12345678910111213141516171819202122 |
- /**
- * @licstart The following is the entire license notice for the
- * Javascript code in this page
- *
- * Copyright 2022 Mozilla Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @licend The above is the entire license notice for the
- * Javascript code in this page
- */
- !function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],r):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=r():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=r()}(this,(function(){return(()=>{var __webpack_modules__=[,(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.UNSUPPORTED_FEATURES=r.TextRenderingMode=r.StreamType=r.RenderingIntentFlag=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.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 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 a=0,i=0;i<r;i++)a+=arrayByteLength(t[i]);for(var o=0,l=new Uint8Array(a),c=0;c<r;c++){var u=t[c];u instanceof Uint8Array||(u="string"==typeof u?stringToBytes(u):new Uint8Array(u));var d=u.byteLength;l.set(u,o);o+=d}return l};r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=function bytesToString(t){"object"===_typeof(t)&&null!==t&&void 0!==t.length||unreachable("Invalid argument for bytesToString");var r=t.length,a=8192;if(r<a)return String.fromCharCode.apply(null,t);for(var i=[],o=0;o<r;o+=a){var l=Math.min(o+a,r),c=t.subarray(o,l);i.push(String.fromCharCode.apply(null,c))}return i.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(a,i){t.resolve=function(t){r=!0;a(t)};t.reject=function(t){r=!0;i(t)}}));return t};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(a&&"string"==typeof t){if(a.addDefaultProtocol&&t.startsWith("www.")){var i=t.match(/\./g);i&&i.length>=2&&(t="http://".concat(t))}if(a.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var o=r?new URL(t,r):new URL(t);if(_isValidProtocol(o))return o}catch(t){}return null};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 o};r.info=function info(t){o>=i.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;for(var a=0,i=t.length;a<i;a++)if(t[a]!==r[a])return!1;return!0};r.isAscii=function isAscii(t){return/^[\x00-\x7F]*$/.test(t)};r.isSameOrigin=function isSameOrigin(t,r){var a;try{if(!(a=new URL(t)).origin||"null"===a.origin)return!1}catch(t){return!1}var i=new URL(r,a);return a.origin===i.origin};r.objectFromMap=function objectFromMap(t){var r,a=Object.create(null),i=function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}(t);try{for(i.s();!(r=i.n()).done;){var o=(u=r.value,d=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(u)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(u,d)||_unsupportedIterableToArray(u,d)||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.")}()),l=o[0],c=o[1];a[l]=c}}catch(t){i.e(t)}finally{i.f()}var u,d;return a};r.objectSize=function objectSize(t){return Object.keys(t).length};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(o=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){if(t[0]>="ï"){var r;"þ"===t[0]&&"ÿ"===t[1]?r="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?r="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(r="utf-8");if(r)try{var a=new TextDecoder(r,{fatal:!0}),i=stringToBytes(t);return a.decode(i)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var o=[],l=0,c=t.length;l<c;l++){var u=A[t.charCodeAt(l)];o.push(u?String.fromCharCode(u):t.charAt(l))}return o.join("")};r.stringToUTF16BEString=function stringToUTF16BEString(t){for(var r=["þÿ"],a=0,i=t.length;a<i;a++){var o=t.charCodeAt(a);r.push(String.fromCharCode(o>>8&255),String.fromCharCode(255&o))}return r.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;a(2);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(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.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return 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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};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",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var i={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=i;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",signatures:"signatures",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",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var o=i.WARNINGS;function warn(t){o>=i.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}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}}function shadow(t,r,a){Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!1});return a}var l=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=l;var c=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,a){var i;_classCallCheck(this,PasswordException);(i=r.call(this,t,"PasswordException")).code=a;return i}return _createClass(PasswordException)}(l);r.PasswordException=c;var u=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,a){var i;_classCallCheck(this,UnknownErrorException);(i=r.call(this,t,"UnknownErrorException")).details=a;return i}return _createClass(UnknownErrorException)}(l);r.UnknownErrorException=u;var d=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(l);r.InvalidPDFException=d;var h=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(l);r.MissingPDFException=h;var p=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,a){var i;_classCallCheck(this,UnexpectedResponseException);(i=r.call(this,t,"UnexpectedResponseException")).status=a;return i}return _createClass(UnexpectedResponseException)}(l);r.UnexpectedResponseException=p;var v=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(l);r.FormatError=v;var y=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(l);r.AbortException=y;function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,a=new Uint8Array(r),i=0;i<r;++i)a[i]=255&t.charCodeAt(i);return a}function arrayByteLength(t){if(void 0!==t.length)return t.length;if(void 0!==t.byteLength)return t.byteLength;unreachable("Invalid argument for arrayByteLength")}var g={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=g;var m={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=m;var _=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),b=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,a){return"#".concat(_[t]).concat(_[r]).concat(_[a])}},{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 a=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])/a,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/a]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var a=Util.applyTransform(t,r),i=Util.applyTransform(t.slice(2,4),r),o=Util.applyTransform([t[0],t[3]],r),l=Util.applyTransform([t[2],t[1]],r);return[Math.min(a[0],i[0],o[0],l[0]),Math.min(a[1],i[1],o[1],l[1]),Math.max(a[0],i[0],o[0],l[0]),Math.max(a[1],i[1],o[1],l[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]],a=t[0]*r[0]+t[1]*r[2],i=t[0]*r[1]+t[1]*r[3],o=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],c=(a+l)/2,u=Math.sqrt(Math.pow(a+l,2)-4*(a*l-o*i))/2,d=c+u||1,h=c-u||1;return[Math.sqrt(d),Math.sqrt(h)]}},{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 a=[t[0],t[2],r[0],r[2]].sort(compare),i=[t[1],t[3],r[1],r[3]].sort(compare),o=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]))return null;o[0]=a[1];o[2]=a[2];if(!(i[0]===t[1]&&i[1]===r[1]||i[0]===r[1]&&i[1]===t[1]))return null;o[1]=i[1];o[3]=i[2];return o}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,a,i,o,l,c,u){for(var d,h,p,v,y,g,m,_,b=[],A=[[],[]],S=0;S<2;++S){if(0===S){h=6*t-12*a+6*o;d=-3*t+9*a-9*o+3*c;p=3*a-3*t}else{h=6*r-12*i+6*l;d=-3*r+9*i-9*l+3*u;p=3*i-3*r}if(Math.abs(d)<1e-12){if(Math.abs(h)<1e-12)continue;0<(v=-p/h)&&v<1&&b.push(v)}else{m=h*h-4*p*d;_=Math.sqrt(m);if(!(m<0)){0<(y=(-h+_)/(2*d))&&y<1&&b.push(y);0<(g=(-h-_)/(2*d))&&g<1&&b.push(g)}}}for(var k,x=b.length,C=x;x--;){k=1-(v=b[x]);A[0][x]=k*k*k*t+3*k*k*v*a+3*k*v*v*o+v*v*v*c;A[1][x]=k*k*k*r+3*k*k*v*i+3*k*v*v*l+v*v*v*u}A[0][C]=t;A[1][C]=r;A[0][C+1]=c;A[1][C+1]=u;A[0].length=A[1].length=C+2;return[Math.min.apply(Math,_toConsumableArray(A[0])),Math.min.apply(Math,_toConsumableArray(A[1])),Math.max.apply(Math,_toConsumableArray(A[0])),Math.max.apply(Math,_toConsumableArray(A[1]))]}}]);return Util}();r.Util=b;var A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToUTF8String(t){return decodeURIComponent(escape(t))}},(t,r,a)=>{"use strict";var i=a(3);if(!globalThis._pdfjsCompatibilityChecked){globalThis._pdfjsCompatibilityChecked=!0;!function checkNodeBtoa(){!globalThis.btoa&&i.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&i.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkDOMMatrix(){!globalThis.DOMMatrix&&i.isNodeJS&&(globalThis.DOMMatrix=a(4))}();!function checkPromise(){globalThis.Promise.allSettled||(globalThis.Promise=a(5))}();!function checkReadableStream(){!globalThis.ReadableStream&&i.isNodeJS&&(globalThis.ReadableStream=require("web-streams-polyfill/dist/ponyfill.js").ReadableStream)}();!function checkStructuredClone(){globalThis.structuredClone||a(129)}()}},(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(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var a=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=a},(t,r,a)=>{"use strict";var i,o,l;function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}l=function(){function fromArray(r){var a=new t,i=Array.from(r);if(!i.every((function(t){return!Number.isNaN(t)})))throw TypeError('CSSMatrix: "'+r+'" must only have numbers.');if(16===i.length){var o=i[0],l=i[1],c=i[2],u=i[3],d=i[4],h=i[5],p=i[6],v=i[7],y=i[8],g=i[9],m=i[10],_=i[11],b=i[12],A=i[13],S=i[14],k=i[15];a.m11=o;a.a=o;a.m21=d;a.c=d;a.m31=y;a.m41=b;a.e=b;a.m12=l;a.b=l;a.m22=h;a.d=h;a.m32=g;a.m42=A;a.f=A;a.m13=c;a.m23=p;a.m33=m;a.m43=S;a.m14=u;a.m24=v;a.m34=_;a.m44=k}else{if(6!==i.length)throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");var x=i[0],C=i[1],P=i[2],w=i[3],T=i[4],R=i[5];a.m11=x;a.a=x;a.m12=C;a.b=C;a.m21=P;a.c=P;a.m22=w;a.d=w;a.m41=T;a.e=T;a.m42=R;a.f=R}return a}function fromMatrix(r){var a=Object.keys(new t);if("object"===_typeof(r)&&a.every((function(t){return t in r})))return fromArray([r.m11,r.m12,r.m13,r.m14,r.m21,r.m22,r.m23,r.m24,r.m31,r.m32,r.m33,r.m34,r.m41,r.m42,r.m43,r.m44]);throw TypeError('CSSMatrix: "'+r+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function fromString(r){if("string"!=typeof r)throw TypeError('CSSMatrix: "'+r+'" is not a string.');var a=String(r).replace(/\s/g,""),i=new t,o='CSSMatrix: invalid transform string "'+r+'"';a.split(")").filter((function(t){return t})).forEach((function(t){var r=t.split("("),a=r[0],l=r[1];if(!l)throw TypeError(o);var c=l.split(",").map((function(t){return t.includes("rad")?parseFloat(t)*(180/Math.PI):parseFloat(t)})),u=c[0],d=c[1],h=c[2],p=c[3],v=[u,d,h],y=[u,d,h,p];if("perspective"===a&&u&&[d,h].every((function(t){return void 0===t})))i.m34=-1/u;else if(a.includes("matrix")&&[6,16].includes(c.length)&&c.every((function(t){return!Number.isNaN(+t)}))){var g=c.map((function(t){return Math.abs(t)<1e-6?0:t}));i=i.multiply(fromArray(g))}else if("translate3d"===a&&v.every((function(t){return!Number.isNaN(+t)})))i=i.translate(u,d,h);else if("translate"===a&&u&&void 0===h)i=i.translate(u,d||0,0);else if("rotate3d"===a&&y.every((function(t){return!Number.isNaN(+t)}))&&p)i=i.rotateAxisAngle(u,d,h,p);else if("rotate"===a&&u&&[d,h].every((function(t){return void 0===t})))i=i.rotate(0,0,u);else if("scale3d"===a&&v.every((function(t){return!Number.isNaN(+t)}))&&v.some((function(t){return 1!==t})))i=i.scale(u,d,h);else if("scale"!==a||Number.isNaN(u)||1===u||void 0!==h)if("skew"===a&&u&&void 0===h){i=i.skewX(u);i=d?i.skewY(d):i}else{if(!(/[XYZ]/.test(a)&&u&&[d,h].every((function(t){return void 0===t}))&&["translate","rotate","scale","skew"].some((function(t){return a.includes(t)}))))throw TypeError(o);if(["skewX","skewY"].includes(a))i=i[a](u);else{var m=a.replace(/[XYZ]/,""),_=a.replace(m,""),b=["X","Y","Z"].indexOf(_),A=[0===b?u:0,1===b?u:0,2===b?u:0];i=i[m].apply(i,A)}}else{var S=Number.isNaN(+d)?u:d;i=i.scale(u,S,1)}}));return i}function Translate(r,a,i){var o=new t;o.m41=r;o.e=r;o.m42=a;o.f=a;o.m43=i;return o}function Rotate(r,a,i){var o=new t,l=Math.PI/180,c=r*l,u=a*l,d=i*l,h=Math.cos(c),p=-Math.sin(c),v=Math.cos(u),y=-Math.sin(u),g=Math.cos(d),m=-Math.sin(d),_=v*g,b=-v*m;o.m11=_;o.a=_;o.m12=b;o.b=b;o.m13=y;var A=p*y*g+h*m;o.m21=A;o.c=A;var S=h*g-p*y*m;o.m22=S;o.d=S;o.m23=-p*v;o.m31=p*m-h*y*g;o.m32=p*g+h*y*m;o.m33=h*v;return o}function RotateAxisAngle(r,a,i,o){var l=new t,c=o*(Math.PI/360),u=Math.sin(c),d=Math.cos(c),h=u*u,p=Math.sqrt(r*r+a*a+i*i),v=r,y=a,g=i;if(0===p){v=0;y=0;g=1}else{v/=p;y/=p;g/=p}var m=v*v,_=y*y,b=g*g,A=1-2*(_+b)*h;l.m11=A;l.a=A;var S=2*(v*y*h+g*u*d);l.m12=S;l.b=S;l.m13=2*(v*g*h-y*u*d);var k=2*(y*v*h-g*u*d);l.m21=k;l.c=k;var x=1-2*(b+m)*h;l.m22=x;l.d=x;l.m23=2*(y*g*h+v*u*d);l.m31=2*(g*v*h+y*u*d);l.m32=2*(g*y*h-v*u*d);l.m33=1-2*(m+_)*h;return l}function Scale(r,a,i){var o=new t;o.m11=r;o.a=r;o.m22=a;o.d=a;o.m33=i;return o}function SkewX(r){var a=new t,i=r*Math.PI/180,o=Math.tan(i);a.m21=o;a.c=o;return a}function SkewY(r){var a=new t,i=r*Math.PI/180,o=Math.tan(i);a.m12=o;a.b=o;return a}function Multiply(t,r){return fromArray([r.m11*t.m11+r.m12*t.m21+r.m13*t.m31+r.m14*t.m41,r.m11*t.m12+r.m12*t.m22+r.m13*t.m32+r.m14*t.m42,r.m11*t.m13+r.m12*t.m23+r.m13*t.m33+r.m14*t.m43,r.m11*t.m14+r.m12*t.m24+r.m13*t.m34+r.m14*t.m44,r.m21*t.m11+r.m22*t.m21+r.m23*t.m31+r.m24*t.m41,r.m21*t.m12+r.m22*t.m22+r.m23*t.m32+r.m24*t.m42,r.m21*t.m13+r.m22*t.m23+r.m23*t.m33+r.m24*t.m43,r.m21*t.m14+r.m22*t.m24+r.m23*t.m34+r.m24*t.m44,r.m31*t.m11+r.m32*t.m21+r.m33*t.m31+r.m34*t.m41,r.m31*t.m12+r.m32*t.m22+r.m33*t.m32+r.m34*t.m42,r.m31*t.m13+r.m32*t.m23+r.m33*t.m33+r.m34*t.m43,r.m31*t.m14+r.m32*t.m24+r.m33*t.m34+r.m34*t.m44,r.m41*t.m11+r.m42*t.m21+r.m43*t.m31+r.m44*t.m41,r.m41*t.m12+r.m42*t.m22+r.m43*t.m32+r.m44*t.m42,r.m41*t.m13+r.m42*t.m23+r.m43*t.m33+r.m44*t.m43,r.m41*t.m14+r.m42*t.m24+r.m43*t.m34+r.m44*t.m44])}var t=function CSSMatrix(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var a=this;a.a=1;a.b=0;a.c=0;a.d=1;a.e=0;a.f=0;a.m11=1;a.m12=0;a.m13=0;a.m14=0;a.m21=0;a.m22=1;a.m23=0;a.m24=0;a.m31=0;a.m32=0;a.m33=1;a.m34=0;a.m41=0;a.m42=0;a.m43=0;a.m44=1;if(t&&t.length){var i=[16,6].some((function(r){return r===t.length}))?t:t[0];return a.setMatrixValue(i)}return a},r={isIdentity:{configurable:!0},is2D:{configurable:!0}};r.isIdentity.set=function(t){this.isIdentity=t};r.isIdentity.get=function(){var t=this;return 1===t.m11&&0===t.m12&&0===t.m13&&0===t.m14&&0===t.m21&&1===t.m22&&0===t.m23&&0===t.m24&&0===t.m31&&0===t.m32&&1===t.m33&&0===t.m34&&0===t.m41&&0===t.m42&&0===t.m43&&1===t.m44};r.is2D.get=function(){var t=this;return 0===t.m31&&0===t.m32&&1===t.m33&&0===t.m34&&0===t.m43&&1===t.m44};r.is2D.set=function(t){this.is2D=t};t.prototype.setMatrixValue=function setMatrixValue(t){return[Array,Float64Array,Float32Array].some((function(r){return t instanceof r}))?fromArray(t):"string"==typeof t&&t.length&&"none"!==t?fromString(t):"object"===_typeof(t)?fromMatrix(t):this};t.prototype.toArray=function toArray(){var t=this,r=Math.pow(10,6);return(t.is2D?[t.a,t.b,t.c,t.d,t.e,t.f]:[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44]).map((function(t){return Math.abs(t)<1e-6?0:(t*r>>0)/r}))};t.prototype.toString=function toString(){var t=this.toArray();return(this.is2D?"matrix":"matrix3d")+"("+t+")"};t.prototype.toJSON=function toJSON(){var t=this,r=t.is2D,a=t.isIdentity;return Object.assign({},t,{is2D:r,isIdentity:a})};t.prototype.multiply=function multiply(t){return Multiply(this,t)};t.prototype.translate=function translate(t,r,a){var i=r,o=a;void 0===o&&(o=0);void 0===i&&(i=0);return Multiply(this,Translate(t,i,o))};t.prototype.scale=function scale(t,r,a){var i=r,o=a;void 0===i&&(i=t);void 0===o&&(o=1);return Multiply(this,Scale(t,i,o))};t.prototype.rotate=function rotate(t,r,a){var i=t,o=r,l=a;void 0===o&&(o=0);if(void 0===l){l=i;i=0}return Multiply(this,Rotate(i,o,l))};t.prototype.rotateAxisAngle=function rotateAxisAngle(t,r,a,i){if([t,r,a,i].some((function(t){return Number.isNaN(t)})))throw new TypeError("CSSMatrix: expecting 4 values");return Multiply(this,RotateAxisAngle(t,r,a,i))};t.prototype.skewX=function skewX(t){return Multiply(this,SkewX(t))};t.prototype.skewY=function skewY(t){return Multiply(this,SkewY(t))};t.prototype.transformPoint=function transformPoint(t){var r=Translate(t.x,t.y,t.z);r.m44=t.w||1;return{x:(r=this.multiply(r)).m41,y:r.m42,z:r.m43,w:r.m44}};t.prototype.transform=function transform(t){var r=this,a=r.m11*t.x+r.m12*t.y+r.m13*t.z+r.m14*t.w,i=r.m21*t.x+r.m22*t.y+r.m23*t.z+r.m24*t.w,o=r.m31*t.x+r.m32*t.y+r.m33*t.z+r.m34*t.w,l=r.m41*t.x+r.m42*t.y+r.m43*t.z+r.m44*t.w;return{x:a/l,y:i/l,z:o/l,w:l}};Object.defineProperties(t.prototype,r);Object.assign(t,{Translate:Translate,Rotate:Rotate,RotateAxisAngle:RotateAxisAngle,Scale:Scale,SkewX:SkewX,SkewY:SkewY,Multiply:Multiply,fromArray:fromArray,fromMatrix:fromMatrix,fromString:fromString});Object.assign(t,{Version:"0.0.24"});return t},"object"===_typeof(r)?t.exports=l():void 0!==(o="function"==typeof(i=l)?i.call(r,a,r,t):i)&&(t.exports=o)},(t,r,a)=>{a(6);a(91);a(97);a(99);a(123);a(124);a(125);a(126);var i=a(128);t.exports=i.Promise},(t,r,a)=>{"use strict";var i=a(7),o=a(8),l=a(27),c=a(69),u=a(71),d=a(57),h=a(73),p=a(46),v=a(15),y=a(77),g=a(78),m=a(79),_=a(88),b=a(36),A=a(90),S=b("toStringTag"),k=o.Error,x=[].push,C=function AggregateError(t,r){var a,i=arguments.length>2?arguments[2]:void 0,o=l(P,this);if(u)a=u(new k,o?c(this):P);else{a=o?this:h(P);p(a,S,"Error")}void 0!==r&&p(a,"message",_(r));A&&p(a,"stack",y(a.stack,1));g(a,i);var d=[];m(t,x,{that:d});p(a,"errors",d);return a};u?u(C,k):d(C,k,{name:!0});var P=C.prototype=h(k.prototype,{constructor:v(1,C),message:v(1,""),name:v(1,"AggregateError")});i({global:!0},{AggregateError:C})},(t,r,a)=>{var i=a(8),o=a(9).f,l=a(46),c=a(50),u=a(40),d=a(57),h=a(68);t.exports=function(t,r){var a,p,v,y,g,m=t.target,_=t.global,b=t.stat;if(a=_?i:b?i[m]||u(m,{}):(i[m]||{}).prototype)for(p in r){y=r[p];v=t.noTargetGet?(g=o(a,p))&&g.value:a[p];if(!h(_?p:m+(b?".":"#")+p,t.forced)&&void 0!==v){if(typeof y==typeof v)continue;d(y,v)}(t.sham||v&&v.sham)&&l(y,"sham",!0);c(a,p,y,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,a)=>{var i=a(10),o=a(12),l=a(14),c=a(15),u=a(16),d=a(21),h=a(41),p=a(44),v=Object.getOwnPropertyDescriptor;r.f=i?v:function getOwnPropertyDescriptor(t,r){t=u(t);r=d(r);if(p)try{return v(t,r)}catch(t){}if(h(t,r))return c(!o(l.f,t,r),t[r])}},(t,r,a)=>{var i=a(11);t.exports=!i((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,a)=>{var i=a(13),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},(t,r,a)=>{var i=a(11);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},(t,r)=>{"use strict";var a={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!a.call({1:2},1);r.f=o?function propertyIsEnumerable(t){var r=i(this,t);return!!r&&r.enumerable}:a},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,a)=>{var i=a(17),o=a(20);t.exports=function(t){return i(o(t))}},(t,r,a)=>{var i=a(8),o=a(18),l=a(11),c=a(19),u=i.Object,d=o("".split);t.exports=l((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==c(t)?d(t,""):u(t)}:u},(t,r,a)=>{var i=a(13),o=Function.prototype,l=o.bind,c=o.call,u=i&&l.bind(c,c);t.exports=i?function(t){return t&&u(t)}:function(t){return t&&function(){return c.apply(t,arguments)}}},(t,r,a)=>{var i=a(18),o=i({}.toString),l=i("".slice);t.exports=function(t){return l(o(t),8,-1)}},(t,r,a)=>{var i=a(8).TypeError;t.exports=function(t){if(null==t)throw i("Can't call method on "+t);return t}},(t,r,a)=>{var i=a(22),o=a(25);t.exports=function(t){var r=i(t,"string");return o(r)?r:r+""}},(t,r,a)=>{var i=a(8),o=a(12),l=a(23),c=a(25),u=a(32),d=a(35),h=a(36),p=i.TypeError,v=h("toPrimitive");t.exports=function(t,r){if(!l(t)||c(t))return t;var a,i=u(t,v);if(i){void 0===r&&(r="default");a=o(i,t,r);if(!l(a)||c(a))return a;throw p("Can't convert object to primitive value")}void 0===r&&(r="number");return d(t,r)}},(t,r,a)=>{var i=a(24);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},t=>{t.exports=function(t){return"function"==typeof t}},(t,r,a)=>{var i=a(8),o=a(26),l=a(24),c=a(27),u=a(28),d=i.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var r=o("Symbol");return l(r)&&c(r.prototype,d(t))}},(t,r,a)=>{var i=a(8),o=a(24),aFunction=function(t){return o(t)?t:void 0};t.exports=function(t,r){return arguments.length<2?aFunction(i[t]):i[t]&&i[t][r]}},(t,r,a)=>{var i=a(18);t.exports=i({}.isPrototypeOf)},(t,r,a)=>{var i=a(29);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,a)=>{var i=a(30),o=a(11);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},(t,r,a)=>{var i,o,l=a(8),c=a(31),u=l.process,d=l.Deno,h=u&&u.versions||d&&d.version,p=h&&h.v8;p&&(o=(i=p.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1]));!o&&c&&(!(i=c.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=c.match(/Chrome\/(\d+)/))&&(o=+i[1]);t.exports=o},(t,r,a)=>{var i=a(26);t.exports=i("navigator","userAgent")||""},(t,r,a)=>{var i=a(33);t.exports=function(t,r){var a=t[r];return null==a?void 0:i(a)}},(t,r,a)=>{var i=a(8),o=a(24),l=a(34),c=i.TypeError;t.exports=function(t){if(o(t))return t;throw c(l(t)+" is not a function")}},(t,r,a)=>{var i=a(8).String;t.exports=function(t){try{return i(t)}catch(t){return"Object"}}},(t,r,a)=>{var i=a(8),o=a(12),l=a(24),c=a(23),u=i.TypeError;t.exports=function(t,r){var a,i;if("string"===r&&l(a=t.toString)&&!c(i=o(a,t)))return i;if(l(a=t.valueOf)&&!c(i=o(a,t)))return i;if("string"!==r&&l(a=t.toString)&&!c(i=o(a,t)))return i;throw u("Can't convert object to primitive value")}},(t,r,a)=>{var i=a(8),o=a(37),l=a(41),c=a(43),u=a(29),d=a(28),h=o("wks"),p=i.Symbol,v=p&&p.for,y=d?p:p&&p.withoutSetter||c;t.exports=function(t){if(!l(h,t)||!u&&"string"!=typeof h[t]){var r="Symbol."+t;u&&l(p,t)?h[t]=p[t]:h[t]=d&&v?v(r):y(r)}return h[t]}},(t,r,a)=>{var i=a(38),o=a(39);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.21.1",mode:i?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,a)=>{var i=a(8),o=a(40),l="__core-js_shared__",c=i[l]||o(l,{});t.exports=c},(t,r,a)=>{var i=a(8),o=Object.defineProperty;t.exports=function(t,r){try{o(i,t,{value:r,configurable:!0,writable:!0})}catch(a){i[t]=r}return r}},(t,r,a)=>{var i=a(18),o=a(42),l=i({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return l(o(t),r)}},(t,r,a)=>{var i=a(8),o=a(20),l=i.Object;t.exports=function(t){return l(o(t))}},(t,r,a)=>{var i=a(18),o=0,l=Math.random(),c=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++o+l,36)}},(t,r,a)=>{var i=a(10),o=a(11),l=a(45);t.exports=!i&&!o((function(){return 7!=Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},(t,r,a)=>{var i=a(8),o=a(23),l=i.document,c=o(l)&&o(l.createElement);t.exports=function(t){return c?l.createElement(t):{}}},(t,r,a)=>{var i=a(10),o=a(47),l=a(15);t.exports=i?function(t,r,a){return o.f(t,r,l(1,a))}:function(t,r,a){t[r]=a;return t}},(t,r,a)=>{var i=a(8),o=a(10),l=a(44),c=a(48),u=a(49),d=a(21),h=i.TypeError,p=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y="enumerable",g="configurable",m="writable";r.f=o?c?function defineProperty(t,r,a){u(t);r=d(r);u(a);if("function"==typeof t&&"prototype"===r&&"value"in a&&m in a&&!a.writable){var i=v(t,r);if(i&&i.writable){t[r]=a.value;a={configurable:g in a?a.configurable:i.configurable,enumerable:y in a?a.enumerable:i.enumerable,writable:!1}}}return p(t,r,a)}:p:function defineProperty(t,r,a){u(t);r=d(r);u(a);if(l)try{return p(t,r,a)}catch(t){}if("get"in a||"set"in a)throw h("Accessors not supported");"value"in a&&(t[r]=a.value);return t}},(t,r,a)=>{var i=a(10),o=a(11);t.exports=i&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,a)=>{var i=a(8),o=a(23),l=i.String,c=i.TypeError;t.exports=function(t){if(o(t))return t;throw c(l(t)+" is not an object")}},(t,r,a)=>{var i=a(8),o=a(24),l=a(41),c=a(46),u=a(40),d=a(51),h=a(52),p=a(56).CONFIGURABLE,v=h.get,y=h.enforce,g=String(String).split("String");(t.exports=function(t,r,a,d){var h,v=!!d&&!!d.unsafe,m=!!d&&!!d.enumerable,_=!!d&&!!d.noTargetGet,b=d&&void 0!==d.name?d.name:r;if(o(a)){"Symbol("===String(b).slice(0,7)&&(b="["+String(b).replace(/^Symbol\(([^)]*)\)/,"$1")+"]");(!l(a,"name")||p&&a.name!==b)&&c(a,"name",b);(h=y(a)).source||(h.source=g.join("string"==typeof b?b:""))}if(t!==i){v?!_&&t[r]&&(m=!0):delete t[r];m?t[r]=a:c(t,r,a)}else m?t[r]=a:u(r,a)})(Function.prototype,"toString",(function toString(){return o(this)&&v(this).source||d(this)}))},(t,r,a)=>{var i=a(18),o=a(24),l=a(39),c=i(Function.toString);o(l.inspectSource)||(l.inspectSource=function(t){return c(t)});t.exports=l.inspectSource},(t,r,a)=>{var i,o,l,c=a(53),u=a(8),d=a(18),h=a(23),p=a(46),v=a(41),y=a(39),g=a(54),m=a(55),_="Object already initialized",b=u.TypeError,A=u.WeakMap;if(c||y.state){var S=y.state||(y.state=new A),k=d(S.get),x=d(S.has),C=d(S.set);i=function(t,r){if(x(S,t))throw new b(_);r.facade=t;C(S,t,r);return r};o=function(t){return k(S,t)||{}};l=function(t){return x(S,t)}}else{var P=g("state");m[P]=!0;i=function(t,r){if(v(t,P))throw new b(_);r.facade=t;p(t,P,r);return r};o=function(t){return v(t,P)?t[P]:{}};l=function(t){return v(t,P)}}t.exports={set:i,get:o,has:l,enforce:function(t){return l(t)?o(t):i(t,{})},getterFor:function(t){return function(r){var a;if(!h(r)||(a=o(r)).type!==t)throw b("Incompatible receiver, "+t+" required");return a}}}},(t,r,a)=>{var i=a(8),o=a(24),l=a(51),c=i.WeakMap;t.exports=o(c)&&/native code/.test(l(c))},(t,r,a)=>{var i=a(37),o=a(43),l=i("keys");t.exports=function(t){return l[t]||(l[t]=o(t))}},t=>{t.exports={}},(t,r,a)=>{var i=a(10),o=a(41),l=Function.prototype,c=i&&Object.getOwnPropertyDescriptor,u=o(l,"name"),d=u&&"something"===function something(){}.name,h=u&&(!i||i&&c(l,"name").configurable);t.exports={EXISTS:u,PROPER:d,CONFIGURABLE:h}},(t,r,a)=>{var i=a(41),o=a(58),l=a(9),c=a(47);t.exports=function(t,r,a){for(var u=o(r),d=c.f,h=l.f,p=0;p<u.length;p++){var v=u[p];i(t,v)||a&&i(a,v)||d(t,v,h(r,v))}}},(t,r,a)=>{var i=a(26),o=a(18),l=a(59),c=a(67),u=a(49),d=o([].concat);t.exports=i("Reflect","ownKeys")||function ownKeys(t){var r=l.f(u(t)),a=c.f;return a?d(r,a(t)):r}},(t,r,a)=>{var i=a(60),o=a(66).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return i(t,o)}},(t,r,a)=>{var i=a(18),o=a(41),l=a(16),c=a(61).indexOf,u=a(55),d=i([].push);t.exports=function(t,r){var a,i=l(t),h=0,p=[];for(a in i)!o(u,a)&&o(i,a)&&d(p,a);for(;r.length>h;)o(i,a=r[h++])&&(~c(p,a)||d(p,a));return p}},(t,r,a)=>{var i=a(16),o=a(62),l=a(64),createMethod=function(t){return function(r,a,c){var u,d=i(r),h=l(d),p=o(c,h);if(t&&a!=a){for(;h>p;)if((u=d[p++])!=u)return!0}else for(;h>p;p++)if((t||p in d)&&d[p]===a)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,a)=>{var i=a(63),o=Math.max,l=Math.min;t.exports=function(t,r){var a=i(t);return a<0?o(a+r,0):l(a,r)}},t=>{var r=Math.ceil,a=Math.floor;t.exports=function(t){var i=+t;return i!=i||0===i?0:(i>0?a:r)(i)}},(t,r,a)=>{var i=a(65);t.exports=function(t){return i(t.length)}},(t,r,a)=>{var i=a(63),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,a)=>{var i=a(11),o=a(24),l=/#|\.prototype\./,isForced=function(t,r){var a=u[c(t)];return a==h||a!=d&&(o(r)?i(r):!!r)},c=isForced.normalize=function(t){return String(t).replace(l,".").toLowerCase()},u=isForced.data={},d=isForced.NATIVE="N",h=isForced.POLYFILL="P";t.exports=isForced},(t,r,a)=>{var i=a(8),o=a(41),l=a(24),c=a(42),u=a(54),d=a(70),h=u("IE_PROTO"),p=i.Object,v=p.prototype;t.exports=d?p.getPrototypeOf:function(t){var r=c(t);if(o(r,h))return r[h];var a=r.constructor;return l(a)&&r instanceof a?a.prototype:r instanceof p?v:null}},(t,r,a)=>{var i=a(11);t.exports=!i((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,a)=>{var i=a(18),o=a(49),l=a(72);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,a={};try{(t=i(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(a,[]);r=a instanceof Array}catch(t){}return function setPrototypeOf(a,i){o(a);l(i);r?t(a,i):a.__proto__=i;return a}}():void 0)},(t,r,a)=>{var i=a(8),o=a(24),l=i.String,c=i.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw c("Can't set "+l(t)+" as a prototype")}},(t,r,a)=>{var i,o=a(49),l=a(74),c=a(66),u=a(55),d=a(76),h=a(45),p=a(54),v=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&i?NullProtoObjectViaActiveX(i):function(){var t,r=h("iframe");r.style.display="none";d.appendChild(r);r.src=String("javascript:");(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(i);for(var t=c.length;t--;)delete NullProtoObject.prototype[c[t]];return NullProtoObject()};u[v]=!0;t.exports=Object.create||function create(t,r){var a;if(null!==t){EmptyConstructor.prototype=o(t);a=new EmptyConstructor;EmptyConstructor.prototype=null;a[v]=t}else a=NullProtoObject();return void 0===r?a:l.f(a,r)}},(t,r,a)=>{var i=a(10),o=a(48),l=a(47),c=a(49),u=a(16),d=a(75);r.f=i&&!o?Object.defineProperties:function defineProperties(t,r){c(t);for(var a,i=u(r),o=d(r),h=o.length,p=0;h>p;)l.f(t,a=o[p++],i[a]);return t}},(t,r,a)=>{var i=a(60),o=a(66);t.exports=Object.keys||function keys(t){return i(t,o)}},(t,r,a)=>{var i=a(26);t.exports=i("document","documentElement")},(t,r,a)=>{var i=a(18)("".replace),o=String(Error("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,c=l.test(o);t.exports=function(t,r){if(c&&"string"==typeof t)for(;r--;)t=i(t,l,"");return t}},(t,r,a)=>{var i=a(23),o=a(46);t.exports=function(t,r){i(r)&&"cause"in r&&o(t,"cause",r.cause)}},(t,r,a)=>{var i=a(8),o=a(80),l=a(12),c=a(49),u=a(34),d=a(81),h=a(64),p=a(27),v=a(83),y=a(84),g=a(87),m=i.TypeError,Result=function(t,r){this.stopped=t;this.result=r},_=Result.prototype;t.exports=function(t,r,a){var i,b,A,S,k,x,C,P=a&&a.that,w=!(!a||!a.AS_ENTRIES),T=!(!a||!a.IS_ITERATOR),R=!(!a||!a.INTERRUPTED),E=o(r,P),stop=function(t){i&&g(i,"normal",t);return new Result(!0,t)},callFn=function(t){if(w){c(t);return R?E(t[0],t[1],stop):E(t[0],t[1])}return R?E(t,stop):E(t)};if(T)i=t;else{if(!(b=y(t)))throw m(u(t)+" is not iterable");if(d(b)){for(A=0,S=h(t);S>A;A++)if((k=callFn(t[A]))&&p(_,k))return k;return new Result(!1)}i=v(t,b)}x=i.next;for(;!(C=l(x,i)).done;){try{k=callFn(C.value)}catch(t){g(i,"throw",t)}if("object"==typeof k&&k&&p(_,k))return k}return new Result(!1)}},(t,r,a)=>{var i=a(18),o=a(33),l=a(13),c=i(i.bind);t.exports=function(t,r){o(t);return void 0===r?t:l?c(t,r):function(){return t.apply(r,arguments)}}},(t,r,a)=>{var i=a(36),o=a(82),l=i("iterator"),c=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||c[l]===t)}},t=>{t.exports={}},(t,r,a)=>{var i=a(8),o=a(12),l=a(33),c=a(49),u=a(34),d=a(84),h=i.TypeError;t.exports=function(t,r){var a=arguments.length<2?d(t):r;if(l(a))return c(o(a,t));throw h(u(t)+" is not iterable")}},(t,r,a)=>{var i=a(85),o=a(32),l=a(82),c=a(36)("iterator");t.exports=function(t){if(null!=t)return o(t,c)||o(t,"@@iterator")||l[i(t)]}},(t,r,a)=>{var i=a(8),o=a(86),l=a(24),c=a(19),u=a(36)("toStringTag"),d=i.Object,h="Arguments"==c(function(){return arguments}());t.exports=o?c:function(t){var r,a,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,r){try{return t[r]}catch(t){}}(r=d(t),u))?a:h?c(r):"Object"==(i=c(r))&&l(r.callee)?"Arguments":i}},(t,r,a)=>{var i={};i[a(36)("toStringTag")]="z";t.exports="[object z]"===String(i)},(t,r,a)=>{var i=a(12),o=a(49),l=a(32);t.exports=function(t,r,a){var c,u;o(t);try{if(!(c=l(t,"return"))){if("throw"===r)throw a;return a}c=i(c,t)}catch(t){u=!0;c=t}if("throw"===r)throw a;if(u)throw c;o(c);return a}},(t,r,a)=>{var i=a(89);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:i(t)}},(t,r,a)=>{var i=a(8),o=a(85),l=i.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return l(t)}},(t,r,a)=>{var i=a(11),o=a(15);t.exports=!i((function(){var t=Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",o(1,7));return 7!==t.stack}))},(t,r,a)=>{"use strict";var i=a(16),o=a(92),l=a(82),c=a(52),u=a(47).f,d=a(93),h=a(38),p=a(10),v="Array Iterator",y=c.set,g=c.getterFor(v);t.exports=d(Array,"Array",(function(t,r){y(this,{type:v,target:i(t),index:0,kind:r})}),(function(){var t=g(this),r=t.target,a=t.kind,i=t.index++;if(!r||i>=r.length){t.target=void 0;return{value:void 0,done:!0}}return"keys"==a?{value:i,done:!1}:"values"==a?{value:r[i],done:!1}:{value:[i,r[i]],done:!1}}),"values");var m=l.Arguments=l.Array;o("keys");o("values");o("entries");if(!h&&p&&"values"!==m.name)try{u(m,"name",{value:"values"})}catch(t){}},(t,r,a)=>{var i=a(36),o=a(73),l=a(47),c=i("unscopables"),u=Array.prototype;null==u[c]&&l.f(u,c,{configurable:!0,value:o(null)});t.exports=function(t){u[c][t]=!0}},(t,r,a)=>{"use strict";var i=a(7),o=a(12),l=a(38),c=a(56),u=a(24),d=a(94),h=a(69),p=a(71),v=a(96),y=a(46),g=a(50),m=a(36),_=a(82),b=a(95),A=c.PROPER,S=c.CONFIGURABLE,k=b.IteratorPrototype,x=b.BUGGY_SAFARI_ITERATORS,C=m("iterator"),P="keys",w="values",T="entries",returnThis=function(){return this};t.exports=function(t,r,a,c,m,b,R){d(a,r,c);var E,O,M,getIterationMethod=function(t){if(t===m&&N)return N;if(!x&&t in L)return L[t];switch(t){case P:return function keys(){return new a(this,t)};case w:return function values(){return new a(this,t)};case T:return function entries(){return new a(this,t)}}return function(){return new a(this)}},I=r+" Iterator",D=!1,L=t.prototype,j=L[C]||L["@@iterator"]||m&&L[m],N=!x&&j||getIterationMethod(m),B="Array"==r&&L.entries||j;if(B&&(E=h(B.call(new t)))!==Object.prototype&&E.next){l||h(E)===k||(p?p(E,k):u(E[C])||g(E,C,returnThis));v(E,I,!0,!0);l&&(_[I]=returnThis)}if(A&&m==w&&j&&j.name!==w)if(!l&&S)y(L,"name",w);else{D=!0;N=function values(){return o(j,this)}}if(m){O={values:getIterationMethod(w),keys:b?N:getIterationMethod(P),entries:getIterationMethod(T)};if(R)for(M in O)(x||D||!(M in L))&&g(L,M,O[M]);else i({target:r,proto:!0,forced:x||D},O)}l&&!R||L[C]===N||g(L,C,N,{name:m});_[r]=N;return O}},(t,r,a)=>{"use strict";var i=a(95).IteratorPrototype,o=a(73),l=a(15),c=a(96),u=a(82),returnThis=function(){return this};t.exports=function(t,r,a,d){var h=r+" Iterator";t.prototype=o(i,{next:l(+!d,a)});c(t,h,!1,!0);u[h]=returnThis;return t}},(t,r,a)=>{"use strict";var i,o,l,c=a(11),u=a(24),d=a(73),h=a(69),p=a(50),v=a(36),y=a(38),g=v("iterator"),m=!1;[].keys&&("next"in(l=[].keys())?(o=h(h(l)))!==Object.prototype&&(i=o):m=!0);null==i||c((function(){var t={};return i[g].call(t)!==t}))?i={}:y&&(i=d(i));u(i[g])||p(i,g,(function(){return this}));t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},(t,r,a)=>{var i=a(47).f,o=a(41),l=a(36)("toStringTag");t.exports=function(t,r,a){t&&!a&&(t=t.prototype);t&&!o(t,l)&&i(t,l,{configurable:!0,value:r})}},(t,r,a)=>{var i=a(86),o=a(50),l=a(98);i||o(Object.prototype,"toString",l,{unsafe:!0})},(t,r,a)=>{"use strict";var i=a(86),o=a(85);t.exports=i?{}.toString:function toString(){return"[object "+o(this)+"]"}},(t,r,a)=>{"use strict";var i,o,l,c,u=a(7),d=a(38),h=a(8),p=a(26),v=a(12),y=a(100),g=a(50),m=a(101),_=a(71),b=a(96),A=a(102),S=a(33),k=a(24),x=a(23),C=a(103),P=a(51),w=a(79),T=a(104),R=a(105),E=a(108).set,O=a(114),M=a(117),I=a(119),D=a(118),L=a(120),j=a(121),N=a(52),B=a(68),G=a(36),U=a(122),W=a(113),H=a(30),q=G("species"),V="Promise",z=N.getterFor(V),X=N.set,Y=N.getterFor(V),K=y&&y.prototype,J=y,Q=K,$=h.TypeError,Z=h.document,ee=h.process,te=D.f,re=te,ne=!!(Z&&Z.createEvent&&h.dispatchEvent),ae=k(h.PromiseRejectionEvent),ie="unhandledrejection",oe=!1,se=B(V,(function(){var t=P(J),r=t!==String(J);if(!r&&66===H)return!0;if(d&&!Q.finally)return!0;if(H>=51&&/native code/.test(t))return!1;var a=new J((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(a.constructor={})[q]=FakePromise;return!(oe=a.then((function(){}))instanceof FakePromise)||!r&&U&&!ae})),le=se||!T((function(t){J.all(t).catch((function(){}))})),isThenable=function(t){var r;return!(!x(t)||!k(r=t.then))&&r},callReaction=function(t,r){var a,i,o,l=r.value,c=1==r.state,u=c?t.ok:t.fail,d=t.resolve,h=t.reject,p=t.domain;try{if(u){if(!c){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===u)a=l;else{p&&p.enter();a=u(l);if(p){p.exit();o=!0}}a===t.promise?h($("Promise-chain cycle")):(i=isThenable(a))?v(i,a,d,h):d(a)}else h(l)}catch(t){p&&!o&&p.exit();h(t)}},notify=function(t,r){if(!t.notified){t.notified=!0;O((function(){for(var a,i=t.reactions;a=i.get();)callReaction(a,t);t.notified=!1;r&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,r,a){var i,o;if(ne){(i=Z.createEvent("Event")).promise=r;i.reason=a;i.initEvent(t,!1,!0);h.dispatchEvent(i)}else i={promise:r,reason:a};!ae&&(o=h["on"+t])?o(i):t===ie&&I("Unhandled promise rejection",a)},onUnhandled=function(t){v(E,h,(function(){var r,a=t.facade,i=t.value;if(isUnhandled(t)){r=L((function(){W?ee.emit("unhandledRejection",i,a):dispatchEvent(ie,a,i)}));t.rejection=W||isUnhandled(t)?2:1;if(r.error)throw r.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){v(E,h,(function(){var r=t.facade;W?ee.emit("rejectionHandled",r):dispatchEvent("rejectionhandled",r,t.value)}))},bind=function(t,r,a){return function(i){t(r,i,a)}},internalReject=function(t,r,a){if(!t.done){t.done=!0;a&&(t=a);t.value=r;t.state=2;notify(t,!0)}},internalResolve=function(t,r,a){if(!t.done){t.done=!0;a&&(t=a);try{if(t.facade===r)throw $("Promise can't be resolved itself");var i=isThenable(r);if(i)O((function(){var a={done:!1};try{v(i,r,bind(internalResolve,a,t),bind(internalReject,a,t))}catch(r){internalReject(a,r,t)}}));else{t.value=r;t.state=1;notify(t,!1)}}catch(r){internalReject({done:!1},r,t)}}};if(se){Q=(J=function Promise(t){C(this,Q);S(t);v(i,this);var r=z(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(i=function Promise(t){X(this,{type:V,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:0,value:void 0})}).prototype=m(Q,{then:function then(t,r){var a=Y(this),i=te(R(this,J));a.parent=!0;i.ok=!k(t)||t;i.fail=k(r)&&r;i.domain=W?ee.domain:void 0;0==a.state?a.reactions.add(i):O((function(){callReaction(i,a)}));return i.promise},catch:function(t){return this.then(void 0,t)}});o=function(){var t=new i,r=z(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};D.f=te=function(t){return t===J||t===l?new o(t):re(t)};if(!d&&k(y)&&K!==Object.prototype){c=K.then;if(!oe){g(K,"then",(function then(t,r){var a=this;return new J((function(t,r){v(c,a,t,r)})).then(t,r)}),{unsafe:!0});g(K,"catch",Q.catch,{unsafe:!0})}try{delete K.constructor}catch(t){}_&&_(K,Q)}}u({global:!0,wrap:!0,forced:se},{Promise:J});b(J,V,!1,!0);A(V);l=p(V);u({target:V,stat:!0,forced:se},{reject:function reject(t){var r=te(this);v(r.reject,void 0,t);return r.promise}});u({target:V,stat:!0,forced:d||se},{resolve:function resolve(t){return M(d&&this===l?J:this,t)}});u({target:V,stat:!0,forced:le},{all:function all(t){var r=this,a=te(r),i=a.resolve,o=a.reject,l=L((function(){var a=S(r.resolve),l=[],c=0,u=1;w(t,(function(t){var d=c++,h=!1;u++;v(a,r,t).then((function(t){if(!h){h=!0;l[d]=t;--u||i(l)}}),o)}));--u||i(l)}));l.error&&o(l.value);return a.promise},race:function race(t){var r=this,a=te(r),i=a.reject,o=L((function(){var o=S(r.resolve);w(t,(function(t){v(o,r,t).then(a.resolve,i)}))}));o.error&&i(o.value);return a.promise}})},(t,r,a)=>{var i=a(8);t.exports=i.Promise},(t,r,a)=>{var i=a(50);t.exports=function(t,r,a){for(var o in r)i(t,o,r[o],a);return t}},(t,r,a)=>{"use strict";var i=a(26),o=a(47),l=a(36),c=a(10),u=l("species");t.exports=function(t){var r=i(t),a=o.f;c&&r&&!r[u]&&a(r,u,{configurable:!0,get:function(){return this}})}},(t,r,a)=>{var i=a(8),o=a(27),l=i.TypeError;t.exports=function(t,r){if(o(r,t))return t;throw l("Incorrect invocation")}},(t,r,a)=>{var i=a(36)("iterator"),o=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){o=!0}};c[i]=function(){return this};Array.from(c,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var a=!1;try{var l={};l[i]=function(){return{next:function(){return{done:a=!0}}}};t(l)}catch(t){}return a}},(t,r,a)=>{var i=a(49),o=a(106),l=a(36)("species");t.exports=function(t,r){var a,c=i(t).constructor;return void 0===c||null==(a=i(c)[l])?r:o(a)}},(t,r,a)=>{var i=a(8),o=a(107),l=a(34),c=i.TypeError;t.exports=function(t){if(o(t))return t;throw c(l(t)+" is not a constructor")}},(t,r,a)=>{var i=a(18),o=a(11),l=a(24),c=a(85),u=a(26),d=a(51),noop=function(){},h=[],p=u("Reflect","construct"),v=/^\s*(?:class|function)\b/,y=i(v.exec),g=!v.exec(noop),m=function isConstructor(t){if(!l(t))return!1;try{p(noop,h,t);return!0}catch(t){return!1}},_=function isConstructor(t){if(!l(t))return!1;switch(c(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!y(v,d(t))}catch(t){return!0}};_.sham=!0;t.exports=!p||o((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?_:m},(t,r,a)=>{var i,o,l,c,u=a(8),d=a(109),h=a(80),p=a(24),v=a(41),y=a(11),g=a(76),m=a(110),_=a(45),b=a(111),A=a(112),S=a(113),k=u.setImmediate,x=u.clearImmediate,C=u.process,P=u.Dispatch,w=u.Function,T=u.MessageChannel,R=u.String,E=0,O={},M="onreadystatechange";try{i=u.location}catch(t){}var run=function(t){if(v(O,t)){var r=O[t];delete O[t];r()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){u.postMessage(R(t),i.protocol+"//"+i.host)};if(!k||!x){k=function setImmediate(t){b(arguments.length,1);var r=p(t)?t:w(t),a=m(arguments,1);O[++E]=function(){d(r,void 0,a)};o(E);return E};x=function clearImmediate(t){delete O[t]};if(S)o=function(t){C.nextTick(runner(t))};else if(P&&P.now)o=function(t){P.now(runner(t))};else if(T&&!A){c=(l=new T).port2;l.port1.onmessage=listener;o=h(c.postMessage,c)}else if(u.addEventListener&&p(u.postMessage)&&!u.importScripts&&i&&"file:"!==i.protocol&&!y(post)){o=post;u.addEventListener("message",listener,!1)}else o=M in _("script")?function(t){g.appendChild(_("script")).onreadystatechange=function(){g.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:k,clear:x}},(t,r,a)=>{var i=a(13),o=Function.prototype,l=o.apply,c=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?c.bind(l):function(){return c.apply(l,arguments)})},(t,r,a)=>{var i=a(18);t.exports=i([].slice)},(t,r,a)=>{var i=a(8).TypeError;t.exports=function(t,r){if(t<r)throw i("Not enough arguments");return t}},(t,r,a)=>{var i=a(31);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},(t,r,a)=>{var i=a(19),o=a(8);t.exports="process"==i(o.process)},(t,r,a)=>{var i,o,l,c,u,d,h,p,v=a(8),y=a(80),g=a(9).f,m=a(108).set,_=a(112),b=a(115),A=a(116),S=a(113),k=v.MutationObserver||v.WebKitMutationObserver,x=v.document,C=v.process,P=v.Promise,w=g(v,"queueMicrotask"),T=w&&w.value;if(!T){i=function(){var t,r;S&&(t=C.domain)&&t.exit();for(;o;){r=o.fn;o=o.next;try{r()}catch(t){o?c():l=void 0;throw t}}l=void 0;t&&t.enter()};if(_||S||A||!k||!x)if(!b&&P&&P.resolve){(h=P.resolve(void 0)).constructor=P;p=y(h.then,h);c=function(){p(i)}}else if(S)c=function(){C.nextTick(i)};else{m=y(m,v);c=function(){m(i)}}else{u=!0;d=x.createTextNode("");new k(i).observe(d,{characterData:!0});c=function(){d.data=u=!u}}}t.exports=T||function(t){var r={fn:t,next:void 0};l&&(l.next=r);if(!o){o=r;c()}l=r}},(t,r,a)=>{var i=a(31),o=a(8);t.exports=/ipad|iphone|ipod/i.test(i)&&void 0!==o.Pebble},(t,r,a)=>{var i=a(31);t.exports=/web0s(?!.*chrome)/i.test(i)},(t,r,a)=>{var i=a(49),o=a(23),l=a(118);t.exports=function(t,r){i(t);if(o(r)&&r.constructor===t)return r;var a=l.f(t);(0,a.resolve)(r);return a.promise}},(t,r,a)=>{"use strict";var i=a(33),PromiseCapability=function(t){var r,a;this.promise=new t((function(t,i){if(void 0!==r||void 0!==a)throw TypeError("Bad Promise constructor");r=t;a=i}));this.resolve=i(r);this.reject=i(a)};t.exports.f=function(t){return new PromiseCapability(t)}},(t,r,a)=>{var i=a(8);t.exports=function(t,r){var a=i.console;a&&a.error&&(1==arguments.length?a.error(t):a.error(t,r))}},t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},t=>{var Queue=function(){this.head=null;this.tail=null};Queue.prototype={add:function(t){var r={item:t,next:null};this.head?this.tail.next=r:this.head=r;this.tail=r},get:function(){var t=this.head;if(t){this.head=t.next;this.tail===t&&(this.tail=null);return t.item}}};t.exports=Queue},t=>{t.exports="object"==typeof window},(t,r,a)=>{"use strict";var i=a(7),o=a(12),l=a(33),c=a(118),u=a(120),d=a(79);i({target:"Promise",stat:!0},{allSettled:function allSettled(t){var r=this,a=c.f(r),i=a.resolve,h=a.reject,p=u((function(){var a=l(r.resolve),c=[],u=0,h=1;d(t,(function(t){var l=u++,d=!1;h++;o(a,r,t).then((function(t){if(!d){d=!0;c[l]={status:"fulfilled",value:t};--h||i(c)}}),(function(t){if(!d){d=!0;c[l]={status:"rejected",reason:t};--h||i(c)}}))}));--h||i(c)}));p.error&&h(p.value);return a.promise}})},(t,r,a)=>{"use strict";var i=a(7),o=a(33),l=a(26),c=a(12),u=a(118),d=a(120),h=a(79),p="No one promise resolved";i({target:"Promise",stat:!0},{any:function any(t){var r=this,a=l("AggregateError"),i=u.f(r),v=i.resolve,y=i.reject,g=d((function(){var i=o(r.resolve),l=[],u=0,d=1,g=!1;h(t,(function(t){var o=u++,h=!1;d++;c(i,r,t).then((function(t){if(!h&&!g){g=!0;v(t)}}),(function(t){if(!h&&!g){h=!0;l[o]=t;--d||y(new a(l,p))}}))}));--d||y(new a(l,p))}));g.error&&y(g.value);return i.promise}})},(t,r,a)=>{"use strict";var i=a(7),o=a(38),l=a(100),c=a(11),u=a(26),d=a(24),h=a(105),p=a(117),v=a(50);i({target:"Promise",proto:!0,real:!0,forced:!!l&&c((function(){l.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=h(this,u("Promise")),a=d(t);return this.then(a?function(a){return p(r,t()).then((function(){return a}))}:t,a?function(a){return p(r,t()).then((function(){throw a}))}:t)}});if(!o&&d(l)){var y=u("Promise").prototype.finally;l.prototype.finally!==y&&v(l.prototype,"finally",y,{unsafe:!0})}},(t,r,a)=>{"use strict";var i=a(127).charAt,o=a(89),l=a(52),c=a(93),u="String Iterator",d=l.set,h=l.getterFor(u);c(String,"String",(function(t){d(this,{type:u,string:o(t),index:0})}),(function next(){var t,r=h(this),a=r.string,o=r.index;if(o>=a.length)return{value:void 0,done:!0};t=i(a,o);r.index+=t.length;return{value:t,done:!1}}))},(t,r,a)=>{var i=a(18),o=a(63),l=a(89),c=a(20),u=i("".charAt),d=i("".charCodeAt),h=i("".slice),createMethod=function(t){return function(r,a){var i,p,v=l(c(r)),y=o(a),g=v.length;return y<0||y>=g?t?"":void 0:(i=d(v,y))<55296||i>56319||y+1===g||(p=d(v,y+1))<56320||p>57343?t?u(v,y):i:t?h(v,y,y+2):p-56320+(i-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},(t,r,a)=>{var i=a(8);t.exports=i},(t,r,a)=>{a(91);a(97);a(130);a(141);a(142);var i=a(128);t.exports=i.structuredClone},(t,r,a)=>{"use strict";a(131)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),a(140))},(t,r,a)=>{"use strict";var i=a(7),o=a(8),l=a(18),c=a(68),u=a(50),d=a(132),h=a(79),p=a(103),v=a(24),y=a(23),g=a(11),m=a(104),_=a(96),b=a(139);t.exports=function(t,r,a){var A=-1!==t.indexOf("Map"),S=-1!==t.indexOf("Weak"),k=A?"set":"add",x=o[t],C=x&&x.prototype,P=x,w={},fixMethod=function(t){var r=l(C[t]);u(C,t,"add"==t?function add(t){r(this,0===t?0:t);return this}:"delete"==t?function(t){return!(S&&!y(t))&&r(this,0===t?0:t)}:"get"==t?function get(t){return S&&!y(t)?void 0:r(this,0===t?0:t)}:"has"==t?function has(t){return!(S&&!y(t))&&r(this,0===t?0:t)}:function set(t,a){r(this,0===t?0:t,a);return this})};if(c(t,!v(x)||!(S||C.forEach&&!g((function(){(new x).entries().next()}))))){P=a.getConstructor(r,t,A,k);d.enable()}else if(c(t,!0)){var T=new P,R=T[k](S?{}:-0,1)!=T,E=g((function(){T.has(1)})),O=m((function(t){new x(t)})),M=!S&&g((function(){for(var t=new x,r=5;r--;)t[k](r,r);return!t.has(-0)}));if(!O){(P=r((function(t,r){p(t,C);var a=b(new x,t,P);null!=r&&h(r,a[k],{that:a,AS_ENTRIES:A});return a}))).prototype=C;C.constructor=P}if(E||M){fixMethod("delete");fixMethod("has");A&&fixMethod("get")}(M||R)&&fixMethod(k);S&&C.clear&&delete C.clear}w[t]=P;i({global:!0,forced:P!=x},w);_(P,t);S||a.setStrong(P,t,A);return P}},(t,r,a)=>{var i=a(7),o=a(18),l=a(55),c=a(23),u=a(41),d=a(47).f,h=a(59),p=a(133),v=a(136),y=a(43),g=a(138),m=!1,_=y("meta"),b=0,setMetadata=function(t){d(t,_,{value:{objectID:"O"+b++,weakData:{}}})},A=t.exports={enable:function(){A.enable=function(){};m=!0;var t=h.f,r=o([].splice),a={};a[_]=1;if(t(a).length){h.f=function(a){for(var i=t(a),o=0,l=i.length;o<l;o++)if(i[o]===_){r(i,o,1);break}return i};i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!c(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,_)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[_].objectID},getWeakData:function(t,r){if(!u(t,_)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[_].weakData},onFreeze:function(t){g&&m&&v(t)&&!u(t,_)&&setMetadata(t);return t}};l[_]=!0},(t,r,a)=>{var i=a(19),o=a(16),l=a(59).f,c=a(134),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return u&&"Window"==i(t)?function(t){try{return l(t)}catch(t){return c(u)}}(t):l(o(t))}},(t,r,a)=>{var i=a(8),o=a(62),l=a(64),c=a(135),u=i.Array,d=Math.max;t.exports=function(t,r,a){for(var i=l(t),h=o(r,i),p=o(void 0===a?i:a,i),v=u(d(p-h,0)),y=0;h<p;h++,y++)c(v,y,t[h]);v.length=y;return v}},(t,r,a)=>{"use strict";var i=a(21),o=a(47),l=a(15);t.exports=function(t,r,a){var c=i(r);c in t?o.f(t,c,l(0,a)):t[c]=a}},(t,r,a)=>{var i=a(11),o=a(23),l=a(19),c=a(137),u=Object.isExtensible,d=i((function(){u(1)}));t.exports=d||c?function isExtensible(t){return!!o(t)&&((!c||"ArrayBuffer"!=l(t))&&(!u||u(t)))}:u},(t,r,a)=>{var i=a(11);t.exports=i((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},(t,r,a)=>{var i=a(11);t.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(t,r,a)=>{var i=a(24),o=a(23),l=a(71);t.exports=function(t,r,a){var c,u;l&&i(c=r.constructor)&&c!==a&&o(u=c.prototype)&&u!==a.prototype&&l(t,u);return t}},(t,r,a)=>{"use strict";var i=a(47).f,o=a(73),l=a(101),c=a(80),u=a(103),d=a(79),h=a(93),p=a(102),v=a(10),y=a(132).fastKey,g=a(52),m=g.set,_=g.getterFor;t.exports={getConstructor:function(t,r,a,h){var p=t((function(t,i){u(t,g);m(t,{type:r,index:o(null),first:void 0,last:void 0,size:0});v||(t.size=0);null!=i&&d(i,t[h],{that:t,AS_ENTRIES:a})})),g=p.prototype,b=_(r),define=function(t,r,a){var i,o,l=b(t),c=getEntry(t,r);if(c)c.value=a;else{l.last=c={index:o=y(r,!0),key:r,value:a,previous:i=l.last,next:void 0,removed:!1};l.first||(l.first=c);i&&(i.next=c);v?l.size++:t.size++;"F"!==o&&(l.index[o]=c)}return t},getEntry=function(t,r){var a,i=b(t),o=y(r);if("F"!==o)return i.index[o];for(a=i.first;a;a=a.next)if(a.key==r)return a};l(g,{clear:function clear(){for(var t=b(this),r=t.index,a=t.first;a;){a.removed=!0;a.previous&&(a.previous=a.previous.next=void 0);delete r[a.index];a=a.next}t.first=t.last=void 0;v?t.size=0:this.size=0},delete:function(t){var r=this,a=b(r),i=getEntry(r,t);if(i){var o=i.next,l=i.previous;delete a.index[i.index];i.removed=!0;l&&(l.next=o);o&&(o.previous=l);a.first==i&&(a.first=o);a.last==i&&(a.last=l);v?a.size--:r.size--}return!!i},forEach:function forEach(t){for(var r,a=b(this),i=c(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:a.first;){i(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});l(g,a?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}});v&&i(g,"size",{get:function(){return b(this).size}});return p},setStrong:function(t,r,a){var i=r+" Iterator",o=_(r),l=_(i);h(t,r,(function(t,r){m(this,{type:i,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=l(this),r=t.kind,a=t.last;a&&a.removed;)a=a.previous;if(!t.target||!(t.last=a=a?a.next:t.state.first)){t.target=void 0;return{value:void 0,done:!0}}return"keys"==r?{value:a.key,done:!1}:"values"==r?{value:a.value,done:!1}:{value:[a.key,a.value],done:!1}}),a?"entries":"values",!a,!0);p(r)}}},(t,r,a)=>{"use strict";a(131)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),a(140))},(t,r,a)=>{var i,o=a(38),l=a(7),c=a(8),u=a(26),d=a(18),h=a(11),p=a(43),v=a(24),y=a(107),g=a(23),m=a(25),_=a(79),b=a(49),A=a(85),S=a(41),k=a(135),x=a(46),C=a(64),P=a(111),w=a(143),T=a(90),R=c.Object,E=c.Date,O=c.Error,M=c.EvalError,I=c.RangeError,D=c.ReferenceError,L=c.SyntaxError,j=c.TypeError,N=c.URIError,B=c.PerformanceMark,G=c.WebAssembly,U=G&&G.CompileError||O,W=G&&G.LinkError||O,H=G&&G.RuntimeError||O,q=u("DOMException"),V=u("Set"),z=u("Map"),X=z.prototype,Y=d(X.has),K=d(X.get),J=d(X.set),Q=d(V.prototype.add),$=u("Object","keys"),Z=d([].push),ee=d((!0).valueOf),te=d(1..valueOf),re=d("".valueOf),ne=d(w),ae=d(E.prototype.getTime),ie=p("structuredClone"),oe="DataCloneError",se="Transferring",checkBasicSemantic=function(t){return!h((function(){var r=new c.Set([7]),a=t(r),i=t(R(7));return a==r||!a.has(7)||"object"!=typeof i||7!=i}))&&t},le=c.structuredClone,ce=o||!(i=le,!h((function(){var t=i(new c.AggregateError([1],ie,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=ie||3!=t.cause}))&&i),ue=!le&&checkBasicSemantic((function(t){return new B(ie,{detail:t}).detail})),de=checkBasicSemantic(le)||ue,throwUncloneable=function(t){throw new q("Uncloneable type: "+t,oe)},throwUnpolyfillable=function(t,r){throw new q((r||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",oe)},structuredCloneInternal=function(t,r){m(t)&&throwUncloneable("Symbol");if(!g(t))return t;if(r){if(Y(r,t))return K(r,t)}else r=new z;var a,i,o,l,d,h,p,_,b,P,w=A(t),B=!1;switch(w){case"Array":o=[];B=!0;break;case"Object":o={};B=!0;break;case"Map":o=new z;B=!0;break;case"Set":o=new V;B=!0;break;case"RegExp":o=new RegExp(t.source,"flags"in t?t.flags:ne(t));break;case"Error":switch(i=t.name){case"AggregateError":o=u("AggregateError")([]);break;case"EvalError":o=M();break;case"RangeError":o=I();break;case"ReferenceError":o=D();break;case"SyntaxError":o=L();break;case"TypeError":o=j();break;case"URIError":o=N();break;case"CompileError":o=U();break;case"LinkError":o=W();break;case"RuntimeError":o=H();break;default:o=O()}B=!0;break;case"DOMException":o=new q(t.message,t.name);B=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":a=c[w];g(a)||throwUnpolyfillable(w);o=new a(structuredCloneInternal(t.buffer,r),t.byteOffset,"DataView"===w?t.byteLength:t.length);break;case"DOMQuad":try{o=new DOMQuad(structuredCloneInternal(t.p1,r),structuredCloneInternal(t.p2,r),structuredCloneInternal(t.p3,r),structuredCloneInternal(t.p4,r))}catch(r){de?o=de(t):throwUnpolyfillable(w)}break;case"FileList":a=c.DataTransfer;if(y(a)){l=new a;for(d=0,h=C(t);d<h;d++)l.items.add(structuredCloneInternal(t[d],r));o=l.files}else de?o=de(t):throwUnpolyfillable(w);break;case"ImageData":try{o=new ImageData(structuredCloneInternal(t.data,r),t.width,t.height,{colorSpace:t.colorSpace})}catch(r){de?o=de(t):throwUnpolyfillable(w)}break;default:if(de)o=de(t);else switch(w){case"BigInt":o=R(t.valueOf());break;case"Boolean":o=R(ee(t));break;case"Number":o=R(te(t));break;case"String":o=R(re(t));break;case"Date":o=new E(ae(t));break;case"ArrayBuffer":(a=c.DataView)||"function"==typeof t.slice||throwUnpolyfillable(w);try{if("function"==typeof t.slice)o=t.slice(0);else{h=t.byteLength;o=new ArrayBuffer(h);b=new a(t);P=new a(o);for(d=0;d<h;d++)P.setUint8(d,b.getUint8(d))}}catch(t){throw new q("ArrayBuffer is detached",oe)}break;case"SharedArrayBuffer":o=t;break;case"Blob":try{o=t.slice(0,t.size,t.type)}catch(t){throwUnpolyfillable(w)}break;case"DOMPoint":case"DOMPointReadOnly":a=c[w];try{o=a.fromPoint?a.fromPoint(t):new a(t.x,t.y,t.z,t.w)}catch(t){throwUnpolyfillable(w)}break;case"DOMRect":case"DOMRectReadOnly":a=c[w];try{o=a.fromRect?a.fromRect(t):new a(t.x,t.y,t.width,t.height)}catch(t){throwUnpolyfillable(w)}break;case"DOMMatrix":case"DOMMatrixReadOnly":a=c[w];try{o=a.fromMatrix?a.fromMatrix(t):new a(t)}catch(t){throwUnpolyfillable(w)}break;case"AudioData":case"VideoFrame":v(t.clone)||throwUnpolyfillable(w);try{o=t.clone()}catch(t){throwUncloneable(w)}break;case"File":try{o=new File([t],t.name,t)}catch(t){throwUnpolyfillable(w)}break;case"CryptoKey":case"GPUCompilationMessage":case"GPUCompilationInfo":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":throwUnpolyfillable(w);default:throwUncloneable(w)}}J(r,t,o);if(B)switch(w){case"Array":case"Object":p=$(t);for(d=0,h=C(p);d<h;d++){_=p[d];k(o,_,structuredCloneInternal(t[_],r))}break;case"Map":t.forEach((function(t,a){J(o,structuredCloneInternal(a,r),structuredCloneInternal(t,r))}));break;case"Set":t.forEach((function(t){Q(o,structuredCloneInternal(t,r))}));break;case"Error":x(o,"message",structuredCloneInternal(t.message,r));S(t,"cause")&&x(o,"cause",structuredCloneInternal(t.cause,r));"AggregateError"==i&&(o.errors=structuredCloneInternal(t.errors,r));case"DOMException":T&&x(o,"stack",structuredCloneInternal(t.stack,r))}return o},fe=le&&!h((function(){var t=new ArrayBuffer(8),r=le(t,{transfer:[t]});return 0!=t.byteLength||8!=r.byteLength})),tryToTransfer=function(t,r){if(!g(t))throw j("Transfer option cannot be converted to a sequence");var a=[];_(t,(function(t){Z(a,b(t))}));var i,o,l,u,d,h,p=0,m=C(a);if(fe){u=le(a,{transfer:a});for(;p<m;)J(r,a[p],u[p++])}else for(;p<m;){i=a[p++];if(Y(r,i))throw new q("Duplicate transferable",oe);switch(o=A(i)){case"ImageBitmap":l=c.OffscreenCanvas;y(l)||throwUnpolyfillable(o,se);try{(h=new l(i.width,i.height)).getContext("bitmaprenderer").transferFromImageBitmap(i);d=h.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":v(i.clone)&&v(i.close)||throwUnpolyfillable(o,se);try{d=i.clone();i.close()}catch(t){}break;case"ArrayBuffer":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":throwUnpolyfillable(o,se)}if(void 0===d)throw new q("This object cannot be transferred: "+o,oe);J(r,i,d)}};l({global:!0,enumerable:!0,sham:!fe,forced:ce},{structuredClone:function structuredClone(t){var r,a=P(arguments.length,1)>1?b(arguments[1]):void 0,i=a?a.transfer:void 0;if(void 0!==i){r=new z;tryToTransfer(i,r)}return structuredCloneInternal(t,r)}})},(t,r,a)=>{"use strict";var i=a(49);t.exports=function(){var t=i(this),r="";t.global&&(r+="g");t.ignoreCase&&(r+="i");t.multiline&&(r+="m");t.dotAll&&(r+="s");t.unicode&&(r+="u");t.sticky&&(r+="y");return r}},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.build=exports.RenderTask=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0;exports.getDocument=getDocument;exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory;exports.version=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(145)),_util=__w_pdfjs_require__(1),_display_utils=__w_pdfjs_require__(147),_font_loader=__w_pdfjs_require__(149),_node_utils=__w_pdfjs_require__(150),_annotation_storage=__w_pdfjs_require__(151),_canvas=__w_pdfjs_require__(152),_worker_options=__w_pdfjs_require__(154),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(155),_metadata=__w_pdfjs_require__(156),_optional_content_config=__w_pdfjs_require__(157),_transport_stream=__w_pdfjs_require__(158),_xfa_text=__w_pdfjs_require__(159);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateMethodGet(t,r,a){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return a}function _classPrivateFieldInitSpec(t,r,a){_checkPrivateRedeclaration(t,r);r.set(t,a)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,a){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}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.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}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 _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DefaultCanvasFactory=_is_node.isNodeJS?_node_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_is_node.isNodeJS?_node_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultStandardFontDataFactory=_is_node.isNodeJS?_node_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function setPDFNetworkStreamFactory(t){createPDFNetworkStream=t}function getDocument(t){var r,a=new PDFDocumentLoadingTask;if("string"==typeof t||t instanceof URL)r={url:t};else if((0,_util.isArrayBuffer)(t))r={data:t};else if(t instanceof PDFDataRangeTransport)r={range:t};else{if("object"!==_typeof(t))throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");r=t}var i=Object.create(null),o=null,l=null;for(var c in r){var u=r[c];switch(c){case"url":if("undefined"!=typeof window)try{i[c]=new URL(u,window.location).href;continue}catch(t){(0,_util.warn)('Cannot create valid URL: "'.concat(t,'".'))}else if("string"==typeof u||u instanceof URL){i[c]=u.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":o=u;continue;case"worker":l=u;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&u instanceof Buffer)i[c]=new Uint8Array(u);else{if(u instanceof Uint8Array)break;if("string"==typeof u)i[c]=(0,_util.stringToBytes)(u);else if("object"!==_typeof(u)||null===u||isNaN(u.length)){if(!(0,_util.isArrayBuffer)(u))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");i[c]=new Uint8Array(u)}else i[c]=new Uint8Array(u)}continue}i[c]=u}i.rangeChunkSize=i.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE;i.CMapReaderFactory=i.CMapReaderFactory||DefaultCMapReaderFactory;i.StandardFontDataFactory=i.StandardFontDataFactory||DefaultStandardFontDataFactory;i.ignoreErrors=!0!==i.stopAtErrors;i.fontExtraProperties=!0===i.fontExtraProperties;i.pdfBug=!0===i.pdfBug;i.enableXfa=!0===i.enableXfa;("string"!=typeof i.docBaseUrl||(0,_display_utils.isDataScheme)(i.docBaseUrl))&&(i.docBaseUrl=null);Number.isInteger(i.maxImageSize)||(i.maxImageSize=-1);"boolean"!=typeof i.useWorkerFetch&&(i.useWorkerFetch=i.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&i.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory);"boolean"!=typeof i.isEvalSupported&&(i.isEvalSupported=!0);"boolean"!=typeof i.disableFontFace&&(i.disableFontFace=_is_node.isNodeJS);"boolean"!=typeof i.useSystemFonts&&(i.useSystemFonts=!_is_node.isNodeJS&&!i.disableFontFace);void 0===i.ownerDocument&&(i.ownerDocument=globalThis.document);"boolean"!=typeof i.disableRange&&(i.disableRange=!1);"boolean"!=typeof i.disableStream&&(i.disableStream=!1);"boolean"!=typeof i.disableAutoFetch&&(i.disableAutoFetch=!1);(0,_util.setVerbosityLevel)(i.verbosity);if(!l){var d={verbosity:i.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};l=d.port?PDFWorker.fromPort(d):new PDFWorker(d);a._worker=l}var h=a.docId;l.promise.then((function(){if(a.destroyed)throw new Error("Loading aborted");var t=_fetchDocument(l,i,o,h),r=new Promise((function(t){var r;o?r=new _transport_stream.PDFDataTransportStream({length:i.length,initialData:i.initialData,progressiveDone:i.progressiveDone,contentDispositionFilename:i.contentDispositionFilename,disableRange:i.disableRange,disableStream:i.disableStream},o):i.data||(r=createPDFNetworkStream({url:i.url,length:i.length,httpHeaders:i.httpHeaders,withCredentials:i.withCredentials,rangeChunkSize:i.rangeChunkSize,disableRange:i.disableRange,disableStream:i.disableStream}));t(r)}));return Promise.all([t,r]).then((function(t){var r=_slicedToArray(t,2),o=r[0],c=r[1];if(a.destroyed)throw new Error("Loading aborted");var u=new _message_handler.MessageHandler(h,o,l.port),d=new WorkerTransport(u,a,c,i);a._transport=d;u.send("Ready",null)}))})).catch(a._capability.reject);return a}function _fetchDocument(t,r,a,i){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regenerator.default.mark((function _callee7(t,r,a,i){var o;return _regenerator.default.wrap((function _callee7$(l){for(;;)switch(l.prev=l.next){case 0:if(!t.destroyed){l.next=2;break}throw new Error("Worker was destroyed");case 2:if(a){r.length=a.length;r.initialData=a.initialData;r.progressiveDone=a.progressiveDone;r.contentDispositionFilename=a.contentDispositionFilename}l.next=5;return t.messageHandler.sendWithPromise("GetDocRequest",{docId:i,apiVersion:"2.13.216",source:{data:r.data,url:r.url,password:r.password,disableAutoFetch:r.disableAutoFetch,rangeChunkSize:r.rangeChunkSize,length:r.length},maxImageSize:r.maxImageSize,disableFontFace:r.disableFontFace,docBaseUrl:r.docBaseUrl,ignoreErrors:r.ignoreErrors,isEvalSupported:r.isEvalSupported,fontExtraProperties:r.fontExtraProperties,enableXfa:r.enableXfa,useSystemFonts:r.useSystemFonts,cMapUrl:r.useWorkerFetch?r.cMapUrl:null,standardFontDataUrl:r.useWorkerFetch?r.standardFontDataUrl:null});case 5:o=l.sent;if(!t.destroyed){l.next=8;break}throw new Error("Worker was destroyed");case 8:return l.abrupt("return",o);case 9:case"end":return l.stop()}}),_callee7)})))).apply(this,arguments)}var PDFDocumentLoadingTask=function(){function PDFDocumentLoadingTask(){_classCallCheck(this,PDFDocumentLoadingTask);this._capability=(0,_util.createPromiseCapability)();this._transport=null;this._worker=null;this.docId="d".concat(PDFDocumentLoadingTask.idCounters.doc++);this.destroyed=!1;this.onPassword=null;this.onProgress=null;this.onUnsupportedFeature=null}_createClass(PDFDocumentLoadingTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"destroy",value:(t=_asyncToGenerator(_regenerator.default.mark((function _callee(){var t;return _regenerator.default.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:this.destroyed=!0;r.next=3;return null===(t=this._transport)||void 0===t?void 0:t.destroy();case 3:this._transport=null;if(this._worker){this._worker.destroy();this._worker=null}case 5:case"end":return r.stop()}}),_callee,this)}))),function destroy(){return t.apply(this,arguments)})}],[{key:"idCounters",get:function get(){return(0,_util.shadow)(this,"idCounters",{doc:0})}}]);var t;return PDFDocumentLoadingTask}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function PDFDataRangeTransport(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,PDFDataRangeTransport);this.length=t;this.initialData=r;this.progressiveDone=a;this.contentDispositionFilename=i;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=(0,_util.createPromiseCapability)()}_createClass(PDFDataRangeTransport,[{key:"addRangeListener",value:function addRangeListener(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function addProgressListener(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function onDataRange(t,r){var a,i=_createForOfIteratorHelper(this._rangeListeners);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t,r)}}catch(t){i.e(t)}finally{i.f()}}},{key:"onDataProgress",value:function onDataProgress(t,r){var a=this;this._readyCapability.promise.then((function(){var i,o=_createForOfIteratorHelper(a._progressListeners);try{for(o.s();!(i=o.n()).done;){(0,i.value)(t,r)}}catch(t){o.e(t)}finally{o.f()}}))}},{key:"onDataProgressiveRead",value:function onDataProgressiveRead(t){var r=this;this._readyCapability.promise.then((function(){var a,i=_createForOfIteratorHelper(r._progressiveReadListeners);try{for(i.s();!(a=i.n()).done;){(0,a.value)(t)}}catch(t){i.e(t)}finally{i.f()}}))}},{key:"onDataProgressiveDone",value:function onDataProgressiveDone(){var t=this;this._readyCapability.promise.then((function(){var r,a=_createForOfIteratorHelper(t._progressiveDoneListeners);try{for(a.s();!(r=a.n()).done;){(0,r.value)()}}catch(t){a.e(t)}finally{a.f()}}))}},{key:"transportReady",value:function transportReady(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function requestDataRange(t,r){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function abort(){}}]);return PDFDataRangeTransport}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function PDFDocumentProxy(t,r){var a,i=this;_classCallCheck(this,PDFDocumentProxy);this._pdfInfo=t;this._transport=r;Object.defineProperty(this,"fingerprint",{get:function get(){(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead.");return this.fingerprints[0]}});Object.defineProperty(this,"getStats",{value:(a=_asyncToGenerator(_regenerator.default.mark((function _callee2(){return _regenerator.default.wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead.");return t.abrupt("return",i.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return t.stop()}}),_callee2)}))),function value(){return a.apply(this,arguments)})})}_createClass(PDFDocumentProxy,[{key:"annotationStorage",get:function get(){return this._transport.annotationStorage}},{key:"numPages",get:function get(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function get(){return this._pdfInfo.fingerprints}},{key:"stats",get:function get(){return this._transport.stats}},{key:"isPureXfa",get:function get(){return!!this._transport._htmlForXfa}},{key:"allXfaHtml",get:function get(){return this._transport._htmlForXfa}},{key:"getPage",value:function getPage(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function getPageIndex(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function getDestinations(){return this._transport.getDestinations()}},{key:"getDestination",value:function getDestination(t){return this._transport.getDestination(t)}},{key:"getPageLabels",value:function getPageLabels(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function getPageLayout(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function getPageMode(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function getOpenAction(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function getAttachments(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function getJavaScript(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function getJSActions(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function getOutline(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function getPermissions(){return this._transport.getPermissions()}},{key:"getMetadata",value:function getMetadata(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function getMarkInfo(){return this._transport.getMarkInfo()}},{key:"getData",value:function getData(){return this._transport.getData()}},{key:"getDownloadInfo",value:function getDownloadInfo(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function destroy(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function get(){return this._transport.loadingParams}},{key:"loadingTask",get:function get(){return this._transport.loadingTask}},{key:"saveDocument",value:function saveDocument(){this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");return this._transport.saveDocument()}},{key:"getFieldObjects",value:function getFieldObjects(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function hasJSActions(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}]);return PDFDocumentProxy}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function PDFPageProxy(t,r,a,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,PDFPageProxy);this._pageIndex=t;this._pageInfo=r;this._ownerDocument=i;this._transport=a;this._stats=o?new _display_utils.StatTimer:null;this._pdfBug=o;this.commonObjs=a.commonObjs;this.objs=new PDFObjects;this.cleanupAfterRender=!1;this.pendingCleanup=!1;this._intentStates=new Map;this._annotationPromises=new Map;this.destroyed=!1}_createClass(PDFPageProxy,[{key:"pageNumber",get:function get(){return this._pageIndex+1}},{key:"rotate",get:function get(){return this._pageInfo.rotate}},{key:"ref",get:function get(){return this._pageInfo.ref}},{key:"userUnit",get:function get(){return this._pageInfo.userUnit}},{key:"view",get:function get(){return this._pageInfo.view}},{key:"getViewport",value:function getViewport(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=t.rotation,i=void 0===a?this.rotate:a,o=t.offsetX,l=void 0===o?0:o,c=t.offsetY,u=void 0===c?0:c,d=t.dontFlip,h=void 0!==d&&d;return new _display_utils.PageViewport({viewBox:this.view,scale:r,rotation:i,offsetX:l,offsetY:u,dontFlip:h})}},{key:"getAnnotations",value:function getAnnotations(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.intent,a=void 0===r?"display":r,i=this._transport.getRenderingIntent(a),o=this._annotationPromises.get(i.cacheKey);if(!o){o=this._transport.getAnnotations(this._pageIndex,i.renderingIntent);this._annotationPromises.set(i.cacheKey,o);o=o.then((function(t){var r,a=_createForOfIteratorHelper(t);try{var i=function _loop(){var t=r.value;void 0!==t.titleObj&&Object.defineProperty(t,"title",{get:function get(){(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead.");return t.titleObj.str}});void 0!==t.contentsObj&&Object.defineProperty(t,"contents",{get:function get(){(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead.");return t.contentsObj.str}})};for(a.s();!(r=a.n()).done;)i()}catch(t){a.e(t)}finally{a.f()}return t}))}return o}},{key:"getJSActions",value:function getJSActions(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:(t=_asyncToGenerator(_regenerator.default.mark((function _callee3(){var t;return _regenerator.default.wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return r.stop()}}),_callee3,this)}))),function getXfa(){return t.apply(this,arguments)})},{key:"render",value:function render(t){var r,a,i,o=this,l=t.canvasContext,c=t.viewport,u=t.intent,d=void 0===u?"display":u,h=t.annotationMode,p=void 0===h?_util.AnnotationMode.ENABLE:h,v=t.transform,y=void 0===v?null:v,g=t.imageLayer,m=void 0===g?null:g,_=t.canvasFactory,b=void 0===_?null:_,A=t.background,S=void 0===A?null:A,k=t.optionalContentConfigPromise,x=void 0===k?null:k,C=t.annotationCanvasMap,P=void 0===C?null:C;if(void 0!==(null===(r=arguments[0])||void 0===r?void 0:r.renderInteractiveForms)){(0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead.");!0===arguments[0].renderInteractiveForms&&p===_util.AnnotationMode.ENABLE&&(p=_util.AnnotationMode.ENABLE_FORMS)}if(void 0!==(null===(a=arguments[0])||void 0===a?void 0:a.includeAnnotationStorage)){(0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead.");!0===arguments[0].includeAnnotationStorage&&p===_util.AnnotationMode.ENABLE&&(p=_util.AnnotationMode.ENABLE_STORAGE)}this._stats&&this._stats.time("Overall");var w=this._transport.getRenderingIntent(d,p);this.pendingCleanup=!1;x||(x=this._transport.getOptionalContentConfig());var T=this._intentStates.get(w.cacheKey);if(!T){T=Object.create(null);this._intentStates.set(w.cacheKey,T)}if(T.streamReaderCancelTimeout){clearTimeout(T.streamReaderCancelTimeout);T.streamReaderCancelTimeout=null}var R=b||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),E=!!(w.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!T.displayReadyCapability){T.displayReadyCapability=(0,_util.createPromiseCapability)();T.operatorList={fnArray:[],argsArray:[],lastChunk:!1};this._stats&&this._stats.time("Page Request");this._pumpOperatorList(w)}var O=function complete(t){T.renderTasks.delete(M);(o.cleanupAfterRender||E)&&(o.pendingCleanup=!0);o._tryCleanup();if(t){M.capability.reject(t);o._abortOperatorList({intentState:T,reason:t instanceof Error?t:new Error(t)})}else M.capability.resolve();if(o._stats){o._stats.timeEnd("Rendering");o._stats.timeEnd("Overall")}},M=new InternalRenderTask({callback:O,params:{canvasContext:l,viewport:c,transform:y,imageLayer:m,background:S},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:P,operatorList:T.operatorList,pageIndex:this._pageIndex,canvasFactory:R,useRequestAnimationFrame:!E,pdfBug:this._pdfBug});((i=T).renderTasks||(i.renderTasks=new Set)).add(M);var I=M.task;Promise.all([T.displayReadyCapability.promise,x]).then((function(t){var r=_slicedToArray(t,2),a=r[0],i=r[1];if(o.pendingCleanup)O();else{o._stats&&o._stats.time("Rendering");M.initializeGraphics({transparency:a,optionalContentConfig:i});M.operatorListChanged()}})).catch(O);return I}},{key:"getOperatorList",value:function getOperatorList(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.intent,a=void 0===r?"display":r,i=t.annotationMode,o=void 0===i?_util.AnnotationMode.ENABLE:i;function operatorListChanged(){if(u.operatorList.lastChunk){u.opListReadCapability.resolve(u.operatorList);u.renderTasks.delete(l)}}var l,c=this._transport.getRenderingIntent(a,o,!0),u=this._intentStates.get(c.cacheKey);if(!u){u=Object.create(null);this._intentStates.set(c.cacheKey,u)}if(!u.opListReadCapability){var d;(l=Object.create(null)).operatorListChanged=operatorListChanged;u.opListReadCapability=(0,_util.createPromiseCapability)();((d=u).renderTasks||(d.renderTasks=new Set)).add(l);u.operatorList={fnArray:[],argsArray:[],lastChunk:!1};this._stats&&this._stats.time("Page Request");this._pumpOperatorList(c)}return u.opListReadCapability.promise}},{key:"streamTextContent",value:function streamTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.disableCombineTextItems,a=void 0!==r&&r,i=t.includeMarkedContent,o=void 0!==i&&i,l=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==a,includeMarkedContent:!0===o},{highWaterMark:l,size:function size(t){return t.items.length}})}},{key:"getTextContent",value:function getTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(t){return _xfa_text.XfaText.textContent(t)}));var r=this.streamTextContent(t);return new Promise((function(t,a){var i=r.getReader(),o={items:[],styles:Object.create(null)};!function pump(){i.read().then((function(r){var a,i=r.value;if(r.done)t(o);else{Object.assign(o.styles,i.styles);(a=o.items).push.apply(a,_toConsumableArray(i.items));pump()}}),a)}()}))}},{key:"getStructTree",value:function getStructTree(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function _destroy(){this.destroyed=!0;var t,r=[],a=_createForOfIteratorHelper(this._intentStates.values());try{for(a.s();!(t=a.n()).done;){var i=t.value;this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0});if(!i.opListReadCapability){var o,l=_createForOfIteratorHelper(i.renderTasks);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.push(c.completed);c.cancel()}}catch(t){l.e(t)}finally{l.f()}}}}catch(t){a.e(t)}finally{a.f()}this.objs.clear();this._annotationPromises.clear();this._jsActionsPromise=null;this._structTreePromise=null;this.pendingCleanup=!1;return Promise.all(r)}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.pendingCleanup=!0;return this._tryCleanup(t)}},{key:"_tryCleanup",value:function _tryCleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var r,a=_createForOfIteratorHelper(this._intentStates.values());try{for(a.s();!(r=a.n()).done;){var i=r.value,o=i.renderTasks,l=i.operatorList;if(o.size>0||!l.lastChunk)return!1}}catch(t){a.e(t)}finally{a.f()}this._intentStates.clear();this.objs.clear();this._annotationPromises.clear();this._jsActionsPromise=null;this._structTreePromise=null;t&&this._stats&&(this._stats=new _display_utils.StatTimer);this.pendingCleanup=!1;return!0}},{key:"_startRenderPage",value:function _startRenderPage(t,r){var a=this._intentStates.get(r);if(a){this._stats&&this._stats.timeEnd("Page Request");a.displayReadyCapability&&a.displayReadyCapability.resolve(t)}}},{key:"_renderPageChunk",value:function _renderPageChunk(t,r){for(var a=0,i=t.length;a<i;a++){r.operatorList.fnArray.push(t.fnArray[a]);r.operatorList.argsArray.push(t.argsArray[a])}r.operatorList.lastChunk=t.lastChunk;var o,l=_createForOfIteratorHelper(r.renderTasks);try{for(l.s();!(o=l.n()).done;){o.value.operatorListChanged()}}catch(t){l.e(t)}finally{l.f()}t.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function _pumpOperatorList(t){var r=this,a=t.renderingIntent,i=t.cacheKey,o=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:a,cacheKey:i,annotationStorage:a&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}).getReader(),l=this._intentStates.get(i);l.streamReader=o;!function pump(){o.read().then((function(t){var a=t.value;if(t.done)l.streamReader=null;else if(!r._transport.destroyed){r._renderPageChunk(a,l);pump()}}),(function(t){l.streamReader=null;if(!r._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;var a,i=_createForOfIteratorHelper(l.renderTasks);try{for(i.s();!(a=i.n()).done;){a.value.operatorListChanged()}}catch(t){i.e(t)}finally{i.f()}r._tryCleanup()}if(l.displayReadyCapability)l.displayReadyCapability.reject(t);else{if(!l.opListReadCapability)throw t;l.opListReadCapability.reject(t)}}}))}()}},{key:"_abortOperatorList",value:function _abortOperatorList(t){var r=this,a=t.intentState,i=t.reason,o=t.force,l=void 0!==o&&o;if(a.streamReader){if(!l){if(a.renderTasks.size>0)return;if(i instanceof _display_utils.RenderingCancelledException){a.streamReaderCancelTimeout=setTimeout((function(){r._abortOperatorList({intentState:a,reason:i,force:!0});a.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT);return}}a.streamReader.cancel(new _util.AbortException(i.message)).catch((function(){}));a.streamReader=null;if(!this._transport.destroyed){var c,u=_createForOfIteratorHelper(this._intentStates);try{for(u.s();!(c=u.n()).done;){var d=_slicedToArray(c.value,2),h=d[0];if(d[1]===a){this._intentStates.delete(h);break}}}catch(t){u.e(t)}finally{u.f()}this.cleanup()}}}},{key:"stats",get:function get(){return this._stats}}]);var t;return PDFPageProxy}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function LoopbackPort(){_classCallCheck(this,LoopbackPort);this._listeners=[];this._deferred=Promise.resolve()}_createClass(LoopbackPort,[{key:"postMessage",value:function postMessage(t,r){var a=this,i={data:r?structuredClone(t,r):structuredClone(t)};this._deferred.then((function(){var t,r=_createForOfIteratorHelper(a._listeners);try{for(r.s();!(t=r.n()).done;){t.value.call(a,i)}}catch(t){r.e(t)}finally{r.f()}}))}},{key:"addEventListener",value:function addEventListener(t,r){this._listeners.push(r)}},{key:"removeEventListener",value:function removeEventListener(t,r){var a=this._listeners.indexOf(r);this._listeners.splice(a,1)}},{key:"terminate",value:function terminate(){this._listeners.length=0}}]);return LoopbackPort}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(_is_node.isNodeJS&&"function"==typeof require){PDFWorkerUtil.isWorkerDisabled=!0;PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js"}else if("object"===("undefined"==typeof document?"undefined":_typeof(document))){var _document,_document$currentScri,pdfjsFilePath=null===(_document=document)||void 0===_document||null===(_document$currentScri=_document.currentScript)||void 0===_document$currentScri?void 0:_document$currentScri.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.createCDNWrapper=function(t){var r='importScripts("'.concat(t,'");');return URL.createObjectURL(new Blob([r]))};var PDFWorker=function(){function PDFWorker(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,a=void 0===r?null:r,i=t.port,o=void 0===i?null:i,l=t.verbosity,c=void 0===l?(0,_util.getVerbosityLevel)():l;_classCallCheck(this,PDFWorker);if(o&&PDFWorker._workerPorts.has(o))throw new Error("Cannot use more than one PDFWorker per port.");this.name=a;this.destroyed=!1;this.verbosity=c;this._readyCapability=(0,_util.createPromiseCapability)();this._port=null;this._webWorker=null;this._messageHandler=null;if(o){PDFWorker._workerPorts.set(o,this);this._initializeFromPort(o)}else this._initialize()}_createClass(PDFWorker,[{key:"promise",get:function get(){return this._readyCapability.promise}},{key:"port",get:function get(){return this._port}},{key:"messageHandler",get:function get(){return this._messageHandler}},{key:"_initializeFromPort",value:function _initializeFromPort(t){this._port=t;this._messageHandler=new _message_handler.MessageHandler("main","worker",t);this._messageHandler.on("ready",(function(){}));this._readyCapability.resolve()}},{key:"_initialize",value:function _initialize(){var t=this;if("undefined"!=typeof Worker&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var r=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,r)||(r=PDFWorkerUtil.createCDNWrapper(new URL(r,window.location).href));var a=new Worker(r),i=new _message_handler.MessageHandler("main","worker",a),o=function terminateEarly(){a.removeEventListener("error",l);i.destroy();a.terminate();t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},l=function onWorkerError(){t._webWorker||o()};a.addEventListener("error",l);i.on("test",(function(r){a.removeEventListener("error",l);if(t.destroyed)o();else if(r){t._messageHandler=i;t._port=a;t._webWorker=a;t._readyCapability.resolve();i.send("configure",{verbosity:t.verbosity})}else{t._setupFakeWorker();i.destroy();a.terminate()}}));i.on("ready",(function(r){a.removeEventListener("error",l);if(t.destroyed)o();else try{c()}catch(r){t._setupFakeWorker()}}));var c=function sendTest(){var t=new Uint8Array([255]);try{i.send("test",t,[t.buffer])}catch(r){(0,_util.warn)("Cannot use postMessage transfers.");t[0]=0;i.send("test",t)}};c();return}catch(t){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function _setupFakeWorker(){var t=this;if(!PDFWorkerUtil.isWorkerDisabled){(0,_util.warn)("Setting up fake worker.");PDFWorkerUtil.isWorkerDisabled=!0}PDFWorker._setupFakeWorkerGlobal.then((function(r){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var a=new LoopbackPort;t._port=a;var i="fake".concat(PDFWorkerUtil.fakeWorkerId++),o=new _message_handler.MessageHandler(i+"_worker",i,a);r.setup(o,a);var l=new _message_handler.MessageHandler(i,i+"_worker",a);t._messageHandler=l;t._readyCapability.resolve();l.send("configure",{verbosity:t.verbosity})}})).catch((function(r){t._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(r.message,'".')))}))}},{key:"destroy",value:function destroy(){this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}PDFWorker._workerPorts.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}}],[{key:"_workerPorts",get:function get(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}},{key:"fromPort",value:function fromPort(t){if(null==t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(t.port)?this._workerPorts.get(t.port):new PDFWorker(t)}},{key:"workerSrc",get:function get(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc){_is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.');return PDFWorkerUtil.fallbackWorkerSrc}throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function get(){try{var t;return(null===(t=globalThis.pdfjsWorker)||void 0===t?void 0:t.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regenerator.default.mark((function _callee4(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap((function _callee4$(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler;if(!mainWorkerMessageHandler){_context4.next=3;break}return _context4.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS||"function"!=typeof require){_context4.next=6;break}worker=eval("require")(_this11.workerSrc);return _context4.abrupt("return",worker.WorkerMessageHandler);case 6:_context4.next=8;return(0,_display_utils.loadScript)(_this11.workerSrc);case 8:return _context4.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context4.stop()}}),_callee4)})));return function loader(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]);return PDFWorker}();exports.PDFWorker=PDFWorker;PDFWorker.getWorkerSrc=function(){(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead.");return this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap,WorkerTransport=function(){function WorkerTransport(t,r,a,i){_classCallCheck(this,WorkerTransport);_classPrivateFieldInitSpec(this,_docStats,{writable:!0,value:null});_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_metadataPromise,{writable:!0,value:null});this.messageHandler=t;this.loadingTask=r;this.commonObjs=new PDFObjects;this.fontLoader=new _font_loader.FontLoader({docId:r.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:i.ownerDocument,styleElement:i.styleElement});this._params=i;if(!i.useWorkerFetch){this.CMapReaderFactory=new i.CMapReaderFactory({baseUrl:i.cMapUrl,isCompressed:i.cMapPacked});this.StandardFontDataFactory=new i.StandardFontDataFactory({baseUrl:i.standardFontDataUrl})}this.destroyed=!1;this.destroyCapability=null;this._passwordCapability=null;this._networkStream=a;this._fullReader=null;this._lastProgress=null;this.downloadInfoCapability=(0,_util.createPromiseCapability)();this.setupMessageHandler()}_createClass(WorkerTransport,[{key:"annotationStorage",get:function get(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"stats",get:function get(){return _classPrivateFieldGet(this,_docStats)}},{key:"getRenderingIntent",value:function getRenderingIntent(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=_util.RenderingIntentFlag.DISPLAY,o="";switch(t){case"any":i=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":i=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(t))}switch(r){case _util.AnnotationMode.DISABLE:i+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:i+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:i+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE;o=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(r))}a&&(i+=_util.RenderingIntentFlag.OPLIST);return{renderingIntent:i,cacheKey:"".concat(i,"_").concat(o)}}},{key:"destroy",value:function destroy(){var t=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=(0,_util.createPromiseCapability)();this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var r,a=[],i=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(i.s();!(r=i.n()).done;){var o=r.value;a.push(o._destroy())}}catch(t){i.e(t)}finally{i.f()}_classPrivateFieldGet(this,_pageCache).clear();_classPrivateFieldGet(this,_pagePromises).clear();this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var l=this.messageHandler.sendWithPromise("Terminate",null);a.push(l);Promise.all(a).then((function(){t.commonObjs.clear();t.fontLoader.clear();_classPrivateFieldSet(t,_metadataPromise,null);t._getFieldObjectsPromise=null;t._hasJSActionsPromise=null;t._networkStream&&t._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated."));if(t.messageHandler){t.messageHandler.destroy();t.messageHandler=null}t.destroyCapability.resolve()}),this.destroyCapability.reject);return this.destroyCapability.promise}},{key:"setupMessageHandler",value:function setupMessageHandler(){var t=this,r=this.messageHandler,a=this.loadingTask;r.on("GetReader",(function(r,a){(0,_util.assert)(t._networkStream,"GetReader - no `IPDFStream` instance available.");t._fullReader=t._networkStream.getFullReader();t._fullReader.onProgress=function(r){t._lastProgress={loaded:r.loaded,total:r.total}};a.onPull=function(){t._fullReader.read().then((function(t){var r=t.value;if(t.done)a.close();else{(0,_util.assert)((0,_util.isArrayBuffer)(r),"GetReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){t._fullReader.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}));r.on("ReaderHeadersReady",(function(r){var i=(0,_util.createPromiseCapability)(),o=t._fullReader;o.headersReady.then((function(){if(!o.isStreamingSupported||!o.isRangeSupported){if(t._lastProgress){var r;null===(r=a.onProgress)||void 0===r||r.call(a,t._lastProgress)}o.onProgress=function(t){var r;null===(r=a.onProgress)||void 0===r||r.call(a,{loaded:t.loaded,total:t.total})}}i.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})}),i.reject);return i.promise}));r.on("GetRangeReader",(function(r,a){(0,_util.assert)(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var i=t._networkStream.getRangeReader(r.begin,r.end);if(i){a.onPull=function(){i.read().then((function(t){var r=t.value;if(t.done)a.close();else{(0,_util.assert)((0,_util.isArrayBuffer)(r),"GetRangeReader - expected an ArrayBuffer.");a.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){a.error(t)}))};a.onCancel=function(r){i.cancel(r);a.ready.catch((function(r){if(!t.destroyed)throw r}))}}else a.close()}));r.on("GetDoc",(function(r){var i=r.pdfInfo;t._numPages=i.numPages;t._htmlForXfa=i.htmlForXfa;delete i.htmlForXfa;a._capability.resolve(new PDFDocumentProxy(i,t))}));r.on("DocException",(function(t){var r;switch(t.name){case"PasswordException":r=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":r=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}a._capability.reject(r)}));r.on("PasswordRequest",(function(r){t._passwordCapability=(0,_util.createPromiseCapability)();if(a.onPassword){try{a.onPassword((function updatePassword(r){r instanceof Error?t._passwordCapability.reject(r):t._passwordCapability.resolve({password:r})}),r.code)}catch(r){t._passwordCapability.reject(r)}}else t._passwordCapability.reject(new _util.PasswordException(r.message,r.code));return t._passwordCapability.promise}));r.on("DataLoaded",(function(r){var i;null===(i=a.onProgress)||void 0===i||i.call(a,{loaded:r.length,total:r.length});t.downloadInfoCapability.resolve(r)}));r.on("StartRenderPage",(function(r){if(!t.destroyed){_classPrivateFieldGet(t,_pageCache).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}}));r.on("commonobj",(function(a){var i,o=_slicedToArray(a,3),l=o[0],c=o[1],u=o[2];if(!t.destroyed&&!t.commonObjs.has(l))switch(c){case"Font":var d=t._params;if("error"in u){var h=u.error;(0,_util.warn)("Error during font loading: ".concat(h));t.commonObjs.resolve(l,h);break}var p=null;d.pdfBug&&null!==(i=globalThis.FontInspector)&&void 0!==i&&i.enabled&&(p={registerFont:function registerFont(t,r){globalThis.FontInspector.fontAdded(t,r)}});var v=new _font_loader.FontFaceObject(u,{isEvalSupported:d.isEvalSupported,disableFontFace:d.disableFontFace,ignoreErrors:d.ignoreErrors,onUnsupportedFeature:t._onUnsupportedFeature.bind(t),fontRegistry:p});t.fontLoader.bind(v).catch((function(t){return r.sendWithPromise("FontFallback",{id:l})})).finally((function(){!d.fontExtraProperties&&v.data&&(v.data=null);t.commonObjs.resolve(l,v)}));break;case"FontPath":case"Image":t.commonObjs.resolve(l,u);break;default:throw new Error("Got unknown common object type ".concat(c))}}));r.on("obj",(function(r){var a,i=_slicedToArray(r,4),o=i[0],l=i[1],c=i[2],u=i[3];if(!t.destroyed){var d=_classPrivateFieldGet(t,_pageCache).get(l);if(!d.objs.has(o))switch(c){case"Image":d.objs.resolve(o,u);(null==u||null===(a=u.data)||void 0===a?void 0:a.length)>8e6&&(d.cleanupAfterRender=!0);break;case"Pattern":d.objs.resolve(o,u);break;default:throw new Error("Got unknown object type ".concat(c))}}}));r.on("DocProgress",(function(r){var i;t.destroyed||null===(i=a.onProgress)||void 0===i||i.call(a,{loaded:r.loaded,total:r.total})}));r.on("DocStats",(function(r){t.destroyed||_classPrivateFieldSet(t,_docStats,Object.freeze({streamTypes:Object.freeze(r.streamTypes),fontTypes:Object.freeze(r.fontTypes)}))}));r.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this));r.on("FetchBuiltInCMap",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.CMapReaderFactory?t.CMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}));r.on("FetchStandardFontData",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.StandardFontDataFactory?t.StandardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"_onUnsupportedFeature",value:function _onUnsupportedFeature(t){var r,a,i=t.featureId;this.destroyed||null===(r=(a=this.loadingTask).onUnsupportedFeature)||void 0===r||r.call(a,i)}},{key:"getData",value:function getData(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function getPage(t){var r=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));var a=t-1,i=_classPrivateFieldGet(this,_pagePromises).get(a);if(i)return i;var o=this.messageHandler.sendWithPromise("GetPage",{pageIndex:a}).then((function(t){if(r.destroyed)throw new Error("Transport destroyed");var i=new PDFPageProxy(a,t,r,r._params.ownerDocument,r._params.pdfBug);_classPrivateFieldGet(r,_pageCache).set(a,i);return i}));_classPrivateFieldGet(this,_pagePromises).set(a,o);return o}},{key:"getPageIndex",value:function getPageIndex(t){return"object"!==_typeof(t)||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}},{key:"getAnnotations",value:function getAnnotations(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"saveDocument",value:function saveDocument(){var t,r,a=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(t=null===(r=this._fullReader)||void 0===r?void 0:r.filename)&&void 0!==t?t:null}).finally((function(){a.annotationStorage.resetModified()}))}},{key:"getFieldObjects",value:function getFieldObjects(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}},{key:"hasJSActions",value:function hasJSActions(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{key:"getPageLabels",value:function getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(t){return new _optional_content_config.OptionalContentConfig(t)}))}},{key:"getPermissions",value:function getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function getMetadata(){var t=this;return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then((function(r){var a,i,o,l;return{info:r[0],metadata:r[1]?new _metadata.Metadata(r[1]):null,contentDispositionFilename:null!==(a=null===(i=t._fullReader)||void 0===i?void 0:i.filename)&&void 0!==a?a:null,contentLength:null!==(o=null===(l=t._fullReader)||void 0===l?void 0:l.contentLength)&&void 0!==o?o:null}})))}},{key:"getMarkInfo",value:function getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=_asyncToGenerator(_regenerator.default.mark((function _callee5(){var t,r,a,i,o=arguments;return _regenerator.default.wrap((function _callee5$(l){for(;;)switch(l.prev=l.next){case 0:t=o.length>0&&void 0!==o[0]&&o[0];l.next=3;return this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){l.next=5;break}return l.abrupt("return");case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());l.prev=6;r.s();case 8:if((a=r.n()).done){l.next=15;break}if((i=a.value).cleanup()){l.next=13;break}throw new Error("startCleanup: Page ".concat(i.pageNumber," is currently rendering."));case 13:l.next=8;break;case 15:l.next=20;break;case 17:l.prev=17;l.t0=l.catch(6);r.e(l.t0);case 20:l.prev=20;r.f();return l.finish(20);case 23:this.commonObjs.clear();t||this.fontLoader.clear();_classPrivateFieldSet(this,_metadataPromise,null);this._getFieldObjectsPromise=null;this._hasJSActionsPromise=null;case 28:case"end":return l.stop()}}),_callee5,this,[[6,17,20,23]])}))),function startCleanup(){return t.apply(this,arguments)})},{key:"loadingParams",get:function get(){var t=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,enableXfa:t.enableXfa})}}]);var t;return WorkerTransport}(),_objs=new WeakMap,_ensureObj=new WeakSet,PDFObjects=function(){function PDFObjects(){_classCallCheck(this,PDFObjects);_classPrivateMethodInitSpec(this,_ensureObj);_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}_createClass(PDFObjects,[{key:"get",value:function get(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(r){var a=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,t);a.capability.promise.then((function(){return r(a.data)}));return null}var i=_classPrivateFieldGet(this,_objs)[t];if(null==i||!i.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return i.data}},{key:"has",value:function has(t){var r=_classPrivateFieldGet(this,_objs)[t];return(null==r?void 0:r.capability.settled)||!1}},{key:"resolve",value:function resolve(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,t);a.data=r;a.capability.resolve()}},{key:"clear",value:function clear(){_classPrivateFieldSet(this,_objs,Object.create(null))}}]);return PDFObjects}();function _ensureObj2(t){var r=_classPrivateFieldGet(this,_objs)[t];return r||(_classPrivateFieldGet(this,_objs)[t]={capability:(0,_util.createPromiseCapability)(),data:null})}var RenderTask=function(){function RenderTask(t){_classCallCheck(this,RenderTask);this._internalRenderTask=t;this.onContinue=null}_createClass(RenderTask,[{key:"promise",get:function get(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function cancel(){this._internalRenderTask.cancel()}}]);return RenderTask}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function InternalRenderTask(t){var r=t.callback,a=t.params,i=t.objs,o=t.commonObjs,l=t.annotationCanvasMap,c=t.operatorList,u=t.pageIndex,d=t.canvasFactory,h=t.useRequestAnimationFrame,p=void 0!==h&&h,v=t.pdfBug,y=void 0!==v&&v;_classCallCheck(this,InternalRenderTask);this.callback=r;this.params=a;this.objs=i;this.commonObjs=o;this.annotationCanvasMap=l;this.operatorListIdx=null;this.operatorList=c;this._pageIndex=u;this.canvasFactory=d;this._pdfBug=y;this.running=!1;this.graphicsReadyCallback=null;this.graphicsReady=!1;this._useRequestAnimationFrame=!0===p&&"undefined"!=typeof window;this.cancelled=!1;this.capability=(0,_util.createPromiseCapability)();this.task=new RenderTask(this);this._cancelBound=this.cancel.bind(this);this._continueBound=this._continue.bind(this);this._scheduleNextBound=this._scheduleNext.bind(this);this._nextBound=this._next.bind(this);this._canvas=a.canvasContext.canvas}_createClass(InternalRenderTask,[{key:"completed",get:function get(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function initializeGraphics(t){var r,a=t.transparency,i=void 0!==a&&a,o=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(InternalRenderTask.canvasInUse.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.canvasInUse.add(this._canvas)}if(this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled){this.stepper=globalThis.StepperManager.create(this._pageIndex);this.stepper.init(this.operatorList);this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()}var l=this.params,c=l.canvasContext,u=l.viewport,d=l.transform,h=l.imageLayer,p=l.background;this.gfx=new _canvas.CanvasGraphics(c,this.commonObjs,this.objs,this.canvasFactory,h,o,this.annotationCanvasMap);this.gfx.beginDrawing({transform:d,viewport:u,transparency:i,background:p});this.operatorListIdx=0;this.graphicsReady=!0;this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function cancel(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.running=!1;this.cancelled=!0;this.gfx&&this.gfx.endDrawing();this._canvas&&InternalRenderTask.canvasInUse.delete(this._canvas);this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function operatorListChanged(){if(this.graphicsReady){this.stepper&&this.stepper.updateOperatorList(this.operatorList);this.running||this._continue()}else this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function _continue(){this.running=!0;this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function _scheduleNext(){var t=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){t._nextBound().catch(t._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:(t=_asyncToGenerator(_regenerator.default.mark((function _callee6(){return _regenerator.default.wrap((function _callee6$(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper);if(this.operatorListIdx===this.operatorList.argsArray.length){this.running=!1;if(this.operatorList.lastChunk){this.gfx.endDrawing();this._canvas&&InternalRenderTask.canvasInUse.delete(this._canvas);this.callback()}}case 4:case"end":return t.stop()}}),_callee6,this)}))),function _next(){return t.apply(this,arguments)})}],[{key:"canvasInUse",get:function get(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]);var t;return InternalRenderTask}(),version="2.13.216";exports.version=version;var build="399a0ec60";exports.build=build},(t,r,a)=>{"use strict";t.exports=a(146)},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var i=function(t){var r,a=Object.prototype,i=a.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function define(t,r,a){Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0});return t[r]}try{define({},"")}catch(t){define=function define(t,r,a){return t[r]=a}}function wrap(t,r,a,i){var o=r&&r.prototype instanceof Generator?r:Generator,l=Object.create(o.prototype),c=new Context(i||[]);l._invoke=function makeInvokeMethod(t,r,a){var i=d;return function invoke(o,l){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw l;return doneResult()}a.method=o;a.arg=l;for(;;){var c=a.delegate;if(c){var u=maybeInvokeDelegate(c,a);if(u){if(u===y)continue;return u}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(i===d){i=v;throw a.arg}a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);i=p;var g=tryCatch(t,r,a);if("normal"===g.type){i=a.done?v:h;if(g.arg===y)continue;return{value:g.arg,done:a.done}}if("throw"===g.type){i=v;a.method="throw";a.arg=g.arg}}}}(t,a,c);return l}t.wrap=wrap;function tryCatch(t,r,a){try{return{type:"normal",arg:t.call(r,a)}}catch(t){return{type:"throw",arg:t}}}var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var g={};define(g,l,(function(){return this}));var m=Object.getPrototypeOf,_=m&&m(m(values([])));_&&_!==a&&i.call(_,l)&&(g=_);var b=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(g);GeneratorFunction.prototype=GeneratorFunctionPrototype;define(b,"constructor",GeneratorFunctionPrototype);define(GeneratorFunctionPrototype,"constructor",GeneratorFunction);GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"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,u,"GeneratorFunction")}t.prototype=Object.create(b);return t};t.awrap=function(t){return{__await:t}};function AsyncIterator(t,r){function invoke(a,o,l,c){var u=tryCatch(t[a],t,o);if("throw"!==u.type){var d=u.arg,h=d.value;return h&&"object"===_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then((function(t){invoke("next",t,l,c)}),(function(t){invoke("throw",t,l,c)})):r.resolve(h).then((function(t){d.value=t;l(d)}),(function(t){return invoke("throw",t,l,c)}))}c(u.arg)}var a;this._invoke=function enqueue(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return a=a?a.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}defineIteratorMethods(AsyncIterator.prototype);define(AsyncIterator.prototype,c,(function(){return this}));t.AsyncIterator=AsyncIterator;t.async=function(r,a,i,o,l){void 0===l&&(l=Promise);var c=new AsyncIterator(wrap(r,a,i,o),l);return t.isGeneratorFunction(a)?c:c.next().then((function(t){return t.done?t.value:c.next()}))};function maybeInvokeDelegate(t,a){var i=t.iterator[a.method];if(i===r){a.delegate=null;if("throw"===a.method){if(t.iterator.return){a.method="return";a.arg=r;maybeInvokeDelegate(t,a);if("throw"===a.method)return y}a.method="throw";a.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=tryCatch(i,t.iterator,a.arg);if("throw"===o.type){a.method="throw";a.arg=o.arg;a.delegate=null;return y}var l=o.arg;if(!l){a.method="throw";a.arg=new TypeError("iterator result is not an object");a.delegate=null;return y}if(!l.done)return l;a[t.resultName]=l.value;a.next=t.nextLoc;if("return"!==a.method){a.method="next";a.arg=r}a.delegate=null;return y}defineIteratorMethods(b);define(b,u,"Generator");define(b,l,(function(){return this}));define(b,"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 a in t)r.push(a);r.reverse();return function next(){for(;r.length;){var a=r.pop();if(a in t){next.value=a;next.done=!1;return next}}next.done=!0;return next}};function values(t){if(t){var a=t[l];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,c=function next(){for(;++o<t.length;)if(i.call(t,o)){next.value=t[o];next.done=!1;return next}next.value=r;next.done=!0;return next};return c.next=c}}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 a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=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 a=this;function handle(i,o){c.type="throw";c.arg=t;a.next=i;if(o){a.method="next";a.arg=r}return!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var u=i.call(l,"catchLoc"),d=i.call(l,"finallyLoc");if(u&&d){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var c=l?l.completion:{};c.type=t;c.arg=r;if(l){this.method="next";this.next=l.finallyLoc;return y}return this.complete(c)},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 y},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t){this.complete(a.completion,a.afterLoc);resetTryEntry(a);return y}}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,a,i){this.delegate={iterator:values(t),resultName:a,nextLoc:i};"next"===this.method&&(this.arg=r);return y}};return t}("object"===_typeof(t=a.nmd(t))?t.exports:{});try{regeneratorRuntime=i}catch(t){"object"===("undefined"==typeof globalThis?"undefined":_typeof(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.StatTimer=r.RenderingCancelledException=r.PixelsPerInch=r.PageViewport=r.PDFDateString=r.DOMStandardFontDataFactory=r.DOMSVGFactory=r.DOMCanvasFactory=r.DOMCMapReaderFactory=void 0;r.deprecated=function deprecated(t){console.log("Deprecated API usage: "+t)};r.getFilenameFromUrl=function getFilenameFromUrl(t){var r=t.indexOf("#"),a=t.indexOf("?"),i=Math.min(r>0?r:t.length,a>0?a:t.length);return t.substring(t.lastIndexOf("/",i)+1,i)};r.getPdfFilenameFromUrl=function getPdfFilenameFromUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof t)return r;if(isDataScheme(t)){(0,l.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return r}var a=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,o=a.exec(t),c=i.exec(o[1])||i.exec(o[2])||i.exec(o[3]);if(c&&(c=c[0]).includes("%"))try{c=i.exec(decodeURIComponent(c))[0]}catch(t){}return c||r};r.getXfaPageViewport=function getXfaPageViewport(t,r){var a=r.scale,i=void 0===a?1:a,o=r.rotation,l=void 0===o?0:o,c=t.attributes.style,u=c.width,d=c.height,h=[0,0,parseInt(u),parseInt(d)];return new v({viewBox:h,scale:i,rotation:l})};r.isDataScheme=isDataScheme;r.isPdfFile=function isPdfFile(t){return"string"==typeof t&&/\.pdf$/i.test(t)};r.isValidFetchUrl=isValidFetchUrl;r.loadScript=function loadScript(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(a,i){var o=document.createElement("script");o.src=t;o.onload=function(t){r&&o.remove();a(t)};o.onerror=function(){i(new Error("Cannot load script at: ".concat(o.src)))};(document.head||document.documentElement).appendChild(o)}))};var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(148),l=a(1);function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperty(t,r,a){r in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}var c=_createClass((function PixelsPerInch(){_classCallCheck(this,PixelsPerInch)}));r.PixelsPerInch=c;_defineProperty(c,"CSS",96);_defineProperty(c,"PDF",72);_defineProperty(c,"PDF_TO_CSS_UNITS",c.CSS/c.PDF);var u=function(t){_inherits(DOMCanvasFactory,t);var r=_createSuper(DOMCanvasFactory);function DOMCanvasFactory(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=a.ownerDocument,o=void 0===i?globalThis.document:i;_classCallCheck(this,DOMCanvasFactory);(t=r.call(this))._document=o;return t}_createClass(DOMCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){var a=this._document.createElement("canvas");a.width=t;a.height=r;return a}}]);return DOMCanvasFactory}(o.BaseCanvasFactory);r.DOMCanvasFactory=u;function fetchData(t){return _fetchData.apply(this,arguments)}function _fetchData(){_fetchData=_asyncToGenerator(i.default.mark((function _callee(t){var r,a,o=arguments;return i.default.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:r=o.length>1&&void 0!==o[1]&&o[1];if(!isValidFetchUrl(t,document.baseURI)){i.next=21;break}i.next=4;return fetch(t);case 4:if((a=i.sent).ok){i.next=7;break}throw new Error(a.statusText);case 7:if(!r){i.next=15;break}i.t1=Uint8Array;i.next=11;return a.arrayBuffer();case 11:i.t2=i.sent;i.t0=new i.t1(i.t2);i.next=20;break;case 15:i.t3=l.stringToBytes;i.next=18;return a.text();case 18:i.t4=i.sent;i.t0=(0,i.t3)(i.t4);case 20:return i.abrupt("return",i.t0);case 21:return i.abrupt("return",new Promise((function(a,i){var o=new XMLHttpRequest;o.open("GET",t,!0);r&&(o.responseType="arraybuffer");o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE){if(200===o.status||0===o.status){var t;r&&o.response?t=new Uint8Array(o.response):!r&&o.responseText&&(t=(0,l.stringToBytes)(o.responseText));if(t){a(t);return}}i(new Error(o.statusText))}};o.send(null)})));case 22:case"end":return i.stop()}}),_callee)})));return _fetchData.apply(this,arguments)}var d=function(t){_inherits(DOMCMapReaderFactory,t);var r=_createSuper(DOMCMapReaderFactory);function DOMCMapReaderFactory(){_classCallCheck(this,DOMCMapReaderFactory);return r.apply(this,arguments)}_createClass(DOMCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return fetchData(t,this.isCompressed).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return DOMCMapReaderFactory}(o.BaseCMapReaderFactory);r.DOMCMapReaderFactory=d;var h=function(t){_inherits(DOMStandardFontDataFactory,t);var r=_createSuper(DOMStandardFontDataFactory);function DOMStandardFontDataFactory(){_classCallCheck(this,DOMStandardFontDataFactory);return r.apply(this,arguments)}_createClass(DOMStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return fetchData(t,!0)}}]);return DOMStandardFontDataFactory}(o.BaseStandardFontDataFactory);r.DOMStandardFontDataFactory=h;var p=function(t){_inherits(DOMSVGFactory,t);var r=_createSuper(DOMSVGFactory);function DOMSVGFactory(){_classCallCheck(this,DOMSVGFactory);return r.apply(this,arguments)}_createClass(DOMSVGFactory,[{key:"_createSVG",value:function _createSVG(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}}]);return DOMSVGFactory}(o.BaseSVGFactory);r.DOMSVGFactory=p;var v=function(){function PageViewport(t){var r=t.viewBox,a=t.scale,i=t.rotation,o=t.offsetX,l=void 0===o?0:o,c=t.offsetY,u=void 0===c?0:c,d=t.dontFlip,h=void 0!==d&&d;_classCallCheck(this,PageViewport);this.viewBox=r;this.scale=a;this.rotation=i;this.offsetX=l;this.offsetY=u;var p,v,y,g,m,_,b,A,S=(r[2]+r[0])/2,k=(r[3]+r[1])/2;(i%=360)<0&&(i+=360);switch(i){case 180:p=-1;v=0;y=0;g=1;break;case 90:p=0;v=1;y=1;g=0;break;case 270:p=0;v=-1;y=-1;g=0;break;case 0:p=1;v=0;y=0;g=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(h){y=-y;g=-g}if(0===p){m=Math.abs(k-r[1])*a+l;_=Math.abs(S-r[0])*a+u;b=Math.abs(r[3]-r[1])*a;A=Math.abs(r[2]-r[0])*a}else{m=Math.abs(S-r[0])*a+l;_=Math.abs(k-r[1])*a+u;b=Math.abs(r[2]-r[0])*a;A=Math.abs(r[3]-r[1])*a}this.transform=[p*a,v*a,y*a,g*a,m-p*a*S-y*a*k,_-v*a*S-g*a*k];this.width=b;this.height=A}_createClass(PageViewport,[{key:"clone",value:function clone(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,a=void 0===r?this.scale:r,i=t.rotation,o=void 0===i?this.rotation:i,l=t.offsetX,c=void 0===l?this.offsetX:l,u=t.offsetY,d=void 0===u?this.offsetY:u,h=t.dontFlip,p=void 0!==h&&h;return new PageViewport({viewBox:this.viewBox.slice(),scale:a,rotation:o,offsetX:c,offsetY:d,dontFlip:p})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(t,r){return l.Util.applyTransform([t,r],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(t){var r=l.Util.applyTransform([t[0],t[1]],this.transform),a=l.Util.applyTransform([t[2],t[3]],this.transform);return[r[0],r[1],a[0],a[1]]}},{key:"convertToPdfPoint",value:function convertToPdfPoint(t,r){return l.Util.applyInverseTransform([t,r],this.transform)}}]);return PageViewport}();r.PageViewport=v;var y=function(t){_inherits(RenderingCancelledException,t);var r=_createSuper(RenderingCancelledException);function RenderingCancelledException(t,a){var i;_classCallCheck(this,RenderingCancelledException);(i=r.call(this,t,"RenderingCancelledException")).type=a;return i}return _createClass(RenderingCancelledException)}(l.BaseException);r.RenderingCancelledException=y;function isDataScheme(t){for(var r=t.length,a=0;a<r&&""===t[a].trim();)a++;return"data:"===t.substring(a,a+5).toLowerCase()}var g,m=function(){function StatTimer(){_classCallCheck(this,StatTimer);this.started=Object.create(null);this.times=[]}_createClass(StatTimer,[{key:"time",value:function time(t){t in this.started&&(0,l.warn)("Timer is already running for ".concat(t));this.started[t]=Date.now()}},{key:"timeEnd",value:function timeEnd(t){t in this.started||(0,l.warn)("Timer has not been started for ".concat(t));this.times.push({name:t,start:this.started[t],end:Date.now()});delete this.started[t]}},{key:"toString",value:function toString(){var t,r=[],a=0,i=_createForOfIteratorHelper(this.times);try{for(i.s();!(t=i.n()).done;){var o=t.value.name;o.length>a&&(a=o.length)}}catch(t){i.e(t)}finally{i.f()}var l,c=_createForOfIteratorHelper(this.times);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.end-u.start;r.push("".concat(u.name.padEnd(a)," ").concat(d,"ms\n"))}}catch(t){c.e(t)}finally{c.f()}return r.join("")}}]);return StatTimer}();r.StatTimer=m;function isValidFetchUrl(t,r){try{var a=(r?new URL(t,r):new URL(t)).protocol;return"http:"===a||"https:"===a}catch(t){return!1}}var _=function(){function PDFDateString(){_classCallCheck(this,PDFDateString)}_createClass(PDFDateString,null,[{key:"toDateObject",value:function toDateObject(t){if(!t||"string"!=typeof t)return null;g||(g=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var r=g.exec(t);if(!r)return null;var a=parseInt(r[1],10),i=parseInt(r[2],10);i=i>=1&&i<=12?i-1:0;var o=parseInt(r[3],10);o=o>=1&&o<=31?o:1;var l=parseInt(r[4],10);l=l>=0&&l<=23?l:0;var c=parseInt(r[5],10);c=c>=0&&c<=59?c:0;var u=parseInt(r[6],10);u=u>=0&&u<=59?u:0;var d=r[7]||"Z",h=parseInt(r[8],10);h=h>=0&&h<=23?h:0;var p=parseInt(r[9],10)||0;p=p>=0&&p<=59?p:0;if("-"===d){l+=h;c+=p}else if("+"===d){l-=h;c-=p}return new Date(Date.UTC(a,i,o,l,c,u))}}]);return PDFDateString}();r.PDFDateString=_},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1);function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=function(){function BaseCanvasFactory(){_classCallCheck(this,BaseCanvasFactory);this.constructor===BaseCanvasFactory&&(0,o.unreachable)("Cannot initialize BaseCanvasFactory.")}_createClass(BaseCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var a=this._createCanvas(t,r);return{canvas:a,context:a.getContext("2d")}}},{key:"reset",value:function reset(t,r,a){if(!t.canvas)throw new Error("Canvas is not specified");if(r<=0||a<=0)throw new Error("Invalid canvas size");t.canvas.width=r;t.canvas.height=a}},{key:"destroy",value:function destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0;t.canvas.height=0;t.canvas=null;t.context=null}},{key:"_createCanvas",value:function _createCanvas(t,r){(0,o.unreachable)("Abstract method `_createCanvas` called.")}}]);return BaseCanvasFactory}();r.BaseCanvasFactory=l;var c=function(){function BaseCMapReaderFactory(t){var r=t.baseUrl,a=void 0===r?null:r,i=t.isCompressed,l=void 0!==i&&i;_classCallCheck(this,BaseCMapReaderFactory);this.constructor===BaseCMapReaderFactory&&(0,o.unreachable)("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=a;this.isCompressed=l}_createClass(BaseCMapReaderFactory,[{key:"fetch",value:(t=_asyncToGenerator(i.default.mark((function _callee(t){var r,a,l,c=this;return i.default.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:r=t.name;if(this.baseUrl){i.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){i.next=5;break}throw new Error("CMap name must be specified.");case 5:a=this.baseUrl+r+(this.isCompressed?".bcmap":"");l=this.isCompressed?o.CMapCompressionType.BINARY:o.CMapCompressionType.NONE;return i.abrupt("return",this._fetchData(a,l).catch((function(t){throw new Error("Unable to load ".concat(c.isCompressed?"binary ":"","CMap at: ").concat(a))})));case 8:case"end":return i.stop()}}),_callee,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t,r){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseCMapReaderFactory}();r.BaseCMapReaderFactory=c;var u=function(){function BaseStandardFontDataFactory(t){var r=t.baseUrl,a=void 0===r?null:r;_classCallCheck(this,BaseStandardFontDataFactory);this.constructor===BaseStandardFontDataFactory&&(0,o.unreachable)("Cannot initialize BaseStandardFontDataFactory.");this.baseUrl=a}_createClass(BaseStandardFontDataFactory,[{key:"fetch",value:(t=_asyncToGenerator(i.default.mark((function _callee2(t){var r,a;return i.default.wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:r=t.filename;if(this.baseUrl){i.next=3;break}throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(r){i.next=5;break}throw new Error("Font filename must be specified.");case 5:a="".concat(this.baseUrl).concat(r);return i.abrupt("return",this._fetchData(a).catch((function(t){throw new Error("Unable to load font data at: ".concat(a))})));case 7:case"end":return i.stop()}}),_callee2,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseStandardFontDataFactory}();r.BaseStandardFontDataFactory=u;var d=function(){function BaseSVGFactory(){_classCallCheck(this,BaseSVGFactory);this.constructor===BaseSVGFactory&&(0,o.unreachable)("Cannot initialize BaseSVGFactory.")}_createClass(BaseSVGFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid SVG dimensions");var a=this._createSVG("svg:svg");a.setAttribute("version","1.1");a.setAttribute("width","".concat(t,"px"));a.setAttribute("height","".concat(r,"px"));a.setAttribute("preserveAspectRatio","none");a.setAttribute("viewBox","0 0 ".concat(t," ").concat(r));return a}},{key:"createElement",value:function createElement(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}},{key:"_createSVG",value:function _createSVG(t){(0,o.unreachable)("Abstract method `_createSVG` called.")}}]);return BaseSVGFactory}();r.BaseSVGFactory=d},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.FontLoader=r.FontFaceObject=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1);function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var l,c=function(){function BaseFontLoader(t){var r=t.docId,a=t.onUnsupportedFeature,i=t.ownerDocument,l=void 0===i?globalThis.document:i;t.styleElement;_classCallCheck(this,BaseFontLoader);this.constructor===BaseFontLoader&&(0,o.unreachable)("Cannot initialize BaseFontLoader.");this.docId=r;this._onUnsupportedFeature=a;this._document=l;this.nativeFontFaces=[];this.styleElement=null}_createClass(BaseFontLoader,[{key:"addNativeFontFace",value:function addNativeFontFace(t){this.nativeFontFaces.push(t);this._document.fonts.add(t)}},{key:"insertRule",value:function insertRule(t){var r=this.styleElement;if(!r){(r=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId);this._document.documentElement.getElementsByTagName("head")[0].appendChild(r)}var a=r.sheet;a.insertRule(t,a.cssRules.length)}},{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.nativeFontFaces);try{for(r.s();!(t=r.n()).done;){var a=t.value;this._document.fonts.delete(a)}}catch(t){r.e(t)}finally{r.f()}this.nativeFontFaces.length=0;if(this.styleElement){this.styleElement.remove();this.styleElement=null}}},{key:"bind",value:(t=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(i.default.mark((function _callee(t){var r,a,l=this;return i.default.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(!t.attached&&!t.missingFile){i.next=2;break}return i.abrupt("return");case 2:t.attached=!0;if(!this.isFontLoadingAPISupported){i.next=19;break}if(!(r=t.createNativeFontFace())){i.next=18;break}this.addNativeFontFace(r);i.prev=7;i.next=10;return r.loaded;case 10:i.next=18;break;case 12:i.prev=12;i.t0=i.catch(7);this._onUnsupportedFeature({featureId:o.UNSUPPORTED_FEATURES.errorFontLoadNative});(0,o.warn)("Failed to load font '".concat(r.family,"': '").concat(i.t0,"'."));t.disableFontFace=!0;throw i.t0;case 18:return i.abrupt("return");case 19:if(!(a=t.createFontFaceRule())){i.next=26;break}this.insertRule(a);if(!this.isSyncFontLoadingSupported){i.next=24;break}return i.abrupt("return");case 24:i.next=26;return new Promise((function(r){var i=l._queueLoadingCallback(r);l._prepareFontLoadEvent([a],[t],i)}));case 26:case"end":return i.stop()}}),_callee,this,[[7,12]])}))),function bind(r){return t.apply(this,arguments)})},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){(0,o.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function get(){var t,r=!(null===(t=this._document)||void 0===t||!t.fonts);return(0,o.shadow)(this,"isFontLoadingAPISupported",r)}},{key:"isSyncFontLoadingSupported",get:function get(){(0,o.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function get(){(0,o.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r,a){(0,o.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]);var t;return BaseFontLoader}();r.FontLoader=l;r.FontLoader=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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(GenericFontLoader,t);var r=_createSuper(GenericFontLoader);function GenericFontLoader(t){var a;_classCallCheck(this,GenericFontLoader);(a=r.call(this,t)).loadingContext={requests:[],nextRequestId:0};a.loadTestFontId=0;return a}_createClass(GenericFontLoader,[{key:"isSyncFontLoadingSupported",get:function get(){var t=!1;if("undefined"==typeof navigator)t=!0;else{var r=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==r?void 0:r[1])>=14&&(t=!0)}return(0,o.shadow)(this,"isSyncFontLoadingSupported",t)}},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){var r=this.loadingContext,a={id:"pdfjs-font-loading-".concat(r.nextRequestId++),done:!1,complete:function completeRequest(){(0,o.assert)(!a.done,"completeRequest() cannot be called twice.");a.done=!0;for(;r.requests.length>0&&r.requests[0].done;){var t=r.requests.shift();setTimeout(t.callback,0)}},callback:t};r.requests.push(a);return a}},{key:"_loadTestFont",get:function get(){return(0,o.shadow)(this,"_loadTestFont",function getLoadTestFont(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")}())}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r,a){function int32(t,r){return t.charCodeAt(r)<<24|t.charCodeAt(r+1)<<16|t.charCodeAt(r+2)<<8|255&t.charCodeAt(r+3)}function spliceString(t,r,a,i){return t.substring(0,r)+i+t.substring(r+a)}var i,l,c=this._document.createElement("canvas");c.width=1;c.height=1;var u=c.getContext("2d"),d=0;var h="lt".concat(Date.now()).concat(this.loadTestFontId++),p=this._loadTestFont,v=1482184792,y=int32(p=spliceString(p,976,h.length,h),16);for(i=0,l=h.length-3;i<l;i+=4)y=y-v+int32(h,i)|0;i<h.length&&(y=y-v+int32(h+"XXX",i)|0);p=spliceString(p,16,4,(0,o.string32)(y));var g="url(data:font/opentype;base64,".concat(btoa(p),");"),m='@font-face {font-family:"'.concat(h,'";src:').concat(g,"}");this.insertRule(m);var _,b=[],A=_createForOfIteratorHelper(r);try{for(A.s();!(_=A.n()).done;){var S=_.value;b.push(S.loadedName)}}catch(t){A.e(t)}finally{A.f()}b.push(h);var k=this._document.createElement("div");k.style.visibility="hidden";k.style.width=k.style.height="10px";k.style.position="absolute";k.style.top=k.style.left="0px";for(var x=0,C=b;x<C.length;x++){var P=C[x],w=this._document.createElement("span");w.textContent="Hi";w.style.fontFamily=P;k.appendChild(w)}this._document.body.appendChild(k);!function isFontReady(t,r){if(++d>30){(0,o.warn)("Load test font never loaded.");r()}else{u.font="30px "+t;u.fillText(".",0,20);u.getImageData(0,0,1,1).data[3]>0?r():setTimeout(isFontReady.bind(null,t,r))}}(h,(function(){k.remove();a.complete()}))}}]);return GenericFontLoader}(c);var u=function(){function FontFaceObject(t,r){var a=r.isEvalSupported,i=void 0===a||a,o=r.disableFontFace,l=void 0!==o&&o,c=r.ignoreErrors,u=void 0!==c&&c,d=r.onUnsupportedFeature,h=r.fontRegistry,p=void 0===h?null:h;_classCallCheck(this,FontFaceObject);this.compiledGlyphs=Object.create(null);for(var v in t)this[v]=t[v];this.isEvalSupported=!1!==i;this.disableFontFace=!0===l;this.ignoreErrors=!0===u;this._onUnsupportedFeature=d;this.fontRegistry=p}_createClass(FontFaceObject,[{key:"createNativeFontFace",value:function createNativeFontFace(){if(!this.data||this.disableFontFace)return null;var t;if(this.cssFontInfo){var r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg"));t=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else t=new FontFace(this.loadedName,this.data,{});this.fontRegistry&&this.fontRegistry.registerFont(this);return t}},{key:"createFontFaceRule",value:function createFontFaceRule(){if(!this.data||this.disableFontFace)return null;var t,r=(0,o.bytesToString)(this.data),a="url(data:".concat(this.mimetype,";base64,").concat(btoa(r),");");if(this.cssFontInfo){var i="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(i+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;"));t='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(i,"src:").concat(a,"}")}else t='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(a,"}");this.fontRegistry&&this.fontRegistry.registerFont(this,a);return t}},{key:"getPathGenerator",value:function getPathGenerator(t,r){if(void 0!==this.compiledGlyphs[r])return this.compiledGlyphs[r];var a;try{a=t.get(this.loadedName+"_path_"+r)}catch(t){if(!this.ignoreErrors)throw t;this._onUnsupportedFeature({featureId:o.UNSUPPORTED_FEATURES.errorFontGetPath});(0,o.warn)('getPathGenerator - ignoring character: "'.concat(t,'".'));return this.compiledGlyphs[r]=function(t,r){}}if(this.isEvalSupported&&o.IsEvalSupportedCached.value){var i,l=[],c=_createForOfIteratorHelper(a);try{for(c.s();!(i=c.n()).done;){var u=i.value,d=void 0!==u.args?u.args.join(","):"";l.push("c.",u.cmd,"(",d,");\n")}}catch(t){c.e(t)}finally{c.f()}return this.compiledGlyphs[r]=new Function("c","size",l.join(""))}return this.compiledGlyphs[r]=function(t,r){var i,o=_createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;){var l=i.value;"scale"===l.cmd&&(l.args=[r,-r]);t[l.cmd].apply(t,l.args)}}catch(t){o.e(t)}finally{o.f()}}}}]);return FontFaceObject}();r.FontFaceObject=u},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.NodeStandardFontDataFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0;var i=a(148),o=a(3),l=a(1);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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var c=_createClass((function NodeCanvasFactory(){_classCallCheck(this,NodeCanvasFactory);(0,l.unreachable)("Not implemented: NodeCanvasFactory")}));r.NodeCanvasFactory=c;var u=_createClass((function NodeCMapReaderFactory(){_classCallCheck(this,NodeCMapReaderFactory);(0,l.unreachable)("Not implemented: NodeCMapReaderFactory")}));r.NodeCMapReaderFactory=u;var d=_createClass((function NodeStandardFontDataFactory(){_classCallCheck(this,NodeStandardFontDataFactory);(0,l.unreachable)("Not implemented: NodeStandardFontDataFactory")}));r.NodeStandardFontDataFactory=d;if(o.isNodeJS){var h=function fetchData(t){return new Promise((function(r,a){require("fs").readFile(t,(function(t,i){!t&&i?r(new Uint8Array(i)):a(new Error(t))}))}))};r.NodeCanvasFactory=c=function(t){_inherits(NodeCanvasFactory,t);var r=_createSuper(NodeCanvasFactory);function NodeCanvasFactory(){_classCallCheck(this,NodeCanvasFactory);return r.apply(this,arguments)}_createClass(NodeCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){return require("canvas").createCanvas(t,r)}}]);return NodeCanvasFactory}(i.BaseCanvasFactory);r.NodeCMapReaderFactory=u=function(t){_inherits(NodeCMapReaderFactory,t);var r=_createSuper(NodeCMapReaderFactory);function NodeCMapReaderFactory(){_classCallCheck(this,NodeCMapReaderFactory);return r.apply(this,arguments)}_createClass(NodeCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return h(t).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return NodeCMapReaderFactory}(i.BaseCMapReaderFactory);r.NodeStandardFontDataFactory=d=function(t){_inherits(NodeStandardFontDataFactory,t);var r=_createSuper(NodeStandardFontDataFactory);function NodeStandardFontDataFactory(){_classCallCheck(this,NodeStandardFontDataFactory);return r.apply(this,arguments)}_createClass(NodeStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return h(t)}}]);return NodeStandardFontDataFactory}(i.BaseStandardFontDataFactory)}},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationStorage=void 0;var i=a(1);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}var o=function(){function AnnotationStorage(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationStorage);this._storage=new Map;this._timeStamp=Date.now();this._modified=!1;this.onSetModified=null;this.onResetModified=null}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationStorage,[{key:"getValue",value:function getValue(t,r){var a=this._storage.get(t);return void 0===a?r:Object.assign(r,a)}},{key:"setValue",value:function setValue(t,r){var a=this._storage.get(t),i=!1;if(void 0!==a)for(var o=0,l=Object.entries(r);o<l.length;o++){var c=_slicedToArray(l[o],2),u=c[0],d=c[1];if(a[u]!==d){i=!0;a[u]=d}}else{i=!0;this._storage.set(t,r)}if(i){this._timeStamp=Date.now();this._setModified()}}},{key:"getAll",value:function getAll(){return this._storage.size>0?(0,i.objectFromMap)(this._storage):null}},{key:"size",get:function get(){return this._storage.size}},{key:"_setModified",value:function _setModified(){if(!this._modified){this._modified=!0;"function"==typeof this.onSetModified&&this.onSetModified()}}},{key:"resetModified",value:function resetModified(){if(this._modified){this._modified=!1;"function"==typeof this.onResetModified&&this.onResetModified()}}},{key:"serializable",get:function get(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function get(){return this._timeStamp.toString()}}]);return AnnotationStorage}();r.AnnotationStorage=o},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.CanvasGraphics=void 0;var i=a(1),o=a(153),l=a(147);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(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 _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var c=4096,u=16;function addContextCurrentTransform(t){t._transformStack&&(t._transformStack=[]);if(!t.mozCurrentTransform){t._originalSave=t.save;t._originalRestore=t.restore;t._originalRotate=t.rotate;t._originalScale=t.scale;t._originalTranslate=t.translate;t._originalTransform=t.transform;t._originalSetTransform=t.setTransform;t._originalResetTransform=t.resetTransform;t._transformMatrix=t._transformMatrix||[1,0,0,1,0,0];t._transformStack=[];try{var r=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"lineWidth");t._setLineWidth=r.set;t._getLineWidth=r.get;Object.defineProperty(t,"lineWidth",{set:function setLineWidth(t){this._setLineWidth(1.000001*t)},get:function getLineWidth(){return this._getLineWidth()}})}catch(t){}Object.defineProperty(t,"mozCurrentTransform",{get:function getCurrentTransform(){return this._transformMatrix}});Object.defineProperty(t,"mozCurrentTransformInverse",{get:function getCurrentTransformInverse(){var t=_slicedToArray(this._transformMatrix,6),r=t[0],a=t[1],i=t[2],o=t[3],l=t[4],c=t[5],u=r*o-a*i,d=a*i-r*o;return[o/u,a/d,i/d,r/u,(o*l-i*c)/d,(a*l-r*c)/u]}});t.save=function ctxSave(){var t=this._transformMatrix;this._transformStack.push(t);this._transformMatrix=t.slice(0,6);this._originalSave()};t.restore=function ctxRestore(){0===this._transformStack.length&&(0,i.warn)("Tried to restore a ctx when the stack was already empty.");var t=this._transformStack.pop();if(t){this._transformMatrix=t;this._originalRestore()}};t.translate=function ctxTranslate(t,r){var a=this._transformMatrix;a[4]=a[0]*t+a[2]*r+a[4];a[5]=a[1]*t+a[3]*r+a[5];this._originalTranslate(t,r)};t.scale=function ctxScale(t,r){var a=this._transformMatrix;a[0]*=t;a[1]*=t;a[2]*=r;a[3]*=r;this._originalScale(t,r)};t.transform=function ctxTransform(r,a,i,o,l,c){var u=this._transformMatrix;this._transformMatrix=[u[0]*r+u[2]*a,u[1]*r+u[3]*a,u[0]*i+u[2]*o,u[1]*i+u[3]*o,u[0]*l+u[2]*c+u[4],u[1]*l+u[3]*c+u[5]];t._originalTransform(r,a,i,o,l,c)};t.setTransform=function ctxSetTransform(r,a,i,o,l,c){this._transformMatrix=[r,a,i,o,l,c];t._originalSetTransform(r,a,i,o,l,c)};t.resetTransform=function ctxResetTransform(){this._transformMatrix=[1,0,0,1,0,0];t._originalResetTransform()};t.rotate=function ctxRotate(t){var r=Math.cos(t),a=Math.sin(t),i=this._transformMatrix;this._transformMatrix=[i[0]*r+i[2]*a,i[1]*r+i[3]*a,i[0]*-a+i[2]*r,i[1]*-a+i[3]*r,i[4],i[5]];this._originalRotate(t)}}}var d=function(){function CachedCanvases(t){_classCallCheck(this,CachedCanvases);this.canvasFactory=t;this.cache=Object.create(null)}_createClass(CachedCanvases,[{key:"getCanvas",value:function getCanvas(t,r,a,i){var o;if(void 0!==this.cache[t]){o=this.cache[t];this.canvasFactory.reset(o,r,a);o.context.setTransform(1,0,0,1,0,0)}else{o=this.canvasFactory.create(r,a);this.cache[t]=o}i&&addContextCurrentTransform(o.context);return o}},{key:"clear",value:function clear(){for(var t in this.cache){var r=this.cache[t];this.canvasFactory.destroy(r);delete this.cache[t]}}}]);return CachedCanvases}();var h=function(){function CanvasExtraState(t,r){_classCallCheck(this,CanvasExtraState);this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=i.IDENTITY_MATRIX;this.textMatrixScale=1;this.fontMatrix=i.FONT_IDENTITY_MATRIX;this.leading=0;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRenderingMode=i.TextRenderingMode.FILL;this.textRise=0;this.fillColor="#000000";this.strokeColor="#000000";this.patternFill=!1;this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.activeSMask=null;this.transferMaps=null;this.startNewPathAndClipBox([0,0,t,r])}_createClass(CanvasExtraState,[{key:"clone",value:function clone(){var clone=Object.create(this);clone.clipBox=this.clipBox.slice();return clone}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}},{key:"updatePathMinMax",value:function updatePathMinMax(t,r,a){var o=_slicedToArray(i.Util.applyTransform([r,a],t),2);r=o[0];a=o[1];this.minX=Math.min(this.minX,r);this.minY=Math.min(this.minY,a);this.maxX=Math.max(this.maxX,r);this.maxY=Math.max(this.maxY,a)}},{key:"updateCurvePathMinMax",value:function updateCurvePathMinMax(t,r,a,o,l,c,u,d,h){var p=i.Util.bezierBoundingBox(r,a,o,l,c,u,d,h);this.updatePathMinMax(t,p[0],p[1]);this.updatePathMinMax(t,p[2],p[3])}},{key:"getPathBoundingBox",value:function getPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.PathType.FILL,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=[this.minX,this.minY,this.maxX,this.maxY];if(t===o.PathType.STROKE){r||(0,i.unreachable)("Stroke bounding box must include transform.");var l=i.Util.singularValueDecompose2dScale(r),c=l[0]*this.lineWidth/2,u=l[1]*this.lineWidth/2;a[0]-=c;a[1]-=u;a[2]+=c;a[3]+=u}return a}},{key:"updateClipFromPath",value:function updateClipFromPath(){var t=i.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function startNewPathAndClipBox(t){this.clipBox=t;this.minX=1/0;this.minY=1/0;this.maxX=0;this.maxY=0}},{key:"getClippedPathBoundingBox",value:function getClippedPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.PathType.FILL,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i.Util.intersect(this.clipBox,this.getPathBoundingBox(t,r))}}]);return CanvasExtraState}();function putBinaryImageData(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&r instanceof ImageData)t.putImageData(r,0,0);else{var o,l,c,d,h,p,v,y,g,m=r.height,_=r.width,b=m%u,A=(m-b)/u,S=0===b?A:A+1,k=t.createImageData(_,u),x=0,C=r.data,P=k.data;if(a)switch(a.length){case 1:p=a[0];v=a[0];y=a[0];g=a[0];break;case 4:p=a[0];v=a[1];y=a[2];g=a[3]}if(r.kind===i.ImageKind.GRAYSCALE_1BPP){var w=C.byteLength,T=new Uint32Array(P.buffer,0,P.byteLength>>2),R=T.length,E=_+7>>3,O=4294967295,M=i.IsLittleEndianCached.value?4278190080:255;if(g&&255===g[0]&&0===g[255]){var I=[M,O];O=I[0];M=I[1]}for(l=0;l<S;l++){d=l<A?u:b;o=0;for(c=0;c<d;c++){for(var D=w-x,L=0,j=D>E?_:8*D-7,N=-8&j,B=0,G=0;L<N;L+=8){G=C[x++];T[o++]=128&G?O:M;T[o++]=64&G?O:M;T[o++]=32&G?O:M;T[o++]=16&G?O:M;T[o++]=8&G?O:M;T[o++]=4&G?O:M;T[o++]=2&G?O:M;T[o++]=1&G?O:M}for(;L<j;L++){if(0===B){G=C[x++];B=128}T[o++]=G&B?O:M;B>>=1}}for(;o<R;)T[o++]=0;t.putImageData(k,0,l*u)}}else if(r.kind===i.ImageKind.RGBA_32BPP){var U=!!(p||v||y);c=0;h=_*u*4;for(l=0;l<A;l++){P.set(C.subarray(x,x+h));x+=h;if(U)for(var W=0;W<h;W+=4){p&&(P[W+0]=p[P[W+0]]);v&&(P[W+1]=v[P[W+1]]);y&&(P[W+2]=y[P[W+2]])}t.putImageData(k,0,c);c+=u}if(l<S){h=_*b*4;P.set(C.subarray(x,x+h));if(U)for(var H=0;H<h;H+=4){p&&(P[H+0]=p[P[H+0]]);v&&(P[H+1]=v[P[H+1]]);y&&(P[H+2]=y[P[H+2]])}t.putImageData(k,0,c)}}else{if(r.kind!==i.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(r.kind));var q=!!(p||v||y);h=_*(d=u);for(l=0;l<S;l++){l>=A&&(h=_*(d=b));o=0;for(c=h;c--;){P[o++]=C[x++];P[o++]=C[x++];P[o++]=C[x++];P[o++]=255}if(q)for(var V=0;V<o;V+=4){p&&(P[V+0]=p[P[V+0]]);v&&(P[V+1]=v[P[V+1]]);y&&(P[V+2]=y[P[V+2]])}t.putImageData(k,0,l*u)}}}}function putBinaryImageMask(t,r){for(var a=r.height,i=r.width,o=a%u,l=(a-o)/u,c=0===o?l:l+1,d=t.createImageData(i,u),h=0,p=r.data,v=d.data,y=0;y<c;y++){for(var g=y<l?u:o,m=3,_=0;_<g;_++)for(var b=void 0,A=0,S=0;S<i;S++){if(!A){b=p[h++];A=128}v[m]=b&A?0:255;m+=4;A>>=1}t.putImageData(d,0,y*u)}}function copyCtxState(t,r){for(var a=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],i=0,o=a.length;i<o;i++){var l=a[i];void 0!==t[l]&&(r[l]=t[l])}if(void 0!==t.setLineDash){r.setLineDash(t.getLineDash());r.lineDashOffset=t.lineDashOffset}}function resetCtxToDefault(t){t.strokeStyle="#000000";t.fillStyle="#000000";t.fillRule="nonzero";t.globalAlpha=1;t.lineWidth=1;t.lineCap="butt";t.lineJoin="miter";t.miterLimit=10;t.globalCompositeOperation="source-over";t.font="10px sans-serif";if(void 0!==t.setLineDash){t.setLineDash([]);t.lineDashOffset=0}}function composeSMaskBackdrop(t,r,a,i){for(var o=t.length,l=3;l<o;l+=4){var c=t[l];if(0===c){t[l-3]=r;t[l-2]=a;t[l-1]=i}else if(c<255){var u=255-c;t[l-3]=t[l-3]*c+r*u>>8;t[l-2]=t[l-2]*c+a*u>>8;t[l-1]=t[l-1]*c+i*u>>8}}}function composeSMaskAlpha(t,r,a){for(var i=t.length,o=3;o<i;o+=4){var l=a?a[t[o]]:t[o];r[o]=r[o]*l*.00392156862745098|0}}function composeSMaskLuminosity(t,r,a){for(var i=t.length,o=3;o<i;o+=4){var l=77*t[o-3]+152*t[o-2]+28*t[o-1];r[o]=a?r[o]*a[l>>8]>>8:r[o]*l>>16}}function composeSMask(t,r,a,i){var o=i[0],l=i[1],c=i[2]-o,u=i[3]-l;if(0!==c&&0!==u){!function genericComposeSMask(t,r,a,i,o,l,c,u,d,h,p){var v,y=!!l,g=y?l[0]:0,m=y?l[1]:0,_=y?l[2]:0;v="Luminosity"===o?composeSMaskLuminosity:composeSMaskAlpha;for(var b=Math.min(i,Math.ceil(1048576/a)),A=0;A<i;A+=b){var S=Math.min(b,i-A),k=t.getImageData(u-h,A+(d-p),a,S),x=r.getImageData(u,A+d,a,S);y&&composeSMaskBackdrop(k.data,g,m,_);v(k.data,x.data,c);r.putImageData(x,u,A+d)}}(r.context,a,c,u,r.subtype,r.backdrop,r.transferMap,o,l,r.offsetX,r.offsetY);t.save();t.globalAlpha=1;t.globalCompositeOperation="source-over";t.setTransform(1,0,0,1,0,0);t.drawImage(a.canvas,0,0);t.restore()}}function getImageSmoothingEnabled(t,r){var a=i.Util.singularValueDecompose2dScale(t);a[0]=Math.fround(a[0]);a[1]=Math.fround(a[1]);var o=Math.fround((globalThis.devicePixelRatio||1)*l.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==r?r:a[0]<=o||a[1]<=o}var p=["butt","round","square"],v=["miter","round","bevel"],y={},g={},m=function(){function CanvasGraphics(t,r,a,i,o,l,c){_classCallCheck(this,CanvasGraphics);this.ctx=t;this.current=new h(this.ctx.canvas.width,this.ctx.canvas.height);this.stateStack=[];this.pendingClip=null;this.pendingEOFill=!1;this.res=null;this.xobjs=null;this.commonObjs=r;this.objs=a;this.canvasFactory=i;this.imageLayer=o;this.groupStack=[];this.processingType3=null;this.baseTransform=null;this.baseTransformStack=[];this.groupLevel=0;this.smaskStack=[];this.smaskCounter=0;this.tempSMask=null;this.suspendedCtx=null;this.contentVisible=!0;this.markedContentStack=[];this.optionalContentConfig=l;this.cachedCanvases=new d(this.canvasFactory);this.cachedPatterns=new Map;this.annotationCanvasMap=c;this.viewportScale=1;this.outputScaleX=1;this.outputScaleY=1;t&&addContextCurrentTransform(t);this._cachedGetSinglePixelWidth=null}_createClass(CanvasGraphics,[{key:"beginDrawing",value:function beginDrawing(t){var r=t.transform,a=t.viewport,i=t.transparency,o=void 0!==i&&i,l=t.background,c=void 0===l?null:l,u=this.ctx.canvas.width,d=this.ctx.canvas.height;this.ctx.save();this.ctx.fillStyle=c||"rgb(255, 255, 255)";this.ctx.fillRect(0,0,u,d);this.ctx.restore();if(o){var h=this.cachedCanvases.getCanvas("transparent",u,d,!0);this.compositeCtx=this.ctx;this.transparentCanvas=h.canvas;this.ctx=h.context;this.ctx.save();this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save();resetCtxToDefault(this.ctx);if(r){this.ctx.transform.apply(this.ctx,r);this.outputScaleX=r[0];this.outputScaleY=r[0]}this.ctx.transform.apply(this.ctx,a.transform);this.viewportScale=a.scale;this.baseTransform=this.ctx.mozCurrentTransform.slice();this._combinedScaleFactor=Math.hypot(this.baseTransform[0],this.baseTransform[2]);this.imageLayer&&this.imageLayer.beginLayout()}},{key:"executeOperatorList",value:function executeOperatorList(t,r,a,o){var l=t.argsArray,c=t.fnArray,u=r||0,d=l.length;if(d===u)return u;for(var h,p=d-u>10&&"function"==typeof a,v=p?Date.now()+15:0,y=0,g=this.commonObjs,m=this.objs;;){if(void 0!==o&&u===o.nextBreakPoint){o.breakIt(u,a);return u}if((h=c[u])!==i.OPS.dependency)this[h].apply(this,l[u]);else{var _,b=_createForOfIteratorHelper(l[u]);try{for(b.s();!(_=b.n()).done;){var A=_.value,S=A.startsWith("g_")?g:m;if(!S.has(A)){S.get(A,a);return u}}}catch(t){b.e(t)}finally{b.f()}}if(++u===d)return u;if(p&&++y>10){if(Date.now()>v){a();return u}y=0}}}},{key:"endDrawing",value:function endDrawing(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore();if(this.transparentCanvas){this.ctx=this.compositeCtx;this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.drawImage(this.transparentCanvas,0,0);this.ctx.restore();this.transparentCanvas=null}this.cachedCanvases.clear();this.cachedPatterns.clear();this.imageLayer&&this.imageLayer.endLayout()}},{key:"_scaleImage",value:function _scaleImage(t,r){for(var a,i,o=t.width,l=t.height,c=Math.max(Math.hypot(r[0],r[1]),1),u=Math.max(Math.hypot(r[2],r[3]),1),d=o,h=l,p="prescale1";c>2&&d>1||u>2&&h>1;){var v=d,y=h;c>2&&d>1&&(c/=d/(v=Math.ceil(d/2)));u>2&&h>1&&(u/=h/(y=Math.ceil(h/2)));(i=(a=this.cachedCanvases.getCanvas(p,v,y)).context).clearRect(0,0,v,y);i.drawImage(t,0,0,d,h,0,0,v,y);t=a.canvas;d=v;h=y;p="prescale1"===p?"prescale2":"prescale1"}return{img:t,paintWidth:d,paintHeight:h}}},{key:"_createMaskCanvas",value:function _createMaskCanvas(t){var r=this.ctx,a=t.width,l=t.height,c=this.current.fillColor,u=this.current.patternFill,d=this.cachedCanvases.getCanvas("maskCanvas",a,l);putBinaryImageMask(d.context,t);var h=r.mozCurrentTransform,p=i.Util.transform(h,[1/a,0,0,-1/l,0,0]);p=i.Util.transform(p,[1,0,0,1,0,-l]);var v=i.Util.applyTransform([0,0],p),y=i.Util.applyTransform([a,l],p),g=i.Util.normalizeRect([v[0],v[1],y[0],y[1]]),m=Math.ceil(g[2]-g[0]),_=Math.ceil(g[3]-g[1]),b=this.cachedCanvases.getCanvas("fillCanvas",m,_,!0),A=b.context,S=Math.min(v[0],y[0]),k=Math.min(v[1],y[1]);A.translate(-S,-k);A.transform.apply(A,p);var x=this._scaleImage(d.canvas,A.mozCurrentTransformInverse);A.imageSmoothingEnabled=getImageSmoothingEnabled(A.mozCurrentTransform,t.interpolate);A.drawImage(x.img,0,0,x.img.width,x.img.height,0,0,a,l);A.globalCompositeOperation="source-in";var C=i.Util.transform(A.mozCurrentTransformInverse,[1,0,0,1,-S,-k]);A.fillStyle=u?c.getPattern(r,this,C,o.PathType.FILL):c;A.fillRect(0,0,a,l);return{canvas:b.canvas,offsetX:Math.round(S),offsetY:Math.round(k)}}},{key:"setLineWidth",value:function setLineWidth(t){this.current.lineWidth=t;this.ctx.lineWidth=t}},{key:"setLineCap",value:function setLineCap(t){this.ctx.lineCap=p[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.ctx.lineJoin=v[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.ctx.miterLimit=t}},{key:"setDash",value:function setDash(t,r){var a=this.ctx;if(void 0!==a.setLineDash){a.setLineDash(t);a.lineDashOffset=r}}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){for(var r=0,a=t.length;r<a;r++){var i=t[r],o=i[0],l=i[1];switch(o){case"LW":this.setLineWidth(l);break;case"LC":this.setLineCap(l);break;case"LJ":this.setLineJoin(l);break;case"ML":this.setMiterLimit(l);break;case"D":this.setDash(l[0],l[1]);break;case"RI":this.setRenderingIntent(l);break;case"FL":this.setFlatness(l);break;case"Font":this.setFont(l[0],l[1]);break;case"CA":this.current.strokeAlpha=i[1];break;case"ca":this.current.fillAlpha=i[1];this.ctx.globalAlpha=i[1];break;case"BM":this.ctx.globalCompositeOperation=l;break;case"SMask":this.current.activeSMask=l?this.tempSMask:null;this.tempSMask=null;this.checkSMaskState();break;case"TR":this.current.transferMaps=l}}}},{key:"inSMaskMode",get:function get(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function checkSMaskState(){var t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var t=this.ctx.canvas.width,r=this.ctx.canvas.height,a="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(a,t,r,!0);this.suspendedCtx=this.ctx;this.ctx=i.context;var o=this.ctx;o.setTransform.apply(o,this.suspendedCtx.mozCurrentTransform);copyCtxState(this.suspendedCtx,o);!function mirrorContextOperations(t,r){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save;t.__originalRestore=t.restore;t.__originalRotate=t.rotate;t.__originalScale=t.scale;t.__originalTranslate=t.translate;t.__originalTransform=t.transform;t.__originalSetTransform=t.setTransform;t.__originalResetTransform=t.resetTransform;t.__originalClip=t.clip;t.__originalMoveTo=t.moveTo;t.__originalLineTo=t.lineTo;t.__originalBezierCurveTo=t.bezierCurveTo;t.__originalRect=t.rect;t.__originalClosePath=t.closePath;t.__originalBeginPath=t.beginPath;t._removeMirroring=function(){t.save=t.__originalSave;t.restore=t.__originalRestore;t.rotate=t.__originalRotate;t.scale=t.__originalScale;t.translate=t.__originalTranslate;t.transform=t.__originalTransform;t.setTransform=t.__originalSetTransform;t.resetTransform=t.__originalResetTransform;t.clip=t.__originalClip;t.moveTo=t.__originalMoveTo;t.lineTo=t.__originalLineTo;t.bezierCurveTo=t.__originalBezierCurveTo;t.rect=t.__originalRect;t.closePath=t.__originalClosePath;t.beginPath=t.__originalBeginPath;delete t._removeMirroring};t.save=function ctxSave(){r.save();this.__originalSave()};t.restore=function ctxRestore(){r.restore();this.__originalRestore()};t.translate=function ctxTranslate(t,a){r.translate(t,a);this.__originalTranslate(t,a)};t.scale=function ctxScale(t,a){r.scale(t,a);this.__originalScale(t,a)};t.transform=function ctxTransform(t,a,i,o,l,c){r.transform(t,a,i,o,l,c);this.__originalTransform(t,a,i,o,l,c)};t.setTransform=function ctxSetTransform(t,a,i,o,l,c){r.setTransform(t,a,i,o,l,c);this.__originalSetTransform(t,a,i,o,l,c)};t.resetTransform=function ctxResetTransform(){r.resetTransform();this.__originalResetTransform()};t.rotate=function ctxRotate(t){r.rotate(t);this.__originalRotate(t)};t.clip=function ctxRotate(t){r.clip(t);this.__originalClip(t)};t.moveTo=function(t,a){r.moveTo(t,a);this.__originalMoveTo(t,a)};t.lineTo=function(t,a){r.lineTo(t,a);this.__originalLineTo(t,a)};t.bezierCurveTo=function(t,a,i,o,l,c){r.bezierCurveTo(t,a,i,o,l,c);this.__originalBezierCurveTo(t,a,i,o,l,c)};t.rect=function(t,a,i,o){r.rect(t,a,i,o);this.__originalRect(t,a,i,o)};t.closePath=function(){r.closePath();this.__originalClosePath()};t.beginPath=function(){r.beginPath();this.__originalBeginPath()}}(o,this.suspendedCtx);this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring();copyCtxState(this.ctx,this.suspendedCtx);this.ctx=this.suspendedCtx;this.suspendedCtx=null}},{key:"compose",value:function compose(t){if(this.current.activeSMask){if(t){t[0]=Math.floor(t[0]);t[1]=Math.floor(t[1]);t[2]=Math.ceil(t[2]);t[3]=Math.ceil(t[3])}else t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var r=this.current.activeSMask;composeSMask(this.suspendedCtx,r,this.ctx,t);this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height);this.ctx.restore()}}},{key:"save",value:function save(){if(this.inSMaskMode){copyCtxState(this.ctx,this.suspendedCtx);this.suspendedCtx.save()}else this.ctx.save();var t=this.current;this.stateStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode();if(0!==this.stateStack.length){this.current=this.stateStack.pop();if(this.inSMaskMode){this.suspendedCtx.restore();copyCtxState(this.suspendedCtx,this.ctx)}else this.ctx.restore();this.checkSMaskState();this.pendingClip=null;this._cachedGetSinglePixelWidth=null}}},{key:"transform",value:function transform(t,r,a,i,o,l){this.ctx.transform(t,r,a,i,o,l);this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function constructPath(t,r){for(var a,o,l=this.ctx,c=this.current,u=c.x,d=c.y,h=0,p=0,v=t.length;h<v;h++)switch(0|t[h]){case i.OPS.rectangle:u=r[p++];d=r[p++];var y=r[p++],g=r[p++],m=u+y,_=d+g;l.moveTo(u,d);if(0===y||0===g)l.lineTo(m,_);else{l.lineTo(m,d);l.lineTo(m,_);l.lineTo(u,_)}c.updatePathMinMax(l.mozCurrentTransform,u,d);c.updatePathMinMax(l.mozCurrentTransform,m,_);l.closePath();break;case i.OPS.moveTo:u=r[p++];d=r[p++];l.moveTo(u,d);c.updatePathMinMax(l.mozCurrentTransform,u,d);break;case i.OPS.lineTo:u=r[p++];d=r[p++];l.lineTo(u,d);c.updatePathMinMax(l.mozCurrentTransform,u,d);break;case i.OPS.curveTo:a=u;o=d;u=r[p+4];d=r[p+5];l.bezierCurveTo(r[p],r[p+1],r[p+2],r[p+3],u,d);c.updateCurvePathMinMax(l.mozCurrentTransform,a,o,r[p],r[p+1],r[p+2],r[p+3],u,d);p+=6;break;case i.OPS.curveTo2:a=u;o=d;l.bezierCurveTo(u,d,r[p],r[p+1],r[p+2],r[p+3]);c.updateCurvePathMinMax(l.mozCurrentTransform,a,o,u,d,r[p],r[p+1],r[p+2],r[p+3]);u=r[p+2];d=r[p+3];p+=4;break;case i.OPS.curveTo3:a=u;o=d;u=r[p+2];d=r[p+3];l.bezierCurveTo(r[p],r[p+1],u,d,u,d);c.updateCurvePathMinMax(l.mozCurrentTransform,a,o,r[p],r[p+1],u,d,u,d);p+=4;break;case i.OPS.closePath:l.closePath()}c.setCurrentPoint(u,d)}},{key:"closePath",value:function closePath(){this.ctx.closePath()}},{key:"stroke",value:function stroke(t){t=void 0===t||t;var r=this.ctx,a=this.current.strokeColor;r.globalAlpha=this.current.strokeAlpha;if(this.contentVisible)if("object"===_typeof(a)&&null!=a&&a.getPattern){var i=this.getSinglePixelWidth();r.save();r.strokeStyle=a.getPattern(r,this,r.mozCurrentTransformInverse,o.PathType.STROKE);r.lineWidth=Math.max(i,this.current.lineWidth);r.stroke();r.restore()}else{var l=this.getSinglePixelWidth();if(l<0&&-l>=this.current.lineWidth){r.save();r.resetTransform();r.lineWidth=Math.floor(this._combinedScaleFactor);r.stroke();r.restore()}else{r.lineWidth=Math.max(l,this.current.lineWidth);r.stroke()}}t&&this.consumePath(this.current.getClippedPathBoundingBox());r.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"fill",value:function fill(t){t=void 0===t||t;var r=this.ctx,a=this.current.fillColor,i=!1;if(this.current.patternFill){r.save();r.fillStyle=a.getPattern(r,this,r.mozCurrentTransformInverse,o.PathType.FILL);i=!0}var l=this.current.getClippedPathBoundingBox();if(this.contentVisible&&null!==l)if(this.pendingEOFill){r.fill("evenodd");this.pendingEOFill=!1}else r.fill();i&&r.restore();t&&this.consumePath(l)}},{key:"eoFill",value:function eoFill(){this.pendingEOFill=!0;this.fill()}},{key:"fillStroke",value:function fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()}},{key:"eoFillStroke",value:function eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()}},{key:"endPath",value:function endPath(){this.consumePath()}},{key:"clip",value:function clip(){this.pendingClip=y}},{key:"eoClip",value:function eoClip(){this.pendingClip=g}},{key:"beginText",value:function beginText(){this.current.textMatrix=i.IDENTITY_MATRIX;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"endText",value:function endText(){var t=this.pendingTextPaths,r=this.ctx;if(void 0!==t){r.save();r.beginPath();for(var a=0;a<t.length;a++){var i=t[a];r.setTransform.apply(r,i.transform);r.translate(i.x,i.y);i.addToPath(r,i.fontSize)}r.restore();r.clip();r.beginPath();delete this.pendingTextPaths}else r.beginPath()}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setFont",value:function setFont(t,r){var a=this.commonObjs.get(t),o=this.current;if(!a)throw new Error("Can't find font for ".concat(t));o.fontMatrix=a.fontMatrix||i.FONT_IDENTITY_MATRIX;0!==o.fontMatrix[0]&&0!==o.fontMatrix[3]||(0,i.warn)("Invalid font matrix for font "+t);if(r<0){r=-r;o.fontDirection=-1}else o.fontDirection=1;this.current.font=a;this.current.fontSize=r;if(!a.isType3Font){var l=a.loadedName||"sans-serif",c="normal";a.black?c="900":a.bold&&(c="bold");var u=a.italic?"italic":"normal",d='"'.concat(l,'", ').concat(a.fallbackName),h=r;r<16?h=16:r>100&&(h=100);this.current.fontSizeScale=r/h;this.ctx.font="".concat(u," ").concat(c," ").concat(h,"px ").concat(d)}}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"moveText",value:function moveText(t,r){this.current.x=this.current.lineX+=t;this.current.y=this.current.lineY+=r}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,a,i,o,l){this.current.textMatrix=[t,r,a,i,o,l];this.current.textMatrixScale=Math.hypot(t,r);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function paintChar(t,r,a,o,l){var c,u=this.ctx,d=this.current,h=d.font,p=d.textRenderingMode,v=d.fontSize/d.fontSizeScale,y=p&i.TextRenderingMode.FILL_STROKE_MASK,g=!!(p&i.TextRenderingMode.ADD_TO_PATH_FLAG),m=d.patternFill&&!h.missingFile;(h.disableFontFace||g||m)&&(c=h.getPathGenerator(this.commonObjs,t));if(h.disableFontFace||m){u.save();u.translate(r,a);u.beginPath();c(u,v);o&&u.setTransform.apply(u,o);y!==i.TextRenderingMode.FILL&&y!==i.TextRenderingMode.FILL_STROKE||u.fill();if(y===i.TextRenderingMode.STROKE||y===i.TextRenderingMode.FILL_STROKE){if(l){u.resetTransform();u.lineWidth=Math.floor(this._combinedScaleFactor)}u.stroke()}u.restore()}else{y!==i.TextRenderingMode.FILL&&y!==i.TextRenderingMode.FILL_STROKE||u.fillText(t,r,a);if(y===i.TextRenderingMode.STROKE||y===i.TextRenderingMode.FILL_STROKE)if(l){u.save();u.moveTo(r,a);u.resetTransform();u.lineWidth=Math.floor(this._combinedScaleFactor);u.strokeText(t,0,0);u.restore()}else u.strokeText(t,r,a)}if(g){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:u.mozCurrentTransform,x:r,y:a,fontSize:v,addToPath:c})}}},{key:"isFontSubpixelAAEnabled",get:function get(){var t=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;t.scale(1.5,1);t.fillText("I",0,10);for(var r=t.getImageData(0,0,10,10).data,a=!1,o=3;o<r.length;o+=4)if(r[o]>0&&r[o]<255){a=!0;break}return(0,i.shadow)(this,"isFontSubpixelAAEnabled",a)}},{key:"showText",value:function showText(t){var r=this.current,a=r.font;if(a.isType3Font)return this.showType3Text(t);var l=r.fontSize;if(0!==l){var c,u=this.ctx,d=r.fontSizeScale,h=r.charSpacing,p=r.wordSpacing,v=r.fontDirection,y=r.textHScale*v,g=t.length,m=a.vertical,_=m?1:-1,b=a.defaultVMetrics,A=l*r.fontMatrix[0],S=r.textRenderingMode===i.TextRenderingMode.FILL&&!a.disableFontFace&&!r.patternFill;u.save();u.transform.apply(u,r.textMatrix);u.translate(r.x,r.y+r.textRise);v>0?u.scale(y,-1):u.scale(y,1);if(r.patternFill){u.save();var k=r.fillColor.getPattern(u,this,u.mozCurrentTransformInverse,o.PathType.FILL);c=u.mozCurrentTransform;u.restore();u.fillStyle=k}var x=r.lineWidth,C=!1,P=r.textMatrixScale;if(0===P||0===x){var w=r.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;if(w===i.TextRenderingMode.STROKE||w===i.TextRenderingMode.FILL_STROKE){this._cachedGetSinglePixelWidth=null;C=(x=this.getSinglePixelWidth())<0}}else x/=P;if(1!==d){u.scale(d,d);x/=d}u.lineWidth=x;var T,R=0;for(T=0;T<g;++T){var E=t[T];if("number"!=typeof E){var O=!1,M=(E.isSpace?p:0)+h,I=E.fontChar,D=E.accent,L=void 0,j=void 0,N=E.width;if(m){var B=E.vmetric||b,G=-(E.vmetric?B[1]:.5*N)*A,U=B[2]*A;N=B?-B[0]:N;L=G/d;j=(R+U)/d}else{L=R/d;j=0}if(a.remeasure&&N>0){var W=1e3*u.measureText(I).width/l*d;if(N<W&&this.isFontSubpixelAAEnabled){var H=N/W;O=!0;u.save();u.scale(H,1);L/=H}else N!==W&&(L+=(N-W)/2e3*l/d)}if(this.contentVisible&&(E.isInFont||a.missingFile))if(S&&!D)u.fillText(I,L,j);else{this.paintChar(I,L,j,c,C);if(D){var q=L+l*D.offset.x/d,V=j-l*D.offset.y/d;this.paintChar(D.fontChar,q,V,c,C)}}R+=m?N*A-M*v:N*A+M*v;O&&u.restore()}else R+=_*E*l/1e3}m?r.y-=R:r.x+=R*y;u.restore();this.compose()}}},{key:"showType3Text",value:function showType3Text(t){var r,a,o,l,c=this.ctx,u=this.current,d=u.font,h=u.fontSize,p=u.fontDirection,v=d.vertical?1:-1,y=u.charSpacing,g=u.wordSpacing,m=u.textHScale*p,_=u.fontMatrix||i.FONT_IDENTITY_MATRIX,b=t.length;if(!(u.textRenderingMode===i.TextRenderingMode.INVISIBLE)&&0!==h){this._cachedGetSinglePixelWidth=null;c.save();c.transform.apply(c,u.textMatrix);c.translate(u.x,u.y);c.scale(m,p);for(r=0;r<b;++r)if("number"!=typeof(a=t[r])){var A=(a.isSpace?g:0)+y,S=d.charProcOperatorList[a.operatorListId];if(S){if(this.contentVisible){this.processingType3=a;this.save();c.scale(h,h);c.transform.apply(c,_);this.executeOperatorList(S);this.restore()}o=i.Util.applyTransform([a.width,0],_)[0]*h+A;c.translate(o,0);u.x+=o*m}else(0,i.warn)('Type3 character "'.concat(a.operatorListId,'" is not available.'))}else{l=v*a*h/1e3;this.ctx.translate(l,0);u.x+=l*m}c.restore();this.processingType3=null}}},{key:"setCharWidth",value:function setCharWidth(t,r){}},{key:"setCharWidthAndBounds",value:function setCharWidthAndBounds(t,r,a,i,o,l){this.ctx.rect(a,i,o-a,l-i);this.clip();this.endPath()}},{key:"getColorN_Pattern",value:function getColorN_Pattern(t){var r,a=this;if("TilingPattern"===t[0]){var i=t[1],l=this.baseTransform||this.ctx.mozCurrentTransform.slice(),c={createCanvasGraphics:function createCanvasGraphics(t){return new CanvasGraphics(t,a.commonObjs,a.objs,a.canvasFactory)}};r=new o.TilingPattern(t,i,this.ctx,c,l)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,a){var o=i.Util.makeHexColor(t,r,a);this.ctx.strokeStyle=o;this.current.strokeColor=o}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,a){var o=i.Util.makeHexColor(t,r,a);this.ctx.fillStyle=o;this.current.fillColor=o;this.current.patternFill=!1}},{key:"_getPattern",value:function _getPattern(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.cachedPatterns.has(t))r=this.cachedPatterns.get(t);else{r=(0,o.getShadingPattern)(this.objs.get(t));this.cachedPatterns.set(t,r)}a&&(r.matrix=a);return r}},{key:"shadingFill",value:function shadingFill(t){if(this.contentVisible){var r=this.ctx;this.save();var a=this._getPattern(t);r.fillStyle=a.getPattern(r,this,r.mozCurrentTransformInverse,o.PathType.SHADING);var l=r.mozCurrentTransformInverse;if(l){var c=r.canvas,u=c.width,d=c.height,h=i.Util.applyTransform([0,0],l),p=i.Util.applyTransform([0,d],l),v=i.Util.applyTransform([u,0],l),y=i.Util.applyTransform([u,d],l),g=Math.min(h[0],p[0],v[0],y[0]),m=Math.min(h[1],p[1],v[1],y[1]),_=Math.max(h[0],p[0],v[0],y[0]),b=Math.max(h[1],p[1],v[1],y[1]);this.ctx.fillRect(g,m,_-g,b-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox());this.restore()}}},{key:"beginInlineImage",value:function beginInlineImage(){(0,i.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function beginImageData(){(0,i.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){if(this.contentVisible){this.save();this.baseTransformStack.push(this.baseTransform);Array.isArray(t)&&6===t.length&&this.transform.apply(this,t);this.baseTransform=this.ctx.mozCurrentTransform;if(r){var a=r[2]-r[0],i=r[3]-r[1];this.ctx.rect(r[0],r[1],a,i);this.current.updatePathMinMax(this.ctx.mozCurrentTransform,r[0],r[1]);this.current.updatePathMinMax(this.ctx.mozCurrentTransform,r[2],r[3]);this.clip();this.endPath()}}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}}},{key:"beginGroup",value:function beginGroup(t){if(this.contentVisible){this.save();if(this.inSMaskMode){this.endSMaskMode();this.current.activeSMask=null}var r=this.ctx;t.isolated||(0,i.info)("TODO: Support non-isolated groups.");t.knockout&&(0,i.warn)("Knockout groups not supported.");var a=r.mozCurrentTransform;t.matrix&&r.transform.apply(r,t.matrix);if(!t.bbox)throw new Error("Bounding box is required.");var o=i.Util.getAxialAlignedBoundingBox(t.bbox,r.mozCurrentTransform),l=[0,0,r.canvas.width,r.canvas.height];o=i.Util.intersect(o,l)||[0,0,0,0];var u=Math.floor(o[0]),d=Math.floor(o[1]),h=Math.max(Math.ceil(o[2])-u,1),p=Math.max(Math.ceil(o[3])-d,1),v=1,y=1;if(h>c){v=h/c;h=c}if(p>c){y=p/c;p=c}this.current.startNewPathAndClipBox([0,0,h,p]);var g="groupAt"+this.groupLevel;t.smask&&(g+="_smask_"+this.smaskCounter++%2);var m=this.cachedCanvases.getCanvas(g,h,p,!0),_=m.context;_.scale(1/v,1/y);_.translate(-u,-d);_.transform.apply(_,a);if(t.smask)this.smaskStack.push({canvas:m.canvas,context:_,offsetX:u,offsetY:d,scaleX:v,scaleY:y,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null});else{r.setTransform(1,0,0,1,0,0);r.translate(u,d);r.scale(v,y);r.save()}copyCtxState(r,_);this.ctx=_;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(r);this.groupLevel++}}},{key:"endGroup",value:function endGroup(t){if(this.contentVisible){this.groupLevel--;var r=this.ctx,a=this.groupStack.pop();this.ctx=a;this.ctx.imageSmoothingEnabled=!1;if(t.smask){this.tempSMask=this.smaskStack.pop();this.restore()}else{this.ctx.restore();var o=this.ctx.mozCurrentTransform;this.restore();this.ctx.save();this.ctx.setTransform.apply(this.ctx,o);var l=i.Util.getAxialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],o);this.ctx.drawImage(r.canvas,0,0);this.ctx.restore();this.compose(l)}}}},{key:"beginAnnotations",value:function beginAnnotations(){this.save();this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function endAnnotations(){this.restore()}},{key:"beginAnnotation",value:function beginAnnotation(t,r,a,o,l){this.save();if(Array.isArray(r)&&4===r.length){var c=r[2]-r[0],u=r[3]-r[1];if(l&&this.annotationCanvasMap){(a=a.slice())[4]-=r[0];a[5]-=r[1];(r=r.slice())[0]=r[1]=0;r[2]=c;r[3]=u;var d=_slicedToArray(i.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),2),p=d[0],v=d[1],y=this.viewportScale,g=Math.ceil(c*this.outputScaleX*y),m=Math.ceil(u*this.outputScaleY*y);this.annotationCanvas=this.canvasFactory.create(g,m);var _=this.annotationCanvas,b=_.canvas,A=_.context;b.style.width="calc(".concat(c,"px * var(--viewport-scale-factor))");b.style.height="calc(".concat(u,"px * var(--viewport-scale-factor))");this.annotationCanvasMap.set(t,b);this.annotationCanvas.savedCtx=this.ctx;this.ctx=A;this.ctx.setTransform(p,0,0,-v,0,u*v);addContextCurrentTransform(this.ctx);resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx);this.ctx.rect(r[0],r[1],c,u);this.clip();this.endPath()}}this.current=new h(this.ctx.canvas.width,this.ctx.canvas.height);this.transform.apply(this,a);this.transform.apply(this,o)}},{key:"endAnnotation",value:function endAnnotation(){if(this.annotationCanvas){this.ctx=this.annotationCanvas.savedCtx;delete this.annotationCanvas.savedCtx;delete this.annotationCanvas}this.restore()}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){if(this.contentVisible){var r=this.ctx,a=t.width,i=t.height,o=this.processingType3;o&&void 0===o.compiled&&(o.compiled=a<=1e3&&i<=1e3?function compileType3Glyph(t){var r,a,i,o,l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=t.width,u=t.height,d=c+1,h=new Uint8Array(d*(u+1)),p=c+7&-8,v=t.data,y=new Uint8Array(p*u),g=0;for(r=0,a=v.length;r<a;r++)for(var m=v[r],_=128;_>0;){y[g++]=m&_?0:255;_>>=1}var b=0;if(0!==y[g=0]){h[0]=1;++b}for(i=1;i<c;i++){if(y[g]!==y[g+1]){h[i]=y[g]?2:1;++b}g++}if(0!==y[g]){h[i]=2;++b}for(r=1;r<u;r++){o=r*d;if(y[(g=r*p)-p]!==y[g]){h[o]=y[g]?1:8;++b}var A=(y[g]?4:0)+(y[g-p]?8:0);for(i=1;i<c;i++){if(l[A=(A>>2)+(y[g+1]?4:0)+(y[g-p+1]?8:0)]){h[o+i]=l[A];++b}g++}if(y[g-p]!==y[g]){h[o+i]=y[g]?2:4;++b}if(b>1e3)return null}o=r*d;if(0!==y[g=p*(u-1)]){h[o]=8;++b}for(i=1;i<c;i++){if(y[g]!==y[g+1]){h[o+i]=y[g]?4:8;++b}g++}if(0!==y[g]){h[o+i]=4;++b}if(b>1e3)return null;var S=new Int32Array([0,d,-1,0,-d,0,0,0,1]),k=[];for(r=0;b&&r<=u;r++){for(var x=r*d,C=x+c;x<C&&!h[x];)x++;if(x!==C){var P=[x%d,r],w=x,T=h[x];do{var R=S[T];do{x+=R}while(!h[x]);var E=h[x];if(5!==E&&10!==E){T=E;h[x]=0}else{T=E&51*T>>4;h[x]&=T>>2|T<<2}P.push(x%d,x/d|0);h[x]||--b}while(w!==x);k.push(P);--r}}return function drawOutline(t){t.save();t.scale(1/c,-1/u);t.translate(0,-u);t.beginPath();for(var r=0,a=k.length;r<a;r++){var i=k[r];t.moveTo(i[0],i[1]);for(var o=2,l=i.length;o<l;o+=2)t.lineTo(i[o],i[o+1])}t.fill();t.beginPath();t.restore()}}({data:t.data,width:a,height:i}):null);if(null!=o&&o.compiled)o.compiled(r);else{var l=this._createMaskCanvas(t),c=l.canvas;r.save();r.setTransform(1,0,0,1,0,0);r.drawImage(c,l.offsetX,l.offsetY);r.restore();this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function paintImageMaskXObjectRepeat(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var u=this.ctx;u.save();var d=u.mozCurrentTransform;u.transform(r,a,o,l,0,0);var h=this._createMaskCanvas(t);u.setTransform(1,0,0,1,0,0);for(var p=0,v=c.length;p<v;p+=2){var y=i.Util.transform(d,[r,a,o,l,c[p],c[p+1]]),g=i.Util.applyTransform([0,0],y),m=_slicedToArray(g,2),_=m[0],b=m[1];u.drawImage(h.canvas,_,b)}u.restore();this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function paintImageMaskXObjectGroup(t){if(this.contentVisible){for(var r=this.ctx,a=this.current.fillColor,i=this.current.patternFill,l=0,c=t.length;l<c;l++){var u=t[l],d=u.width,h=u.height,p=this.cachedCanvases.getCanvas("maskCanvas",d,h),v=p.context;v.save();putBinaryImageMask(v,u);v.globalCompositeOperation="source-in";v.fillStyle=i?a.getPattern(v,this,r.mozCurrentTransformInverse,o.PathType.FILL):a;v.fillRect(0,0,d,h);v.restore();r.save();r.transform.apply(r,u.transform);r.scale(1,-1);r.drawImage(p.canvas,0,0,d,h,0,-1,1,1);r.restore()}this.compose()}}},{key:"paintImageXObject",value:function paintImageXObject(t){if(this.contentVisible){var r=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);r?this.paintInlineImageXObject(r):(0,i.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function paintImageXObjectRepeat(t,r,a,o){if(this.contentVisible){var l=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);if(l){for(var c=l.width,u=l.height,d=[],h=0,p=o.length;h<p;h+=2)d.push({transform:[r,0,0,a,o[h],o[h+1]],x:0,y:0,w:c,h:u});this.paintInlineImageXObjectGroup(l,d)}else(0,i.warn)("Dependent image isn't ready yet")}}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(t){if(this.contentVisible){var r,a=t.width,i=t.height,o=this.ctx;this.save();o.scale(1/a,-1/i);if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)r=t;else{var l=this.cachedCanvases.getCanvas("inlineImage",a,i);putBinaryImageData(l.context,t,this.current.transferMaps);r=l.canvas}var c=this._scaleImage(r,o.mozCurrentTransformInverse);o.imageSmoothingEnabled=getImageSmoothingEnabled(o.mozCurrentTransform,t.interpolate);o.drawImage(c.img,0,0,c.paintWidth,c.paintHeight,0,-i,a,i);if(this.imageLayer){var u=this.getCanvasPosition(0,-i);this.imageLayer.appendImage({imgData:t,left:u[0],top:u[1],width:a/o.mozCurrentTransformInverse[0],height:i/o.mozCurrentTransformInverse[3]})}this.compose();this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function paintInlineImageXObjectGroup(t,r){if(this.contentVisible){var a=this.ctx,i=t.width,o=t.height,l=this.cachedCanvases.getCanvas("inlineImage",i,o);putBinaryImageData(l.context,t,this.current.transferMaps);for(var c=0,u=r.length;c<u;c++){var d=r[c];a.save();a.transform.apply(a,d.transform);a.scale(1,-1);a.drawImage(l.canvas,d.x,d.y,d.w,d.h,0,-1,1,1);if(this.imageLayer){var h=this.getCanvasPosition(d.x,d.y);this.imageLayer.appendImage({imgData:t,left:h[0],top:h[1],width:i,height:o})}a.restore()}this.compose()}}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){if(this.contentVisible){this.ctx.fillRect(0,0,1,1);this.compose()}}},{key:"markPoint",value:function markPoint(t){}},{key:"markPointProps",value:function markPointProps(t,r){}},{key:"beginMarkedContent",value:function beginMarkedContent(t){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function beginMarkedContentProps(t,r){"OC"===t?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0});this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function endMarkedContent(){this.markedContentStack.pop();this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function beginCompat(){}},{key:"endCompat",value:function endCompat(){}},{key:"consumePath",value:function consumePath(t){this.pendingClip&&this.current.updateClipFromPath();this.pendingClip||this.compose(t);var r=this.ctx;if(this.pendingClip){this.pendingClip===g?r.clip("evenodd"):r.clip();this.pendingClip=null}this.current.startNewPathAndClipBox(this.current.clipBox);r.beginPath()}},{key:"getSinglePixelWidth",value:function getSinglePixelWidth(){if(null===this._cachedGetSinglePixelWidth){var t=this.ctx.mozCurrentTransform,r=Math.abs(t[0]*t[3]-t[2]*t[1]),a=Math.pow(t[0],2)+Math.pow(t[2],2),i=Math.pow(t[1],2)+Math.pow(t[3],2),o=Math.sqrt(Math.max(a,i))/r;a!==i&&this._combinedScaleFactor*o>1?this._cachedGetSinglePixelWidth=-this._combinedScaleFactor*o:r>Number.EPSILON?this._cachedGetSinglePixelWidth=o:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function getCanvasPosition(t,r){var a=this.ctx.mozCurrentTransform;return[a[0]*t+a[2]*r+a[4],a[1]*t+a[3]*r+a[5]]}},{key:"isContentVisible",value:function isContentVisible(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}]);return CanvasGraphics}();r.CanvasGraphics=m;for(var _ in i.OPS)void 0!==m.prototype[_]&&(m.prototype[i.OPS[_]]=m.prototype[_])},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TilingPattern=r.PathType=void 0;r.getShadingPattern=function getShadingPattern(t){switch(t[0]){case"RadialAxial":return new c(t);case"Mesh":return new u(t);case"Dummy":return new d}throw new Error("Unknown IR type: ".concat(t[0]))};var i=a(1);function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(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 a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var o={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};r.PathType=o;function applyBoundingBox(t,r){if(r&&"undefined"!=typeof Path2D){var a=r[2]-r[0],i=r[3]-r[1],o=new Path2D;o.rect(r[0],r[1],a,i);t.clip(o)}}var l=function(){function BaseShadingPattern(){_classCallCheck(this,BaseShadingPattern);this.constructor===BaseShadingPattern&&(0,i.unreachable)("Cannot initialize BaseShadingPattern.")}_createClass(BaseShadingPattern,[{key:"getPattern",value:function getPattern(){(0,i.unreachable)("Abstract method `getPattern` called.")}}]);return BaseShadingPattern}(),c=function(t){_inherits(RadialAxialShadingPattern,t);var r=_createSuper(RadialAxialShadingPattern);function RadialAxialShadingPattern(t){var a;_classCallCheck(this,RadialAxialShadingPattern);(a=r.call(this))._type=t[1];a._bbox=t[2];a._colorStops=t[3];a._p0=t[4];a._p1=t[5];a._r0=t[6];a._r1=t[7];a.matrix=null;return a}_createClass(RadialAxialShadingPattern,[{key:"_createGradient",value:function _createGradient(t){var r;"axial"===this._type?r=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(r=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var a,i=_createForOfIteratorHelper(this._colorStops);try{for(i.s();!(a=i.n()).done;){var o=a.value;r.addColorStop(o[0],o[1])}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"getPattern",value:function getPattern(t,r,a,l){var c;if(l===o.STROKE||l===o.FILL){var u=r.current.getClippedPathBoundingBox(l,t.mozCurrentTransform)||[0,0,0,0],d=Math.ceil(u[2]-u[0])||1,h=Math.ceil(u[3]-u[1])||1,p=r.cachedCanvases.getCanvas("pattern",d,h,!0),v=p.context;v.clearRect(0,0,v.canvas.width,v.canvas.height);v.beginPath();v.rect(0,0,v.canvas.width,v.canvas.height);v.translate(-u[0],-u[1]);a=i.Util.transform(a,[1,0,0,1,u[0],u[1]]);v.transform.apply(v,r.baseTransform);this.matrix&&v.transform.apply(v,this.matrix);applyBoundingBox(v,this._bbox);v.fillStyle=this._createGradient(v);v.fill();c=t.createPattern(p.canvas,"no-repeat");var y=new DOMMatrix(a);try{c.setTransform(y)}catch(t){(0,i.warn)('RadialAxialShadingPattern.getPattern: "'.concat(null==t?void 0:t.message,'".'))}}else{applyBoundingBox(t,this._bbox);c=this._createGradient(t)}return c}}]);return RadialAxialShadingPattern}(l);function drawTriangle(t,r,a,i,o,l,c,u){var d,h=r.coords,p=r.colors,v=t.data,y=4*t.width;if(h[a+1]>h[i+1]){d=a;a=i;i=d;d=l;l=c;c=d}if(h[i+1]>h[o+1]){d=i;i=o;o=d;d=c;c=u;u=d}if(h[a+1]>h[i+1]){d=a;a=i;i=d;d=l;l=c;c=d}var g=(h[a]+r.offsetX)*r.scaleX,m=(h[a+1]+r.offsetY)*r.scaleY,_=(h[i]+r.offsetX)*r.scaleX,b=(h[i+1]+r.offsetY)*r.scaleY,A=(h[o]+r.offsetX)*r.scaleX,S=(h[o+1]+r.offsetY)*r.scaleY;if(!(m>=S))for(var k,x,C,P,w,T,R,E,O=p[l],M=p[l+1],I=p[l+2],D=p[c],L=p[c+1],j=p[c+2],N=p[u],B=p[u+1],G=p[u+2],U=Math.round(m),W=Math.round(S),H=U;H<=W;H++){if(H<b){var q=void 0;k=g-(g-_)*(q=H<m?0:(m-H)/(m-b));x=O-(O-D)*q;C=M-(M-L)*q;P=I-(I-j)*q}else{var V=void 0;k=_-(_-A)*(V=H>S?1:b===S?0:(b-H)/(b-S));x=D-(D-N)*V;C=L-(L-B)*V;P=j-(j-G)*V}var z=void 0;w=g-(g-A)*(z=H<m?0:H>S?1:(m-H)/(m-S));T=O-(O-N)*z;R=M-(M-B)*z;E=I-(I-G)*z;for(var X=Math.round(Math.min(k,w)),Y=Math.round(Math.max(k,w)),K=y*H+4*X,J=X;J<=Y;J++){(z=(k-J)/(k-w))<0?z=0:z>1&&(z=1);v[K++]=x-(x-T)*z|0;v[K++]=C-(C-R)*z|0;v[K++]=P-(P-E)*z|0;v[K++]=255}}}function drawFigure(t,r,a){var i,o,l=r.coords,c=r.colors;switch(r.type){case"lattice":var u=r.verticesPerRow,d=Math.floor(l.length/u)-1,h=u-1;for(i=0;i<d;i++)for(var p=i*u,v=0;v<h;v++,p++){drawTriangle(t,a,l[p],l[p+1],l[p+u],c[p],c[p+1],c[p+u]);drawTriangle(t,a,l[p+u+1],l[p+1],l[p+u],c[p+u+1],c[p+1],c[p+u])}break;case"triangles":for(i=0,o=l.length;i<o;i+=3)drawTriangle(t,a,l[i],l[i+1],l[i+2],c[i],c[i+1],c[i+2]);break;default:throw new Error("illegal figure")}}var u=function(t){_inherits(MeshShadingPattern,t);var r=_createSuper(MeshShadingPattern);function MeshShadingPattern(t){var a;_classCallCheck(this,MeshShadingPattern);(a=r.call(this))._coords=t[2];a._colors=t[3];a._figures=t[4];a._bounds=t[5];a._bbox=t[7];a._background=t[8];a.matrix=null;return a}_createClass(MeshShadingPattern,[{key:"_createMeshCanvas",value:function _createMeshCanvas(t,r,a){var i=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-i,c=Math.ceil(this._bounds[3])-o,u=Math.min(Math.ceil(Math.abs(l*t[0]*1.1)),3e3),d=Math.min(Math.ceil(Math.abs(c*t[1]*1.1)),3e3),h=l/u,p=c/d,v={coords:this._coords,colors:this._colors,offsetX:-i,offsetY:-o,scaleX:1/h,scaleY:1/p},y=u+4,g=d+4,m=a.getCanvas("mesh",y,g,!1),_=m.context,b=_.createImageData(u,d);if(r)for(var A=b.data,S=0,k=A.length;S<k;S+=4){A[S]=r[0];A[S+1]=r[1];A[S+2]=r[2];A[S+3]=255}var x,C=_createForOfIteratorHelper(this._figures);try{for(C.s();!(x=C.n()).done;){drawFigure(b,x.value,v)}}catch(t){C.e(t)}finally{C.f()}_.putImageData(b,2,2);return{canvas:m.canvas,offsetX:i-2*h,offsetY:o-2*p,scaleX:h,scaleY:p}}},{key:"getPattern",value:function getPattern(t,r,a,l){applyBoundingBox(t,this._bbox);var c;if(l===o.SHADING)c=i.Util.singularValueDecompose2dScale(t.mozCurrentTransform);else{c=i.Util.singularValueDecompose2dScale(r.baseTransform);if(this.matrix){var u=i.Util.singularValueDecompose2dScale(this.matrix);c=[c[0]*u[0],c[1]*u[1]]}}var d=this._createMeshCanvas(c,l===o.SHADING?null:this._background,r.cachedCanvases);if(l!==o.SHADING){t.setTransform.apply(t,r.baseTransform);this.matrix&&t.transform.apply(t,this.matrix)}t.translate(d.offsetX,d.offsetY);t.scale(d.scaleX,d.scaleY);return t.createPattern(d.canvas,"no-repeat")}}]);return MeshShadingPattern}(l),d=function(t){_inherits(DummyShadingPattern,t);var r=_createSuper(DummyShadingPattern);function DummyShadingPattern(){_classCallCheck(this,DummyShadingPattern);return r.apply(this,arguments)}_createClass(DummyShadingPattern,[{key:"getPattern",value:function getPattern(){return"hotpink"}}]);return DummyShadingPattern}(l);var h=1,p=2,v=function(){function TilingPattern(t,r,a,i,o){_classCallCheck(this,TilingPattern);this.operatorList=t[2];this.matrix=t[3]||[1,0,0,1,0,0];this.bbox=t[4];this.xstep=t[5];this.ystep=t[6];this.paintType=t[7];this.tilingType=t[8];this.color=r;this.ctx=a;this.canvasGraphicsFactory=i;this.baseTransform=o}_createClass(TilingPattern,[{key:"createPatternCanvas",value:function createPatternCanvas(t){var r=this.operatorList,a=this.bbox,o=this.xstep,l=this.ystep,c=this.paintType,u=this.tilingType,d=this.color,h=this.canvasGraphicsFactory;(0,i.info)("TilingType: "+u);var p=a[0],v=a[1],y=a[2],g=a[3],m=i.Util.singularValueDecompose2dScale(this.matrix),_=i.Util.singularValueDecompose2dScale(this.baseTransform),b=[m[0]*_[0],m[1]*_[1]],A=this.getSizeAndScale(o,this.ctx.canvas.width,b[0]),S=this.getSizeAndScale(l,this.ctx.canvas.height,b[1]),k=t.cachedCanvases.getCanvas("pattern",A.size,S.size,!0),x=k.context,C=h.createCanvasGraphics(x);C.groupLevel=t.groupLevel;this.setFillAndStrokeStyleToContext(C,c,d);var P=p,w=v,T=y,R=g;if(p<0){P=0;T+=Math.abs(p)}if(v<0){w=0;R+=Math.abs(v)}x.translate(-A.scale*P,-S.scale*w);C.transform(A.scale,0,0,S.scale,0,0);x.save();this.clipBbox(C,P,w,T,R);C.baseTransform=C.ctx.mozCurrentTransform.slice();C.executeOperatorList(r);C.endDrawing();return{canvas:k.canvas,scaleX:A.scale,scaleY:S.scale,offsetX:P,offsetY:w}}},{key:"getSizeAndScale",value:function getSizeAndScale(t,r,a){t=Math.abs(t);var i=Math.max(TilingPattern.MAX_PATTERN_SIZE,r),o=Math.ceil(t*a);o>=i?o=i:a=o/t;return{scale:a,size:o}}},{key:"clipBbox",value:function clipBbox(t,r,a,i,o){var l=i-r,c=o-a;t.ctx.rect(r,a,l,c);t.clip();t.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function setFillAndStrokeStyleToContext(t,r,a){var o=t.ctx,l=t.current;switch(r){case h:var c=this.ctx;o.fillStyle=c.fillStyle;o.strokeStyle=c.strokeStyle;l.fillColor=c.fillStyle;l.strokeColor=c.strokeStyle;break;case p:var u=i.Util.makeHexColor(a[0],a[1],a[2]);o.fillStyle=u;o.strokeStyle=u;l.fillColor=u;l.strokeColor=u;break;default:throw new i.FormatError("Unsupported paint type: ".concat(r))}}},{key:"getPattern",value:function getPattern(t,r,a,l){var c=a;if(l!==o.SHADING){c=i.Util.transform(c,r.baseTransform);this.matrix&&(c=i.Util.transform(c,this.matrix))}var u=this.createPatternCanvas(r),d=new DOMMatrix(c);d=(d=d.translate(u.offsetX,u.offsetY)).scale(1/u.scaleX,1/u.scaleY);var h=t.createPattern(u.canvas,"repeat");try{h.setTransform(d)}catch(t){(0,i.warn)('TilingPattern.getPattern: "'.concat(null==t?void 0:t.message,'".'))}return h}}],[{key:"MAX_PATTERN_SIZE",get:function get(){return(0,i.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]);return TilingPattern}();r.TilingPattern=v},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.GlobalWorkerOptions=void 0;var a=Object.create(null);r.GlobalWorkerOptions=a;a.workerPort=void 0===a.workerPort?null:a.workerPort;a.workerSrc=void 0===a.workerSrc?"":a.workerSrc},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.MessageHandler=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1);function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var l=1,c=2,u=1,d=2,h=3,p=4,v=5,y=6,g=7,m=8;function wrapReason(t){t instanceof Error||"object"===_typeof(t)&&null!==t||(0,o.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.');switch(t.name){case"AbortException":return new o.AbortException(t.message);case"MissingPDFException":return new o.MissingPDFException(t.message);case"PasswordException":return new o.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new o.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new o.UnknownErrorException(t.message,t.details);default:return new o.UnknownErrorException(t.message,t.toString())}}var _=function(){function MessageHandler(t,r,a){var i=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MessageHandler);this.sourceName=t;this.targetName=r;this.comObj=a;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);this._onComObjOnMessage=function(t){var r=t.data;if(r.targetName===i.sourceName)if(r.stream)i._processStreamMessage(r);else if(r.callback){var o=r.callbackId,u=i.callbackCapabilities[o];if(!u)throw new Error("Cannot resolve callback ".concat(o));delete i.callbackCapabilities[o];if(r.callback===l)u.resolve(r.data);else{if(r.callback!==c)throw new Error("Unexpected callback case");u.reject(wrapReason(r.reason))}}else{var d=i.actionHandler[r.action];if(!d)throw new Error("Unknown action from worker: ".concat(r.action));if(r.callbackId){var h=i.sourceName,p=r.sourceName;new Promise((function(t){t(d(r.data))})).then((function(t){a.postMessage({sourceName:h,targetName:p,callback:l,callbackId:r.callbackId,data:t})}),(function(t){a.postMessage({sourceName:h,targetName:p,callback:c,callbackId:r.callbackId,reason:wrapReason(t)})}))}else r.streamId?i._createStreamSink(r):d(r.data)}};a.addEventListener("message",this._onComObjOnMessage)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(MessageHandler,[{key:"on",value:function on(t,r){var a=this.actionHandler;if(a[t])throw new Error('There is already an actionName called "'.concat(t,'"'));a[t]=r}},{key:"send",value:function send(t,r,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:r},a)}},{key:"sendWithPromise",value:function sendWithPromise(t,r,a){var i=this.callbackId++,l=(0,o.createPromiseCapability)();this.callbackCapabilities[i]=l;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:i,data:r},a)}catch(t){l.reject(t)}return l.promise}},{key:"sendWithStream",value:function sendWithStream(t,r,a,i){var l=this,c=this.streamId++,d=this.sourceName,h=this.targetName,p=this.comObj;return new ReadableStream({start:function start(a){var u=(0,o.createPromiseCapability)();l.streamControllers[c]={controller:a,startCall:u,pullCall:null,cancelCall:null,isClosed:!1};p.postMessage({sourceName:d,targetName:h,action:t,streamId:c,data:r,desiredSize:a.desiredSize},i);return u.promise},pull:function pull(t){var r=(0,o.createPromiseCapability)();l.streamControllers[c].pullCall=r;p.postMessage({sourceName:d,targetName:h,stream:y,streamId:c,desiredSize:t.desiredSize});return r.promise},cancel:function cancel(t){(0,o.assert)(t instanceof Error,"cancel must have a valid reason");var r=(0,o.createPromiseCapability)();l.streamControllers[c].cancelCall=r;l.streamControllers[c].isClosed=!0;p.postMessage({sourceName:d,targetName:h,stream:u,streamId:c,reason:wrapReason(t)});return r.promise}},a)}},{key:"_createStreamSink",value:function _createStreamSink(t){var r=t.streamId,a=this.sourceName,i=t.sourceName,l=this.comObj,c=this,u=this.actionHandler[t.action],d={enqueue:function enqueue(t){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,u=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var d=this.desiredSize;this.desiredSize-=c;if(d>0&&this.desiredSize<=0){this.sinkCapability=(0,o.createPromiseCapability)();this.ready=this.sinkCapability.promise}l.postMessage({sourceName:a,targetName:i,stream:p,streamId:r,chunk:t},u)}},close:function close(){if(!this.isCancelled){this.isCancelled=!0;l.postMessage({sourceName:a,targetName:i,stream:h,streamId:r});delete c.streamSinks[r]}},error:function error(t){(0,o.assert)(t instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;l.postMessage({sourceName:a,targetName:i,stream:v,streamId:r,reason:wrapReason(t)})}},sinkCapability:(0,o.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};d.sinkCapability.resolve();d.ready=d.sinkCapability.promise;this.streamSinks[r]=d;new Promise((function(r){r(u(t.data,d))})).then((function(){l.postMessage({sourceName:a,targetName:i,stream:m,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:i,stream:m,streamId:r,reason:wrapReason(t)})}))}},{key:"_processStreamMessage",value:function _processStreamMessage(t){var r=t.streamId,a=this.sourceName,i=t.sourceName,l=this.comObj,c=this.streamControllers[r],_=this.streamSinks[r];switch(t.stream){case m:t.success?c.startCall.resolve():c.startCall.reject(wrapReason(t.reason));break;case g:t.success?c.pullCall.resolve():c.pullCall.reject(wrapReason(t.reason));break;case y:if(!_){l.postMessage({sourceName:a,targetName:i,stream:g,streamId:r,success:!0});break}_.desiredSize<=0&&t.desiredSize>0&&_.sinkCapability.resolve();_.desiredSize=t.desiredSize;new Promise((function(t){t(_.onPull&&_.onPull())})).then((function(){l.postMessage({sourceName:a,targetName:i,stream:g,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:i,stream:g,streamId:r,reason:wrapReason(t)})}));break;case p:(0,o.assert)(c,"enqueue should have stream controller");if(c.isClosed)break;c.controller.enqueue(t.chunk);break;case h:(0,o.assert)(c,"close should have stream controller");if(c.isClosed)break;c.isClosed=!0;c.controller.close();this._deleteStreamController(c,r);break;case v:(0,o.assert)(c,"error should have stream controller");c.controller.error(wrapReason(t.reason));this._deleteStreamController(c,r);break;case d:t.success?c.cancelCall.resolve():c.cancelCall.reject(wrapReason(t.reason));this._deleteStreamController(c,r);break;case u:if(!_)break;new Promise((function(r){r(_.onCancel&&_.onCancel(wrapReason(t.reason)))})).then((function(){l.postMessage({sourceName:a,targetName:i,stream:d,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:a,targetName:i,stream:d,streamId:r,reason:wrapReason(t)})}));_.sinkCapability.reject(wrapReason(t.reason));_.isCancelled=!0;delete this.streamSinks[r];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(t=function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}(i.default.mark((function _callee(t,r){return i.default.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return Promise.allSettled([t.startCall&&t.startCall.promise,t.pullCall&&t.pullCall.promise,t.cancelCall&&t.cancelCall.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return a.stop()}}),_callee,this)}))),function _deleteStreamController(r,a){return t.apply(this,arguments)})},{key:"destroy",value:function destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]);var t;return MessageHandler}();r.MessageHandler=_},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.Metadata=void 0;var i=a(1);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _classPrivateFieldInitSpec(t,r,a){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,a)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,a){!function _classApplyDescriptorSet(t,r,a){if(r.set)r.set.call(t,a);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=a}}(t,_classExtractFieldDescriptor(t,r,"set"),a);return a}function _classExtractFieldDescriptor(t,r,a){if(!r.has(t))throw new TypeError("attempted to "+a+" private field on non-instance");return r.get(t)}var o=new WeakMap,l=new WeakMap,c=function(){function Metadata(t){var r=t.parsedData,a=t.rawData;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Metadata);_classPrivateFieldInitSpec(this,o,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0});_classPrivateFieldSet(this,o,r);_classPrivateFieldSet(this,l,a)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(Metadata,[{key:"getRaw",value:function getRaw(){return _classPrivateFieldGet(this,l)}},{key:"get",value:function get(t){var r;return null!==(r=_classPrivateFieldGet(this,o).get(t))&&void 0!==r?r:null}},{key:"getAll",value:function getAll(){return(0,i.objectFromMap)(_classPrivateFieldGet(this,o))}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,o).has(t)}}]);return Metadata}();r.Metadata=c},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.OptionalContentConfig=void 0;var i=a(1);function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var o=_createClass((function OptionalContentGroup(t,r){_classCallCheck(this,OptionalContentGroup);this.visible=!0;this.name=t;this.intent=r})),l=function(){function OptionalContentConfig(t){_classCallCheck(this,OptionalContentConfig);this.name=null;this.creator=null;this._order=null;this._groups=new Map;if(null!==t){this.name=t.name;this.creator=t.creator;this._order=t.order;var r,a=_createForOfIteratorHelper(t.groups);try{for(a.s();!(r=a.n()).done;){var i=r.value;this._groups.set(i.id,new o(i.name,i.intent))}}catch(t){a.e(t)}finally{a.f()}if("OFF"===t.baseState){var l,c=_createForOfIteratorHelper(this._groups);try{for(c.s();!(l=c.n()).done;){l.value.visible=!1}}catch(t){c.e(t)}finally{c.f()}}var u,d=_createForOfIteratorHelper(t.on);try{for(d.s();!(u=d.n()).done;){var h=u.value;this._groups.get(h).visible=!0}}catch(t){d.e(t)}finally{d.f()}var p,v=_createForOfIteratorHelper(t.off);try{for(v.s();!(p=v.n()).done;){var y=p.value;this._groups.get(y).visible=!1}}catch(t){v.e(t)}finally{v.f()}}}_createClass(OptionalContentConfig,[{key:"_evaluateVisibilityExpression",value:function _evaluateVisibilityExpression(t){var r=t.length;if(r<2)return!0;for(var a=t[0],o=1;o<r;o++){var l=t[o],c=void 0;if(Array.isArray(l))c=this._evaluateVisibilityExpression(l);else{if(!this._groups.has(l)){(0,i.warn)("Optional content group not found: ".concat(l));return!0}c=this._groups.get(l).visible}switch(a){case"And":if(!c)return!1;break;case"Or":if(c)return!0;break;case"Not":return!c;default:return!0}}return"And"===a}},{key:"isVisible",value:function isVisible(t){if(0===this._groups.size)return!0;if(!t){(0,i.warn)("Optional content group not defined.");return!0}if("OCG"===t.type){if(!this._groups.has(t.id)){(0,i.warn)("Optional content group not found: ".concat(t.id));return!0}return this._groups.get(t.id).visible}if("OCMD"===t.type){if(t.expression)return this._evaluateVisibilityExpression(t.expression);if(!t.policy||"AnyOn"===t.policy){var r,a=_createForOfIteratorHelper(t.ids);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(!this._groups.has(o)){(0,i.warn)("Optional content group not found: ".concat(o));return!0}if(this._groups.get(o).visible)return!0}}catch(t){a.e(t)}finally{a.f()}return!1}if("AllOn"===t.policy){var l,c=_createForOfIteratorHelper(t.ids);try{for(c.s();!(l=c.n()).done;){var u=l.value;if(!this._groups.has(u)){(0,i.warn)("Optional content group not found: ".concat(u));return!0}if(!this._groups.get(u).visible)return!1}}catch(t){c.e(t)}finally{c.f()}return!0}if("AnyOff"===t.policy){var d,h=_createForOfIteratorHelper(t.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p)){(0,i.warn)("Optional content group not found: ".concat(p));return!0}if(!this._groups.get(p).visible)return!0}}catch(t){h.e(t)}finally{h.f()}return!1}if("AllOff"===t.policy){var v,y=_createForOfIteratorHelper(t.ids);try{for(y.s();!(v=y.n()).done;){var g=v.value;if(!this._groups.has(g)){(0,i.warn)("Optional content group not found: ".concat(g));return!0}if(this._groups.get(g).visible)return!1}}catch(t){y.e(t)}finally{y.f()}return!0}(0,i.warn)("Unknown optional content policy ".concat(t.policy,"."));return!0}(0,i.warn)("Unknown group type ".concat(t.type,"."));return!0}},{key:"setVisibility",value:function setVisibility(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._groups.has(t)?this._groups.get(t).visible=!!r:(0,i.warn)("Optional content group not found: ".concat(t))}},{key:"getOrder",value:function getOrder(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function getGroups(){return this._groups.size>0?(0,i.objectFromMap)(this._groups):null}},{key:"getGroup",value:function getGroup(t){return this._groups.get(t)||null}}]);return OptionalContentConfig}();r.OptionalContentConfig=l},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFDataTransportStream=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1),l=a(147);function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var c=function(){function PDFDataTransportStream(t,r){var a=this;_classCallCheck(this,PDFDataTransportStream);(0,o.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=t.progressiveDone||!1;this._contentDispositionFilename=t.contentDispositionFilename||null;var i=t.initialData;if((null==i?void 0:i.length)>0){var l=new Uint8Array(i).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=r;this._isStreamingSupported=!t.disableStream;this._isRangeSupported=!t.disableRange;this._contentLength=t.length;this._fullRequestReader=null;this._rangeReaders=[];this._pdfDataRangeTransport.addRangeListener((function(t,r){a._onReceiveData({begin:t,chunk:r})}));this._pdfDataRangeTransport.addProgressListener((function(t,r){a._onProgress({loaded:t,total:r})}));this._pdfDataRangeTransport.addProgressiveReadListener((function(t){a._onReceiveData({chunk:t})}));this._pdfDataRangeTransport.addProgressiveDoneListener((function(){a._onProgressiveDone()}));this._pdfDataRangeTransport.transportReady()}_createClass(PDFDataTransportStream,[{key:"_onReceiveData",value:function _onReceiveData(t){var r=new Uint8Array(t.chunk).buffer;if(void 0===t.begin)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{var a=this._rangeReaders.some((function(a){if(a._begin!==t.begin)return!1;a._enqueue(r);return!0}));(0,o.assert)(a,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"_onProgress",value:function _onProgress(t){if(void 0===t.total){var r=this._rangeReaders[0];null!=r&&r.onProgress&&r.onProgress({loaded:t.loaded})}else{var a=this._fullRequestReader;null!=a&&a.onProgress&&a.onProgress({loaded:t.loaded,total:t.total})}}},{key:"_onProgressiveDone",value:function _onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone();this._progressiveDone=!0}},{key:"_removeRangeReader",value:function _removeRangeReader(t){var r=this._rangeReaders.indexOf(t);r>=0&&this._rangeReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){(0,o.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;this._queuedChunks=null;return new u(this,t,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new d(this,t,r);this._pdfDataRangeTransport.requestDataRange(t,r);this._rangeReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t);var r,a=_createForOfIteratorHelper(this._rangeReaders.slice(0));try{for(a.s();!(r=a.n()).done;){r.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}this._pdfDataRangeTransport.abort()}}]);return PDFDataTransportStream}();r.PDFDataTransportStream=c;var u=function(){function PDFDataTransportStreamReader(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,PDFDataTransportStreamReader);this._stream=t;this._done=a||!1;this._filename=(0,l.isPdfFile)(i)?i:null;this._queuedChunks=r||[];this._loaded=0;var o,c=_createForOfIteratorHelper(this._queuedChunks);try{for(c.s();!(o=c.n()).done;){var u=o.value;this._loaded+=u.byteLength}}catch(t){c.e(t)}finally{c.f()}this._requests=[];this._headersReady=Promise.resolve();t._fullRequestReader=this;this.onProgress=null}_createClass(PDFDataTransportStreamReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}},{key:"headersReady",get:function get(){return this._headersReady}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function get(){return this._stream._contentLength}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee(){var t,r;return i.default.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(!(this._queuedChunks.length>0)){a.next=3;break}t=this._queuedChunks.shift();return a.abrupt("return",{value:t,done:!1});case 3:if(!this._done){a.next=5;break}return a.abrupt("return",{value:void 0,done:!0});case 5:r=(0,o.createPromiseCapability)();this._requests.push(r);return a.abrupt("return",r.promise);case 8:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}},{key:"progressiveDone",value:function progressiveDone(){this._done||(this._done=!0)}}]);var t;return PDFDataTransportStreamReader}(),d=function(){function PDFDataTransportStreamRangeReader(t,r,a){_classCallCheck(this,PDFDataTransportStreamRangeReader);this._stream=t;this._begin=r;this._end=a;this._queuedChunk=null;this._requests=[];this._done=!1;this.onProgress=null}_createClass(PDFDataTransportStreamRangeReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}this._done=!0;this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee2(){var t,r;return i.default.wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._queuedChunk){a.next=4;break}t=this._queuedChunk;this._queuedChunk=null;return a.abrupt("return",{value:t,done:!1});case 4:if(!this._done){a.next=6;break}return a.abrupt("return",{value:void 0,done:!0});case 6:r=(0,o.createPromiseCapability)();this._requests.push(r);return a.abrupt("return",r.promise);case 9:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._stream._removeRangeReader(this)}}]);var t;return PDFDataTransportStreamRangeReader}()},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.XfaText=void 0;function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}var a=function(){function XfaText(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaText)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaText,null,[{key:"textContent",value:function textContent(t){var r=[],a={items:r,styles:Object.create(null)};!function walk(t){var a;if(t){var i=null,o=t.name;if("#text"===o)i=t.value;else{if(!XfaText.shouldBuildText(o))return;null!=t&&null!==(a=t.attributes)&&void 0!==a&&a.textContent?i=t.attributes.textContent:t.value&&(i=t.value)}null!==i&&r.push({str:i});if(t.children){var l,c=_createForOfIteratorHelper(t.children);try{for(c.s();!(l=c.n()).done;){walk(l.value)}}catch(t){c.e(t)}finally{c.f()}}}}(t);return a}},{key:"shouldBuildText",value:function shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}]);return XfaText}();r.XfaText=a},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationLayer=void 0;var i=a(1),o=a(147),l=a(151),c=a(161),u=a(162);function _classStaticPrivateMethodGet(t,r,a){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return a}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(t,r,a){var i=_superPropBase(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}};return _get.apply(this,arguments)}function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}function _defineProperty(t,r,a){r in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a;return t}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(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.")}()}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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(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 _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var d=1e3,h=new WeakSet;function getRectDims(t){return{width:t[2]-t[0],height:t[3]-t[1]}}var p=function(){function AnnotationElementFactory(){_classCallCheck(this,AnnotationElementFactory)}_createClass(AnnotationElementFactory,null,[{key:"create",value:function create(t){switch(t.data.annotationType){case i.AnnotationType.LINK:return new y(t);case i.AnnotationType.TEXT:return new g(t);case i.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new _(t);case"Btn":return t.data.radioButton?new A(t):t.data.checkBox?new b(t):new S(t);case"Ch":return new k(t)}return new m(t);case i.AnnotationType.POPUP:return new x(t);case i.AnnotationType.FREETEXT:return new P(t);case i.AnnotationType.LINE:return new w(t);case i.AnnotationType.SQUARE:return new T(t);case i.AnnotationType.CIRCLE:return new R(t);case i.AnnotationType.POLYLINE:return new E(t);case i.AnnotationType.CARET:return new M(t);case i.AnnotationType.INK:return new I(t);case i.AnnotationType.POLYGON:return new O(t);case i.AnnotationType.HIGHLIGHT:return new D(t);case i.AnnotationType.UNDERLINE:return new L(t);case i.AnnotationType.SQUIGGLY:return new j(t);case i.AnnotationType.STRIKEOUT:return new N(t);case i.AnnotationType.STAMP:return new B(t);case i.AnnotationType.FILEATTACHMENT:return new G(t);default:return new v(t)}}}]);return AnnotationElementFactory}(),v=function(){function AnnotationElement(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.isRenderable,i=void 0!==a&&a,o=r.ignoreBorder,l=void 0!==o&&o,c=r.createQuadrilaterals,u=void 0!==c&&c;_classCallCheck(this,AnnotationElement);this.isRenderable=i;this.data=t.data;this.layer=t.layer;this.page=t.page;this.viewport=t.viewport;this.linkService=t.linkService;this.downloadManager=t.downloadManager;this.imageResourcesPath=t.imageResourcesPath;this.renderForms=t.renderForms;this.svgFactory=t.svgFactory;this.annotationStorage=t.annotationStorage;this.enableScripting=t.enableScripting;this.hasJSActions=t.hasJSActions;this._fieldObjects=t.fieldObjects;this._mouseState=t.mouseState;i&&(this.container=this._createContainer(l));u&&(this.quadrilaterals=this._createQuadrilaterals(l))}_createClass(AnnotationElement,[{key:"_createContainer",value:function _createContainer(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.data,a=this.page,o=this.viewport,l=document.createElement("section"),c=getRectDims(r.rect),u=c.width,d=c.height;l.setAttribute("data-annotation-id",r.id);var h=i.Util.normalizeRect([r.rect[0],a.view[3]-r.rect[1]+a.view[1],r.rect[2],a.view[3]-r.rect[3]+a.view[1]]);if(r.hasOwnCanvas){var p=o.transform.slice(),v=i.Util.singularValueDecompose2dScale(p),y=_slicedToArray(v,2),g=y[0],m=y[1];u=Math.ceil(u*g);d=Math.ceil(d*m);h[0]*=g;h[1]*=m;for(var _=0;_<4;_++)p[_]=Math.sign(p[_]);l.style.transform="matrix(".concat(p.join(","),")")}else l.style.transform="matrix(".concat(o.transform.join(","),")");l.style.transformOrigin="".concat(-h[0],"px ").concat(-h[1],"px");if(!t&&r.borderStyle.width>0){l.style.borderWidth="".concat(r.borderStyle.width,"px");if(r.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE){u-=2*r.borderStyle.width;d-=2*r.borderStyle.width}var b=r.borderStyle.horizontalCornerRadius,A=r.borderStyle.verticalCornerRadius;if(b>0||A>0){var S="".concat(b,"px / ").concat(A,"px");l.style.borderRadius=S}switch(r.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:l.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:l.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:l.style.borderBottomStyle="solid"}var k=r.borderColor||r.color||null;k?l.style.borderColor=i.Util.makeHexColor(0|r.color[0],0|r.color[1],0|r.color[2]):l.style.borderWidth=0}l.style.left="".concat(h[0],"px");l.style.top="".concat(h[1],"px");if(r.hasOwnCanvas)l.style.width=l.style.height="auto";else{l.style.width="".concat(u,"px");l.style.height="".concat(d,"px")}return l}},{key:"_createQuadrilaterals",value:function _createQuadrilaterals(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var r,a=[],i=this.data.rect,o=_createForOfIteratorHelper(this.data.quadPoints);try{for(o.s();!(r=o.n()).done;){var l=r.value;this.data.rect=[l[2].x,l[2].y,l[1].x,l[1].y];a.push(this._createContainer(t))}}catch(t){o.e(t)}finally{o.f()}this.data.rect=i;return a}},{key:"_createPopup",value:function _createPopup(t,r){var a=this.container;if(this.quadrilaterals){t=t||this.quadrilaterals;a=this.quadrilaterals[0]}if(!t){(t=document.createElement("div")).style.height=a.style.height;t.style.width=a.style.width;a.appendChild(t)}var i=new C({container:a,trigger:t,color:r.color,titleObj:r.titleObj,modificationDate:r.modificationDate,contentsObj:r.contentsObj,richText:r.richText,hideWrapper:!0}).render();i.style.left=a.style.width;a.appendChild(i)}},{key:"_renderQuadrilaterals",value:function _renderQuadrilaterals(t){var r,a=_createForOfIteratorHelper(this.quadrilaterals);try{for(a.s();!(r=a.n()).done;){r.value.className=t}}catch(t){a.e(t)}finally{a.f()}return this.quadrilaterals}},{key:"render",value:function render(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function _getElementsByName(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=[];if(this._fieldObjects){var o=this._fieldObjects[t];if(o){var l,c=_createForOfIteratorHelper(o);try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.page,p=u.id,v=u.exportValues;if(-1!==d&&p!==r){var y="string"==typeof v?v:null,g=document.getElementById(p);!g||h.has(g)?a.push({id:p,exportValue:y,domElement:g}):(0,i.warn)("_getElementsByName - element not allowed: ".concat(p))}}}catch(t){c.e(t)}finally{c.f()}}return a}var m,_=_createForOfIteratorHelper(document.getElementsByName(t));try{for(_.s();!(m=_.n()).done;){var b=m.value,A=b.id,S=b.exportValue;A!==r&&(h.has(b)&&a.push({id:A,exportValue:S,domElement:b}))}}catch(t){_.e(t)}finally{_.f()}return a}}],[{key:"platform",get:function get(){var t="undefined"!=typeof navigator?navigator.platform:"";return(0,i.shadow)(this,"platform",{isWin:t.includes("Win"),isMac:t.includes("Mac")})}}]);return AnnotationElement}(),y=function(t){_inherits(LinkAnnotationElement,t);var r=_createSuper(LinkAnnotationElement);function LinkAnnotationElement(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classCallCheck(this,LinkAnnotationElement);var i=!!(t.data.url||t.data.dest||t.data.action||t.data.isTooltipOnly||t.data.resetForm||t.data.actions&&(t.data.actions.Action||t.data.actions["Mouse Up"]||t.data.actions["Mouse Down"]));return r.call(this,t,{isRenderable:i,ignoreBorder:!(null==a||!a.ignoreBorder),createQuadrilaterals:!0})}_createClass(LinkAnnotationElement,[{key:"render",value:function render(){var t=this.data,r=this.linkService,a=document.createElement("a");if(t.url){var o;r.addLinkAttributes||(0,i.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance.");null===(o=r.addLinkAttributes)||void 0===o||o.call(r,a,t.url,t.newWindow)}else if(t.action)this._bindNamedAction(a,t.action);else if(t.dest)this._bindLink(a,t.dest);else{var l=!1;if(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions){l=!0;this._bindJSAction(a,t)}t.resetForm?this._bindResetFormAction(a,t.resetForm):l||this._bindLink(a,"")}if(this.quadrilaterals)return this._renderQuadrilaterals("linkAnnotation").map((function(t,r){var i=0===r?a:a.cloneNode();t.appendChild(i);return t}));this.container.className="linkAnnotation";this.container.appendChild(a);return this.container}},{key:"_bindLink",value:function _bindLink(t,r){var a=this;t.href=this.linkService.getDestinationHash(r);t.onclick=function(){r&&a.linkService.goToDestination(r);return!1};(r||""===r)&&(t.className="internalLink")}},{key:"_bindNamedAction",value:function _bindNamedAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){a.linkService.executeNamedAction(r);return!1};t.className="internalLink"}},{key:"_bindJSAction",value:function _bindJSAction(t,r){var a=this;t.href=this.linkService.getAnchorUrl("");for(var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),o=function _loop(){var o=c[l],u=i.get(o);if(!u)return"continue";t[u]=function(){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:r.id,name:o}});return!1}},l=0,c=Object.keys(r.actions);l<c.length;l++)o();t.onclick||(t.onclick=function(){return!1});t.className="internalLink"}},{key:"_bindResetFormAction",value:function _bindResetFormAction(t,r){var a=this,o=t.onclick;o||(t.href=this.linkService.getAnchorUrl(""));t.className="internalLink";if(this._fieldObjects)t.onclick=function(){o&&o();var t=r.fields,i=r.refs,l=r.include,c=[];if(0!==t.length||0!==i.length){var u,d=new Set(i),p=_createForOfIteratorHelper(t);try{for(p.s();!(u=p.n()).done;){var v,y=u.value,g=_createForOfIteratorHelper(a._fieldObjects[y]||[]);try{for(g.s();!(v=g.n()).done;){var m=v.value.id;d.add(m)}}catch(t){g.e(t)}finally{g.f()}}}catch(t){p.e(t)}finally{p.f()}for(var _=0,b=Object.values(a._fieldObjects);_<b.length;_++){var A,S=_createForOfIteratorHelper(b[_]);try{for(S.s();!(A=S.n()).done;){var k=A.value;d.has(k.id)===l&&c.push(k)}}catch(t){S.e(t)}finally{S.f()}}}else for(var x=0,C=Object.values(a._fieldObjects);x<C.length;x++){var P=C[x];c.push.apply(c,_toConsumableArray(P))}for(var w=a.annotationStorage,T=[],R=0,E=c;R<E.length;R++){var O=E[R],M=O.id;T.push(M);switch(O.type){case"text":var I=O.defaultValue||"";w.setValue(M,{value:I,valueAsString:I});break;case"checkbox":case"radiobutton":var D=O.defaultValue===O.exportValues;w.setValue(M,{value:D});break;case"combobox":case"listbox":var L=O.defaultValue||"";w.setValue(M,{value:L});break;default:continue}var j=document.getElementById(M);j&&h.has(j)&&j.dispatchEvent(new Event("resetform"))}if(a.enableScripting){var N;null===(N=a.linkService.eventBus)||void 0===N||N.dispatch("dispatcheventinsandbox",{source:a,detail:{id:"app",ids:T,name:"ResetForm"}})}return!1};else{(0,i.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.');o||(t.onclick=function(){return!1})}}}]);return LinkAnnotationElement}(v),g=function(t){_inherits(TextAnnotationElement,t);var r=_createSuper(TextAnnotationElement);function TextAnnotationElement(t){var a,i,o;_classCallCheck(this,TextAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l})}_createClass(TextAnnotationElement,[{key:"render",value:function render(){this.container.className="textAnnotation";var t=document.createElement("img");t.style.height=this.container.style.height;t.style.width=this.container.style.width;t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg";t.alt="[{{type}} Annotation]";t.dataset.l10nId="text_annotation_type";t.dataset.l10nArgs=JSON.stringify({type:this.data.name});this.data.hasPopup||this._createPopup(t,this.data);this.container.appendChild(t);return this.container}}]);return TextAnnotationElement}(v),m=function(t){_inherits(WidgetAnnotationElement,t);var r=_createSuper(WidgetAnnotationElement);function WidgetAnnotationElement(){_classCallCheck(this,WidgetAnnotationElement);return r.apply(this,arguments)}_createClass(WidgetAnnotationElement,[{key:"render",value:function render(){this.data.alternativeText&&(this.container.title=this.data.alternativeText);return this.container}},{key:"_getKeyModifier",value:function _getKeyModifier(t){var r=v.platform,a=r.isWin,i=r.isMac;return a&&t.ctrlKey||i&&t.metaKey}},{key:"_setEventListener",value:function _setEventListener(t,r,a,i){var o=this;r.includes("mouse")?t.addEventListener(r,(function(t){var r;null===(r=o.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:o,detail:{id:o.data.id,name:a,value:i(t),shift:t.shiftKey,modifier:o._getKeyModifier(t)}})})):t.addEventListener(r,(function(t){var r;null===(r=o.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:o,detail:{id:o.data.id,name:a,value:i(t)}})}))}},{key:"_setEventListeners",value:function _setEventListeners(t,r,a){var i,o=_createForOfIteratorHelper(r);try{for(o.s();!(i=o.n()).done;){var l,c=_slicedToArray(i.value,2),u=c[0],d=c[1];("Action"===d||null!==(l=this.data.actions)&&void 0!==l&&l[d])&&this._setEventListener(t,u,d,a)}}catch(t){o.e(t)}finally{o.f()}}},{key:"_setBackgroundColor",value:function _setBackgroundColor(t){var r=this.data.backgroundColor||null;t.style.backgroundColor=null===r?"transparent":i.Util.makeHexColor(r[0],r[1],r[2])}},{key:"_dispatchEventFromSandbox",value:function _dispatchEventFromSandbox(t,r){for(var a=this,i=function setColor(t,r,a){var i=a.detail[t];a.target.style[r]=c.ColorConverters["".concat(i[0],"_HTML")](i.slice(1))},o={display:function display(t){var r=t.detail.display%2==1;t.target.style.visibility=r?"hidden":"visible";a.annotationStorage.setValue(a.data.id,{hidden:r,print:0===t.detail.display||3===t.detail.display})},print:function print(t){a.annotationStorage.setValue(a.data.id,{print:t.detail.print})},hidden:function hidden(t){t.target.style.visibility=t.detail.hidden?"hidden":"visible";a.annotationStorage.setValue(a.data.id,{hidden:t.detail.hidden})},focus:function focus(t){setTimeout((function(){return t.target.focus({preventScroll:!1})}),0)},userName:function userName(t){t.target.title=t.detail.userName},readonly:function readonly(t){t.detail.readonly?t.target.setAttribute("readonly",""):t.target.removeAttribute("readonly")},required:function required(t){t.detail.required?t.target.setAttribute("required",""):t.target.removeAttribute("required")},bgColor:function bgColor(t){i("bgColor","backgroundColor",t)},fillColor:function fillColor(t){i("fillColor","backgroundColor",t)},fgColor:function fgColor(t){i("fgColor","color",t)},textColor:function textColor(t){i("textColor","color",t)},borderColor:function borderColor(t){i("borderColor","borderColor",t)},strokeColor:function strokeColor(t){i("strokeColor","borderColor",t)}},l=0,u=Object.keys(r.detail);l<u.length;l++){var d=u[l],h=t[d]||o[d];h&&h(r)}}}]);return WidgetAnnotationElement}(v),_=function(t){_inherits(TextWidgetAnnotationElement,t);var r=_createSuper(TextWidgetAnnotationElement);function TextWidgetAnnotationElement(t){_classCallCheck(this,TextWidgetAnnotationElement);var a=t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue;return r.call(this,t,{isRenderable:a})}_createClass(TextWidgetAnnotationElement,[{key:"setPropertyOnSiblings",value:function setPropertyOnSiblings(t,r,a,i){var o,l=this.annotationStorage,c=_createForOfIteratorHelper(this._getElementsByName(t.name,t.id));try{for(c.s();!(o=c.n()).done;){var u=o.value;u.domElement&&(u.domElement[r]=a);l.setValue(u.id,_defineProperty({},i,a))}}catch(t){c.e(t)}finally{c.f()}}},{key:"render",value:function render(){var t=this,r=this.annotationStorage,a=this.data.id;this.container.className="textWidgetAnnotation";var i=null;if(this.renderForms){var o=r.getValue(a,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),l=o.valueAsString||o.value||"",c={userValue:null,formattedValue:null};if(this.data.multiLine)(i=document.createElement("textarea")).textContent=l;else{(i=document.createElement("input")).type="text";i.setAttribute("value",l)}h.add(i);i.disabled=this.data.readOnly;i.name=this.data.fieldName;i.tabIndex=d;c.userValue=l;i.setAttribute("id",a);i.addEventListener("input",(function(o){r.setValue(a,{value:o.target.value});t.setPropertyOnSiblings(i,"value",o.target.value,"value")}));i.addEventListener("resetform",(function(r){var a=t.data.defaultFieldValue||"";i.value=c.userValue=a;delete c.formattedValue}));var u=function blurListener(t){c.formattedValue&&(t.target.value=c.formattedValue);t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var p;i.addEventListener("focus",(function(t){c.userValue&&(t.target.value=c.userValue)}));i.addEventListener("updatefromsandbox",(function(i){var o={value:function value(t){c.userValue=t.detail.value||"";r.setValue(a,{value:c.userValue.toString()});c.formattedValue||(t.target.value=c.userValue)},valueAsString:function valueAsString(t){c.formattedValue=t.detail.valueAsString||"";t.target!==document.activeElement&&(t.target.value=c.formattedValue);r.setValue(a,{formattedValue:c.formattedValue})},selRange:function selRange(t){var r=_slicedToArray(t.detail.selRange,2),a=r[0],i=r[1];a>=0&&i<t.target.value.length&&t.target.setSelectionRange(a,i)}};t._dispatchEventFromSandbox(o,i)}));i.addEventListener("keydown",(function(r){var i,o=-1;"Escape"===r.key?o=0:"Enter"===r.key?o=2:"Tab"===r.key&&(o=3);if(-1!==o){c.userValue=r.target.value;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:r.target.value,willCommit:!0,commitKey:o,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}}));var v=u;u=null;i.addEventListener("blur",(function(r){c.userValue=r.target.value;if(t._mouseState.isDown){var i;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:r.target.value,willCommit:!0,commitKey:1,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}v(r)}));null!==(p=this.data.actions)&&void 0!==p&&p.Keystroke&&i.addEventListener("beforeinput",(function(r){var i;c.formattedValue="";var o=r.data,l=r.target,u=l.value,d=l.selectionStart,h=l.selectionEnd;null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:u,change:o,willCommit:!1,selStart:d,selEnd:h}})}));this._setEventListeners(i,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.value}))}u&&i.addEventListener("blur",u);null!==this.data.maxLen&&(i.maxLength=this.data.maxLen);if(this.data.comb){var y=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;i.classList.add("comb");i.style.letterSpacing="calc(".concat(y,"px - 1ch)")}}else{(i=document.createElement("div")).textContent=this.data.fieldValue;i.style.verticalAlign="middle";i.style.display="table-cell"}this._setTextStyle(i);this._setBackgroundColor(i);this.container.appendChild(i);return this.container}},{key:"_setTextStyle",value:function _setTextStyle(t){var r=this.data.defaultAppearanceData,a=r.fontSize,o=r.fontColor,l=t.style;a&&(l.fontSize="".concat(a,"px"));l.color=i.Util.makeHexColor(o[0],o[1],o[2]);null!==this.data.textAlignment&&(l.textAlign=["left","center","right"][this.data.textAlignment])}}]);return TextWidgetAnnotationElement}(m),b=function(t){_inherits(CheckboxWidgetAnnotationElement,t);var r=_createSuper(CheckboxWidgetAnnotationElement);function CheckboxWidgetAnnotationElement(t){_classCallCheck(this,CheckboxWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(CheckboxWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=this.annotationStorage,a=this.data,i=a.id,o=r.getValue(i,{value:a.exportValue===a.fieldValue}).value;if("string"==typeof o){o="Off"!==o;r.setValue(i,{value:o})}this.container.className="buttonWidgetAnnotation checkBox";var l=document.createElement("input");h.add(l);l.disabled=a.readOnly;l.type="checkbox";l.name=a.fieldName;o&&l.setAttribute("checked",!0);l.setAttribute("id",i);l.setAttribute("exportValue",a.exportValue);l.tabIndex=d;l.addEventListener("change",(function(o){var l,c=o.target,u=c.name,d=c.checked,h=_createForOfIteratorHelper(t._getElementsByName(u,i));try{for(h.s();!(l=h.n()).done;){var p=l.value,v=d&&p.exportValue===a.exportValue;p.domElement&&(p.domElement.checked=v);r.setValue(p.id,{value:v})}}catch(t){h.e(t)}finally{h.f()}r.setValue(i,{value:d})}));l.addEventListener("resetform",(function(t){var r=a.defaultFieldValue||"Off";t.target.checked=r===a.exportValue}));if(this.enableScripting&&this.hasJSActions){l.addEventListener("updatefromsandbox",(function(a){var o={value:function value(t){t.target.checked="Off"!==t.detail.value;r.setValue(i,{value:t.target.checked})}};t._dispatchEventFromSandbox(o,a)}));this._setEventListeners(l,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(l);this.container.appendChild(l);return this.container}}]);return CheckboxWidgetAnnotationElement}(m),A=function(t){_inherits(RadioButtonWidgetAnnotationElement,t);var r=_createSuper(RadioButtonWidgetAnnotationElement);function RadioButtonWidgetAnnotationElement(t){_classCallCheck(this,RadioButtonWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(RadioButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t=this;this.container.className="buttonWidgetAnnotation radioButton";var r=this.annotationStorage,a=this.data,i=a.id,o=r.getValue(i,{value:a.fieldValue===a.buttonValue}).value;if("string"==typeof o){o=o!==a.buttonValue;r.setValue(i,{value:o})}var l=document.createElement("input");h.add(l);l.disabled=a.readOnly;l.type="radio";l.name=a.fieldName;o&&l.setAttribute("checked",!0);l.setAttribute("id",i);l.tabIndex=d;l.addEventListener("change",(function(a){var o,l=a.target,c=l.name,u=l.checked,d=_createForOfIteratorHelper(t._getElementsByName(c,i));try{for(d.s();!(o=d.n()).done;){var h=o.value;r.setValue(h.id,{value:!1})}}catch(t){d.e(t)}finally{d.f()}r.setValue(i,{value:u})}));l.addEventListener("resetform",(function(t){var r=a.defaultFieldValue;t.target.checked=null!=r&&r===a.buttonValue}));if(this.enableScripting&&this.hasJSActions){var c=a.buttonValue;l.addEventListener("updatefromsandbox",(function(a){var o={value:function value(a){var o,l=c===a.detail.value,u=_createForOfIteratorHelper(t._getElementsByName(a.target.name));try{for(u.s();!(o=u.n()).done;){var d=o.value,h=l&&d.id===i;d.domElement&&(d.domElement.checked=h);r.setValue(d.id,{value:h})}}catch(t){u.e(t)}finally{u.f()}}};t._dispatchEventFromSandbox(o,a)}));this._setEventListeners(l,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(l);this.container.appendChild(l);return this.container}}]);return RadioButtonWidgetAnnotationElement}(m),S=function(t){_inherits(PushButtonWidgetAnnotationElement,t);var r=_createSuper(PushButtonWidgetAnnotationElement);function PushButtonWidgetAnnotationElement(t){_classCallCheck(this,PushButtonWidgetAnnotationElement);return r.call(this,t,{ignoreBorder:t.data.hasAppearance})}_createClass(PushButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t=_get(_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype),"render",this).call(this);t.className="buttonWidgetAnnotation pushButton";this.data.alternativeText&&(t.title=this.data.alternativeText);return t}}]);return PushButtonWidgetAnnotationElement}(y),k=function(t){_inherits(ChoiceWidgetAnnotationElement,t);var r=_createSuper(ChoiceWidgetAnnotationElement);function ChoiceWidgetAnnotationElement(t){_classCallCheck(this,ChoiceWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(ChoiceWidgetAnnotationElement,[{key:"render",value:function render(){var t=this;this.container.className="choiceWidgetAnnotation";var r=this.annotationStorage,a=this.data.id;r.getValue(a,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var i=this.data.defaultAppearanceData.fontSize;i||(i=9);var o="calc(".concat(i,"px * var(--zoom-factor))"),l=document.createElement("select");h.add(l);l.disabled=this.data.readOnly;l.name=this.data.fieldName;l.setAttribute("id",a);l.tabIndex=d;l.style.fontSize="".concat(i,"px");if(!this.data.combo){l.size=this.data.options.length;this.data.multiSelect&&(l.multiple=!0)}l.addEventListener("resetform",(function(r){var a,i=t.data.defaultFieldValue,o=_createForOfIteratorHelper(l.options);try{for(o.s();!(a=o.n()).done;){var c=a.value;c.selected=c.value===i}}catch(t){o.e(t)}finally{o.f()}}));var c,u=_createForOfIteratorHelper(this.data.options);try{for(u.s();!(c=u.n()).done;){var p=c.value,v=document.createElement("option");v.textContent=p.displayValue;v.value=p.exportValue;this.data.combo&&(v.style.fontSize=o);this.data.fieldValue.includes(p.exportValue)&&v.setAttribute("selected",!0);l.appendChild(v)}}catch(t){u.e(t)}finally{u.f()}var y=function getValue(t,r){var a=r?"value":"textContent",i=t.target.options;return t.target.multiple?Array.prototype.filter.call(i,(function(t){return t.selected})).map((function(t){return t[a]})):-1===i.selectedIndex?null:i[i.selectedIndex][a]},g=function getItems(t){var r=t.target.options;return Array.prototype.map.call(r,(function(t){return{displayValue:t.textContent,exportValue:t.value}}))};if(this.enableScripting&&this.hasJSActions){l.addEventListener("updatefromsandbox",(function(i){var o={value:function value(t){var i,value=t.detail.value,o=new Set(Array.isArray(value)?value:[value]),c=_createForOfIteratorHelper(l.options);try{for(c.s();!(i=c.n()).done;){var u=i.value;u.selected=o.has(u.value)}}catch(t){c.e(t)}finally{c.f()}r.setValue(a,{value:y(t,!0)})},multipleSelection:function multipleSelection(t){l.multiple=!0},remove:function remove(t){var i=l.options,o=t.detail.remove;i[o].selected=!1;l.remove(o);if(i.length>0){var c=Array.prototype.findIndex.call(i,(function(t){return t.selected}));-1===c&&(i[0].selected=!0)}r.setValue(a,{value:y(t,!0),items:g(t)})},clear:function clear(t){for(;0!==l.length;)l.remove(0);r.setValue(a,{value:null,items:[]})},insert:function insert(t){var i=t.detail.insert,o=i.index,c=i.displayValue,u=i.exportValue,d=document.createElement("option");d.textContent=c;d.value=u;l.insertBefore(d,l.children[o]);r.setValue(a,{value:y(t,!0),items:g(t)})},items:function items(t){for(var items=t.detail.items;0!==l.length;)l.remove(0);var i,o=_createForOfIteratorHelper(items);try{for(o.s();!(i=o.n()).done;){var c=i.value,u=c.displayValue,d=c.exportValue,h=document.createElement("option");h.textContent=u;h.value=d;l.appendChild(h)}}catch(t){o.e(t)}finally{o.f()}l.options.length>0&&(l.options[0].selected=!0);r.setValue(a,{value:y(t,!0),items:g(t)})},indices:function indices(t){var i,indices=new Set(t.detail.indices),o=_createForOfIteratorHelper(t.target.options);try{for(o.s();!(i=o.n()).done;){var l=i.value;l.selected=indices.has(l.index)}}catch(t){o.e(t)}finally{o.f()}r.setValue(a,{value:y(t,!0)})},editable:function editable(t){t.target.disabled=!t.detail.editable}};t._dispatchEventFromSandbox(o,i)}));l.addEventListener("input",(function(i){var o,l=y(i,!0),c=y(i,!1);r.setValue(a,{value:l});null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:a,name:"Keystroke",value:c,changeEx:l,willCommit:!0,commitKey:1,keyDown:!1}})}));this._setEventListeners(l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],(function(t){return t.target.checked}))}else l.addEventListener("input",(function(t){r.setValue(a,{value:y(t)})}));this._setBackgroundColor(l);this.container.appendChild(l);return this.container}}]);return ChoiceWidgetAnnotationElement}(m),x=function(t){_inherits(PopupAnnotationElement,t);var r=_createSuper(PopupAnnotationElement);function PopupAnnotationElement(t){var a,i,o;_classCallCheck(this,PopupAnnotationElement);var l=!!(null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l})}_createClass(PopupAnnotationElement,[{key:"render",value:function render(){this.container.className="popupAnnotation";if(["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var t='[data-annotation-id="'.concat(this.data.parentId,'"]'),r=this.layer.querySelectorAll(t);if(0===r.length)return this.container;var a=new C({container:this.container,trigger:Array.from(r),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),o=this.page,l=i.Util.normalizeRect([this.data.parentRect[0],o.view[3]-this.data.parentRect[1]+o.view[1],this.data.parentRect[2],o.view[3]-this.data.parentRect[3]+o.view[1]]),c=l[0]+this.data.parentRect[2]-this.data.parentRect[0],u=l[1];this.container.style.transformOrigin="".concat(-c,"px ").concat(-u,"px");this.container.style.left="".concat(c,"px");this.container.style.top="".concat(u,"px");this.container.appendChild(a.render());return this.container}}]);return PopupAnnotationElement}(v),C=function(){function PopupElement(t){_classCallCheck(this,PopupElement);this.container=t.container;this.trigger=t.trigger;this.color=t.color;this.titleObj=t.titleObj;this.modificationDate=t.modificationDate;this.contentsObj=t.contentsObj;this.richText=t.richText;this.hideWrapper=t.hideWrapper||!1;this.pinned=!1}_createClass(PopupElement,[{key:"render",value:function render(){var t,r,a=document.createElement("div");a.className="popupWrapper";this.hideElement=this.hideWrapper?a:this.container;this.hideElement.hidden=!0;var l=document.createElement("div");l.className="popup";var c=this.color;if(c){var d=.7*(255-c[0])+c[0],h=.7*(255-c[1])+c[1],p=.7*(255-c[2])+c[2];l.style.backgroundColor=i.Util.makeHexColor(0|d,0|h,0|p)}var v=document.createElement("h1");v.dir=this.titleObj.dir;v.textContent=this.titleObj.str;l.appendChild(v);var y=o.PDFDateString.toDateObject(this.modificationDate);if(y){var g=document.createElement("span");g.className="popupDate";g.textContent="{{date}}, {{time}}";g.dataset.l10nId="annotation_date_string";g.dataset.l10nArgs=JSON.stringify({date:y.toLocaleDateString(),time:y.toLocaleTimeString()});l.appendChild(g)}if(null===(t=this.richText)||void 0===t||!t.str||null!==(r=this.contentsObj)&&void 0!==r&&r.str&&this.contentsObj.str!==this.richText.str){var m=this._formatContents(this.contentsObj);l.appendChild(m)}else{u.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:l});l.lastChild.className="richText popupContent"}Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var _,b=_createForOfIteratorHelper(this.trigger);try{for(b.s();!(_=b.n()).done;){var A=_.value;A.addEventListener("click",this._toggle.bind(this));A.addEventListener("mouseover",this._show.bind(this,!1));A.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(t){b.e(t)}finally{b.f()}l.addEventListener("click",this._hide.bind(this,!0));a.appendChild(l);return a}},{key:"_formatContents",value:function _formatContents(t){var r=t.str,a=t.dir,i=document.createElement("p");i.className="popupContent";i.dir=a;for(var o=r.split(/(?:\r\n?|\n)/),l=0,c=o.length;l<c;++l){var u=o[l];i.appendChild(document.createTextNode(u));l<c-1&&i.appendChild(document.createElement("br"))}return i}},{key:"_toggle",value:function _toggle(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function _show(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&(this.pinned=!0);if(this.hideElement.hidden){this.hideElement.hidden=!1;this.container.style.zIndex+=1}}},{key:"_hide",value:function _hide(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.pinned=!1);if(!this.hideElement.hidden&&!this.pinned){this.hideElement.hidden=!0;this.container.style.zIndex-=1}}}]);return PopupElement}(),P=function(t){_inherits(FreeTextAnnotationElement,t);var r=_createSuper(FreeTextAnnotationElement);function FreeTextAnnotationElement(t){var a,i,o;_classCallCheck(this,FreeTextAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(FreeTextAnnotationElement,[{key:"render",value:function render(){this.container.className="freeTextAnnotation";this.data.hasPopup||this._createPopup(null,this.data);return this.container}}]);return FreeTextAnnotationElement}(v),w=function(t){_inherits(LineAnnotationElement,t);var r=_createSuper(LineAnnotationElement);function LineAnnotationElement(t){var a,i,o;_classCallCheck(this,LineAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(LineAnnotationElement,[{key:"render",value:function render(){this.container.className="lineAnnotation";var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i),l=this.svgFactory.createElement("svg:line");l.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]);l.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]);l.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]);l.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]);l.setAttribute("stroke-width",t.borderStyle.width||1);l.setAttribute("stroke","transparent");l.setAttribute("fill","transparent");o.appendChild(l);this.container.append(o);this._createPopup(l,t);return this.container}}]);return LineAnnotationElement}(v),T=function(t){_inherits(SquareAnnotationElement,t);var r=_createSuper(SquareAnnotationElement);function SquareAnnotationElement(t){var a,i,o;_classCallCheck(this,SquareAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(SquareAnnotationElement,[{key:"render",value:function render(){this.container.className="squareAnnotation";var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i),l=t.borderStyle.width,c=this.svgFactory.createElement("svg:rect");c.setAttribute("x",l/2);c.setAttribute("y",l/2);c.setAttribute("width",a-l);c.setAttribute("height",i-l);c.setAttribute("stroke-width",l||1);c.setAttribute("stroke","transparent");c.setAttribute("fill","transparent");o.appendChild(c);this.container.append(o);this._createPopup(c,t);return this.container}}]);return SquareAnnotationElement}(v),R=function(t){_inherits(CircleAnnotationElement,t);var r=_createSuper(CircleAnnotationElement);function CircleAnnotationElement(t){var a,i,o;_classCallCheck(this,CircleAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(CircleAnnotationElement,[{key:"render",value:function render(){this.container.className="circleAnnotation";var t=this.data,r=getRectDims(t.rect),a=r.width,i=r.height,o=this.svgFactory.create(a,i),l=t.borderStyle.width,c=this.svgFactory.createElement("svg:ellipse");c.setAttribute("cx",a/2);c.setAttribute("cy",i/2);c.setAttribute("rx",a/2-l/2);c.setAttribute("ry",i/2-l/2);c.setAttribute("stroke-width",l||1);c.setAttribute("stroke","transparent");c.setAttribute("fill","transparent");o.appendChild(c);this.container.append(o);this._createPopup(c,t);return this.container}}]);return CircleAnnotationElement}(v),E=function(t){_inherits(PolylineAnnotationElement,t);var r=_createSuper(PolylineAnnotationElement);function PolylineAnnotationElement(t){var a,i,o,l;_classCallCheck(this,PolylineAnnotationElement);var c=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);(l=r.call(this,t,{isRenderable:c,ignoreBorder:!0})).containerClassName="polylineAnnotation";l.svgElementName="svg:polyline";return l}_createClass(PolylineAnnotationElement,[{key:"render",value:function render(){this.container.className=this.containerClassName;var t,r=this.data,a=getRectDims(r.rect),i=a.width,o=a.height,l=this.svgFactory.create(i,o),c=[],u=_createForOfIteratorHelper(r.vertices);try{for(u.s();!(t=u.n()).done;){var d=t.value,h=d.x-r.rect[0],p=r.rect[3]-d.y;c.push(h+","+p)}}catch(t){u.e(t)}finally{u.f()}c=c.join(" ");var v=this.svgFactory.createElement(this.svgElementName);v.setAttribute("points",c);v.setAttribute("stroke-width",r.borderStyle.width||1);v.setAttribute("stroke","transparent");v.setAttribute("fill","transparent");l.appendChild(v);this.container.append(l);this._createPopup(v,r);return this.container}}]);return PolylineAnnotationElement}(v),O=function(t){_inherits(PolygonAnnotationElement,t);var r=_createSuper(PolygonAnnotationElement);function PolygonAnnotationElement(t){var a;_classCallCheck(this,PolygonAnnotationElement);(a=r.call(this,t)).containerClassName="polygonAnnotation";a.svgElementName="svg:polygon";return a}return _createClass(PolygonAnnotationElement)}(E),M=function(t){_inherits(CaretAnnotationElement,t);var r=_createSuper(CaretAnnotationElement);function CaretAnnotationElement(t){var a,i,o;_classCallCheck(this,CaretAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(CaretAnnotationElement,[{key:"render",value:function render(){this.container.className="caretAnnotation";this.data.hasPopup||this._createPopup(null,this.data);return this.container}}]);return CaretAnnotationElement}(v),I=function(t){_inherits(InkAnnotationElement,t);var r=_createSuper(InkAnnotationElement);function InkAnnotationElement(t){var a,i,o,l;_classCallCheck(this,InkAnnotationElement);var c=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);(l=r.call(this,t,{isRenderable:c,ignoreBorder:!0})).containerClassName="inkAnnotation";l.svgElementName="svg:polyline";return l}_createClass(InkAnnotationElement,[{key:"render",value:function render(){this.container.className=this.containerClassName;var t,r=this.data,a=getRectDims(r.rect),i=a.width,o=a.height,l=this.svgFactory.create(i,o),c=_createForOfIteratorHelper(r.inkLists);try{for(c.s();!(t=c.n()).done;){var u,d=t.value,h=[],p=_createForOfIteratorHelper(d);try{for(p.s();!(u=p.n()).done;){var v=u.value,y=v.x-r.rect[0],g=r.rect[3]-v.y;h.push("".concat(y,",").concat(g))}}catch(t){p.e(t)}finally{p.f()}h=h.join(" ");var m=this.svgFactory.createElement(this.svgElementName);m.setAttribute("points",h);m.setAttribute("stroke-width",r.borderStyle.width||1);m.setAttribute("stroke","transparent");m.setAttribute("fill","transparent");this._createPopup(m,r);l.appendChild(m)}}catch(t){c.e(t)}finally{c.f()}this.container.append(l);return this.container}}]);return InkAnnotationElement}(v),D=function(t){_inherits(HighlightAnnotationElement,t);var r=_createSuper(HighlightAnnotationElement);function HighlightAnnotationElement(t){var a,i,o;_classCallCheck(this,HighlightAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(HighlightAnnotationElement,[{key:"render",value:function render(){this.data.hasPopup||this._createPopup(null,this.data);if(this.quadrilaterals)return this._renderQuadrilaterals("highlightAnnotation");this.container.className="highlightAnnotation";return this.container}}]);return HighlightAnnotationElement}(v),L=function(t){_inherits(UnderlineAnnotationElement,t);var r=_createSuper(UnderlineAnnotationElement);function UnderlineAnnotationElement(t){var a,i,o;_classCallCheck(this,UnderlineAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(UnderlineAnnotationElement,[{key:"render",value:function render(){this.data.hasPopup||this._createPopup(null,this.data);if(this.quadrilaterals)return this._renderQuadrilaterals("underlineAnnotation");this.container.className="underlineAnnotation";return this.container}}]);return UnderlineAnnotationElement}(v),j=function(t){_inherits(SquigglyAnnotationElement,t);var r=_createSuper(SquigglyAnnotationElement);function SquigglyAnnotationElement(t){var a,i,o;_classCallCheck(this,SquigglyAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(SquigglyAnnotationElement,[{key:"render",value:function render(){this.data.hasPopup||this._createPopup(null,this.data);if(this.quadrilaterals)return this._renderQuadrilaterals("squigglyAnnotation");this.container.className="squigglyAnnotation";return this.container}}]);return SquigglyAnnotationElement}(v),N=function(t){_inherits(StrikeOutAnnotationElement,t);var r=_createSuper(StrikeOutAnnotationElement);function StrikeOutAnnotationElement(t){var a,i,o;_classCallCheck(this,StrikeOutAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(StrikeOutAnnotationElement,[{key:"render",value:function render(){this.data.hasPopup||this._createPopup(null,this.data);if(this.quadrilaterals)return this._renderQuadrilaterals("strikeoutAnnotation");this.container.className="strikeoutAnnotation";return this.container}}]);return StrikeOutAnnotationElement}(v),B=function(t){_inherits(StampAnnotationElement,t);var r=_createSuper(StampAnnotationElement);function StampAnnotationElement(t){var a,i,o;_classCallCheck(this,StampAnnotationElement);var l=!!(t.data.hasPopup||null!==(a=t.data.titleObj)&&void 0!==a&&a.str||null!==(i=t.data.contentsObj)&&void 0!==i&&i.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(StampAnnotationElement,[{key:"render",value:function render(){this.container.className="stampAnnotation";this.data.hasPopup||this._createPopup(null,this.data);return this.container}}]);return StampAnnotationElement}(v),G=function(t){_inherits(FileAttachmentAnnotationElement,t);var r=_createSuper(FileAttachmentAnnotationElement);function FileAttachmentAnnotationElement(t){var a,l;_classCallCheck(this,FileAttachmentAnnotationElement);var c=(l=r.call(this,t,{isRenderable:!0})).data.file,u=c.filename,d=c.content;l.filename=(0,o.getFilenameFromUrl)(u);l.content=d;null===(a=l.linkService.eventBus)||void 0===a||a.dispatch("fileattachmentannotation",{source:_assertThisInitialized(l),id:(0,i.stringToPDFString)(u),filename:u,content:d});return l}_createClass(FileAttachmentAnnotationElement,[{key:"render",value:function render(){var t,r;this.container.className="fileAttachmentAnnotation";var a=document.createElement("div");a.style.height=this.container.style.height;a.style.width=this.container.style.width;a.addEventListener("dblclick",this._download.bind(this));!this.data.hasPopup&&(null!==(t=this.data.titleObj)&&void 0!==t&&t.str||null!==(r=this.data.contentsObj)&&void 0!==r&&r.str||this.data.richText)&&this._createPopup(a,this.data);this.container.appendChild(a);return this.container}},{key:"_download",value:function _download(){var t;null===(t=this.downloadManager)||void 0===t||t.openOrDownloadData(this.container,this.content,this.filename)}}]);return FileAttachmentAnnotationElement}(v),U=function(){function AnnotationLayer(){_classCallCheck(this,AnnotationLayer)}_createClass(AnnotationLayer,null,[{key:"render",value:function render(t){var r,a=[],c=[],u=_createForOfIteratorHelper(t.annotations);try{for(u.s();!(r=u.n()).done;){var d=r.value;if(d){var h=getRectDims(d.rect),v=h.width,y=h.height;v<=0||y<=0||(d.annotationType!==i.AnnotationType.POPUP?a.push(d):c.push(d))}}}catch(t){u.e(t)}finally{u.f()}c.length&&a.push.apply(a,c);for(var g=t.div,m=0,_=a;m<_.length;m++){var b=_[m],A=p.create({data:b,layer:g,page:t.page,viewport:t.viewport,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new o.DOMSVGFactory,annotationStorage:t.annotationStorage||new l.AnnotationStorage,enableScripting:t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,mouseState:t.mouseState||{isDown:!1}});if(A.isRenderable){var S=A.render();b.hidden&&(S.style.visibility="hidden");if(Array.isArray(S)){var k,C=_createForOfIteratorHelper(S);try{for(C.s();!(k=C.n()).done;){var P=k.value;g.appendChild(P)}}catch(t){C.e(t)}finally{C.f()}}else A instanceof x?g.prepend(S):g.appendChild(S)}}_classStaticPrivateMethodGet(this,AnnotationLayer,_setAnnotationCanvasMap).call(this,g,t.annotationCanvasMap)}},{key:"update",value:function update(t){var r,a,o,l=t.page,c=t.viewport,u=t.annotations,d=t.annotationCanvasMap,h=t.div,p=c.transform,v="matrix(".concat(p.join(","),")"),y=_createForOfIteratorHelper(u);try{for(y.s();!(o=y.n()).done;){var g=o.value,m=h.querySelectorAll('[data-annotation-id="'.concat(g.id,'"]'));if(m){var _,b=_createForOfIteratorHelper(m);try{for(b.s();!(_=b.n()).done;){var A=_.value;if(g.hasOwnCanvas){var S=i.Util.normalizeRect([g.rect[0],l.view[3]-g.rect[1]+l.view[1],g.rect[2],l.view[3]-g.rect[3]+l.view[1]]);if(!a){r=Math.abs(p[0]||p[1]);for(var k=p.slice(),x=0;x<4;x++)k[x]=Math.sign(k[x]);a="matrix(".concat(k.join(","),")")}var C=S[0]*r,P=S[1]*r;A.style.left="".concat(C,"px");A.style.top="".concat(P,"px");A.style.transformOrigin="".concat(-C,"px ").concat(-P,"px");A.style.transform=a}else A.style.transform=v}}catch(t){b.e(t)}finally{b.f()}}}}catch(t){y.e(t)}finally{y.f()}_classStaticPrivateMethodGet(this,AnnotationLayer,_setAnnotationCanvasMap).call(this,h,d);h.hidden=!1}}]);return AnnotationLayer}();r.AnnotationLayer=U;function _setAnnotationCanvasMap(t,r){if(r){var a,i=_createForOfIteratorHelper(r);try{for(i.s();!(a=i.n()).done;){var o=_slicedToArray(a.value,2),l=o[0],c=o[1],u=t.querySelector('[data-annotation-id="'.concat(l,'"]'));if(u){var d=u.firstChild;"CANVAS"===d.nodeName?u.replaceChild(c,d):u.insertBefore(c,d)}}}catch(t){i.e(t)}finally{i.f()}r.clear()}}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ColorConverters=void 0;function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function makeColorComp(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}var a=function(){function ColorConverters(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ColorConverters)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(ColorConverters,null,[{key:"CMYK_G",value:function CMYK_G(t){var r=_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return["G",1-Math.min(1,.3*a+.59*o+.11*i+l)]}},{key:"G_CMYK",value:function G_CMYK(t){return["CMYK",0,0,0,1-_slicedToArray(t,1)[0]]}},{key:"G_RGB",value:function G_RGB(t){var r=_slicedToArray(t,1)[0];return["RGB",r,r,r]}},{key:"G_HTML",value:function G_HTML(t){var r=makeColorComp(_slicedToArray(t,1)[0]);return"#".concat(r).concat(r).concat(r)}},{key:"RGB_G",value:function RGB_G(t){var r=_slicedToArray(t,3);return["G",.3*r[0]+.59*r[1]+.11*r[2]]}},{key:"RGB_HTML",value:function RGB_HTML(t){var r=_slicedToArray(t,3),a=r[0],i=r[1],o=r[2],l=makeColorComp(a),c=makeColorComp(i),u=makeColorComp(o);return"#".concat(l).concat(c).concat(u)}},{key:"T_HTML",value:function T_HTML(){return"#00000000"}},{key:"CMYK_RGB",value:function CMYK_RGB(t){var r=_slicedToArray(t,4),a=r[0],i=r[1],o=r[2],l=r[3];return["RGB",1-Math.min(1,a+l),1-Math.min(1,o+l),1-Math.min(1,i+l)]}},{key:"CMYK_HTML",value:function CMYK_HTML(t){return this.RGB_HTML(this.CMYK_RGB(t))}},{key:"RGB_CMYK",value:function RGB_CMYK(t){var r=_slicedToArray(t,3),a=1-r[0],i=1-r[1],o=1-r[2];return["CMYK",a,i,o,Math.min(a,i,o)]}}]);return ColorConverters}();r.ColorConverters=a},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.XfaLayer=void 0;var i=a(1),o=a(159);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(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 a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}var l=function(){function XfaLayer(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaLayer)}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaLayer,null,[{key:"setupStorage",value:function setupStorage(t,r,a,i,o){var l=i.getValue(r,{value:null});switch(a.name){case"textarea":null!==l.value&&(t.textContent=l.value);if("print"===o)break;t.addEventListener("input",(function(t){i.setValue(r,{value:t.target.value})}));break;case"input":if("radio"===a.attributes.type||"checkbox"===a.attributes.type){l.value===a.attributes.xfaOn?t.setAttribute("checked",!0):l.value===a.attributes.xfaOff&&t.removeAttribute("checked");if("print"===o)break;t.addEventListener("change",(function(t){i.setValue(r,{value:t.target.checked?t.target.getAttribute("xfaOn"):t.target.getAttribute("xfaOff")})}))}else{null!==l.value&&t.setAttribute("value",l.value);if("print"===o)break;t.addEventListener("input",(function(t){i.setValue(r,{value:t.target.value})}))}break;case"select":if(null!==l.value){var c,u=_createForOfIteratorHelper(a.children);try{for(u.s();!(c=u.n()).done;){var d=c.value;d.attributes.value===l.value&&(d.attributes.selected=!0)}}catch(t){u.e(t)}finally{u.f()}}t.addEventListener("input",(function(t){var a=t.target.options,o=-1===a.selectedIndex?"":a[a.selectedIndex].value;i.setValue(r,{value:o})}))}}},{key:"setAttributes",value:function setAttributes(t){var r=t.html,a=t.element,o=t.storage,l=void 0===o?null:o,c=t.intent,u=t.linkService,d=a.attributes,h=r instanceof HTMLAnchorElement;"radio"===d.type&&(d.name="".concat(d.name,"-").concat(c));for(var p=0,v=Object.entries(d);p<v.length;p++){var y=_slicedToArray(v[p],2),g=y[0],m=y[1];if(null!=m&&"dataId"!==g)if("style"!==g)if("textContent"===g)r.textContent=m;else if("class"===g)m.length&&r.setAttribute(g,m.join(" "));else{if(h&&("href"===g||"newWindow"===g))continue;r.setAttribute(g,m)}else Object.assign(r.style,m)}if(h){var _;u.addLinkAttributes||(0,i.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance.");null===(_=u.addLinkAttributes)||void 0===_||_.call(u,r,d.href,d.newWindow)}l&&d.dataId&&this.setupStorage(r,d.dataId,a,l)}},{key:"render",value:function render(t){var r=t.annotationStorage,a=t.linkService,i=t.xfaHtml,l=t.intent||"display",c=document.createElement(i.name);i.attributes&&this.setAttributes({html:c,element:i,intent:l,linkService:a});var u=[[i,-1,c]],d=t.div;d.appendChild(c);if(t.viewport){var h="matrix(".concat(t.viewport.transform.join(","),")");d.style.transform=h}"richText"!==l&&d.setAttribute("class","xfaLayer xfaFont");for(var p=[];u.length>0;){var v,y=_slicedToArray(u[u.length-1],3),g=y[0],m=y[1],_=y[2];if(m+1!==g.children.length){var b=g.children[++u[u.length-1][1]];if(null!==b){var A=b.name;if("#text"!==A){var S=void 0;S=null!=b&&null!==(v=b.attributes)&&void 0!==v&&v.xmlns?document.createElementNS(b.attributes.xmlns,A):document.createElement(A);_.appendChild(S);b.attributes&&this.setAttributes({html:S,element:b,storage:r,intent:l,linkService:a});if(b.children&&b.children.length>0)u.push([b,-1,S]);else if(b.value){var k=document.createTextNode(b.value);o.XfaText.shouldBuildText(A)&&p.push(k);S.appendChild(k)}}else{var x=document.createTextNode(b.value);p.push(x);_.appendChild(x)}}}else u.pop()}var C,P=_createForOfIteratorHelper(d.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(P.s();!(C=P.n()).done;){C.value.setAttribute("readOnly",!0)}}catch(t){P.e(t)}finally{P.f()}return{textDivs:p}}},{key:"update",value:function update(t){var r="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=r;t.div.hidden=!1}}]);return XfaLayer}();r.XfaLayer=l},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.renderTextLayer=function renderTextLayer(t){var r=new u({textContent:t.textContent,textContentStream:t.textContentStream,container:t.container,viewport:t.viewport,textDivs:t.textDivs,textContentItemsStr:t.textContentItemsStr,enhanceTextSelection:t.enhanceTextSelection});r._render(t.timeout);return r};var i=a(1);function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}var o=30,l=new Map,c=/^\s+$/g;function appendText(t,r,a,u){var d=document.createElement("span"),h=t._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==r.str,hasEOL:r.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==r.str,hasEOL:r.hasEOL};t._textDivs.push(d);var p=i.Util.transform(t._viewport.transform,r.transform),v=Math.atan2(p[1],p[0]),y=a[r.fontName];y.vertical&&(v+=Math.PI/2);var g,m,_=Math.hypot(p[2],p[3]),b=_*function getAscent(t,r){var a=l.get(t);if(a)return a;r.save();r.font="".concat(o,"px ").concat(t);var i=r.measureText(""),c=i.fontBoundingBoxAscent,u=Math.abs(i.fontBoundingBoxDescent);if(c){r.restore();var d=c/(c+u);l.set(t,d);return d}r.strokeStyle="red";r.clearRect(0,0,o,o);r.strokeText("g",0,0);var h=r.getImageData(0,0,o,o).data;u=0;for(var p=h.length-1-3;p>=0;p-=4)if(h[p]>0){u=Math.ceil(p/4/o);break}r.clearRect(0,0,o,o);r.strokeText("A",0,o);c=0;for(var v=0,y=(h=r.getImageData(0,0,o,o).data).length;v<y;v+=4)if(h[v]>0){c=o-Math.floor(v/4/o);break}r.restore();if(c){var g=c/(c+u);l.set(t,g);return g}l.set(t,.8);return.8}(y.fontFamily,u);if(0===v){g=p[4];m=p[5]-b}else{g=p[4]+b*Math.sin(v);m=p[5]-b*Math.cos(v)}d.style.left="".concat(g,"px");d.style.top="".concat(m,"px");d.style.fontSize="".concat(_,"px");d.style.fontFamily=y.fontFamily;d.setAttribute("role","presentation");d.textContent=r.str;d.dir=r.dir;t._fontInspectorEnabled&&(d.dataset.fontName=r.fontName);0!==v&&(h.angle=v*(180/Math.PI));var A=!1;if(r.str.length>1||t._enhanceTextSelection&&c.test(r.str))A=!0;else if(" "!==r.str&&r.transform[0]!==r.transform[3]){var S=Math.abs(r.transform[0]),k=Math.abs(r.transform[3]);S!==k&&Math.max(S,k)/Math.min(S,k)>1.5&&(A=!0)}A&&(y.vertical?h.canvasWidth=r.height*t._viewport.scale:h.canvasWidth=r.width*t._viewport.scale);t._textDivProperties.set(d,h);t._textContentStream&&t._layoutText(d);if(t._enhanceTextSelection&&h.hasText){var x=1,C=0;if(0!==v){x=Math.cos(v);C=Math.sin(v)}var P,w,T=(y.vertical?r.height:r.width)*t._viewport.scale,R=_;if(0!==v){P=[x,C,-C,x,g,m];w=i.Util.getAxialAlignedBoundingBox([0,0,T,R],P)}else w=[g,m,g+T,m+R];t._bounds.push({left:w[0],top:w[1],right:w[2],bottom:w[3],div:d,size:[T,R],m:P})}}function render(t){if(!t._canceled){var r=t._textDivs,a=t._capability,i=r.length;if(i>1e5){t._renderingDone=!0;a.resolve()}else{if(!t._textContentStream)for(var o=0;o<i;o++)t._layoutText(r[o]);t._renderingDone=!0;a.resolve()}}}function findPositiveMin(t,r,a){for(var i=0,o=0;o<a;o++){var l=t[r++];l>0&&(i=i?Math.min(l,i):l)}return i}function expand(t){for(var r=t._bounds,a=t._viewport,o=function expandBounds(t,r,a){var i=a.map((function(t,r){return{x1:t.left,y1:t.top,x2:t.right,y2:t.bottom,index:r,x1New:void 0,x2New:void 0}}));expandBoundsLTR(t,i);var o,l=new Array(a.length),c=_createForOfIteratorHelper(i);try{for(c.s();!(o=c.n()).done;){var u=o.value,d=u.index;l[d]={left:u.x1New,top:0,right:u.x2New,bottom:0}}}catch(t){c.e(t)}finally{c.f()}a.map((function(r,a){var o=l[a],c=i[a];c.x1=r.top;c.y1=t-o.right;c.x2=r.bottom;c.y2=t-o.left;c.index=a;c.x1New=void 0;c.x2New=void 0}));expandBoundsLTR(r,i);var h,p=_createForOfIteratorHelper(i);try{for(p.s();!(h=p.n()).done;){var v=h.value,y=v.index;l[y].top=v.x1New;l[y].bottom=v.x2New}}catch(t){p.e(t)}finally{p.f()}return l}(a.width,a.height,r),l=0;l<o.length;l++){var c=r[l].div,u=t._textDivProperties.get(c);if(0!==u.angle){for(var d=o[l],h=r[l],p=h.m,v=p[0],y=p[1],g=[[0,0],[0,h.size[1]],[h.size[0],0],h.size],m=new Float64Array(64),_=0,b=g.length;_<b;_++){var A=i.Util.applyTransform(g[_],p);m[_+0]=v&&(d.left-A[0])/v;m[_+4]=y&&(d.top-A[1])/y;m[_+8]=v&&(d.right-A[0])/v;m[_+12]=y&&(d.bottom-A[1])/y;m[_+16]=y&&(d.left-A[0])/-y;m[_+20]=v&&(d.top-A[1])/v;m[_+24]=y&&(d.right-A[0])/-y;m[_+28]=v&&(d.bottom-A[1])/v;m[_+32]=v&&(d.left-A[0])/-v;m[_+36]=y&&(d.top-A[1])/-y;m[_+40]=v&&(d.right-A[0])/-v;m[_+44]=y&&(d.bottom-A[1])/-y;m[_+48]=y&&(d.left-A[0])/y;m[_+52]=v&&(d.top-A[1])/-v;m[_+56]=y&&(d.right-A[0])/y;m[_+60]=v&&(d.bottom-A[1])/-v}var S=1+Math.min(Math.abs(v),Math.abs(y));u.paddingLeft=findPositiveMin(m,32,16)/S;u.paddingTop=findPositiveMin(m,48,16)/S;u.paddingRight=findPositiveMin(m,0,16)/S;u.paddingBottom=findPositiveMin(m,16,16)/S;t._textDivProperties.set(c,u)}else{u.paddingLeft=r[l].left-o[l].left;u.paddingTop=r[l].top-o[l].top;u.paddingRight=o[l].right-r[l].right;u.paddingBottom=o[l].bottom-r[l].bottom;t._textDivProperties.set(c,u)}}}function expandBoundsLTR(t,r){r.sort((function(t,r){return t.x1-r.x1||t.index-r.index}));var a,i=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}],o=_createForOfIteratorHelper(r);try{for(o.s();!(a=o.n()).done;){for(var l=a.value,c=0;c<i.length&&i[c].end<=l.y1;)c++;for(var u=i.length-1;u>=0&&i[u].start>=l.y2;)u--;var d=void 0,h=void 0,p=void 0,v=void 0,y=-1/0;for(p=c;p<=u;p++){h=(d=i[p]).boundary;var g=void 0;(g=h.x2>l.x1?h.index>l.index?h.x1New:l.x1:void 0===h.x2New?(h.x2+l.x1)/2:h.x2New)>y&&(y=g)}l.x1New=y;for(p=c;p<=u;p++)void 0===(h=(d=i[p]).boundary).x2New?h.x2>l.x1?h.index>l.index&&(h.x2New=h.x2):h.x2New=y:h.x2New>y&&(h.x2New=Math.max(y,h.x2));var m=[],_=null;for(p=c;p<=u;p++){var b=(h=(d=i[p]).boundary).x2>l.x2?h:l;if(_===b)m[m.length-1].end=d.end;else{m.push({start:d.start,end:d.end,boundary:b});_=b}}if(i[c].start<l.y1){m[0].start=l.y1;m.unshift({start:i[c].start,end:l.y1,boundary:i[c].boundary})}if(l.y2<i[u].end){m[m.length-1].end=l.y2;m.push({start:l.y2,end:i[u].end,boundary:i[u].boundary})}for(p=c;p<=u;p++)if(void 0===(h=(d=i[p]).boundary).x2New){var A=!1;for(v=c-1;!A&&v>=0&&i[v].start>=h.y1;v--)A=i[v].boundary===h;for(v=u+1;!A&&v<i.length&&i[v].end<=h.y2;v++)A=i[v].boundary===h;for(v=0;!A&&v<m.length;v++)A=m[v].boundary===h;A||(h.x2New=y)}Array.prototype.splice.apply(i,[c,u-c+1].concat(m))}}catch(t){o.e(t)}finally{o.f()}for(var S=0,k=i;S<k.length;S++){var x=k[S].boundary;void 0===x.x2New&&(x.x2New=Math.max(t,x.x2))}}var u=function(){function TextLayerRenderTask(t){var r,a=this,o=t.textContent,l=t.textContentStream,c=t.container,u=t.viewport,d=t.textDivs,h=t.textContentItemsStr,p=t.enhanceTextSelection;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextLayerRenderTask);this._textContent=o;this._textContentStream=l;this._container=c;this._document=c.ownerDocument;this._viewport=u;this._textDivs=d||[];this._textContentItemsStr=h||[];this._enhanceTextSelection=!!p;this._fontInspectorEnabled=!(null===(r=globalThis.FontInspector)||void 0===r||!r.enabled);this._reader=null;this._layoutTextLastFontSize=null;this._layoutTextLastFontFamily=null;this._layoutTextCtx=null;this._textDivProperties=new WeakMap;this._renderingDone=!1;this._canceled=!1;this._capability=(0,i.createPromiseCapability)();this._renderTimer=null;this._bounds=[];this._capability.promise.finally((function(){a._enhanceTextSelection||(a._textDivProperties=null);if(a._layoutTextCtx){a._layoutTextCtx.canvas.width=0;a._layoutTextCtx.canvas.height=0;a._layoutTextCtx=null}})).catch((function(){}))}!function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextLayerRenderTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"cancel",value:function cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new i.AbortException("TextLayer task cancelled.")).catch((function(){}));this._reader=null}if(null!==this._renderTimer){clearTimeout(this._renderTimer);this._renderTimer=null}this._capability.reject(new Error("TextLayer task cancelled."))}},{key:"_processItems",value:function _processItems(t,r){for(var a=0,i=t.length;a<i;a++)if(void 0!==t[a].str){this._textContentItemsStr.push(t[a].str);appendText(this,t[a],r,this._layoutTextCtx)}else if("beginMarkedContentProps"===t[a].type||"beginMarkedContent"===t[a].type){var o=this._container;this._container=document.createElement("span");this._container.classList.add("markedContent");null!==t[a].id&&this._container.setAttribute("id","".concat(t[a].id));o.appendChild(this._container)}else"endMarkedContent"===t[a].type&&(this._container=this._container.parentNode)}},{key:"_layoutText",value:function _layoutText(t){var r=this._textDivProperties.get(t),a="";if(0!==r.canvasWidth&&r.hasText){var i=t.style,o=i.fontSize,l=i.fontFamily;if(o!==this._layoutTextLastFontSize||l!==this._layoutTextLastFontFamily){this._layoutTextCtx.font="".concat(o," ").concat(l);this._layoutTextLastFontSize=o;this._layoutTextLastFontFamily=l}var c=this._layoutTextCtx.measureText(t.textContent).width;if(c>0){var u=r.canvasWidth/c;this._enhanceTextSelection&&(r.scale=u);a="scaleX(".concat(u,")")}}0!==r.angle&&(a="rotate(".concat(r.angle,"deg) ").concat(a));if(a.length>0){this._enhanceTextSelection&&(r.originalTransform=a);t.style.transform=a}r.hasText&&this._container.appendChild(t);if(r.hasEOL){var d=document.createElement("br");d.setAttribute("role","presentation");this._container.appendChild(d)}}},{key:"_render",value:function _render(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=(0,i.createPromiseCapability)(),l=Object.create(null),c=this._document.createElement("canvas");c.height=c.width=o;c.mozOpaque=!0;this._layoutTextCtx=c.getContext("2d",{alpha:!1});if(this._textContent){var u=this._textContent.items,d=this._textContent.styles;this._processItems(u,d);a.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');var h=function pump(){t._reader.read().then((function(r){var i=r.value;if(r.done)a.resolve();else{Object.assign(l,i.styles);t._processItems(i.items,l);pump()}}),a.reject)};this._reader=this._textContentStream.getReader();h()}a.promise.then((function(){l=null;r?t._renderTimer=setTimeout((function(){render(t);t._renderTimer=null}),r):render(t)}),this._capability.reject)}},{key:"expandTextDivs",value:function expandTextDivs(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enhanceTextSelection&&this._renderingDone){if(null!==this._bounds){expand(this);this._bounds=null}for(var r=[],a=[],i=0,o=this._textDivs.length;i<o;i++){var l=this._textDivs[i],c=this._textDivProperties.get(l);if(c.hasText)if(t){r.length=0;a.length=0;c.originalTransform&&r.push(c.originalTransform);if(c.paddingTop>0){a.push("".concat(c.paddingTop,"px"));r.push("translateY(".concat(-c.paddingTop,"px)"))}else a.push(0);c.paddingRight>0?a.push("".concat(c.paddingRight/c.scale,"px")):a.push(0);c.paddingBottom>0?a.push("".concat(c.paddingBottom,"px")):a.push(0);if(c.paddingLeft>0){a.push("".concat(c.paddingLeft/c.scale,"px"));r.push("translateX(".concat(-c.paddingLeft/c.scale,"px)"))}else a.push(0);l.style.padding=a.join(" ");r.length&&(l.style.transform=r.join(" "))}else{l.style.padding=null;l.style.transform=c.originalTransform}}}}}]);return TextLayerRenderTask}()},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.SVGGraphics=void 0;var i=a(1),o=a(147),l=a(3);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(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.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(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 a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);return"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}var c=_createClass((function SVGGraphics(){_classCallCheck(this,SVGGraphics);(0,i.unreachable)("Not implemented: SVGGraphics")}));r.SVGGraphics=c;var u=function pf(t){if(Number.isInteger(t))return t.toString();var r=t.toFixed(10),a=r.length-1;if("0"!==r[a])return r;do{a--}while("0"===r[a]);return r.substring(0,"."===r[a]?a:a+1)},d=function pm(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":"scale(".concat(u(t[0])," ").concat(u(t[3]),")");if(t[0]===t[3]&&t[1]===-t[2]){var r=180*Math.acos(t[0])/Math.PI;return"rotate(".concat(u(r),")")}}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return"translate(".concat(u(t[4])," ").concat(u(t[5]),")");return"matrix(".concat(u(t[0])," ").concat(u(t[1])," ").concat(u(t[2])," ").concat(u(t[3])," ").concat(u(t[4])," ")+"".concat(u(t[5]),")")},h={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},p=["butt","round","square"],v=["miter","round","bevel"],y=function createObjectURL(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!a)return URL.createObjectURL(new Blob([t],{type:r}));for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="data:".concat(r,";base64,"),l=0,c=t.length;l<c;l+=3){var u=255&t[l],d=255&t[l+1],h=255&t[l+2],p=u>>2,v=(3&u)<<4|d>>4,y=l+1<c?(15&d)<<2|h>>6:64,g=l+2<c?63&h:64;o+=i[p]+i[v]+i[y]+i[g]}return o},g=function(){for(var t=new Uint8Array([137,80,78,71,13,10,26,10]),r=new Int32Array(256),a=0;a<256;a++){for(var o=a,c=0;c<8;c++)o=1&o?3988292384^o>>1&2147483647:o>>1&2147483647;r[a]=o}function writePngChunk(t,a,i,o){var l=o,c=a.length;i[l]=c>>24&255;i[l+1]=c>>16&255;i[l+2]=c>>8&255;i[l+3]=255&c;i[l+=4]=255&t.charCodeAt(0);i[l+1]=255&t.charCodeAt(1);i[l+2]=255&t.charCodeAt(2);i[l+3]=255&t.charCodeAt(3);l+=4;i.set(a,l);var u=function crc32(t,a,i){for(var o=-1,l=a;l<i;l++){var c=255&(o^t[l]);o=o>>>8^r[c]}return-1^o}(i,o+4,l+=a.length);i[l]=u>>24&255;i[l+1]=u>>16&255;i[l+2]=u>>8&255;i[l+3]=255&u}function deflateSyncUncompressed(t){var r=t.length,a=65535,i=Math.ceil(r/a),o=new Uint8Array(2+r+5*i+4),l=0;o[l++]=120;o[l++]=156;for(var c=0;r>a;){o[l++]=0;o[l++]=255;o[l++]=255;o[l++]=0;o[l++]=0;o.set(t.subarray(c,c+a),l);l+=a;c+=a;r-=a}o[l++]=1;o[l++]=255&r;o[l++]=r>>8&255;o[l++]=255&~r;o[l++]=(65535&~r)>>8&255;o.set(t.subarray(c),l);l+=t.length-c;var u=function adler32(t,r,a){for(var i=1,o=0,l=r;l<a;++l)o=(o+(i=(i+(255&t[l]))%65521))%65521;return o<<16|i}(t,0,t.length);o[l++]=u>>24&255;o[l++]=u>>16&255;o[l++]=u>>8&255;o[l++]=255&u;return o}function encode(r,a,o,c){var u,d,h,p=r.width,v=r.height,g=r.data;switch(a){case i.ImageKind.GRAYSCALE_1BPP:d=0;u=1;h=p+7>>3;break;case i.ImageKind.RGB_24BPP:d=2;u=8;h=3*p;break;case i.ImageKind.RGBA_32BPP:d=6;u=8;h=4*p;break;default:throw new Error("invalid format")}for(var m=new Uint8Array((1+h)*v),_=0,b=0,A=0;A<v;++A){m[_++]=0;m.set(g.subarray(b,b+h),_);b+=h;_+=h}if(a===i.ImageKind.GRAYSCALE_1BPP&&c){_=0;for(var S=0;S<v;S++){_++;for(var k=0;k<h;k++)m[_++]^=255}}var x=new Uint8Array([p>>24&255,p>>16&255,p>>8&255,255&p,v>>24&255,v>>16&255,v>>8&255,255&v,u,d,0,0,0]),C=function deflateSync(t){if(!l.isNodeJS)return deflateSyncUncompressed(t);try{var r;r=parseInt(process.versions.node)>=8?t:Buffer.from(t);var a=require("zlib").deflateSync(r,{level:9});return a instanceof Uint8Array?a:new Uint8Array(a)}catch(t){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return deflateSyncUncompressed(t)}(m),P=t.length+36+x.length+C.length,w=new Uint8Array(P),T=0;w.set(t,T);writePngChunk("IHDR",x,w,T+=t.length);writePngChunk("IDATA",C,w,T+=12+x.length);T+=12+C.length;writePngChunk("IEND",new Uint8Array(0),w,T);return y(w,"image/png",o)}return function convertImgDataToPng(t,r,a){return encode(t,void 0===t.kind?i.ImageKind.GRAYSCALE_1BPP:t.kind,r,a)}}(),m=function(){function SVGExtraState(){_classCallCheck(this,SVGExtraState);this.fontSizeScale=1;this.fontWeight=h.fontWeight;this.fontSize=0;this.textMatrix=i.IDENTITY_MATRIX;this.fontMatrix=i.FONT_IDENTITY_MATRIX;this.leading=0;this.textRenderingMode=i.TextRenderingMode.FILL;this.textMatrixScale=1;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRise=0;this.fillColor=h.fillColor;this.strokeColor="#000000";this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.lineJoin="";this.lineCap="";this.miterLimit=0;this.dashArray=[];this.dashPhase=0;this.dependencies=[];this.activeClipUrl=null;this.clipGroup=null;this.maskId=""}_createClass(SVGExtraState,[{key:"clone",value:function clone(){return Object.create(this)}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}}]);return SVGExtraState}(),_=0,b=0,A=0;r.SVGGraphics=c=function(){function SVGGraphics(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,SVGGraphics);this.svgFactory=new o.DOMSVGFactory;this.current=new m;this.transformMatrix=i.IDENTITY_MATRIX;this.transformStack=[];this.extraStack=[];this.commonObjs=t;this.objs=r;this.pendingClip=null;this.pendingEOFill=!1;this.embedFonts=!1;this.embeddedFonts=Object.create(null);this.cssStyle=null;this.forceDataSchema=!!a;this._operatorIdMapping=[];for(var l in i.OPS)this._operatorIdMapping[i.OPS[l]]=l}_createClass(SVGGraphics,[{key:"save",value:function save(){this.transformStack.push(this.transformMatrix);var t=this.current;this.extraStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){this.transformMatrix=this.transformStack.pop();this.current=this.extraStack.pop();this.pendingClip=null;this.tgrp=null}},{key:"group",value:function group(t){this.save();this.executeOpTree(t);this.restore()}},{key:"loadDependencies",value:function loadDependencies(t){for(var r=this,a=t.fnArray,o=t.argsArray,l=0,c=a.length;l<c;l++)if(a[l]===i.OPS.dependency){var u,d=_createForOfIteratorHelper(o[l]);try{var h=function _loop(){var t=u.value,a=t.startsWith("g_")?r.commonObjs:r.objs,i=new Promise((function(r){a.get(t,r)}));r.current.dependencies.push(i)};for(d.s();!(u=d.n()).done;)h()}catch(t){d.e(t)}finally{d.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function transform(t,r,a,o,l,c){var u=[t,r,a,o,l,c];this.transformMatrix=i.Util.transform(this.transformMatrix,u);this.tgrp=null}},{key:"getSVG",value:function getSVG(t,r){var a=this;this.viewport=r;var o=this._initialize(r);return this.loadDependencies(t).then((function(){a.transformMatrix=i.IDENTITY_MATRIX;a.executeOpTree(a.convertOpList(t));return o}))}},{key:"convertOpList",value:function convertOpList(t){for(var r=this._operatorIdMapping,a=t.argsArray,i=t.fnArray,o=[],l=0,c=i.length;l<c;l++){var u=i[l];o.push({fnId:u,fn:r[u],args:a[l]})}return function opListToTree(t){var r,a=[],i=[],o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;if("save"!==l.fn)"restore"===l.fn?a=i.pop():a.push(l);else{a.push({fnId:92,fn:"group",items:[]});i.push(a);a=a[a.length-1].items}}}catch(t){o.e(t)}finally{o.f()}return a}(o)}},{key:"executeOpTree",value:function executeOpTree(t){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,l=o.fn,c=o.fnId,u=o.args;switch(0|c){case i.OPS.beginText:this.beginText();break;case i.OPS.dependency:break;case i.OPS.setLeading:this.setLeading(u);break;case i.OPS.setLeadingMoveText:this.setLeadingMoveText(u[0],u[1]);break;case i.OPS.setFont:this.setFont(u);break;case i.OPS.showText:case i.OPS.showSpacedText:this.showText(u[0]);break;case i.OPS.endText:this.endText();break;case i.OPS.moveText:this.moveText(u[0],u[1]);break;case i.OPS.setCharSpacing:this.setCharSpacing(u[0]);break;case i.OPS.setWordSpacing:this.setWordSpacing(u[0]);break;case i.OPS.setHScale:this.setHScale(u[0]);break;case i.OPS.setTextMatrix:this.setTextMatrix(u[0],u[1],u[2],u[3],u[4],u[5]);break;case i.OPS.setTextRise:this.setTextRise(u[0]);break;case i.OPS.setTextRenderingMode:this.setTextRenderingMode(u[0]);break;case i.OPS.setLineWidth:this.setLineWidth(u[0]);break;case i.OPS.setLineJoin:this.setLineJoin(u[0]);break;case i.OPS.setLineCap:this.setLineCap(u[0]);break;case i.OPS.setMiterLimit:this.setMiterLimit(u[0]);break;case i.OPS.setFillRGBColor:this.setFillRGBColor(u[0],u[1],u[2]);break;case i.OPS.setStrokeRGBColor:this.setStrokeRGBColor(u[0],u[1],u[2]);break;case i.OPS.setStrokeColorN:this.setStrokeColorN(u);break;case i.OPS.setFillColorN:this.setFillColorN(u);break;case i.OPS.shadingFill:this.shadingFill(u[0]);break;case i.OPS.setDash:this.setDash(u[0],u[1]);break;case i.OPS.setRenderingIntent:this.setRenderingIntent(u[0]);break;case i.OPS.setFlatness:this.setFlatness(u[0]);break;case i.OPS.setGState:this.setGState(u[0]);break;case i.OPS.fill:this.fill();break;case i.OPS.eoFill:this.eoFill();break;case i.OPS.stroke:this.stroke();break;case i.OPS.fillStroke:this.fillStroke();break;case i.OPS.eoFillStroke:this.eoFillStroke();break;case i.OPS.clip:this.clip("nonzero");break;case i.OPS.eoClip:this.clip("evenodd");break;case i.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case i.OPS.paintImageXObject:this.paintImageXObject(u[0]);break;case i.OPS.paintInlineImageXObject:this.paintInlineImageXObject(u[0]);break;case i.OPS.paintImageMaskXObject:this.paintImageMaskXObject(u[0]);break;case i.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(u[0],u[1]);break;case i.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case i.OPS.closePath:this.closePath();break;case i.OPS.closeStroke:this.closeStroke();break;case i.OPS.closeFillStroke:this.closeFillStroke();break;case i.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case i.OPS.nextLine:this.nextLine();break;case i.OPS.transform:this.transform(u[0],u[1],u[2],u[3],u[4],u[5]);break;case i.OPS.constructPath:this.constructPath(u[0],u[1]);break;case i.OPS.endPath:this.endPath();break;case 92:this.group(o.items);break;default:(0,i.warn)("Unimplemented operator ".concat(l))}}}catch(t){a.e(t)}finally{a.f()}}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,a,i,o,l){var c=this.current;c.textMatrix=c.lineMatrix=[t,r,a,i,o,l];c.textMatrixScale=Math.hypot(t,r);c.x=c.lineX=0;c.y=c.lineY=0;c.xcoords=[];c.ycoords=[];c.tspan=this.svgFactory.createElement("svg:tspan");c.tspan.setAttributeNS(null,"font-family",c.fontFamily);c.tspan.setAttributeNS(null,"font-size","".concat(u(c.fontSize),"px"));c.tspan.setAttributeNS(null,"y",u(-c.y));c.txtElement=this.svgFactory.createElement("svg:text");c.txtElement.appendChild(c.tspan)}},{key:"beginText",value:function beginText(){var t=this.current;t.x=t.lineX=0;t.y=t.lineY=0;t.textMatrix=i.IDENTITY_MATRIX;t.lineMatrix=i.IDENTITY_MATRIX;t.textMatrixScale=1;t.tspan=this.svgFactory.createElement("svg:tspan");t.txtElement=this.svgFactory.createElement("svg:text");t.txtgrp=this.svgFactory.createElement("svg:g");t.xcoords=[];t.ycoords=[]}},{key:"moveText",value:function moveText(t,r){var a=this.current;a.x=a.lineX+=t;a.y=a.lineY+=r;a.xcoords=[];a.ycoords=[];a.tspan=this.svgFactory.createElement("svg:tspan");a.tspan.setAttributeNS(null,"font-family",a.fontFamily);a.tspan.setAttributeNS(null,"font-size","".concat(u(a.fontSize),"px"));a.tspan.setAttributeNS(null,"y",u(-a.y))}},{key:"showText",value:function showText(t){var r=this.current,a=r.font,o=r.fontSize;if(0!==o){var l,c=r.fontSizeScale,p=r.charSpacing,v=r.wordSpacing,y=r.fontDirection,g=r.textHScale*y,m=a.vertical,_=m?1:-1,b=a.defaultVMetrics,A=o*r.fontMatrix[0],S=0,k=_createForOfIteratorHelper(t);try{for(k.s();!(l=k.n()).done;){var x=l.value;if(null!==x)if("number"!=typeof x){var C=(x.isSpace?v:0)+p,P=x.fontChar,w=void 0,T=void 0,R=x.width;if(m){var E=void 0,O=x.vmetric||b;E=-(E=x.vmetric?O[1]:.5*R)*A;var M=O[2]*A;R=O?-O[0]:R;w=E/c;T=(S+M)/c}else{w=S/c;T=0}if(x.isInFont||a.missingFile){r.xcoords.push(r.x+w);m&&r.ycoords.push(-r.y+T);r.tspan.textContent+=P}S+=m?R*A-C*y:R*A+C*y}else S+=_*x*o/1e3;else S+=y*v}}catch(t){k.e(t)}finally{k.f()}r.tspan.setAttributeNS(null,"x",r.xcoords.map(u).join(" "));m?r.tspan.setAttributeNS(null,"y",r.ycoords.map(u).join(" ")):r.tspan.setAttributeNS(null,"y",u(-r.y));m?r.y-=S:r.x+=S*g;r.tspan.setAttributeNS(null,"font-family",r.fontFamily);r.tspan.setAttributeNS(null,"font-size","".concat(u(r.fontSize),"px"));r.fontStyle!==h.fontStyle&&r.tspan.setAttributeNS(null,"font-style",r.fontStyle);r.fontWeight!==h.fontWeight&&r.tspan.setAttributeNS(null,"font-weight",r.fontWeight);var I=r.textRenderingMode&i.TextRenderingMode.FILL_STROKE_MASK;if(I===i.TextRenderingMode.FILL||I===i.TextRenderingMode.FILL_STROKE){r.fillColor!==h.fillColor&&r.tspan.setAttributeNS(null,"fill",r.fillColor);r.fillAlpha<1&&r.tspan.setAttributeNS(null,"fill-opacity",r.fillAlpha)}else r.textRenderingMode===i.TextRenderingMode.ADD_TO_PATH?r.tspan.setAttributeNS(null,"fill","transparent"):r.tspan.setAttributeNS(null,"fill","none");if(I===i.TextRenderingMode.STROKE||I===i.TextRenderingMode.FILL_STROKE){var D=1/(r.textMatrixScale||1);this._setStrokeAttributes(r.tspan,D)}var L=r.textMatrix;0!==r.textRise&&((L=L.slice())[5]+=r.textRise);r.txtElement.setAttributeNS(null,"transform","".concat(d(L)," scale(").concat(u(g),", -1)"));r.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve");r.txtElement.appendChild(r.tspan);r.txtgrp.appendChild(r.txtElement);this._ensureTransformGroup().appendChild(r.txtElement)}}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"addFontStyle",value:function addFontStyle(t){if(!t.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');if(!this.cssStyle){this.cssStyle=this.svgFactory.createElement("svg:style");this.cssStyle.setAttributeNS(null,"type","text/css");this.defs.appendChild(this.cssStyle)}var r=y(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(t.loadedName,'";')+" src: url(".concat(r,"); }\n")}},{key:"setFont",value:function setFont(t){var r=this.current,a=this.commonObjs.get(t[0]),o=t[1];r.font=a;if(this.embedFonts&&!a.missingFile&&!this.embeddedFonts[a.loadedName]){this.addFontStyle(a);this.embeddedFonts[a.loadedName]=a}r.fontMatrix=a.fontMatrix||i.FONT_IDENTITY_MATRIX;var l="normal";a.black?l="900":a.bold&&(l="bold");var c=a.italic?"italic":"normal";if(o<0){o=-o;r.fontDirection=-1}else r.fontDirection=1;r.fontSize=o;r.fontFamily=a.loadedName;r.fontWeight=l;r.fontStyle=c;r.tspan=this.svgFactory.createElement("svg:tspan");r.tspan.setAttributeNS(null,"y",u(-r.y));r.xcoords=[];r.ycoords=[]}},{key:"endText",value:function endText(){var t,r=this.current;if(r.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(t=r.txtElement)&&void 0!==t&&t.hasChildNodes()){r.element=r.txtElement;this.clip("nonzero");this.endPath()}}},{key:"setLineWidth",value:function setLineWidth(t){t>0&&(this.current.lineWidth=t)}},{key:"setLineCap",value:function setLineCap(t){this.current.lineCap=p[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.current.lineJoin=v[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.current.miterLimit=t}},{key:"setStrokeAlpha",value:function setStrokeAlpha(t){this.current.strokeAlpha=t}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,a){this.current.strokeColor=i.Util.makeHexColor(t,r,a)}},{key:"setFillAlpha",value:function setFillAlpha(t){this.current.fillAlpha=t}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,a){this.current.fillColor=i.Util.makeHexColor(t,r,a);this.current.tspan=this.svgFactory.createElement("svg:tspan");this.current.xcoords=[];this.current.ycoords=[]}},{key:"setStrokeColorN",value:function setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}},{key:"setFillColorN",value:function setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}},{key:"shadingFill",value:function shadingFill(t){var r=this.viewport.width,a=this.viewport.height,o=i.Util.inverseTransform(this.transformMatrix),l=i.Util.applyTransform([0,0],o),c=i.Util.applyTransform([0,a],o),u=i.Util.applyTransform([r,0],o),d=i.Util.applyTransform([r,a],o),h=Math.min(l[0],c[0],u[0],d[0]),p=Math.min(l[1],c[1],u[1],d[1]),v=Math.max(l[0],c[0],u[0],d[0]),y=Math.max(l[1],c[1],u[1],d[1]),g=this.svgFactory.createElement("svg:rect");g.setAttributeNS(null,"x",h);g.setAttributeNS(null,"y",p);g.setAttributeNS(null,"width",v-h);g.setAttributeNS(null,"height",y-p);g.setAttributeNS(null,"fill",this._makeShadingPattern(t));this.current.fillAlpha<1&&g.setAttributeNS(null,"fill-opacity",this.current.fillAlpha);this._ensureTransformGroup().appendChild(g)}},{key:"_makeColorN_Pattern",value:function _makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}},{key:"_makeTilingPattern",value:function _makeTilingPattern(t){var r=t[1],a=t[2],o=t[3]||i.IDENTITY_MATRIX,l=_slicedToArray(t[4],4),c=l[0],u=l[1],d=l[2],h=l[3],p=t[5],v=t[6],y=t[7],g="shading".concat(A++),m=_slicedToArray(i.Util.normalizeRect([].concat(_toConsumableArray(i.Util.applyTransform([c,u],o)),_toConsumableArray(i.Util.applyTransform([d,h],o)))),4),_=m[0],b=m[1],S=m[2],k=m[3],x=_slicedToArray(i.Util.singularValueDecompose2dScale(o),2),C=p*x[0],P=v*x[1],w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",g);w.setAttributeNS(null,"patternUnits","userSpaceOnUse");w.setAttributeNS(null,"width",C);w.setAttributeNS(null,"height",P);w.setAttributeNS(null,"x","".concat(_));w.setAttributeNS(null,"y","".concat(b));var T=this.svg,R=this.transformMatrix,E=this.current.fillColor,O=this.current.strokeColor,M=this.svgFactory.create(S-_,k-b);this.svg=M;this.transformMatrix=o;if(2===y){var I=i.Util.makeHexColor.apply(i.Util,_toConsumableArray(r));this.current.fillColor=I;this.current.strokeColor=I}this.executeOpTree(this.convertOpList(a));this.svg=T;this.transformMatrix=R;this.current.fillColor=E;this.current.strokeColor=O;w.appendChild(M.childNodes[0]);this.defs.appendChild(w);return"url(#".concat(g,")")}},{key:"_makeShadingPattern",value:function _makeShadingPattern(t){"string"==typeof t&&(t=this.objs.get(t));switch(t[0]){case"RadialAxial":var r,a="shading".concat(A++),o=t[3];switch(t[1]){case"axial":var l=t[4],c=t[5];(r=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",a);r.setAttributeNS(null,"gradientUnits","userSpaceOnUse");r.setAttributeNS(null,"x1",l[0]);r.setAttributeNS(null,"y1",l[1]);r.setAttributeNS(null,"x2",c[0]);r.setAttributeNS(null,"y2",c[1]);break;case"radial":var u=t[4],d=t[5],h=t[6],p=t[7];(r=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",a);r.setAttributeNS(null,"gradientUnits","userSpaceOnUse");r.setAttributeNS(null,"cx",d[0]);r.setAttributeNS(null,"cy",d[1]);r.setAttributeNS(null,"r",p);r.setAttributeNS(null,"fx",u[0]);r.setAttributeNS(null,"fy",u[1]);r.setAttributeNS(null,"fr",h);break;default:throw new Error("Unknown RadialAxial type: ".concat(t[1]))}var v,y=_createForOfIteratorHelper(o);try{for(y.s();!(v=y.n()).done;){var g=v.value,m=this.svgFactory.createElement("svg:stop");m.setAttributeNS(null,"offset",g[0]);m.setAttributeNS(null,"stop-color",g[1]);r.appendChild(m)}}catch(t){y.e(t)}finally{y.f()}this.defs.appendChild(r);return"url(#".concat(a,")");case"Mesh":(0,i.warn)("Unimplemented pattern Mesh");return null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(t[0]))}}},{key:"setDash",value:function setDash(t,r){this.current.dashArray=t;this.current.dashPhase=r}},{key:"constructPath",value:function constructPath(t,r){var a,o=this.current,l=o.x,c=o.y,d=[],h=0,p=_createForOfIteratorHelper(t);try{for(p.s();!(a=p.n()).done;){switch(0|a.value){case i.OPS.rectangle:l=r[h++];c=r[h++];var v=r[h++],y=r[h++],g=l+v,m=c+y;d.push("M",u(l),u(c),"L",u(g),u(c),"L",u(g),u(m),"L",u(l),u(m),"Z");break;case i.OPS.moveTo:l=r[h++];c=r[h++];d.push("M",u(l),u(c));break;case i.OPS.lineTo:l=r[h++];c=r[h++];d.push("L",u(l),u(c));break;case i.OPS.curveTo:l=r[h+4];c=r[h+5];d.push("C",u(r[h]),u(r[h+1]),u(r[h+2]),u(r[h+3]),u(l),u(c));h+=6;break;case i.OPS.curveTo2:d.push("C",u(l),u(c),u(r[h]),u(r[h+1]),u(r[h+2]),u(r[h+3]));l=r[h+2];c=r[h+3];h+=4;break;case i.OPS.curveTo3:l=r[h+2];c=r[h+3];d.push("C",u(r[h]),u(r[h+1]),u(l),u(c),u(l),u(c));h+=4;break;case i.OPS.closePath:d.push("Z")}}}catch(t){p.e(t)}finally{p.f()}d=d.join(" ");if(o.path&&t.length>0&&t[0]!==i.OPS.rectangle&&t[0]!==i.OPS.moveTo)d=o.path.getAttributeNS(null,"d")+d;else{o.path=this.svgFactory.createElement("svg:path");this._ensureTransformGroup().appendChild(o.path)}o.path.setAttributeNS(null,"d",d);o.path.setAttributeNS(null,"fill","none");o.element=o.path;o.setCurrentPoint(l,c)}},{key:"endPath",value:function endPath(){var t=this.current;t.path=null;if(this.pendingClip)if(t.element){var r="clippath".concat(_++),a=this.svgFactory.createElement("svg:clipPath");a.setAttributeNS(null,"id",r);a.setAttributeNS(null,"transform",d(this.transformMatrix));var i=t.element.cloneNode(!0);"evenodd"===this.pendingClip?i.setAttributeNS(null,"clip-rule","evenodd"):i.setAttributeNS(null,"clip-rule","nonzero");this.pendingClip=null;a.appendChild(i);this.defs.appendChild(a);if(t.activeClipUrl){t.clipGroup=null;var o,l=_createForOfIteratorHelper(this.extraStack);try{for(l.s();!(o=l.n()).done;){o.value.clipGroup=null}}catch(t){l.e(t)}finally{l.f()}a.setAttributeNS(null,"clip-path",t.activeClipUrl)}t.activeClipUrl="url(#".concat(r,")");this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function clip(t){this.pendingClip=t}},{key:"closePath",value:function closePath(){var t=this.current;if(t.path){var r="".concat(t.path.getAttributeNS(null,"d"),"Z");t.path.setAttributeNS(null,"d",r)}}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){var r,a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var o=_slicedToArray(r.value,2),l=o[0],c=o[1];switch(l){case"LW":this.setLineWidth(c);break;case"LC":this.setLineCap(c);break;case"LJ":this.setLineJoin(c);break;case"ML":this.setMiterLimit(c);break;case"D":this.setDash(c[0],c[1]);break;case"RI":this.setRenderingIntent(c);break;case"FL":this.setFlatness(c);break;case"Font":this.setFont(c);break;case"CA":this.setStrokeAlpha(c);break;case"ca":this.setFillAlpha(c);break;default:(0,i.warn)("Unimplemented graphic state operator ".concat(l))}}}catch(t){a.e(t)}finally{a.f()}}},{key:"fill",value:function fill(){var t=this.current;if(t.element){t.element.setAttributeNS(null,"fill",t.fillColor);t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha);this.endPath()}}},{key:"stroke",value:function stroke(){var t=this.current;if(t.element){this._setStrokeAttributes(t.element);t.element.setAttributeNS(null,"fill","none");this.endPath()}}},{key:"_setStrokeAttributes",value:function _setStrokeAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=this.current,i=a.dashArray;1!==r&&i.length>0&&(i=i.map((function(t){return r*t})));t.setAttributeNS(null,"stroke",a.strokeColor);t.setAttributeNS(null,"stroke-opacity",a.strokeAlpha);t.setAttributeNS(null,"stroke-miterlimit",u(a.miterLimit));t.setAttributeNS(null,"stroke-linecap",a.lineCap);t.setAttributeNS(null,"stroke-linejoin",a.lineJoin);t.setAttributeNS(null,"stroke-width",u(r*a.lineWidth)+"px");t.setAttributeNS(null,"stroke-dasharray",i.map(u).join(" "));t.setAttributeNS(null,"stroke-dashoffset",u(r*a.dashPhase)+"px")}},{key:"eoFill",value:function eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd");this.fill()}},{key:"fillStroke",value:function fillStroke(){this.stroke();this.fill()}},{key:"eoFillStroke",value:function eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd");this.fillStroke()}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.closePath();this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){var t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0");t.setAttributeNS(null,"y","0");t.setAttributeNS(null,"width","1px");t.setAttributeNS(null,"height","1px");t.setAttributeNS(null,"fill",this.current.fillColor);this._ensureTransformGroup().appendChild(t)}},{key:"paintImageXObject",value:function paintImageXObject(t){var r=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);r?this.paintInlineImageXObject(r):(0,i.warn)("Dependent image with object ID ".concat(t," is not ready yet"))}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(t,r){var a=t.width,i=t.height,o=g(t,this.forceDataSchema,!!r),l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0");l.setAttributeNS(null,"y","0");l.setAttributeNS(null,"width",u(a));l.setAttributeNS(null,"height",u(i));this.current.element=l;this.clip("nonzero");var c=this.svgFactory.createElement("svg:image");c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);c.setAttributeNS(null,"x","0");c.setAttributeNS(null,"y",u(-i));c.setAttributeNS(null,"width",u(a)+"px");c.setAttributeNS(null,"height",u(i)+"px");c.setAttributeNS(null,"transform","scale(".concat(u(1/a)," ").concat(u(-1/i),")"));r?r.appendChild(c):this._ensureTransformGroup().appendChild(c)}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){var r=this.current,a=t.width,i=t.height,o=r.fillColor;r.maskId="mask".concat(b++);var l=this.svgFactory.createElement("svg:mask");l.setAttributeNS(null,"id",r.maskId);var c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0");c.setAttributeNS(null,"y","0");c.setAttributeNS(null,"width",u(a));c.setAttributeNS(null,"height",u(i));c.setAttributeNS(null,"fill",o);c.setAttributeNS(null,"mask","url(#".concat(r.maskId,")"));this.defs.appendChild(l);this._ensureTransformGroup().appendChild(c);this.paintInlineImageXObject(t,l)}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]);if(r){var a=r[2]-r[0],i=r[3]-r[1],o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x",r[0]);o.setAttributeNS(null,"y",r[1]);o.setAttributeNS(null,"width",u(a));o.setAttributeNS(null,"height",u(i));this.current.element=o;this.clip("nonzero");this.endPath()}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){}},{key:"_initialize",value:function _initialize(t){var r=this.svgFactory.create(t.width,t.height),a=this.svgFactory.createElement("svg:defs");r.appendChild(a);this.defs=a;var i=this.svgFactory.createElement("svg:g");i.setAttributeNS(null,"transform",d(t.transform));r.appendChild(i);this.svg=i;return r}},{key:"_ensureClipGroup",value:function _ensureClipGroup(){if(!this.current.clipGroup){var t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl);this.svg.appendChild(t);this.current.clipGroup=t}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function _ensureTransformGroup(){if(!this.tgrp){this.tgrp=this.svgFactory.createElement("svg:g");this.tgrp.setAttributeNS(null,"transform",d(this.transformMatrix));this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)}return this.tgrp}}]);return SVGGraphics}()},(t,r,a)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFNodeStream=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1),l=a(166);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}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(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{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var c=require("fs"),u=require("http"),d=require("https"),h=require("url"),p=/^file:\/\/\/[a-zA-Z]:\//;var v=function(){function PDFNodeStream(t){_classCallCheck(this,PDFNodeStream);this.source=t;this.url=function parseUrl(t){var r=h.parse(t);if("file:"===r.protocol||r.host)return r;if(/^[a-z]:[/\\]/i.test(t))return h.parse("file:///".concat(t));r.host||(r.protocol="file:");return r}(t.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNodeStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){(0,o.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new b(this):new m(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=this.isFsUrl?new A(this,t,r):new _(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t);var r,a=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(a.s();!(r=a.n()).done;){r.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}}}]);return PDFNodeStream}();r.PDFNodeStream=v;var y=function(){function BaseFullReader(t){_classCallCheck(this,BaseFullReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;var r=t.source;this._contentLength=r.length;this._loaded=0;this._filename=null;this._disableRange=r.disableRange||!1;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!r.disableStream;this._isRangeSupported=!r.disableRange;this._readableStream=null;this._readCapability=(0,o.createPromiseCapability)();this._headersCapability=(0,o.createPromiseCapability)()}_createClass(BaseFullReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee(){var t,r;return i.default.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return this._readCapability.promise;case 2:if(!this._done){a.next=4;break}return a.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){a.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){a.next=10;break}this._readCapability=(0,o.createPromiseCapability)();return a.abrupt("return",this.read());case 10:this._loaded+=t.length;this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});r=new Uint8Array(t).buffer;return a.abrupt("return",{value:r,done:!1});case 14:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));!this._isStreamingSupported&&this._isRangeSupported&&this._error(new o.AbortException("streaming is disabled"));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseFullReader}(),g=function(){function BaseRangeReader(t){_classCallCheck(this,BaseRangeReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;this._loaded=0;this._readableStream=null;this._readCapability=(0,o.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}_createClass(BaseRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee2(){var t,r;return i.default.wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return this._readCapability.promise;case 2:if(!this._done){a.next=4;break}return a.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){a.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){a.next=10;break}this._readCapability=(0,o.createPromiseCapability)();return a.abrupt("return",this.read());case 10:this._loaded+=t.length;this.onProgress&&this.onProgress({loaded:this._loaded});r=new Uint8Array(t).buffer;return a.abrupt("return",{value:r,done:!1});case 14:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseRangeReader}();function createRequestOptions(t,r){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:r}}var m=function(t){_inherits(PDFNodeStreamFullReader,t);var r=_createSuper(PDFNodeStreamFullReader);function PDFNodeStreamFullReader(t){var a;_classCallCheck(this,PDFNodeStreamFullReader);var i=function handleResponse(r){if(404!==r.statusCode){a._headersCapability.resolve();a._setReadableStream(r);var i=function getResponseHeader(t){return a._readableStream.headers[t.toLowerCase()]},c=(0,l.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:t.isHttp,rangeChunkSize:a._rangeChunkSize,disableRange:a._disableRange}),u=c.allowRangeRequests,d=c.suggestedLength;a._isRangeSupported=u;a._contentLength=d||a._contentLength;a._filename=(0,l.extractFilenameFromHeader)(i)}else{var h=new o.MissingPDFException('Missing PDF "'.concat(a._url,'".'));a._storedError=h;a._headersCapability.reject(h)}};(a=r.call(this,t))._request=null;"http:"===a._url.protocol?a._request=u.request(createRequestOptions(a._url,t.httpHeaders),i):a._request=d.request(createRequestOptions(a._url,t.httpHeaders),i);a._request.on("error",(function(t){a._storedError=t;a._headersCapability.reject(t)}));a._request.end();return a}return _createClass(PDFNodeStreamFullReader)}(y),_=function(t){_inherits(PDFNodeStreamRangeReader,t);var r=_createSuper(PDFNodeStreamRangeReader);function PDFNodeStreamRangeReader(t,a,i){var l;_classCallCheck(this,PDFNodeStreamRangeReader);(l=r.call(this,t))._httpHeaders={};for(var c in t.httpHeaders){var h=t.httpHeaders[c];void 0!==h&&(l._httpHeaders[c]=h)}l._httpHeaders.Range="bytes=".concat(a,"-").concat(i-1);var p=function handleResponse(t){if(404!==t.statusCode)l._setReadableStream(t);else{var r=new o.MissingPDFException('Missing PDF "'.concat(l._url,'".'));l._storedError=r}};l._request=null;"http:"===l._url.protocol?l._request=u.request(createRequestOptions(l._url,l._httpHeaders),p):l._request=d.request(createRequestOptions(l._url,l._httpHeaders),p);l._request.on("error",(function(t){l._storedError=t}));l._request.end();return l}return _createClass(PDFNodeStreamRangeReader)}(g),b=function(t){_inherits(PDFNodeStreamFsFullReader,t);var r=_createSuper(PDFNodeStreamFsFullReader);function PDFNodeStreamFsFullReader(t){var a;_classCallCheck(this,PDFNodeStreamFsFullReader);a=r.call(this,t);var i=decodeURIComponent(a._url.path);p.test(a._url.href)&&(i=i.replace(/^\//,""));c.lstat(i,(function(t,r){if(t){"ENOENT"===t.code&&(t=new o.MissingPDFException('Missing PDF "'.concat(i,'".')));a._storedError=t;a._headersCapability.reject(t)}else{a._contentLength=r.size;a._setReadableStream(c.createReadStream(i));a._headersCapability.resolve()}}));return a}return _createClass(PDFNodeStreamFsFullReader)}(y),A=function(t){_inherits(PDFNodeStreamFsRangeReader,t);var r=_createSuper(PDFNodeStreamFsRangeReader);function PDFNodeStreamFsRangeReader(t,a,i){var o;_classCallCheck(this,PDFNodeStreamFsRangeReader);o=r.call(this,t);var l=decodeURIComponent(o._url.path);p.test(o._url.href)&&(l=l.replace(/^\//,""));o._setReadableStream(c.createReadStream(l,{start:a,end:i-1}));return o}return _createClass(PDFNodeStreamFsRangeReader)}(g)},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.createResponseStatusError=function createResponseStatusError(t,r){if(404===t||0===t&&r.startsWith("file:"))return new i.MissingPDFException('Missing PDF "'+r+'".');return new i.UnexpectedResponseException("Unexpected server response (".concat(t,') while retrieving PDF "').concat(r,'".'),t)};r.extractFilenameFromHeader=function extractFilenameFromHeader(t){var r=t("Content-Disposition");if(r){var a=(0,o.getFilenameFromContentDispositionHeader)(r);if(a.includes("%"))try{a=decodeURIComponent(a)}catch(t){}if((0,l.isPdfFile)(a))return a}return null};r.validateRangeRequestCapabilities=function validateRangeRequestCapabilities(t){var r=t.getResponseHeader,a=t.isHttp,o=t.rangeChunkSize,l=t.disableRange;(0,i.assert)(o>0,"Range chunk size must be larger than zero");var c={allowRangeRequests:!1,suggestedLength:void 0},u=parseInt(r("Content-Length"),10);if(!Number.isInteger(u))return c;c.suggestedLength=u;if(u<=2*o)return c;if(l||!a)return c;if("bytes"!==r("Accept-Ranges"))return c;if("identity"!==(r("Content-Encoding")||"identity"))return c;c.allowRangeRequests=!0;return c};r.validateResponseStatus=function validateResponseStatus(t){return 200===t||206===t};var i=a(1),o=a(167),l=a(147)},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.getFilenameFromContentDispositionHeader=function getFilenameFromContentDispositionHeader(t){var r=!0,a=toParamRegExp("filename\\*","i").exec(t);if(a){var o=rfc2616unquote(a=a[1]);return fixupEncoding(o=rfc2047decode(o=rfc5987decode(o=unescape(o))))}if(a=function rfc2231getparam(t){var r,a=[],i=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=i.exec(t));){var o=_slicedToArray(r,4),l=o[1],c=o[2],u=o[3];if((l=parseInt(l,10))in a){if(0===l)break}else a[l]=[c,u]}for(var d=[],h=0;h<a.length&&h in a;++h){var p=_slicedToArray(a[h],2),v=p[0],y=p[1];y=rfc2616unquote(y);if(v){y=unescape(y);0===h&&(y=rfc5987decode(y))}d.push(y)}return d.join("")}(t)){return fixupEncoding(rfc2047decode(a))}if(a=toParamRegExp("filename","i").exec(t)){var l=rfc2616unquote(a=a[1]);return fixupEncoding(l=rfc2047decode(l))}function toParamRegExp(t,r){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',r)}function textdecode(t,a){if(t){if(!/^[\x00-\xFF]+$/.test(a))return a;try{var o=new TextDecoder(t,{fatal:!0}),l=(0,i.stringToBytes)(a);a=o.decode(l);r=!1}catch(t){}}return a}function fixupEncoding(t){if(r&&/[\x80-\xff]/.test(t)){t=textdecode("utf-8",t);r&&(t=textdecode("iso-8859-1",t))}return t}function rfc2616unquote(t){if(t.startsWith('"')){for(var r=t.slice(1).split('\\"'),a=0;a<r.length;++a){var i=r[a].indexOf('"');if(-1!==i){r[a]=r[a].slice(0,i);r.length=a+1}r[a]=r[a].replace(/\\(.)/g,"$1")}t=r.join('"')}return t}function rfc5987decode(t){var r=t.indexOf("'");return-1===r?t:textdecode(t.slice(0,r),t.slice(r+1).replace(/^[^']*'/,""))}function rfc2047decode(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,r,a,i){if("q"===a||"Q"===a)return textdecode(r,i=(i=i.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(t,r){return String.fromCharCode(parseInt(r,16))})));try{i=atob(i)}catch(t){}return textdecode(r,i)}))}return""};var i=a(1);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,o,l=[],c=!0,u=!1;try{for(a=a.call(t);!(c=(i=a.next()).done);c=!0){l.push(i.value);if(r&&l.length===r)break}}catch(t){u=!0;o=t}finally{try{c||null==a.return||a.return()}finally{if(u)throw o}}return l}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(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 _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFNetworkStream=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1),l=a(166);function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}var c=function(){function NetworkManager(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,NetworkManager);this.url=t;this.isHttp=/^https?:/i.test(t);this.httpHeaders=this.isHttp&&r.httpHeaders||Object.create(null);this.withCredentials=r.withCredentials||!1;this.getXhr=r.getXhr||function NetworkManager_getXhr(){return new XMLHttpRequest};this.currXhrId=0;this.pendingRequests=Object.create(null)}_createClass(NetworkManager,[{key:"requestRange",value:function requestRange(t,r,a){var i={begin:t,end:r};for(var o in a)i[o]=a[o];return this.request(i)}},{key:"requestFull",value:function requestFull(t){return this.request(t)}},{key:"request",value:function request(t){var r=this.getXhr(),a=this.currXhrId++,i=this.pendingRequests[a]={xhr:r};r.open("GET",this.url);r.withCredentials=this.withCredentials;for(var o in this.httpHeaders){var l=this.httpHeaders[o];void 0!==l&&r.setRequestHeader(o,l)}if(this.isHttp&&"begin"in t&&"end"in t){r.setRequestHeader("Range","bytes=".concat(t.begin,"-").concat(t.end-1));i.expectedStatus=206}else i.expectedStatus=200;r.responseType="arraybuffer";t.onError&&(r.onerror=function(a){t.onError(r.status)});r.onreadystatechange=this.onStateChange.bind(this,a);r.onprogress=this.onProgress.bind(this,a);i.onHeadersReceived=t.onHeadersReceived;i.onDone=t.onDone;i.onError=t.onError;i.onProgress=t.onProgress;r.send(null);return a}},{key:"onProgress",value:function onProgress(t,r){var a,i=this.pendingRequests[t];i&&(null===(a=i.onProgress)||void 0===a||a.call(i,r))}},{key:"onStateChange",value:function onStateChange(t,r){var a=this.pendingRequests[t];if(a){var i=a.xhr;if(i.readyState>=2&&a.onHeadersReceived){a.onHeadersReceived();delete a.onHeadersReceived}if(4===i.readyState&&t in this.pendingRequests){delete this.pendingRequests[t];if(0===i.status&&this.isHttp){var l;null===(l=a.onError)||void 0===l||l.call(a,i.status)}else{var c=i.status||200;if(200===c&&206===a.expectedStatus||c===a.expectedStatus){var u=function getArrayBuffer(t){var r=t.response;return"string"!=typeof r?r:(0,o.stringToBytes)(r).buffer}(i);if(206===c){var d=i.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(d);a.onDone({begin:parseInt(h[1],10),chunk:u})}else if(u)a.onDone({begin:0,chunk:u});else{var p;null===(p=a.onError)||void 0===p||p.call(a,i.status)}}else{var v;null===(v=a.onError)||void 0===v||v.call(a,i.status)}}}}}},{key:"getRequestXhr",value:function getRequestXhr(t){return this.pendingRequests[t].xhr}},{key:"isPendingRequest",value:function isPendingRequest(t){return t in this.pendingRequests}},{key:"abortRequest",value:function abortRequest(t){var r=this.pendingRequests[t].xhr;delete this.pendingRequests[t];r.abort()}}]);return NetworkManager}(),u=function(){function PDFNetworkStream(t){_classCallCheck(this,PDFNetworkStream);this._source=t;this._manager=new c(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials});this._rangeChunkSize=t.rangeChunkSize;this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNetworkStream,[{key:"_onRangeRequestReaderClosed",value:function _onRangeRequestReaderClosed(t){var r=this._rangeRequestReaders.indexOf(t);r>=0&&this._rangeRequestReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){(0,o.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once.");this._fullRequestReader=new d(this._manager,this._source);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){var a=new h(this._manager,t,r);a.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var a,i=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(i.s();!(a=i.n()).done;){a.value.cancel(t)}}catch(t){i.e(t)}finally{i.f()}}}]);return PDFNetworkStream}();r.PDFNetworkStream=u;var d=function(){function PDFNetworkStreamFullRequestReader(t,r){_classCallCheck(this,PDFNetworkStreamFullRequestReader);this._manager=t;var a={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url;this._fullRequestId=t.requestFull(a);this._headersReceivedCapability=(0,o.createPromiseCapability)();this._disableRange=r.disableRange||!1;this._contentLength=r.length;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!1;this._isRangeSupported=!1;this._cachedChunks=[];this._requests=[];this._done=!1;this._storedError=void 0;this._filename=null;this.onProgress=null}_createClass(PDFNetworkStreamFullRequestReader,[{key:"_onHeadersReceived",value:function _onHeadersReceived(){var t=this._fullRequestId,r=this._manager.getRequestXhr(t),a=function getResponseHeader(t){return r.getResponseHeader(t)},i=(0,l.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),o=i.allowRangeRequests,c=i.suggestedLength;o&&(this._isRangeSupported=!0);this._contentLength=c||this._contentLength;this._filename=(0,l.extractFilenameFromHeader)(a);this._isRangeSupported&&this._manager.abortRequest(t);this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function _onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);this._done=!0;if(!(this._cachedChunks.length>0)){var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0}}},{key:"_onError",value:function _onError(t){this._storedError=(0,l.createResponseStatusError)(t,this._url);this._headersReceivedCapability.reject(this._storedError);var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.reject(this._storedError)}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._cachedChunks.length=0}},{key:"_onProgress",value:function _onProgress(t){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"headersReady",get:function get(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee(){var t,r;return i.default.wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._storedError){a.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){a.next=5;break}t=this._cachedChunks.shift();return a.abrupt("return",{value:t,done:!1});case 5:if(!this._done){a.next=7;break}return a.abrupt("return",{value:void 0,done:!0});case 7:r=(0,o.createPromiseCapability)();this._requests.push(r);return a.abrupt("return",r.promise);case 10:case"end":return a.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;this._headersReceivedCapability.reject(t);var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}}]);var t;return PDFNetworkStreamFullRequestReader}(),h=function(){function PDFNetworkStreamRangeRequestReader(t,r,a){_classCallCheck(this,PDFNetworkStreamRangeRequestReader);this._manager=t;var i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url;this._requestId=t.requestRange(r,a,i);this._requests=[];this._queuedChunk=null;this._done=!1;this._storedError=void 0;this.onProgress=null;this.onClosed=null}_createClass(PDFNetworkStreamRangeRequestReader,[{key:"_close",value:function _close(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}},{key:"_onDone",value:function _onDone(t){var r=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:r,done:!1})}else this._queuedChunk=r;this._done=!0;var a,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(a=i.n()).done;){a.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._close()}},{key:"_onError",value:function _onError(t){this._storedError=(0,l.createResponseStatusError)(t,this._url);var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.reject(this._storedError)}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._queuedChunk=null}},{key:"_onProgress",value:function _onProgress(t){if(!this.isStreamingSupported){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded})}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee2(){var t,r;return i.default.wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:if(!this._storedError){a.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){a.next=6;break}t=this._queuedChunk;this._queuedChunk=null;return a.abrupt("return",{value:t,done:!1});case 6:if(!this._done){a.next=8;break}return a.abrupt("return",{value:void 0,done:!0});case 8:r=(0,o.createPromiseCapability)();this._requests.push(r);return a.abrupt("return",r.promise);case 11:case"end":return a.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(r=a.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}}]);var t;return PDFNetworkStreamRangeRequestReader}()},(t,r,a)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.PDFFetchStream=void 0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(a(145)),o=a(1),l=a(166);function asyncGeneratorStep(t,r,a,i,o,l,c){try{var u=t[l](c),d=u.value}catch(t){a(t);return}u.done?r(d):Promise.resolve(d).then(i,o)}function _asyncToGenerator(t){return function(){var r=this,a=arguments;return new Promise((function(i,o){var l=t.apply(r,a);function _next(t){asyncGeneratorStep(l,i,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}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 l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();c=t.done;return t},e:function e(t){u=!0;l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a<r;a++)i[a]=t[a];return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;a<r.length;a++){var i=r[a];i.enumerable=i.enumerable||!1;i.configurable=!0;"value"in i&&(i.writable=!0);Object.defineProperty(t,i.key,i)}}function _createClass(t,r,a){r&&_defineProperties(t.prototype,r);a&&_defineProperties(t,a);Object.defineProperty(t,"prototype",{writable:!1});return t}function createFetchOptions(t,r,a){return{method:"GET",headers:t,signal:null==a?void 0:a.signal,mode:"cors",credentials:r?"include":"same-origin",redirect:"follow"}}function createHeaders(t){var r=new Headers;for(var a in t){var i=t[a];void 0!==i&&r.append(a,i)}return r}var c=function(){function PDFFetchStream(t){_classCallCheck(this,PDFFetchStream);this.source=t;this.isHttp=/^https?:/i.test(t.url);this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFFetchStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){(0,o.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new u(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var a=new d(this,t,r);this._rangeRequestReaders.push(a);return a}},{key:"cancelAllRequests",value:function cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t);var r,a=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(a.s();!(r=a.n()).done;){r.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}}}]);return PDFFetchStream}();r.PDFFetchStream=c;var u=function(){function PDFFetchStreamReader(t){var r=this;_classCallCheck(this,PDFFetchStreamReader);this._stream=t;this._reader=null;this._loaded=0;this._filename=null;var a=t.source;this._withCredentials=a.withCredentials||!1;this._contentLength=a.length;this._headersCapability=(0,o.createPromiseCapability)();this._disableRange=a.disableRange||!1;this._rangeChunkSize=a.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);"undefined"!=typeof AbortController&&(this._abortController=new AbortController);this._isStreamingSupported=!a.disableStream;this._isRangeSupported=!a.disableRange;this._headers=createHeaders(this._stream.httpHeaders);var i=a.url;fetch(i,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,l.validateResponseStatus)(t.status))throw(0,l.createResponseStatusError)(t.status,i);r._reader=t.body.getReader();r._headersCapability.resolve();var a=function getResponseHeader(r){return t.headers.get(r)},c=(0,l.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),u=c.allowRangeRequests,d=c.suggestedLength;r._isRangeSupported=u;r._contentLength=d||r._contentLength;r._filename=(0,l.extractFilenameFromHeader)(a);!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new o.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee(){var t,r,a,o;return i.default.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._headersCapability.promise;case 2:i.next=4;return this._reader.read();case 4:t=i.sent;r=t.value;if(!(a=t.done)){i.next=9;break}return i.abrupt("return",{value:r,done:a});case 9:this._loaded+=r.byteLength;this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength});o=new Uint8Array(r).buffer;return i.abrupt("return",{value:o,done:!1});case 13:case"end":return i.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._reader&&this._reader.cancel(t);this._abortController&&this._abortController.abort()}}]);var t;return PDFFetchStreamReader}(),d=function(){function PDFFetchStreamRangeReader(t,r,a){var i=this;_classCallCheck(this,PDFFetchStreamRangeReader);this._stream=t;this._reader=null;this._loaded=0;var c=t.source;this._withCredentials=c.withCredentials||!1;this._readCapability=(0,o.createPromiseCapability)();this._isStreamingSupported=!c.disableStream;"undefined"!=typeof AbortController&&(this._abortController=new AbortController);this._headers=createHeaders(this._stream.httpHeaders);this._headers.append("Range","bytes=".concat(r,"-").concat(a-1));var u=c.url;fetch(u,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,l.validateResponseStatus)(t.status))throw(0,l.createResponseStatusError)(t.status,u);i._readCapability.resolve();i._reader=t.body.getReader()})).catch(this._readCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(i.default.mark((function _callee2(){var t,r,a,o;return i.default.wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._readCapability.promise;case 2:i.next=4;return this._reader.read();case 4:t=i.sent;r=t.value;if(!(a=t.done)){i.next=9;break}return i.abrupt("return",{value:r,done:a});case 9:this._loaded+=r.byteLength;this.onProgress&&this.onProgress({loaded:this._loaded});o=new Uint8Array(r).buffer;return i.abrupt("return",{value:o,done:!1});case 13:case"end":return i.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._reader&&this._reader.cancel(t);this._abortController&&this._abortController.abort()}}]);var t;return PDFFetchStreamRangeReader}()}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var r=__webpack_module_cache__[t];if(void 0!==r)return r.exports;var a=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};__webpack_modules__[t](a,a.exports,__w_pdfjs_require__);a.loaded=!0;return a.exports}__w_pdfjs_require__.nmd=t=>{t.paths=[];t.children||(t.children=[]);return t};var __webpack_exports__={};(()=>{"use strict";var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function get(){return o.AnnotationLayer}});Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function get(){return r.AnnotationMode}});Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function get(){return r.CMapCompressionType}});Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function get(){return l.GlobalWorkerOptions}});Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function get(){return r.InvalidPDFException}});Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function get(){return a.LoopbackPort}});Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function get(){return r.MissingPDFException}});Object.defineProperty(t,"OPS",{enumerable:!0,get:function get(){return r.OPS}});Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function get(){return a.PDFDataRangeTransport}});Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function get(){return i.PDFDateString}});Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function get(){return a.PDFWorker}});Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function get(){return r.PasswordResponses}});Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function get(){return r.PermissionFlag}});Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function get(){return i.PixelsPerInch}});Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function get(){return i.RenderingCancelledException}});Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function get(){return d.SVGGraphics}});Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function get(){return r.UNSUPPORTED_FEATURES}});Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function get(){return r.UnexpectedResponseException}});Object.defineProperty(t,"Util",{enumerable:!0,get:function get(){return r.Util}});Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function get(){return r.VerbosityLevel}});Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function get(){return h.XfaLayer}});Object.defineProperty(t,"build",{enumerable:!0,get:function get(){return a.build}});Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function get(){return r.createPromiseCapability}});Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function get(){return r.createValidAbsoluteUrl}});Object.defineProperty(t,"getDocument",{enumerable:!0,get:function get(){return a.getDocument}});Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function get(){return i.getFilenameFromUrl}});Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function get(){return i.getPdfFilenameFromUrl}});Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function get(){return i.getXfaPageViewport}});Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function get(){return i.isPdfFile}});Object.defineProperty(t,"loadScript",{enumerable:!0,get:function get(){return i.loadScript}});Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function get(){return u.renderTextLayer}});Object.defineProperty(t,"shadow",{enumerable:!0,get:function get(){return r.shadow}});Object.defineProperty(t,"version",{enumerable:!0,get:function get(){return a.version}});var r=__w_pdfjs_require__(1),a=__w_pdfjs_require__(144),i=__w_pdfjs_require__(147),o=__w_pdfjs_require__(160),l=__w_pdfjs_require__(154),c=__w_pdfjs_require__(3),u=__w_pdfjs_require__(163),d=__w_pdfjs_require__(164),h=__w_pdfjs_require__(162);if(c.isNodeJS){var p=__w_pdfjs_require__(165).PDFNodeStream;(0,a.setPDFNetworkStreamFactory)((function(t){return new p(t)}))}else{var v=__w_pdfjs_require__(168).PDFNetworkStream,y=__w_pdfjs_require__(169).PDFFetchStream;(0,a.setPDFNetworkStreamFactory)((function(t){return(0,i.isValidFetchUrl)(t.url)?new y(t):new v(t)}))}})();return __webpack_exports__})()}));
|