hsu-utils 0.0.18 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hsu-utils.js +3 -3
- package/dist/hsu-utils.min.js +1 -1
- package/dist/hsu-utils.min.js.LICENSE.txt +1 -1
- package/es/RenderPDF/index.d.ts +10 -3
- package/es/RenderPDF/index.js +37 -13
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/lib/RenderPDF/index.d.ts +10 -3
- package/lib/RenderPDF/index.js +43 -10
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/package.json +1 -1
package/dist/hsu-utils.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see hsu-utils.min.js.LICENSE.txt */
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["hsu-utils"]=t():e["hsu-utils"]=t()}(this,(()=>(()=>{var __webpack_modules__={783:function(module,__unused_webpack_exports,__webpack_require__){var factory;factory=function(){return(()=>{var __webpack_modules__=[,(e,t,r)=>{"use strict";function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){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 a(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.UNSUPPORTED_FEATURES=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=T,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=T(e[n]);for(var a=0,o=new Uint8Array(r),i=0;i<t;i++){var s=e[i];s instanceof Uint8Array||(s="string"==typeof s?C(s):new Uint8Array(s));var l=s.byteLength;o.set(s,a),a+=l}return o},t.assert=function(e,t){e||m(t)},t.bytesToString=function(e){"object"===i(e)&&null!==e&&void 0!==e.length||m("Invalid argument for bytesToString");var t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);for(var n=[],a=0;a<t;a+=r){var o=Math.min(a+r,t),s=e.subarray(a,o);n.push(String.fromCharCode.apply(null,s))}return n.join("")},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}})),e},t.createValidAbsoluteUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var n=e.match(/\./g);n&&n.length>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=j(e)}catch(e){}}var a=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(e){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,(function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)}))},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return v},t.info=function(e){v>=p.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===i(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.objectFromMap=function(e){var t,r,n,o=Object.create(null),i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}(e);try{for(i.s();!(t=i.n()).done;){var s=(r=t.value,n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(r,n)||a(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=s[0],u=s[1];o[l]=u}}catch(e){i.e(e)}finally{i.f()}return o},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(v=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=C,t.stringToPDFString=function(e){var t;if(e[0]>="ï"&&("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t))try{var r=new TextDecoder(t,{fatal:!0}),n=C(e);return r.decode(n)}catch(e){y('stringToPDFString: "'.concat(e,'".'))}for(var a=[],o=0,i=e.length;o<i;o++){var s=M[e.charCodeAt(o)];a.push(s?String.fromCharCode(s):e.charAt(o))}return a.join("")},t.stringToUTF16BEString=function(e){for(var t=["þÿ"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")},t.stringToUTF8String=j,t.unreachable=m,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=y,r(2),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var p={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=p,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",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"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var v=p.WARNINGS;function y(e){v>=p.WARNINGS&&console.log("Warning: ".concat(e))}function m(e){throw new Error(e)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var b=function(){function e(t,r){this.constructor===e&&m("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=b;var _=function(e){c(r,e);var t=d(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"PasswordException")).code=n,a}return l(r)}(b);t.PasswordException=_;var w=function(e){c(r,e);var t=d(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"UnknownErrorException")).details=n,a}return l(r)}(b);t.UnknownErrorException=w;var S=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"InvalidPDFException")}return l(r)}(b);t.InvalidPDFException=S;var A=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"MissingPDFException")}return l(r)}(b);t.MissingPDFException=A;var k=function(e){c(r,e);var t=d(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"UnexpectedResponseException")).status=n,a}return l(r)}(b);t.UnexpectedResponseException=k;var x=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"FormatError")}return l(r)}(b);t.FormatError=x;var P=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"AbortException")}return l(r)}(b);function C(e){"string"!=typeof e&&m("Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function T(e){return void 0!==e.length?e.length:void 0!==e.byteLength?e.byteLength:void m("Invalid argument for arrayByteLength")}t.AbortException=P;var R={get value(){return g(this,"value",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}};t.IsLittleEndianCached=R;var E={get value(){return g(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=E;var O=n(Array(256).keys()).map((function(e){return e.toString(16).padStart(2,"0")})),F=function(){function e(){u(this,e)}return l(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(O[e]).concat(O[t]).concat(O[r])}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),o=e.applyTransform([t[0],t[3]],r),i=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],o[0],i[0]),Math.min(n[1],a[1],o[1],i[1]),Math.max(n[0],a[0],o[0],i[0]),Math.max(n[1],a[1],o[1],i[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],i=(r+o)/2,s=Math.sqrt(Math.pow(r+o,2)-4*(r*o-a*n))/2,l=i+s||1,u=i-s||1;return[Math.sqrt(l),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var a=[t[0],t[2],r[0],r[2]].sort(n),o=[t[1],t[3],r[1],r[3]].sort(n),i=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(i[0]=a[1],i[2]=a[2],o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]?(i[1]=o[1],i[3]=o[2],i):null):null}},{key:"bezierBoundingBox",value:function(e,t,r,a,o,i,s,l){for(var u,c,f,d,h,p,v,y,m=[],g=[[],[]],b=0;b<2;++b)if(0===b?(c=6*e-12*r+6*o,u=-3*e+9*r-9*o+3*s,f=3*r-3*e):(c=6*t-12*a+6*i,u=-3*t+9*a-9*i+3*l,f=3*a-3*t),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;0<(d=-f/c)&&d<1&&m.push(d)}else v=c*c-4*f*u,y=Math.sqrt(v),v<0||(0<(h=(-c+y)/(2*u))&&h<1&&m.push(h),0<(p=(-c-y)/(2*u))&&p<1&&m.push(p));for(var _,w=m.length,S=w;w--;)_=1-(d=m[w]),g[0][w]=_*_*_*e+3*_*_*d*r+3*_*d*d*o+d*d*d*s,g[1][w]=_*_*_*t+3*_*_*d*a+3*_*d*d*i+d*d*d*l;return g[0][S]=e,g[1][S]=t,g[0][S+1]=s,g[1][S+1]=l,g[0].length=g[1].length=S+2,[Math.min.apply(Math,n(g[0])),Math.min.apply(Math,n(g[1])),Math.max.apply(Math,n(g[0])),Math.max.apply(Math,n(g[1]))]}}]),e}();t.Util=F;var M=[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 j(e){return decodeURIComponent(escape(e))}},(e,t,r)=>{"use strict";var n=r(3);globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),!globalThis.DOMMatrix&&n.isNodeJS&&(globalThis.DOMMatrix=r(4)),globalThis.Promise.allSettled||(globalThis.Promise=r(5)),!globalThis.ReadableStream&&n.isNodeJS&&(globalThis.ReadableStream=__webpack_require__(800).ReadableStream),globalThis.structuredClone||r(129))},(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n=!("object"!==("undefined"==typeof process?"undefined":r(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,r)=>{"use strict";var n,a,o;function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}o=function(){function e(e){var t=new f,r=Array.from(e);if(!r.every((function(e){return!Number.isNaN(e)})))throw TypeError('CSSMatrix: "'+e+'" must only have numbers.');if(16===r.length){var n=r[0],a=r[1],o=r[2],i=r[3],s=r[4],l=r[5],u=r[6],c=r[7],d=r[8],h=r[9],p=r[10],v=r[11],y=r[12],m=r[13],g=r[14],b=r[15];t.m11=n,t.a=n,t.m21=s,t.c=s,t.m31=d,t.m41=y,t.e=y,t.m12=a,t.b=a,t.m22=l,t.d=l,t.m32=h,t.m42=m,t.f=m,t.m13=o,t.m23=u,t.m33=p,t.m43=g,t.m14=i,t.m24=c,t.m34=v,t.m44=b}else{if(6!==r.length)throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");var _=r[0],w=r[1],S=r[2],A=r[3],k=r[4],x=r[5];t.m11=_,t.a=_,t.m12=w,t.b=w,t.m21=S,t.c=S,t.m22=A,t.d=A,t.m41=k,t.e=k,t.m42=x,t.f=x}return t}function t(t){var r=Object.keys(new f);if("object"===i(t)&&r.every((function(e){return e in t})))return e([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]);throw TypeError('CSSMatrix: "'+t+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function r(t){if("string"!=typeof t)throw TypeError('CSSMatrix: "'+t+'" is not a string.');var r=String(t).replace(/\s/g,""),n=new f,a='CSSMatrix: invalid transform string "'+t+'"';return r.split(")").filter((function(e){return e})).forEach((function(t){var r=t.split("("),o=r[0],i=r[1];if(!i)throw TypeError(a);var s=i.split(",").map((function(e){return e.includes("rad")?parseFloat(e)*(180/Math.PI):parseFloat(e)})),l=s[0],u=s[1],c=s[2],f=s[3],d=[l,u,c],h=[l,u,c,f];if("perspective"===o&&l&&[u,c].every((function(e){return void 0===e})))n.m34=-1/l;else if(o.includes("matrix")&&[6,16].includes(s.length)&&s.every((function(e){return!Number.isNaN(+e)}))){var p=s.map((function(e){return Math.abs(e)<1e-6?0:e}));n=n.multiply(e(p))}else if("translate3d"===o&&d.every((function(e){return!Number.isNaN(+e)})))n=n.translate(l,u,c);else if("translate"===o&&l&&void 0===c)n=n.translate(l,u||0,0);else if("rotate3d"===o&&h.every((function(e){return!Number.isNaN(+e)}))&&f)n=n.rotateAxisAngle(l,u,c,f);else if("rotate"===o&&l&&[u,c].every((function(e){return void 0===e})))n=n.rotate(0,0,l);else if("scale3d"===o&&d.every((function(e){return!Number.isNaN(+e)}))&&d.some((function(e){return 1!==e})))n=n.scale(l,u,c);else if("scale"!==o||Number.isNaN(l)||1===l||void 0!==c)if("skew"===o&&l&&void 0===c)n=n.skewX(l),n=u?n.skewY(u):n;else{if(!(/[XYZ]/.test(o)&&l&&[u,c].every((function(e){return void 0===e}))&&["translate","rotate","scale","skew"].some((function(e){return o.includes(e)}))))throw TypeError(a);if(["skewX","skewY"].includes(o))n=n[o](l);else{var v=o.replace(/[XYZ]/,""),y=o.replace(v,""),m=["X","Y","Z"].indexOf(y),g=[0===m?l:0,1===m?l:0,2===m?l:0];n=n[v].apply(n,g)}}else{var b=Number.isNaN(+u)?l:u;n=n.scale(l,b,1)}})),n}function n(e,t,r){var n=new f;return n.m41=e,n.e=e,n.m42=t,n.f=t,n.m43=r,n}function a(e,t,r){var n=new f,a=Math.PI/180,o=e*a,i=t*a,s=r*a,l=Math.cos(o),u=-Math.sin(o),c=Math.cos(i),d=-Math.sin(i),h=Math.cos(s),p=-Math.sin(s),v=c*h,y=-c*p;n.m11=v,n.a=v,n.m12=y,n.b=y,n.m13=d;var m=u*d*h+l*p;n.m21=m,n.c=m;var g=l*h-u*d*p;return n.m22=g,n.d=g,n.m23=-u*c,n.m31=u*p-l*d*h,n.m32=u*h+l*d*p,n.m33=l*c,n}function o(e,t,r,n){var a=new f,o=n*(Math.PI/360),i=Math.sin(o),s=Math.cos(o),l=i*i,u=Math.sqrt(e*e+t*t+r*r),c=e,d=t,h=r;0===u?(c=0,d=0,h=1):(c/=u,d/=u,h/=u);var p=c*c,v=d*d,y=h*h,m=1-2*(v+y)*l;a.m11=m,a.a=m;var g=2*(c*d*l+h*i*s);a.m12=g,a.b=g,a.m13=2*(c*h*l-d*i*s);var b=2*(d*c*l-h*i*s);a.m21=b,a.c=b;var _=1-2*(y+p)*l;return a.m22=_,a.d=_,a.m23=2*(d*h*l+c*i*s),a.m31=2*(h*c*l+d*i*s),a.m32=2*(h*d*l-c*i*s),a.m33=1-2*(p+v)*l,a}function s(e,t,r){var n=new f;return n.m11=e,n.a=e,n.m22=t,n.d=t,n.m33=r,n}function l(e){var t=new f,r=e*Math.PI/180,n=Math.tan(r);return t.m21=n,t.c=n,t}function u(e){var t=new f,r=e*Math.PI/180,n=Math.tan(r);return t.m12=n,t.b=n,t}function c(t,r){return e([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 f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if(r.a=1,r.b=0,r.c=0,r.d=1,r.e=0,r.f=0,r.m11=1,r.m12=0,r.m13=0,r.m14=0,r.m21=0,r.m22=1,r.m23=0,r.m24=0,r.m31=0,r.m32=0,r.m33=1,r.m34=0,r.m41=0,r.m42=0,r.m43=0,r.m44=1,e&&e.length){var n=[16,6].some((function(t){return t===e.length}))?e:e[0];return r.setMatrixValue(n)}return r},d={isIdentity:{configurable:!0},is2D:{configurable:!0}};return d.isIdentity.set=function(e){this.isIdentity=e},d.isIdentity.get=function(){var e=this;return 1===e.m11&&0===e.m12&&0===e.m13&&0===e.m14&&0===e.m21&&1===e.m22&&0===e.m23&&0===e.m24&&0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m41&&0===e.m42&&0===e.m43&&1===e.m44},d.is2D.get=function(){var e=this;return 0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m43&&1===e.m44},d.is2D.set=function(e){this.is2D=e},f.prototype.setMatrixValue=function(n){return[Array,Float64Array,Float32Array].some((function(e){return n instanceof e}))?e(n):"string"==typeof n&&n.length&&"none"!==n?r(n):"object"===i(n)?t(n):this},f.prototype.toArray=function(){var e=this,t=Math.pow(10,6);return(e.is2D?[e.a,e.b,e.c,e.d,e.e,e.f]:[e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44]).map((function(e){return Math.abs(e)<1e-6?0:(e*t>>0)/t}))},f.prototype.toString=function(){var e=this.toArray();return(this.is2D?"matrix":"matrix3d")+"("+e+")"},f.prototype.toJSON=function(){var e=this,t=e.is2D,r=e.isIdentity;return Object.assign({},e,{is2D:t,isIdentity:r})},f.prototype.multiply=function(e){return c(this,e)},f.prototype.translate=function(e,t,r){var a=t,o=r;return void 0===o&&(o=0),void 0===a&&(a=0),c(this,n(e,a,o))},f.prototype.scale=function(e,t,r){var n=t,a=r;return void 0===n&&(n=e),void 0===a&&(a=1),c(this,s(e,n,a))},f.prototype.rotate=function(e,t,r){var n=e,o=t,i=r;return void 0===o&&(o=0),void 0===i&&(i=n,n=0),c(this,a(n,o,i))},f.prototype.rotateAxisAngle=function(e,t,r,n){if([e,t,r,n].some((function(e){return Number.isNaN(e)})))throw new TypeError("CSSMatrix: expecting 4 values");return c(this,o(e,t,r,n))},f.prototype.skewX=function(e){return c(this,l(e))},f.prototype.skewY=function(e){return c(this,u(e))},f.prototype.transformPoint=function(e){var t=n(e.x,e.y,e.z);return t.m44=e.w||1,{x:(t=this.multiply(t)).m41,y:t.m42,z:t.m43,w:t.m44}},f.prototype.transform=function(e){var t=this,r=t.m11*e.x+t.m12*e.y+t.m13*e.z+t.m14*e.w,n=t.m21*e.x+t.m22*e.y+t.m23*e.z+t.m24*e.w,a=t.m31*e.x+t.m32*e.y+t.m33*e.z+t.m34*e.w,o=t.m41*e.x+t.m42*e.y+t.m43*e.z+t.m44*e.w;return{x:r/o,y:n/o,z:a/o,w:o}},Object.defineProperties(f.prototype,d),Object.assign(f,{Translate:n,Rotate:a,RotateAxisAngle:o,Scale:s,SkewX:l,SkewY:u,Multiply:c,fromArray:e,fromMatrix:t,fromString:r}),Object.assign(f,{Version:"0.0.24"}),f},"object"===i(t)?e.exports=o():void 0===(a="function"==typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=a)},(e,t,r)=>{r(6),r(91),r(97),r(99),r(123),r(124),r(125),r(126);var n=r(128);e.exports=n.Promise},(e,t,r)=>{"use strict";var n=r(7),a=r(8),o=r(27),i=r(69),s=r(71),l=r(57),u=r(73),c=r(46),f=r(15),d=r(77),h=r(78),p=r(79),v=r(88),y=r(36),m=r(90),g=y("toStringTag"),b=a.Error,_=[].push,w=function(e,t){var r,n=arguments.length>2?arguments[2]:void 0,a=o(S,this);s?r=s(new b,a?i(this):S):(r=a?this:u(S),c(r,g,"Error")),void 0!==t&&c(r,"message",v(t)),m&&c(r,"stack",d(r.stack,1)),h(r,n);var l=[];return p(e,_,{that:l}),c(r,"errors",l),r};s?s(w,b):l(w,b,{name:!0});var S=w.prototype=u(b.prototype,{constructor:f(1,w),message:f(1,""),name:f(1,"AggregateError")});n({global:!0},{AggregateError:w})},(e,t,r)=>{var n=r(8),a=r(9).f,o=r(46),i=r(50),s=r(40),l=r(57),u=r(68);e.exports=function(e,t){var r,c,f,d,h,p=e.target,v=e.global,y=e.stat;if(r=v?n:y?n[p]||s(p,{}):(n[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=a(r,c))&&h.value:r[c],!u(v?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&o(d,"sham",!0),i(r,c,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof __webpack_require__.g&&__webpack_require__.g)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(10),a=r(12),o=r(14),i=r(15),s=r(16),l=r(21),u=r(41),c=r(44),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=l(t),c)try{return f(e,t)}catch(e){}if(u(e,t))return i(!a(o.f,e,t),e[t])}},(e,t,r)=>{var n=r(11);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,r)=>{var n=r(13),a=Function.prototype.call;e.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},(e,t,r)=>{var n=r(11);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(17),a=r(20);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(8),a=r(18),o=r(11),i=r(19),s=n.Object,l=a("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?l(e,""):s(e)}:s},(e,t,r)=>{var n=r(13),a=Function.prototype,o=a.bind,i=a.call,s=n&&o.bind(i,i);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},(e,t,r)=>{var n=r(18),a=n({}.toString),o=n("".slice);e.exports=function(e){return o(a(e),8,-1)}},(e,t,r)=>{var n=r(8).TypeError;e.exports=function(e){if(null==e)throw n("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(22),a=r(25);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},(e,t,r)=>{var n=r(8),a=r(12),o=r(23),i=r(25),s=r(32),l=r(35),u=r(36),c=n.TypeError,f=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,n=s(e,f);if(n){if(void 0===t&&(t="default"),r=a(n,e,t),!o(r)||i(r))return r;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},(e,t,r)=>{var n=r(24);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},e=>{e.exports=function(e){return"function"==typeof e}},(e,t,r)=>{var n=r(8),a=r(26),o=r(24),i=r(27),s=r(28),l=n.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return o(t)&&i(t.prototype,l(e))}},(e,t,r)=>{var n=r(8),a=r(24);e.exports=function(e,t){return arguments.length<2?(r=n[e],a(r)?r:void 0):n[e]&&n[e][t];var r}},(e,t,r)=>{var n=r(18);e.exports=n({}.isPrototypeOf)},(e,t,r)=>{var n=r(29);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n=r(30),a=r(11);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(e,t,r)=>{var n,a,o=r(8),i=r(31),s=o.process,l=o.Deno,u=s&&s.versions||l&&l.version,c=u&&u.v8;c&&(a=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(a=+n[1]),e.exports=a},(e,t,r)=>{var n=r(26);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(33);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},(e,t,r)=>{var n=r(8),a=r(24),o=r(34),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a function")}},(e,t,r)=>{var n=r(8).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},(e,t,r)=>{var n=r(8),a=r(12),o=r(24),i=r(23),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!i(n=a(r,e)))return n;if(o(r=e.valueOf)&&!i(n=a(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!i(n=a(r,e)))return n;throw s("Can't convert object to primitive value")}},(e,t,r)=>{var n=r(8),a=r(37),o=r(41),i=r(43),s=r(29),l=r(28),u=a("wks"),c=n.Symbol,f=c&&c.for,d=l?c:c&&c.withoutSetter||i;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(c,e)?u[e]=c[e]:u[e]=l&&f?f(t):d(t)}return u[e]}},(e,t,r)=>{var n=r(38),a=r(39);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:n?"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"})},e=>{e.exports=!1},(e,t,r)=>{var n=r(8),a=r(40),o="__core-js_shared__",i=n[o]||a(o,{});e.exports=i},(e,t,r)=>{var n=r(8),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(18),a=r(42),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(a(e),t)}},(e,t,r)=>{var n=r(8),a=r(20),o=n.Object;e.exports=function(e){return o(a(e))}},(e,t,r)=>{var n=r(18),a=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+o,36)}},(e,t,r)=>{var n=r(10),a=r(11),o=r(45);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},(e,t,r)=>{var n=r(8),a=r(23),o=n.document,i=a(o)&&a(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},(e,t,r)=>{var n=r(10),a=r(47),o=r(15);e.exports=n?function(e,t,r){return a.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(8),a=r(10),o=r(44),i=r(48),s=r(49),l=r(21),u=n.TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",p="writable";t.f=a?i?function(e,t,r){if(s(e),t=l(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var n=f(e,t);n&&n[p]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:d in r?r[d]:n[d],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(s(e),t=l(t),s(r),o)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(10),a=r(11);e.exports=n&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,r)=>{var n=r(8),a=r(23),o=n.String,i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not an object")}},(e,t,r)=>{var n=r(8),a=r(24),o=r(41),i=r(46),s=r(40),l=r(51),u=r(52),c=r(56).CONFIGURABLE,f=u.get,d=u.enforce,h=String(String).split("String");(e.exports=function(e,t,r,l){var u,f=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,v=!!l&&!!l.noTargetGet,y=l&&void 0!==l.name?l.name:t;a(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||c&&r.name!==y)&&i(r,"name",y),(u=d(r)).source||(u.source=h.join("string"==typeof y?y:""))),e!==n?(f?!v&&e[t]&&(p=!0):delete e[t],p?e[t]=r:i(e,t,r)):p?e[t]=r:s(t,r)})(Function.prototype,"toString",(function(){return a(this)&&f(this).source||l(this)}))},(e,t,r)=>{var n=r(18),a=r(24),o=r(39),i=n(Function.toString);a(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},(e,t,r)=>{var n,a,o,i=r(53),s=r(8),l=r(18),u=r(23),c=r(46),f=r(41),d=r(39),h=r(54),p=r(55),v="Object already initialized",y=s.TypeError,m=s.WeakMap;if(i||d.state){var g=d.state||(d.state=new m),b=l(g.get),_=l(g.has),w=l(g.set);n=function(e,t){if(_(g,e))throw new y(v);return t.facade=e,w(g,e,t),t},a=function(e){return b(g,e)||{}},o=function(e){return _(g,e)}}else{var S=h("state");p[S]=!0,n=function(e,t){if(f(e,S))throw new y(v);return t.facade=e,c(e,S,t),t},a=function(e){return f(e,S)?e[S]:{}},o=function(e){return f(e,S)}}e.exports={set:n,get:a,has:o,enforce:function(e){return o(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=a(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var n=r(8),a=r(24),o=r(51),i=n.WeakMap;e.exports=a(i)&&/native code/.test(o(i))},(e,t,r)=>{var n=r(37),a=r(43),o=n("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},e=>{e.exports={}},(e,t,r)=>{var n=r(10),a=r(41),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,s=a(o,"name"),l=s&&"something"===function(){}.name,u=s&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:u}},(e,t,r)=>{var n=r(41),a=r(58),o=r(9),i=r(47);e.exports=function(e,t,r){for(var s=a(t),l=i.f,u=o.f,c=0;c<s.length;c++){var f=s[c];n(e,f)||r&&n(r,f)||l(e,f,u(t,f))}}},(e,t,r)=>{var n=r(26),a=r(18),o=r(59),i=r(67),s=r(49),l=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=i.f;return r?l(t,r(e)):t}},(e,t,r)=>{var n=r(60),a=r(66).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(18),a=r(41),o=r(16),i=r(61).indexOf,s=r(55),l=n([].push);e.exports=function(e,t){var r,n=o(e),u=0,c=[];for(r in n)!a(s,r)&&a(n,r)&&l(c,r);for(;t.length>u;)a(n,r=t[u++])&&(~i(c,r)||l(c,r));return c}},(e,t,r)=>{var n=r(16),a=r(62),o=r(64),i=function(e){return function(t,r,i){var s,l=n(t),u=o(l),c=a(i,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,r)=>{var n=r(63),a=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):o(r,t)}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?r:t)(n)}},(e,t,r)=>{var n=r(65);e.exports=function(e){return n(e.length)}},(e,t,r)=>{var n=r(63),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(11),a=r(24),o=/#|\.prototype\./,i=function(e,t){var r=l[s(e)];return r==c||r!=u&&(a(t)?n(t):!!t)},s=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=i.data={},u=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},(e,t,r)=>{var n=r(8),a=r(41),o=r(24),i=r(42),s=r(54),l=r(70),u=s("IE_PROTO"),c=n.Object,f=c.prototype;e.exports=l?c.getPrototypeOf:function(e){var t=i(e);if(a(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof c?f:null}},(e,t,r)=>{var n=r(11);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},(e,t,r)=>{var n=r(18),a=r(49),o=r(72);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return a(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},(e,t,r)=>{var n=r(8),a=r(24),o=n.String,i=n.TypeError;e.exports=function(e){if("object"==typeof e||a(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},(e,t,r)=>{var n,a=r(49),o=r(74),i=r(66),s=r(55),l=r(76),u=r(45),c=r(54),f="prototype",d="script",h=c("IE_PROTO"),p=function(){},v=function(e){return"<"+d+">"+e+"</"+d+">"},y=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m="undefined"!=typeof document?document.domain&&n?y(n):(t=u("iframe"),r="java"+d+":",t.style.display="none",l.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):y(n);for(var a=i.length;a--;)delete m[f][i[a]];return m()};s[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[f]=a(e),r=new p,p[f]=null,r[h]=e):r=m(),void 0===t?r:o.f(r,t)}},(e,t,r)=>{var n=r(10),a=r(48),o=r(47),i=r(49),s=r(16),l=r(75);t.f=n&&!a?Object.defineProperties:function(e,t){i(e);for(var r,n=s(t),a=l(t),u=a.length,c=0;u>c;)o.f(e,r=a[c++],n[r]);return e}},(e,t,r)=>{var n=r(60),a=r(66);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(26);e.exports=n("document","documentElement")},(e,t,r)=>{var n=r(18)("".replace),a=String(Error("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(a);e.exports=function(e,t){if(i&&"string"==typeof e)for(;t--;)e=n(e,o,"");return e}},(e,t,r)=>{var n=r(23),a=r(46);e.exports=function(e,t){n(t)&&"cause"in t&&a(e,"cause",t.cause)}},(e,t,r)=>{var n=r(8),a=r(80),o=r(12),i=r(49),s=r(34),l=r(81),u=r(64),c=r(27),f=r(83),d=r(84),h=r(87),p=n.TypeError,v=function(e,t){this.stopped=e,this.result=t},y=v.prototype;e.exports=function(e,t,r){var n,m,g,b,_,w,S,A=r&&r.that,k=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),C=a(t,A),T=function(e){return n&&h(n,"normal",e),new v(!0,e)},R=function(e){return k?(i(e),P?C(e[0],e[1],T):C(e[0],e[1])):P?C(e,T):C(e)};if(x)n=e;else{if(!(m=d(e)))throw p(s(e)+" is not iterable");if(l(m)){for(g=0,b=u(e);b>g;g++)if((_=R(e[g]))&&c(y,_))return _;return new v(!1)}n=f(e,m)}for(w=n.next;!(S=o(w,n)).done;){try{_=R(S.value)}catch(e){h(n,"throw",e)}if("object"==typeof _&&_&&c(y,_))return _}return new v(!1)}},(e,t,r)=>{var n=r(18),a=r(33),o=r(13),i=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:o?i(e,t):function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(36),a=r(82),o=n("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||i[o]===e)}},e=>{e.exports={}},(e,t,r)=>{var n=r(8),a=r(12),o=r(33),i=r(49),s=r(34),l=r(84),u=n.TypeError;e.exports=function(e,t){var r=arguments.length<2?l(e):t;if(o(r))return i(a(r,e));throw u(s(e)+" is not iterable")}},(e,t,r)=>{var n=r(85),a=r(32),o=r(82),i=r(36)("iterator");e.exports=function(e){if(null!=e)return a(e,i)||a(e,"@@iterator")||o[n(e)]}},(e,t,r)=>{var n=r(8),a=r(86),o=r(24),i=r(19),s=r(36)("toStringTag"),l=n.Object,u="Arguments"==i(function(){return arguments}());e.exports=a?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=l(e),s))?r:u?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},(e,t,r)=>{var n={};n[r(36)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,r)=>{var n=r(12),a=r(49),o=r(32);e.exports=function(e,t,r){var i,s;a(e);try{if(!(i=o(e,"return"))){if("throw"===t)throw r;return r}i=n(i,e)}catch(e){s=!0,i=e}if("throw"===t)throw r;if(s)throw i;return a(i),r}},(e,t,r)=>{var n=r(89);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},(e,t,r)=>{var n=r(8),a=r(85),o=n.String;e.exports=function(e){if("Symbol"===a(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},(e,t,r)=>{var n=r(11),a=r(15);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",a(1,7)),7!==e.stack)}))},(e,t,r)=>{"use strict";var n=r(16),a=r(92),o=r(82),i=r(52),s=r(47).f,l=r(93),u=r(38),c=r(10),f="Array Iterator",d=i.set,h=i.getterFor(f);e.exports=l(Array,"Array",(function(e,t){d(this,{type:f,target:n(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var p=o.Arguments=o.Array;if(a("keys"),a("values"),a("entries"),!u&&c&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}},(e,t,r)=>{var n=r(36),a=r(73),o=r(47),i=n("unscopables"),s=Array.prototype;null==s[i]&&o.f(s,i,{configurable:!0,value:a(null)}),e.exports=function(e){s[i][e]=!0}},(e,t,r)=>{"use strict";var n=r(7),a=r(12),o=r(38),i=r(56),s=r(24),l=r(94),u=r(69),c=r(71),f=r(96),d=r(46),h=r(50),p=r(36),v=r(82),y=r(95),m=i.PROPER,g=i.CONFIGURABLE,b=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,w=p("iterator"),S="keys",A="values",k="entries",x=function(){return this};e.exports=function(e,t,r,i,p,y,P){l(r,t,i);var C,T,R,E=function(e){if(e===p&&I)return I;if(!_&&e in M)return M[e];switch(e){case S:case A:case k:return function(){return new r(this,e)}}return function(){return new r(this)}},O=t+" Iterator",F=!1,M=e.prototype,j=M[w]||M["@@iterator"]||p&&M[p],I=!_&&j||E(p),D="Array"==t&&M.entries||j;if(D&&(C=u(D.call(new e)))!==Object.prototype&&C.next&&(o||u(C)===b||(c?c(C,b):s(C[w])||h(C,w,x)),f(C,O,!0,!0),o&&(v[O]=x)),m&&p==A&&j&&j.name!==A&&(!o&&g?d(M,"name",A):(F=!0,I=function(){return a(j,this)})),p)if(T={values:E(A),keys:y?I:E(S),entries:E(k)},P)for(R in T)(_||F||!(R in M))&&h(M,R,T[R]);else n({target:t,proto:!0,forced:_||F},T);return o&&!P||M[w]===I||h(M,w,I,{name:p}),v[t]=I,T}},(e,t,r)=>{"use strict";var n=r(95).IteratorPrototype,a=r(73),o=r(15),i=r(96),s=r(82),l=function(){return this};e.exports=function(e,t,r,u){var c=t+" Iterator";return e.prototype=a(n,{next:o(+!u,r)}),i(e,c,!1,!0),s[c]=l,e}},(e,t,r)=>{"use strict";var n,a,o,i=r(11),s=r(24),l=r(73),u=r(69),c=r(50),f=r(36),d=r(38),h=f("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(a=u(u(o)))!==Object.prototype&&(n=a):p=!0),null==n||i((function(){var e={};return n[h].call(e)!==e}))?n={}:d&&(n=l(n)),s(n[h])||c(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},(e,t,r)=>{var n=r(47).f,a=r(41),o=r(36)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!a(e,o)&&n(e,o,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(86),a=r(50),o=r(98);n||a(Object.prototype,"toString",o,{unsafe:!0})},(e,t,r)=>{"use strict";var n=r(86),a=r(85);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{"use strict";var n,a,o,i,s=r(7),l=r(38),u=r(8),c=r(26),f=r(12),d=r(100),h=r(50),p=r(101),v=r(71),y=r(96),m=r(102),g=r(33),b=r(24),_=r(23),w=r(103),S=r(51),A=r(79),k=r(104),x=r(105),P=r(108).set,C=r(114),T=r(117),R=r(119),E=r(118),O=r(120),F=r(121),M=r(52),j=r(68),I=r(36),D=r(122),L=r(113),N=r(30),q=I("species"),B="Promise",W=M.getterFor(B),U=M.set,z=M.getterFor(B),G=d&&d.prototype,H=d,V=G,X=u.TypeError,Y=u.document,K=u.process,Q=E.f,J=Q,$=!!(Y&&Y.createEvent&&u.dispatchEvent),Z=b(u.PromiseRejectionEvent),ee="unhandledrejection",te=!1,re=j(B,(function(){var e=S(H),t=e!==String(H);if(!t&&66===N)return!0;if(l&&!V.finally)return!0;if(N>=51&&/native code/.test(e))return!1;var r=new H((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[q]=n,!(te=r.then((function(){}))instanceof n)||!t&&D&&!Z})),ne=re||!k((function(e){H.all(e).catch((function(){}))})),ae=function(e){var t;return!(!_(e)||!b(t=e.then))&&t},oe=function(e,t){var r,n,a,o=t.value,i=1==t.state,s=i?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(i||(2===t.rejection&&ce(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),a=!0)),r===e.promise?u(X("Promise-chain cycle")):(n=ae(r))?f(n,r,l,u):l(r)):u(o)}catch(e){c&&!a&&c.exit(),u(e)}},ie=function(e,t){e.notified||(e.notified=!0,C((function(){for(var r,n=e.reactions;r=n.get();)oe(r,e);e.notified=!1,t&&!e.rejection&&le(e)})))},se=function(e,t,r){var n,a;$?((n=Y.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!Z&&(a=u["on"+e])?a(n):e===ee&&R("Unhandled promise rejection",r)},le=function(e){f(P,u,(function(){var t,r=e.facade,n=e.value;if(ue(e)&&(t=O((function(){L?K.emit("unhandledRejection",n,r):se(ee,r,n)})),e.rejection=L||ue(e)?2:1,t.error))throw t.value}))},ue=function(e){return 1!==e.rejection&&!e.parent},ce=function(e){f(P,u,(function(){var t=e.facade;L?K.emit("rejectionHandled",t):se("rejectionhandled",t,e.value)}))},fe=function(e,t,r){return function(n){e(t,n,r)}},de=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ie(e,!0))},he=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw X("Promise can't be resolved itself");var n=ae(t);n?C((function(){var r={done:!1};try{f(n,t,fe(he,r,e),fe(de,r,e))}catch(t){de(r,t,e)}})):(e.value=t,e.state=1,ie(e,!1))}catch(t){de({done:!1},t,e)}}};if(re&&(V=(H=function(e){w(this,V),g(e),f(n,this);var t=W(this);try{e(fe(he,t),fe(de,t))}catch(e){de(t,e)}}).prototype,(n=function(e){U(this,{type:B,done:!1,notified:!1,parent:!1,reactions:new F,rejection:!1,state:0,value:void 0})}).prototype=p(V,{then:function(e,t){var r=z(this),n=Q(x(this,H));return r.parent=!0,n.ok=!b(e)||e,n.fail=b(t)&&t,n.domain=L?K.domain:void 0,0==r.state?r.reactions.add(n):C((function(){oe(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=W(e);this.promise=e,this.resolve=fe(he,t),this.reject=fe(de,t)},E.f=Q=function(e){return e===H||e===o?new a(e):J(e)},!l&&b(d)&&G!==Object.prototype)){i=G.then,te||(h(G,"then",(function(e,t){var r=this;return new H((function(e,t){f(i,r,e,t)})).then(e,t)}),{unsafe:!0}),h(G,"catch",V.catch,{unsafe:!0}));try{delete G.constructor}catch(e){}v&&v(G,V)}s({global:!0,wrap:!0,forced:re},{Promise:H}),y(H,B,!1,!0),m(B),o=c(B),s({target:B,stat:!0,forced:re},{reject:function(e){var t=Q(this);return f(t.reject,void 0,e),t.promise}}),s({target:B,stat:!0,forced:l||re},{resolve:function(e){return T(l&&this===o?H:this,e)}}),s({target:B,stat:!0,forced:ne},{all:function(e){var t=this,r=Q(t),n=r.resolve,a=r.reject,o=O((function(){var r=g(t.resolve),o=[],i=0,s=1;A(e,(function(e){var l=i++,u=!1;s++,f(r,t,e).then((function(e){u||(u=!0,o[l]=e,--s||n(o))}),a)})),--s||n(o)}));return o.error&&a(o.value),r.promise},race:function(e){var t=this,r=Q(t),n=r.reject,a=O((function(){var a=g(t.resolve);A(e,(function(e){f(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}})},(e,t,r)=>{var n=r(8);e.exports=n.Promise},(e,t,r)=>{var n=r(50);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{"use strict";var n=r(26),a=r(47),o=r(36),i=r(10),s=o("species");e.exports=function(e){var t=n(e),r=a.f;i&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},(e,t,r)=>{var n=r(8),a=r(27),o=n.TypeError;e.exports=function(e,t){if(a(t,e))return e;throw o("Incorrect invocation")}},(e,t,r)=>{var n=r(36)("iterator"),a=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){a=!0}};i[n]=function(){return this},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},(e,t,r)=>{var n=r(49),a=r(106),o=r(36)("species");e.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||null==(r=n(i)[o])?t:a(r)}},(e,t,r)=>{var n=r(8),a=r(107),o=r(34),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a constructor")}},(e,t,r)=>{var n=r(18),a=r(11),o=r(24),i=r(85),s=r(26),l=r(51),u=function(){},c=[],f=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=n(d.exec),p=!d.exec(u),v=function(e){if(!o(e))return!1;try{return f(u,c,e),!0}catch(e){return!1}},y=function(e){if(!o(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(d,l(e))}catch(e){return!0}};y.sham=!0,e.exports=!f||a((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?y:v},(e,t,r)=>{var n,a,o,i,s=r(8),l=r(109),u=r(80),c=r(24),f=r(41),d=r(11),h=r(76),p=r(110),v=r(45),y=r(111),m=r(112),g=r(113),b=s.setImmediate,_=s.clearImmediate,w=s.process,S=s.Dispatch,A=s.Function,k=s.MessageChannel,x=s.String,P=0,C={},T="onreadystatechange";try{n=s.location}catch(e){}var R=function(e){if(f(C,e)){var t=C[e];delete C[e],t()}},E=function(e){return function(){R(e)}},O=function(e){R(e.data)},F=function(e){s.postMessage(x(e),n.protocol+"//"+n.host)};b&&_||(b=function(e){y(arguments.length,1);var t=c(e)?e:A(e),r=p(arguments,1);return C[++P]=function(){l(t,void 0,r)},a(P),P},_=function(e){delete C[e]},g?a=function(e){w.nextTick(E(e))}:S&&S.now?a=function(e){S.now(E(e))}:k&&!m?(i=(o=new k).port2,o.port1.onmessage=O,a=u(i.postMessage,i)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(F)?(a=F,s.addEventListener("message",O,!1)):a=T in v("script")?function(e){h.appendChild(v("script"))[T]=function(){h.removeChild(this),R(e)}}:function(e){setTimeout(E(e),0)}),e.exports={set:b,clear:_}},(e,t,r)=>{var n=r(13),a=Function.prototype,o=a.apply,i=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(o):function(){return i.apply(o,arguments)})},(e,t,r)=>{var n=r(18);e.exports=n([].slice)},(e,t,r)=>{var n=r(8).TypeError;e.exports=function(e,t){if(e<t)throw n("Not enough arguments");return e}},(e,t,r)=>{var n=r(31);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(19),a=r(8);e.exports="process"==n(a.process)},(e,t,r)=>{var n,a,o,i,s,l,u,c,f=r(8),d=r(80),h=r(9).f,p=r(108).set,v=r(112),y=r(115),m=r(116),g=r(113),b=f.MutationObserver||f.WebKitMutationObserver,_=f.document,w=f.process,S=f.Promise,A=h(f,"queueMicrotask"),k=A&&A.value;k||(n=function(){var e,t;for(g&&(e=w.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?i():o=void 0,e}}o=void 0,e&&e.enter()},v||g||m||!b||!_?!y&&S&&S.resolve?((u=S.resolve(void 0)).constructor=S,c=d(u.then,u),i=function(){c(n)}):g?i=function(){w.nextTick(n)}:(p=d(p,f),i=function(){p(n)}):(s=!0,l=_.createTextNode(""),new b(n).observe(l,{characterData:!0}),i=function(){l.data=s=!s})),e.exports=k||function(e){var t={fn:e,next:void 0};o&&(o.next=t),a||(a=t,i()),o=t}},(e,t,r)=>{var n=r(31),a=r(8);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==a.Pebble},(e,t,r)=>{var n=r(31);e.exports=/web0s(?!.*chrome)/i.test(n)},(e,t,r)=>{var n=r(49),a=r(23),o=r(118);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},(e,t,r)=>{"use strict";var n=r(33),a=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new a(e)}},(e,t,r)=>{var n=r(8);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=t},e=>{e.exports="object"==typeof window},(e,t,r)=>{"use strict";var n=r(7),a=r(12),o=r(33),i=r(118),s=r(120),l=r(79);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,u=r.reject,c=s((function(){var r=o(t.resolve),i=[],s=0,u=1;l(e,(function(e){var o=s++,l=!1;u++,a(r,t,e).then((function(e){l||(l=!0,i[o]={status:"fulfilled",value:e},--u||n(i))}),(function(e){l||(l=!0,i[o]={status:"rejected",reason:e},--u||n(i))}))})),--u||n(i)}));return c.error&&u(c.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(7),a=r(33),o=r(26),i=r(12),s=r(118),l=r(120),u=r(79),c="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var t=this,r=o("AggregateError"),n=s.f(t),f=n.resolve,d=n.reject,h=l((function(){var n=a(t.resolve),o=[],s=0,l=1,h=!1;u(e,(function(e){var a=s++,u=!1;l++,i(n,t,e).then((function(e){u||h||(h=!0,f(e))}),(function(e){u||h||(u=!0,o[a]=e,--l||d(new r(o,c)))}))})),--l||d(new r(o,c))}));return h.error&&d(h.value),n.promise}})},(e,t,r)=>{"use strict";var n=r(7),a=r(38),o=r(100),i=r(11),s=r(26),l=r(24),u=r(105),c=r(117),f=r(50);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&i((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),r=l(e);return this.then(r?function(r){return c(t,e()).then((function(){return r}))}:e,r?function(r){return c(t,e()).then((function(){throw r}))}:e)}}),!a&&l(o)){var d=s("Promise").prototype.finally;o.prototype.finally!==d&&f(o.prototype,"finally",d,{unsafe:!0})}},(e,t,r)=>{"use strict";var n=r(127).charAt,a=r(89),o=r(52),i=r(93),s="String Iterator",l=o.set,u=o.getterFor(s);i(String,"String",(function(e){l(this,{type:s,string:a(e),index:0})}),(function(){var e,t=u(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},(e,t,r)=>{var n=r(18),a=r(63),o=r(89),i=r(20),s=n("".charAt),l=n("".charCodeAt),u=n("".slice),c=function(e){return function(t,r){var n,c,f=o(i(t)),d=a(r),h=f.length;return d<0||d>=h?e?"":void 0:(n=l(f,d))<55296||n>56319||d+1===h||(c=l(f,d+1))<56320||c>57343?e?s(f,d):n:e?u(f,d,d+2):c-56320+(n-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},(e,t,r)=>{var n=r(8);e.exports=n},(e,t,r)=>{r(91),r(97),r(130),r(141),r(142);var n=r(128);e.exports=n.structuredClone},(e,t,r)=>{"use strict";r(131)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(140))},(e,t,r)=>{"use strict";var n=r(7),a=r(8),o=r(18),i=r(68),s=r(50),l=r(132),u=r(79),c=r(103),f=r(24),d=r(23),h=r(11),p=r(104),v=r(96),y=r(139);e.exports=function(e,t,r){var m=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),b=m?"set":"add",_=a[e],w=_&&_.prototype,S=_,A={},k=function(e){var t=o(w[e]);s(w,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return g&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(i(e,!f(_)||!(g||w.forEach&&!h((function(){(new _).entries().next()})))))S=r.getConstructor(t,e,m,b),l.enable();else if(i(e,!0)){var x=new S,P=x[b](g?{}:-0,1)!=x,C=h((function(){x.has(1)})),T=p((function(e){new _(e)})),R=!g&&h((function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)}));T||((S=t((function(e,t){c(e,w);var r=y(new _,e,S);return null!=t&&u(t,r[b],{that:r,AS_ENTRIES:m}),r}))).prototype=w,w.constructor=S),(C||R)&&(k("delete"),k("has"),m&&k("get")),(R||P)&&k(b),g&&w.clear&&delete w.clear}return A[e]=S,n({global:!0,forced:S!=_},A),v(S,e),g||r.setStrong(S,e,m),S}},(e,t,r)=>{var n=r(7),a=r(18),o=r(55),i=r(23),s=r(41),l=r(47).f,u=r(59),c=r(133),f=r(136),d=r(43),h=r(138),p=!1,v=d("meta"),y=0,m=function(e){l(e,v,{value:{objectID:"O"+y++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},p=!0;var e=u.f,t=a([].splice),r={};r[v]=1,e(r).length&&(u.f=function(r){for(var n=e(r),a=0,o=n.length;a<o;a++)if(n[a]===v){t(n,a,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,v)){if(!f(e))return"F";if(!t)return"E";m(e)}return e[v].objectID},getWeakData:function(e,t){if(!s(e,v)){if(!f(e))return!0;if(!t)return!1;m(e)}return e[v].weakData},onFreeze:function(e){return h&&p&&f(e)&&!s(e,v)&&m(e),e}};o[v]=!0},(e,t,r)=>{var n=r(19),a=r(16),o=r(59).f,i=r(134),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return o(e)}catch(e){return i(s)}}(e):o(a(e))}},(e,t,r)=>{var n=r(8),a=r(62),o=r(64),i=r(135),s=n.Array,l=Math.max;e.exports=function(e,t,r){for(var n=o(e),u=a(t,n),c=a(void 0===r?n:r,n),f=s(l(c-u,0)),d=0;u<c;u++,d++)i(f,d,e[u]);return f.length=d,f}},(e,t,r)=>{"use strict";var n=r(21),a=r(47),o=r(15);e.exports=function(e,t,r){var i=n(t);i in e?a.f(e,i,o(0,r)):e[i]=r}},(e,t,r)=>{var n=r(11),a=r(23),o=r(19),i=r(137),s=Object.isExtensible,l=n((function(){s(1)}));e.exports=l||i?function(e){return!!a(e)&&(!i||"ArrayBuffer"!=o(e))&&(!s||s(e))}:s},(e,t,r)=>{var n=r(11);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},(e,t,r)=>{var n=r(11);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(e,t,r)=>{var n=r(24),a=r(23),o=r(71);e.exports=function(e,t,r){var i,s;return o&&n(i=t.constructor)&&i!==r&&a(s=i.prototype)&&s!==r.prototype&&o(e,s),e}},(e,t,r)=>{"use strict";var n=r(47).f,a=r(73),o=r(101),i=r(80),s=r(103),l=r(79),u=r(93),c=r(102),f=r(10),d=r(132).fastKey,h=r(52),p=h.set,v=h.getterFor;e.exports={getConstructor:function(e,t,r,u){var c=e((function(e,n){s(e,h),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=n&&l(n,e[u],{that:e,AS_ENTRIES:r})})),h=c.prototype,y=v(t),m=function(e,t,r){var n,a,o=y(e),i=g(e,t);return i?i.value=r:(o.last=i={index:a=d(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=i),n&&(n.next=i),f?o.size++:e.size++,"F"!==a&&(o.index[a]=i)),e},g=function(e,t){var r,n=y(e),a=d(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return o(h,{clear:function(){for(var e=y(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=this,r=y(t),n=g(t,e);if(n){var a=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=a),a&&(a.previous=o),r.first==n&&(r.first=a),r.last==n&&(r.last=o),f?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=y(this),n=i(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),o(h,r?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&n(h,"size",{get:function(){return y(this).size}}),c},setStrong:function(e,t,r){var n=t+" Iterator",a=v(t),o=v(n);u(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),c(t)}}},(e,t,r)=>{"use strict";r(131)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(140))},(e,t,r)=>{var n,a=r(38),o=r(7),i=r(8),s=r(26),l=r(18),u=r(11),c=r(43),f=r(24),d=r(107),h=r(23),p=r(25),v=r(79),y=r(49),m=r(85),g=r(41),b=r(135),_=r(46),w=r(64),S=r(111),A=r(143),k=r(90),x=i.Object,P=i.Date,C=i.Error,T=i.EvalError,R=i.RangeError,E=i.ReferenceError,O=i.SyntaxError,F=i.TypeError,M=i.URIError,j=i.PerformanceMark,I=i.WebAssembly,D=I&&I.CompileError||C,L=I&&I.LinkError||C,N=I&&I.RuntimeError||C,q=s("DOMException"),B=s("Set"),W=s("Map"),U=W.prototype,z=l(U.has),G=l(U.get),H=l(U.set),V=l(B.prototype.add),X=s("Object","keys"),Y=l([].push),K=l((!0).valueOf),Q=l(1..valueOf),J=l("".valueOf),$=l(A),Z=l(P.prototype.getTime),ee=c("structuredClone"),te="DataCloneError",re="Transferring",ne=function(e){return!u((function(){var t=new i.Set([7]),r=e(t),n=e(x(7));return r==t||!r.has(7)||"object"!=typeof n||7!=n}))&&e},ae=i.structuredClone,oe=a||(n=ae,!(!u((function(){var e=n(new i.AggregateError([1],ee,{cause:3}));return"AggregateError"!=e.name||1!=e.errors[0]||e.message!=ee||3!=e.cause}))&&n)),ie=!ae&&ne((function(e){return new j(ee,{detail:e}).detail})),se=ne(ae)||ie,le=function(e){throw new q("Uncloneable type: "+e,te)},ue=function(e,t){throw new q((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",te)},ce=function(e,t){if(p(e)&&le("Symbol"),!h(e))return e;if(t){if(z(t,e))return G(t,e)}else t=new W;var r,n,a,o,l,u,c,v,y,S,A=m(e),j=!1;switch(A){case"Array":a=[],j=!0;break;case"Object":a={},j=!0;break;case"Map":a=new W,j=!0;break;case"Set":a=new B,j=!0;break;case"RegExp":a=new RegExp(e.source,"flags"in e?e.flags:$(e));break;case"Error":switch(n=e.name){case"AggregateError":a=s("AggregateError")([]);break;case"EvalError":a=T();break;case"RangeError":a=R();break;case"ReferenceError":a=E();break;case"SyntaxError":a=O();break;case"TypeError":a=F();break;case"URIError":a=M();break;case"CompileError":a=D();break;case"LinkError":a=L();break;case"RuntimeError":a=N();break;default:a=C()}j=!0;break;case"DOMException":a=new q(e.message,e.name),j=!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":r=i[A],h(r)||ue(A),a=new r(ce(e.buffer,t),e.byteOffset,"DataView"===A?e.byteLength:e.length);break;case"DOMQuad":try{a=new DOMQuad(ce(e.p1,t),ce(e.p2,t),ce(e.p3,t),ce(e.p4,t))}catch(t){se?a=se(e):ue(A)}break;case"FileList":if(r=i.DataTransfer,d(r)){for(o=new r,l=0,u=w(e);l<u;l++)o.items.add(ce(e[l],t));a=o.files}else se?a=se(e):ue(A);break;case"ImageData":try{a=new ImageData(ce(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch(t){se?a=se(e):ue(A)}break;default:if(se)a=se(e);else switch(A){case"BigInt":a=x(e.valueOf());break;case"Boolean":a=x(K(e));break;case"Number":a=x(Q(e));break;case"String":a=x(J(e));break;case"Date":a=new P(Z(e));break;case"ArrayBuffer":(r=i.DataView)||"function"==typeof e.slice||ue(A);try{if("function"==typeof e.slice)a=e.slice(0);else for(u=e.byteLength,a=new ArrayBuffer(u),y=new r(e),S=new r(a),l=0;l<u;l++)S.setUint8(l,y.getUint8(l))}catch(e){throw new q("ArrayBuffer is detached",te)}break;case"SharedArrayBuffer":a=e;break;case"Blob":try{a=e.slice(0,e.size,e.type)}catch(e){ue(A)}break;case"DOMPoint":case"DOMPointReadOnly":r=i[A];try{a=r.fromPoint?r.fromPoint(e):new r(e.x,e.y,e.z,e.w)}catch(e){ue(A)}break;case"DOMRect":case"DOMRectReadOnly":r=i[A];try{a=r.fromRect?r.fromRect(e):new r(e.x,e.y,e.width,e.height)}catch(e){ue(A)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=i[A];try{a=r.fromMatrix?r.fromMatrix(e):new r(e)}catch(e){ue(A)}break;case"AudioData":case"VideoFrame":f(e.clone)||ue(A);try{a=e.clone()}catch(e){le(A)}break;case"File":try{a=new File([e],e.name,e)}catch(e){ue(A)}break;case"CryptoKey":case"GPUCompilationMessage":case"GPUCompilationInfo":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ue(A);default:le(A)}}if(H(t,e,a),j)switch(A){case"Array":case"Object":for(c=X(e),l=0,u=w(c);l<u;l++)v=c[l],b(a,v,ce(e[v],t));break;case"Map":e.forEach((function(e,r){H(a,ce(r,t),ce(e,t))}));break;case"Set":e.forEach((function(e){V(a,ce(e,t))}));break;case"Error":_(a,"message",ce(e.message,t)),g(e,"cause")&&_(a,"cause",ce(e.cause,t)),"AggregateError"==n&&(a.errors=ce(e.errors,t));case"DOMException":k&&_(a,"stack",ce(e.stack,t))}return a},fe=ae&&!u((function(){var e=new ArrayBuffer(8),t=ae(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength}));o({global:!0,enumerable:!0,sham:!fe,forced:oe},{structuredClone:function(e){var t,r=S(arguments.length,1)>1?y(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(e,t){if(!h(e))throw F("Transfer option cannot be converted to a sequence");var r=[];v(e,(function(e){Y(r,y(e))}));var n,a,o,s,l,u,c=0,p=w(r);if(fe)for(s=ae(r,{transfer:r});c<p;)H(t,r[c],s[c++]);else for(;c<p;){if(n=r[c++],z(t,n))throw new q("Duplicate transferable",te);switch(a=m(n)){case"ImageBitmap":o=i.OffscreenCanvas,d(o)||ue(a,re);try{(u=new o(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),l=u.transferToImageBitmap()}catch(e){}break;case"AudioData":case"VideoFrame":f(n.clone)&&f(n.close)||ue(a,re);try{l=n.clone(),n.close()}catch(e){}break;case"ArrayBuffer":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":ue(a,re)}if(void 0===l)throw new q("This object cannot be transferred: "+a,te);H(t,n,l)}}(n,t=new W),ce(e,t)}})},(e,t,r)=>{"use strict";var n=r(49);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},(__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(e){return e&&e.__esModule?e:{default:e}}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateMethodGet(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),r),r}function _classApplyDescriptorSet(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_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(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function asyncGeneratorStep(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){asyncGeneratorStep(o,n,a,i,s,"next",e)}function s(e){asyncGeneratorStep(o,n,a,i,s,"throw",e)}i(void 0)}))}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_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(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}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;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){var t,r=new PDFDocumentLoadingTask;if("string"==typeof e||e instanceof URL)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!==_typeof(e))throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");t=e}var n=Object.create(null),a=null,o=null;for(var i in t){var s=t[i];switch(i){case"url":if("undefined"!=typeof window)try{n[i]=new URL(s,window.location).href;continue}catch(e){(0,_util.warn)('Cannot create valid URL: "'.concat(e,'".'))}else if("string"==typeof s||s instanceof URL){n[i]=s.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":a=s;continue;case"worker":o=s;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&s instanceof Buffer)n[i]=new Uint8Array(s);else{if(s instanceof Uint8Array)break;if("string"==typeof s)n[i]=(0,_util.stringToBytes)(s);else if("object"!==_typeof(s)||null===s||isNaN(s.length)){if(!(0,_util.isArrayBuffer)(s))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");n[i]=new Uint8Array(s)}else n[i]=new Uint8Array(s)}continue}n[i]=s}if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CMapReaderFactory=n.CMapReaderFactory||DefaultCMapReaderFactory,n.StandardFontDataFactory=n.StandardFontDataFactory||DefaultStandardFontDataFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,n.enableXfa=!0===n.enableXfa,("string"!=typeof n.docBaseUrl||(0,_display_utils.isDataScheme)(n.docBaseUrl))&&(n.docBaseUrl=null),Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!=typeof n.useWorkerFetch&&(n.useWorkerFetch=n.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&n.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=_is_node.isNodeJS),"boolean"!=typeof n.useSystemFonts&&(n.useSystemFonts=!_is_node.isNodeJS&&!n.disableFontFace),void 0===n.ownerDocument&&(n.ownerDocument=globalThis.document),"boolean"!=typeof n.disableRange&&(n.disableRange=!1),"boolean"!=typeof n.disableStream&&(n.disableStream=!1),"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!o){var l={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};o=l.port?PDFWorker.fromPort(l):new PDFWorker(l),r._worker=o}var u=r.docId;return o.promise.then((function(){if(r.destroyed)throw new Error("Loading aborted");var e=_fetchDocument(o,n,a,u),t=new Promise((function(e){var t;a?t=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,contentDispositionFilename:n.contentDispositionFilename,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(t=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),e(t)}));return Promise.all([e,t]).then((function(e){var t=_slicedToArray(e,2),a=t[0],i=t[1];if(r.destroyed)throw new Error("Loading aborted");var s=new _message_handler.MessageHandler(u,a,o.port),l=new WorkerTransport(s,r,i,n);r._transport=l,s.send("Ready",null)}))})).catch(r._capability.reject),r}function _fetchDocument(e,t,r,n){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regenerator.default.mark((function e(t,r,n,a){var o;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.destroyed){e.next=2;break}throw new Error("Worker was destroyed");case 2:return n&&(r.length=n.length,r.initialData=n.initialData,r.progressiveDone=n.progressiveDone,r.contentDispositionFilename=n.contentDispositionFilename),e.next=5,t.messageHandler.sendWithPromise("GetDocRequest",{docId:a,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:if(o=e.sent,!t.destroyed){e.next=8;break}throw new Error("Worker was destroyed");case 8:return e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;var PDFDocumentLoadingTask=function(){function e(){_classCallCheck(this,e),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d".concat(e.idCounters.doc++),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}var t;return _createClass(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:(t=_asyncToGenerator(_regenerator.default.mark((function e(){var t;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.destroyed=!0,e.next=3,null===(t=this._transport)||void 0===t?void 0:t.destroy();case 3:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"idCounters",get:function(){return(0,_util.shadow)(this,"idCounters",{doc:0})}}]),e}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r,n=_createForOfIteratorHelper(this._rangeListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(e,t)}catch(e){n.e(e)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;)(0,n.value)(e,t)}catch(e){a.e(e)}finally{a.f()}}))}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then((function(){var r,n=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(e)}catch(e){n.e(e)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then((function(){var t,r=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(r.s();!(t=r.n()).done;)(0,t.value)()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,r){var n,a=this;_classCallCheck(this,e),this._pdfInfo=t,this._transport=r,Object.defineProperty(this,"fingerprint",{get:function(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:(n=_asyncToGenerator(_regenerator.default.mark((function e(){return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),e.abrupt("return",a.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})}return _createClass(e,[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"stats",get:function(){return this._transport.stats}},{key:"isPureXfa",get:function(){return!!this._transport._htmlForXfa}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,a){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=a,this._transport=n,this._stats=o?new _display_utils.StatTimer:null,this._pdfBug=o,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}var t;return _createClass(e,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,a=e.offsetX,o=void 0===a?0:a,i=e.offsetY,s=void 0===i?0:i,l=e.dontFlip,u=void 0!==l&&l;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:o,offsetY:s,dontFlip:u})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?"display":e,r=this._transport.getRenderingIntent(t),n=this._annotationPromises.get(r.cacheKey);return n||(n=this._transport.getAnnotations(this._pageIndex,r.renderingIntent),this._annotationPromises.set(r.cacheKey,n),n=n.then((function(e){var t,r=_createForOfIteratorHelper(e);try{var n=function(){var e=t.value;void 0!==e.titleObj&&Object.defineProperty(e,"title",{get:function(){return(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),e.titleObj.str}}),void 0!==e.contentsObj&&Object.defineProperty(e,"contents",{get:function(){return(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),e.contentsObj.str}})};for(r.s();!(t=r.n()).done;)n()}catch(e){r.e(e)}finally{r.f()}return e}))),n}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:(t=_asyncToGenerator(_regenerator.default.mark((function e(){var t;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(e){var t,r,n,a=this,o=e.canvasContext,i=e.viewport,s=e.intent,l=void 0===s?"display":s,u=e.annotationMode,c=void 0===u?_util.AnnotationMode.ENABLE:u,f=e.transform,d=void 0===f?null:f,h=e.imageLayer,p=void 0===h?null:h,v=e.canvasFactory,y=void 0===v?null:v,m=e.background,g=void 0===m?null:m,b=e.optionalContentConfigPromise,_=void 0===b?null:b,w=e.annotationCanvasMap,S=void 0===w?null:w;void 0!==(null===(t=arguments[0])||void 0===t?void 0:t.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null===(r=arguments[0])||void 0===r?void 0:r.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");var A=this._transport.getRenderingIntent(l,c);this.pendingCleanup=!1,_||(_=this._transport.getOptionalContentConfig());var k=this._intentStates.get(A.cacheKey);k||(k=Object.create(null),this._intentStates.set(A.cacheKey,k)),k.streamReaderCancelTimeout&&(clearTimeout(k.streamReaderCancelTimeout),k.streamReaderCancelTimeout=null);var x=y||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),P=!!(A.renderingIntent&_util.RenderingIntentFlag.PRINT);k.displayReadyCapability||(k.displayReadyCapability=(0,_util.createPromiseCapability)(),k.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(A));var C=function(e){k.renderTasks.delete(T),(a.cleanupAfterRender||P)&&(a.pendingCleanup=!0),a._tryCleanup(),e?(T.capability.reject(e),a._abortOperatorList({intentState:k,reason:e instanceof Error?e:new Error(e)})):T.capability.resolve(),a._stats&&(a._stats.timeEnd("Rendering"),a._stats.timeEnd("Overall"))},T=new InternalRenderTask({callback:C,params:{canvasContext:o,viewport:i,transform:d,imageLayer:p,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:S,operatorList:k.operatorList,pageIndex:this._pageIndex,canvasFactory:x,useRequestAnimationFrame:!P,pdfBug:this._pdfBug});((n=k).renderTasks||(n.renderTasks=new Set)).add(T);var R=T.task;return Promise.all([k.displayReadyCapability.promise,_]).then((function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];a.pendingCleanup?C():(a._stats&&a._stats.time("Rendering"),T.initializeGraphics({transparency:r,optionalContentConfig:n}),T.operatorListChanged())})).catch(C),R}},{key:"getOperatorList",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.intent,a=void 0===n?"display":n,o=r.annotationMode,i=void 0===o?_util.AnnotationMode.ENABLE:o,s=this._transport.getRenderingIntent(a,i,!0),l=this._intentStates.get(s.cacheKey);return l||(l=Object.create(null),this._intentStates.set(s.cacheKey,l)),l.opListReadCapability||((e=Object.create(null)).operatorListChanged=function(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(e))},l.opListReadCapability=(0,_util.createPromiseCapability)(),((t=l).renderTasks||(t.renderTasks=new Set)).add(e),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(s)),l.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableCombineTextItems,r=void 0!==t&&t,n=e.includeMarkedContent,a=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==r,includeMarkedContent:!0===a},{highWaterMark:100,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(e){return _xfa_text.XfaText.textContent(e)}));var t=this.streamTextContent(e);return new Promise((function(e,r){var n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then((function(r){var n,o=r.value;r.done?e(a):(Object.assign(a.styles,o.styles),(n=a.items).push.apply(n,_toConsumableArray(o.items)),t())}),r)}()}))}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0;var e,t=[],r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability){var a,o=_createForOfIteratorHelper(n.renderTasks);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.push(i.completed),i.cancel()}}catch(e){o.e(e)}finally{o.f()}}}}catch(e){r.e(e)}finally{r.f()}return this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value,a=n.renderTasks,o=n.operatorList;if(a.size>0||!o.lastChunk)return!1}}catch(e){r.e(e)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var r=0,n=e.length;r<n;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;var a,o=_createForOfIteratorHelper(t.renderTasks);try{for(o.s();!(a=o.n()).done;)a.value.operatorListChanged()}catch(e){o.e(e)}finally{o.f()}e.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(e){var t=this,r=e.renderingIntent,n=e.cacheKey,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:r,cacheKey:n,annotationStorage:r&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}).getReader(),o=this._intentStates.get(n);o.streamReader=a,function e(){a.read().then((function(r){var n=r.value;r.done?o.streamReader=null:t._transport.destroyed||(t._renderPageChunk(n,o),e())}),(function(e){if(o.streamReader=null,!t._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;var r,n=_createForOfIteratorHelper(o.renderTasks);try{for(n.s();!(r=n.n()).done;)r.value.operatorListChanged()}catch(e){n.e(e)}finally{n.f()}t._tryCleanup()}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))}()}},{key:"_abortOperatorList",value:function(e){var t=this,r=e.intentState,n=e.reason,a=e.force,o=void 0!==a&&a;if(r.streamReader){if(!o){if(r.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException)return void(r.streamReaderCancelTimeout=setTimeout((function(){t._abortOperatorList({intentState:r,reason:n,force:!0}),r.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}if(r.streamReader.cancel(new _util.AbortException(n.message)).catch((function(){})),r.streamReader=null,!this._transport.destroyed){var i,s=_createForOfIteratorHelper(this._intentStates);try{for(s.s();!(i=s.n()).done;){var l=_slicedToArray(i.value,2),u=l[0];if(l[1]===r){this._intentStates.delete(u);break}}}catch(e){s.e(e)}finally{s.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),e}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function e(){_classCallCheck(this,e),this._listeners=[],this._deferred=Promise.resolve()}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this,n={data:t?structuredClone(e,t):structuredClone(e)};this._deferred.then((function(){var e,t=_createForOfIteratorHelper(r._listeners);try{for(t.s();!(e=t.n()).done;)e.value.call(r,n)}catch(e){t.e(e)}finally{t.f()}}))}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(_is_node.isNodeJS)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(e){var t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};var PDFWorker=function(){function PDFWorker(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=void 0===t?null:t,n=e.port,a=void 0===n?null:n,o=e.verbosity,i=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,PDFWorker),a&&PDFWorker._workerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=r,this.destroyed=!1,this.verbosity=i,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return PDFWorker._workerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(PDFWorker,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!=typeof Worker&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var t=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),a=function(){r.removeEventListener("error",o),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},o=function(){e._webWorker||a()};r.addEventListener("error",o),n.on("test",(function(t){r.removeEventListener("error",o),e.destroyed?a():t?(e._messageHandler=n,e._port=r,e._webWorker=r,e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())})),n.on("ready",(function(t){if(r.removeEventListener("error",o),e.destroyed)a();else try{i()}catch(t){e._setupFakeWorker()}}));var i=function(){var e=new Uint8Array([255]);try{n.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,n.send("test",e)}};return void i()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=new LoopbackPort;e._port=r;var n="fake".concat(PDFWorkerUtil.fakeWorkerId++),a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var o=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=o,e._readyCapability.resolve(),o.send("configure",{verbosity:e.verbosity})}})).catch((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker._workerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"_workerPorts",get:function(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}},{key:"fromPort",value:function(e){if(null==e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(e.port)?this._workerPorts.get(e.port):new PDFWorker(e)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(e){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:if(mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler,!mainWorkerMessageHandler){_context4.next=3;break}return _context4.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context4.next=6;break}return worker=eval("require")(_this11.workerSrc),_context4.abrupt("return",worker.WorkerMessageHandler);case 6:return _context4.next=8,(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(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]),PDFWorker}();exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap,WorkerTransport=function(){function e(t,r,n,a){_classCallCheck(this,e),_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:a.ownerDocument,styleElement:a.styleElement}),this._params=a,a.useWorkerFetch||(this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.StandardFontDataFactory=new a.StandardFontDataFactory({baseUrl:a.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}var t;return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"stats",get:function(){return _classPrivateFieldGet(this,_docStats)}},{key:"getRenderingIntent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=_util.RenderingIntentFlag.DISPLAY,a="";switch(e){case"any":n=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":n=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:n+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:n+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:n+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,a=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return r&&(n+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:n,cacheKey:"".concat(n,"_").concat(a)}}},{key:"destroy",value:function(){var e=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 t,r=[],n=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(a._destroy())}}catch(e){n.e(e)}finally{n.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var o=this.messageHandler.sendWithPromise("Terminate",null);return r.push(o),Promise.all(r).then((function(){e.commonObjs.clear(),e.fontLoader.clear(),_classPrivateFieldSet(e,_metadataPromise,null),e._getFieldObjectsPromise=null,e._hasJSActionsPromise=null,e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,r=this.loadingTask;t.on("GetReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=function(){e._fullReader.read().then((function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){r.error(e)}))},r.onCancel=function(t){e._fullReader.cancel(t),r.ready.catch((function(t){if(!e.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then((function(){var t;a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&(null===(t=r.onProgress)||void 0===t||t.call(r,e._lastProgress)),a.onProgress=function(e){var t;null===(t=r.onProgress)||void 0===t||t.call(r,{loaded:e.loaded,total:e.total})});n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})}),n.reject),n.promise})),t.on("GetRangeReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var n=e._networkStream.getRangeReader(t.begin,t.end);n?(r.onPull=function(){n.read().then((function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){r.error(e)}))},r.onCancel=function(t){n.cancel(t),r.ready.catch((function(t){if(!e.destroyed)throw t}))}):r.close()})),t.on("GetDoc",(function(t){var n=t.pdfInfo;e._numPages=n.numPages,e._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,r._capability.resolve(new PDFDocumentProxy(n,e))})),t.on("DocException",(function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword)try{r.onPassword((function(t){t instanceof Error?e._passwordCapability.reject(t):e._passwordCapability.resolve({password:t})}),t.code)}catch(t){e._passwordCapability.reject(t)}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise})),t.on("DataLoaded",(function(t){var n;null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){e.destroyed||_classPrivateFieldGet(e,_pageCache).get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(function(r){var n,a=_slicedToArray(r,3),o=a[0],i=a[1],s=a[2];if(!e.destroyed&&!e.commonObjs.has(o))switch(i){case"Font":var l=e._params;if("error"in s){var u=s.error;(0,_util.warn)("Error during font loading: ".concat(u)),e.commonObjs.resolve(o,u);break}var c=null;l.pdfBug&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var f=new _font_loader.FontFaceObject(s,{isEvalSupported:l.isEvalSupported,disableFontFace:l.disableFontFace,ignoreErrors:l.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});e.fontLoader.bind(f).catch((function(e){return t.sendWithPromise("FontFallback",{id:o})})).finally((function(){!l.fontExtraProperties&&f.data&&(f.data=null),e.commonObjs.resolve(o,f)}));break;case"FontPath":case"Image":e.commonObjs.resolve(o,s);break;default:throw new Error("Got unknown common object type ".concat(i))}})),t.on("obj",(function(t){var r,n=_slicedToArray(t,4),a=n[0],o=n[1],i=n[2],s=n[3];if(!e.destroyed){var l=_classPrivateFieldGet(e,_pageCache).get(o);if(!l.objs.has(a))switch(i){case"Image":l.objs.resolve(a,s),(null==s||null===(r=s.data)||void 0===r?void 0:r.length)>8e6&&(l.cleanupAfterRender=!0);break;case"Pattern":l.objs.resolve(a,s);break;default:throw new Error("Got unknown object type ".concat(i))}}})),t.on("DocProgress",(function(t){var n;e.destroyed||null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.loaded,total:t.total})})),t.on("DocStats",(function(t){e.destroyed||_classPrivateFieldSet(e,_docStats,Object.freeze({streamTypes:Object.freeze(t.streamTypes),fontTypes:Object.freeze(t.fontTypes)}))})),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.CMapReaderFactory?e.CMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))})),t.on("FetchStandardFontData",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.StandardFontDataFactory?e.StandardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"_onUnsupportedFeature",value:function(e){var t,r,n=e.featureId;this.destroyed||null===(t=(r=this.loadingTask).onUnsupportedFeature)||void 0===t||t.call(r,n)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));var r=e-1,n=_classPrivateFieldGet(this,_pagePromises).get(r);if(n)return n;var a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return _classPrivateFieldGet(t,_pageCache).set(r,n),n}));return _classPrivateFieldGet(this,_pagePromises).set(r,a),a}},{key:"getPageIndex",value:function(e){return"object"!==_typeof(e)||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(){var e,t,r=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally((function(){r.annotationStorage.resetModified()}))}},{key:"getFieldObjects",value:function(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getStructTree",value:function(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(e){return new _optional_content_config.OptionalContentConfig(e)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then((function(t){var r,n,a,o;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(r=null===(n=e._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(a=null===(o=e._fullReader)||void 0===o?void 0:o.contentLength)&&void 0!==a?a:null}})))}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=_asyncToGenerator(_regenerator.default.mark((function e(){var t,r,n,a,o=arguments;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]&&o[0],e.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){e.next=5;break}return e.abrupt("return");case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),e.prev=6,r.s();case 8:if((n=r.n()).done){e.next=15;break}if((a=n.value).cleanup()){e.next=13;break}throw new Error("startCleanup: Page ".concat(a.pageNumber," is currently rendering."));case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),r.e(e.t0);case 20:return e.prev=20,r.f(),e.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 e.stop()}}),e,this,[[6,17,20,23]])}))),function(){return t.apply(this,arguments)})},{key:"loadingParams",get:function(){var e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,enableXfa:e.enableXfa})}}]),e}(),_objs=new WeakMap,_ensureObj=new WeakSet,PDFObjects=function(){function e(){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_ensureObj),_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}return _createClass(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){var r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);return r.capability.promise.then((function(){return t(r.data)})),null}var n=_classPrivateFieldGet(this,_objs)[e];if(null==n||!n.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return n.data}},{key:"has",value:function(e){var t=_classPrivateFieldGet(this,_objs)[e];return(null==t?void 0:t.capability.settled)||!1}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);r.data=t,r.capability.resolve()}},{key:"clear",value:function(){_classPrivateFieldSet(this,_objs,Object.create(null))}}]),e}();function _ensureObj2(e){var t=_classPrivateFieldGet(this,_objs)[e];return t||(_classPrivateFieldGet(this,_objs)[e]={capability:(0,_util.createPromiseCapability)(),data:null})}var RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),e}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function e(t){var r=t.callback,n=t.params,a=t.objs,o=t.commonObjs,i=t.annotationCanvasMap,s=t.operatorList,l=t.pageIndex,u=t.canvasFactory,c=t.useRequestAnimationFrame,f=void 0!==c&&c,d=t.pdfBug,h=void 0!==d&&d;_classCallCheck(this,e),this.callback=r,this.params=n,this.objs=a,this.commonObjs=o,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=l,this.canvasFactory=u,this._pdfBug=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===f&&"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=n.canvasContext.canvas}var t;return _createClass(e,[{key:"completed",get:function(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function(t){var r,n=t.transparency,a=void 0!==n&&n,o=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(e.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.");e.canvasInUse.add(this._canvas)}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 i=this.params,s=i.canvasContext,l=i.viewport,u=i.transform,c=i.imageLayer,f=i.background;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,c,o,this.annotationCanvasMap),this.gfx.beginDrawing({transform:u,viewport:l,transparency:a,background:f}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){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&&e.canvasInUse.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){e._nextBound().catch(e._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:(t=_asyncToGenerator(_regenerator.default.mark((function t(){return _regenerator.default.wrap((function(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),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.canvasInUse.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}],[{key:"canvasInUse",get:function(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]),e}(),version="2.13.216";exports.version=version;var build="399a0ec60";exports.build=build},(e,t,r)=>{"use strict";e.exports=r(146)},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n=d;return function(a,o){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===a)throw o;return O()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=f(e,t,r);if("normal"===l.type){if(n=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=v,r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var _={};u(_,i,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(E([])));S&&S!==r&&a.call(S,i)&&(_=S);var A=b.prototype=m.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,s,l){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,l)}))}l(u.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}}function P(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=f(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:O}}function O(){return{value:t,done:!0}}return g.prototype=b,u(A,"constructor",b),u(b,"constructor",g),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(A),e},e.awrap=function(e){return{__await:e}},k(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(c(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(A),u(A,l,"Generator"),u(A,i,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;T(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}("object"===n(e=r.nmd(e))?e.exports:{});try{regeneratorRuntime=a}catch(e){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.getPdfFilenameFromUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(T(e))return(0,s.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),a=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(a&&(a=a[0]).includes("%"))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){}return a||t},t.getXfaPageViewport=function(e,t){var r=t.scale,n=void 0===r?1:r,a=t.rotation,o=void 0===a?0:a,i=e.attributes.style,s=i.width,l=i.height,u=[0,0,parseInt(s),parseInt(l)];return new P({viewBox:u,scale:n,rotation:o})},t.isDataScheme=T,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=O,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r,n){var a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),r(e)},a.onerror=function(){n(new Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).appendChild(a)}))};var a,o=(a=r(145))&&a.__esModule?a:{default:a},i=r(148),s=r(1);function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var o=p(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var b=y((function e(){m(this,e)}));t.PixelsPerInch=b,g(b,"CSS",96),g(b,"PDF",72),g(b,"PDF_TO_CSS_UNITS",b.CSS/b.PDF);var _=function(e){f(r,e);var t=h(r);function r(){var e,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,a=void 0===n?globalThis.document:n;return m(this,r),(e=t.call(this))._document=a,e}return y(r,[{key:"_createCanvas",value:function(e,t){var r=this._document.createElement("canvas");return r.width=e,r.height=t,r}}]),r}(i.BaseCanvasFactory);function w(e){return S.apply(this,arguments)}function S(){var e;return e=o.default.mark((function e(t){var r,n,a=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>1&&void 0!==a[1]&&a[1],!O(t,document.baseURI)){e.next=21;break}return e.next=4,fetch(t);case 4:if((n=e.sent).ok){e.next=7;break}throw new Error(n.statusText);case 7:if(!r){e.next=15;break}return e.t1=Uint8Array,e.next=11,n.arrayBuffer();case 11:e.t2=e.sent,e.t0=new e.t1(e.t2),e.next=20;break;case 15:return e.t3=s.stringToBytes,e.next=18,n.text();case 18:e.t4=e.sent,e.t0=(0,e.t3)(e.t4);case 20:return e.abrupt("return",e.t0);case 21:return e.abrupt("return",new Promise((function(e,n){var a=new XMLHttpRequest;a.open("GET",t,!0),r&&(a.responseType="arraybuffer"),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var t;if((200===a.status||0===a.status)&&(r&&a.response?t=new Uint8Array(a.response):!r&&a.responseText&&(t=(0,s.stringToBytes)(a.responseText)),t))return void e(t);n(new Error(a.statusText))}},a.send(null)})));case 22:case"end":return e.stop()}}),e)})),S=function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))},S.apply(this,arguments)}t.DOMCanvasFactory=_;var A=function(e){f(r,e);var t=h(r);function r(){return m(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e,t){return w(e,this.isCompressed).then((function(e){return{cMapData:e,compressionType:t}}))}}]),r}(i.BaseCMapReaderFactory);t.DOMCMapReaderFactory=A;var k=function(e){f(r,e);var t=h(r);function r(){return m(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e){return w(e,!0)}}]),r}(i.BaseStandardFontDataFactory);t.DOMStandardFontDataFactory=k;var x=function(e){f(r,e);var t=h(r);function r(){return m(this,r),t.apply(this,arguments)}return y(r,[{key:"_createSVG",value:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}]),r}(i.BaseSVGFactory);t.DOMSVGFactory=x;var P=function(){function e(t){var r=t.viewBox,n=t.scale,a=t.rotation,o=t.offsetX,i=void 0===o?0:o,s=t.offsetY,l=void 0===s?0:s,u=t.dontFlip,c=void 0!==u&&u;m(this,e),this.viewBox=r,this.scale=n,this.rotation=a,this.offsetX=i,this.offsetY=l;var f,d,h,p,v,y,g,b,_=(r[2]+r[0])/2,w=(r[3]+r[1])/2;switch((a%=360)<0&&(a+=360),a){case 180:f=-1,d=0,h=0,p=1;break;case 90:f=0,d=1,h=1,p=0;break;case 270:f=0,d=-1,h=-1,p=0;break;case 0:f=1,d=0,h=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(h=-h,p=-p),0===f?(v=Math.abs(w-r[1])*n+i,y=Math.abs(_-r[0])*n+l,g=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(v=Math.abs(_-r[0])*n+i,y=Math.abs(w-r[1])*n+l,g=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[f*n,d*n,h*n,p*n,v-f*n*_-h*n*w,y-d*n*_-p*n*w],this.width=g,this.height=b}return y(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,a=t.rotation,o=void 0===a?this.rotation:a,i=t.offsetX,s=void 0===i?this.offsetX:i,l=t.offsetY,u=void 0===l?this.offsetY:l,c=t.dontFlip,f=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:o,offsetX:s,offsetY:u,dontFlip:f})}},{key:"convertToViewportPoint",value:function(e,t){return s.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=s.Util.applyTransform([e[0],e[1]],this.transform),r=s.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return s.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=P;var C=function(e){f(r,e);var t=h(r);function r(e,n){var a;return m(this,r),(a=t.call(this,e,"RenderingCancelledException")).type=n,a}return y(r)}(s.BaseException);function T(e){for(var t=e.length,r=0;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}t.RenderingCancelledException=C;var R,E=function(){function e(){m(this,e),this.started=Object.create(null),this.times=[]}return y(e,[{key:"time",value:function(e){e in this.started&&(0,s.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,s.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,n=l(this.times);try{for(n.s();!(e=n.n()).done;){var a=e.value.name;a.length>r&&(r=a.length)}}catch(e){n.e(e)}finally{n.f()}var o,i=l(this.times);try{for(i.s();!(o=i.n()).done;){var s=o.value,u=s.end-s.start;t.push("".concat(s.name.padEnd(r)," ").concat(u,"ms\n"))}}catch(e){i.e(e)}finally{i.f()}return t.join("")}}]),e}();function O(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.StatTimer=E;var F=function(){function e(){m(this,e)}return y(e,null,[{key:"toDateObject",value:function(e){if(!e||"string"!=typeof e)return null;R||(R=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=R.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var i=parseInt(t[5],10);i=i>=0&&i<=59?i:0;var s=parseInt(t[6],10);s=s>=0&&s<=59?s:0;var l=t[7]||"Z",u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;var c=parseInt(t[9],10)||0;return c=c>=0&&c<=59?c:0,"-"===l?(o+=u,i+=c):"+"===l&&(o-=u,i-=c),new Date(Date.UTC(r,n,a,o,i,s))}}]),e}();t.PDFDateString=F},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1);function i(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,l,"next",e)}function l(e){i(o,n,a,s,l,"throw",e)}s(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=function(){function e(){l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseCanvasFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}},{key:"_createCanvas",value:function(e,t){(0,o.unreachable)("Abstract method `_createCanvas` called.")}}]),e}();t.BaseCanvasFactory=f;var d=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,a=t.isCompressed,i=void 0!==a&&a;l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=i}var t;return c(e,[{key:"fetch",value:(t=s(a.default.mark((function e(t){var r,n,i,s=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.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){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return n=this.baseUrl+r+(this.isCompressed?".bcmap":""),i=this.isCompressed?o.CMapCompressionType.BINARY:o.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(n,i).catch((function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(n))})));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_fetchData",value:function(e,t){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=d;var h=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r;l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=n}var t;return c(e,[{key:"fetch",value:(t=s(a.default.mark((function e(t){var r,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.filename,this.baseUrl){e.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){e.next=5;break}throw new Error("Font filename must be specified.");case 5:return n="".concat(this.baseUrl).concat(r),e.abrupt("return",this._fetchData(n).catch((function(e){throw new Error("Unable to load font data at: ".concat(n))})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_fetchData",value:function(e){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseStandardFontDataFactory=h;var p=function(){function e(){l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseSVGFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");var r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width","".concat(e,"px")),r.setAttribute("height","".concat(t,"px")),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),r}},{key:"createElement",value:function(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}},{key:"_createSVG",value:function(e){(0,o.unreachable)("Abstract method `_createSVG` called.")}}]),e}();t.BaseSVGFactory=p},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a,o=(a=r(145))&&a.__esModule?a:{default:a},i=r(1);function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var y,m=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature,a=t.ownerDocument,o=void 0===a?globalThis.document:a;t.styleElement,h(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this._document=o,this.nativeFontFaces=[],this.styleElement=null}var t,r;return v(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){var e,t=f(this.nativeFontFaces);try{for(t.s();!(e=t.n()).done;){var r=e.value;this._document.fonts.delete(r)}}catch(e){t.e(e)}finally{t.f()}this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:(t=o.default.mark((function e(t){var r,n,a=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(n=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise((function(e){var r=a._queueLoadingCallback(e);a._prepareFontLoadEvent([n],[t],r)}));case 26:case"end":return e.stop()}}),e,this,[[7,12]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))},function(e){return r.apply(this,arguments)})},{key:"_queueLoadingCallback",value:function(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var e,t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}},{key:"isSyncFontLoadingSupported",get:function(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),e}();t.FontLoader=y,t.FontLoader=y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(r,e);var t=l(r);function r(e){var n;return h(this,r),(n=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},n.loadTestFontId=0,n}return v(r,[{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==t?void 0:t[1])>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,i.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_loadTestFont",get:function(){return(0,i.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,l=this._document.createElement("canvas");l.width=1,l.height=1;var u=l.getContext("2d"),c=0,d="lt".concat(Date.now()).concat(this.loadTestFontId++),h=this._loadTestFont,p=1482184792,v=n(h=a(h,976,d.length,d),16);for(o=0,s=d.length-3;o<s;o+=4)v=v-p+n(d,o)|0;o<d.length&&(v=v-p+n(d+"XXX",o)|0),h=a(h,16,4,(0,i.string32)(v));var y="url(data:font/opentype;base64,".concat(btoa(h),");"),m='@font-face {font-family:"'.concat(d,'";src:').concat(y,"}");this.insertRule(m);var g,b=[],_=f(t);try{for(_.s();!(g=_.n()).done;){var w=g.value;b.push(w.loadedName)}}catch(e){_.e(e)}finally{_.f()}b.push(d);var S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(var A=0,k=b;A<k.length;A++){var x=k[A],P=this._document.createElement("span");P.textContent="Hi",P.style.fontFamily=x,S.appendChild(P)}this._document.body.appendChild(S),function e(t,r){if(++c>30)return(0,i.warn)("Load test font never loaded."),void r();u.font="30px "+t,u.fillText(".",0,20),u.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(d,(function(){S.remove(),r.complete()}))}}]),r}(m);var g=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,o=r.disableFontFace,i=void 0!==o&&o,s=r.ignoreErrors,l=void 0!==s&&s,u=r.onUnsupportedFeature,c=r.fontRegistry,f=void 0===c?null:c;for(var d in h(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==a,this.disableFontFace=!0===i,this.ignoreErrors=!0===l,this._onUnsupportedFeature=u,this.fontRegistry=f}return v(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e;if(this.cssFontInfo){var t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e,t=(0,i.bytesToString)(this.data),r="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");if(this.cssFontInfo){var n="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(n+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(n,"src:").concat(r,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(r,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,r),e}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){var n,a=[],o=f(r);try{for(o.s();!(n=o.n()).done;){var s=n.value,l=void 0!==s.args?s.args.join(","):"";a.push("c.",s.cmd,"(",l,");\n")}}catch(e){o.e(e)}finally{o.f()}return this.compiledGlyphs[t]=new Function("c","size",a.join(""))}return this.compiledGlyphs[t]=function(e,t){var n,a=f(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;"scale"===o.cmd&&(o.args=[t,-t]),e[o.cmd].apply(e,o.args)}}catch(e){a.e(e)}finally{a.f()}}}}]),e}();t.FontFaceObject=g},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var a=r(148),o=r(3),i=r(1);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=d((function e(){h(this,e),(0,i.unreachable)("Not implemented: NodeCanvasFactory")}));t.NodeCanvasFactory=p;var v=d((function e(){h(this,e),(0,i.unreachable)("Not implemented: NodeCMapReaderFactory")}));t.NodeCMapReaderFactory=v;var y=d((function e(){h(this,e),(0,i.unreachable)("Not implemented: NodeStandardFontDataFactory")}));if(t.NodeStandardFontDataFactory=y,o.isNodeJS){var m=function(e){return new Promise((function(t,r){__webpack_require__(767).readFile(e,(function(e,n){!e&&n?t(new Uint8Array(n)):r(new Error(e))}))}))};t.NodeCanvasFactory=p=function(e){s(r,e);var t=u(r);function r(){return h(this,r),t.apply(this,arguments)}return d(r,[{key:"_createCanvas",value:function(e,t){return __webpack_require__(601).createCanvas(e,t)}}]),r}(a.BaseCanvasFactory),t.NodeCMapReaderFactory=v=function(e){s(r,e);var t=u(r);function r(){return h(this,r),t.apply(this,arguments)}return d(r,[{key:"_fetchData",value:function(e,t){return m(e).then((function(e){return{cMapData:e,compressionType:t}}))}}]),r}(a.BaseCMapReaderFactory),t.NodeStandardFontDataFactory=y=function(e){s(r,e);var t=u(r);function r(){return h(this,r),t.apply(this,arguments)}return d(r,[{key:"_fetchData",value:function(e){return m(e)}}]),r}(a.BaseStandardFontDataFactory)}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationStorage=void 0;var n=r(1);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._storage=new Map,this._timeStamp=Date.now(),this._modified=!1,this.onSetModified=null,this.onResetModified=null}var t,r,o;return t=e,(r=[{key:"getValue",value:function(e,t){var r=this._storage.get(e);return void 0===r?t:Object.assign(t,r)}},{key:"setValue",value:function(e,t){var r=this._storage.get(e),n=!1;if(void 0!==r)for(var o=0,i=Object.entries(t);o<i.length;o++){var s=a(i[o],2),l=s[0],u=s[1];r[l]!==u&&(n=!0,r[l]=u)}else n=!0,this._storage.set(e,t);n&&(this._timeStamp=Date.now(),this._setModified())}},{key:"getAll",value:function(){return this._storage.size>0?(0,n.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function(){return this._timeStamp.toString()}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.AnnotationStorage=s},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(1),a=r(153),o=r(147);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=4096,v=16;function y(e){if(e._transformStack&&(e._transformStack=[]),!e.mozCurrentTransform){e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._originalResetTransform=e.resetTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[];try{var t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set,e._getLineWidth=t.get,Object.defineProperty(e,"lineWidth",{set:function(e){this._setLineWidth(1.000001*e)},get:function(){return this._getLineWidth()}})}catch(e){}Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=f(this._transformMatrix,6),t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5],s=t*a-r*n,l=r*n-t*a;return[a/s,r/l,n/l,t/s,(a*o-n*i)/l,(r*o-t*i)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){0===this._transformStack.length&&(0,n.warn)("Tried to restore a ctx when the stack was already empty.");var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]*=e,r[1]*=e,r[2]*=t,r[3]*=t,this._originalScale(e,t)},e.transform=function(t,r,n,a,o,i){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*a,s[1]*n+s[3]*a,s[0]*o+s[2]*i+s[4],s[1]*o+s[3]*i+s[5]],e._originalTransform(t,r,n,a,o,i)},e.setTransform=function(t,r,n,a,o,i){this._transformMatrix=[t,r,n,a,o,i],e._originalSetTransform(t,r,n,a,o,i)},e.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],e._originalResetTransform()},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)}}}var m=function(){function e(t){l(this,e),this.canvasFactory=t,this.cache=Object.create(null)}return c(e,[{key:"getCanvas",value:function(e,t,r,n){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),n&&y(a.context),a}},{key:"clear",value:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}]),e}(),g=function(){function e(t,r){l(this,e),this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.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=n.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])}return c(e,[{key:"clone",value:function(){var e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}},{key:"updatePathMinMax",value:function(e,t,r){var a=f(n.Util.applyTransform([t,r],e),2);t=a[0],r=a[1],this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}},{key:"updateCurvePathMinMax",value:function(e,t,r,a,o,i,s,l,u){var c=n.Util.bezierBoundingBox(t,r,a,o,i,s,l,u);this.updatePathMinMax(e,c[0],c[1]),this.updatePathMinMax(e,c[2],c[3])}},{key:"getPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[this.minX,this.minY,this.maxX,this.maxY];if(e===a.PathType.STROKE){t||(0,n.unreachable)("Stroke bounding box must include transform.");var o=n.Util.singularValueDecompose2dScale(t),i=o[0]*this.lineWidth/2,s=o[1]*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}},{key:"updateClipFromPath",value:function(){var e=n.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}]),e}();function b(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var a,o,i,s,l,u,c,f,d,h=t.height,p=t.width,y=h%v,m=(h-y)/v,g=0===y?m:m+1,b=e.createImageData(p,v),_=0,w=t.data,S=b.data;if(r)switch(r.length){case 1:u=r[0],c=r[0],f=r[0],d=r[0];break;case 4:u=r[0],c=r[1],f=r[2],d=r[3]}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var A=w.byteLength,k=new Uint32Array(S.buffer,0,S.byteLength>>2),x=k.length,P=p+7>>3,C=4294967295,T=n.IsLittleEndianCached.value?4278190080:255;if(d&&255===d[0]&&0===d[255]){var R=[T,C];C=R[0],T=R[1]}for(o=0;o<g;o++){for(s=o<m?v:y,a=0,i=0;i<s;i++){for(var E=A-_,O=0,F=E>P?p:8*E-7,M=-8&F,j=0,I=0;O<M;O+=8)I=w[_++],k[a++]=128&I?C:T,k[a++]=64&I?C:T,k[a++]=32&I?C:T,k[a++]=16&I?C:T,k[a++]=8&I?C:T,k[a++]=4&I?C:T,k[a++]=2&I?C:T,k[a++]=1&I?C:T;for(;O<F;O++)0===j&&(I=w[_++],j=128),k[a++]=I&j?C:T,j>>=1}for(;a<x;)k[a++]=0;e.putImageData(b,0,o*v)}}else if(t.kind===n.ImageKind.RGBA_32BPP){var D=!!(u||c||f);for(i=0,l=p*v*4,o=0;o<m;o++){if(S.set(w.subarray(_,_+l)),_+=l,D)for(var L=0;L<l;L+=4)u&&(S[L+0]=u[S[L+0]]),c&&(S[L+1]=c[S[L+1]]),f&&(S[L+2]=f[S[L+2]]);e.putImageData(b,0,i),i+=v}if(o<g){if(l=p*y*4,S.set(w.subarray(_,_+l)),D)for(var N=0;N<l;N+=4)u&&(S[N+0]=u[S[N+0]]),c&&(S[N+1]=c[S[N+1]]),f&&(S[N+2]=f[S[N+2]]);e.putImageData(b,0,i)}}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));var q=!!(u||c||f);for(l=p*(s=v),o=0;o<g;o++){for(o>=m&&(l=p*(s=y)),a=0,i=l;i--;)S[a++]=w[_++],S[a++]=w[_++],S[a++]=w[_++],S[a++]=255;if(q)for(var B=0;B<a;B+=4)u&&(S[B+0]=u[S[B+0]]),c&&(S[B+1]=c[S[B+1]]),f&&(S[B+2]=f[S[B+2]]);e.putImageData(b,0,o*v)}}}}function _(e,t){for(var r=t.height,n=t.width,a=r%v,o=(r-a)/v,i=0===a?o:o+1,s=e.createImageData(n,v),l=0,u=t.data,c=s.data,f=0;f<i;f++){for(var d=f<o?v:a,h=3,p=0;p<d;p++)for(var y=void 0,m=0,g=0;g<n;g++)m||(y=u[l++],m=128),c[h]=y&m?0:255,h+=4,m>>=1;e.putImageData(s,0,f*v)}}function w(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n<a;n++){var o=r[n];void 0!==e[o]&&(t[o]=e[o])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function S(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function A(e,t,r,n){for(var a=e.length,o=3;o<a;o+=4){var i=e[o];if(0===i)e[o-3]=t,e[o-2]=r,e[o-1]=n;else if(i<255){var s=255-i;e[o-3]=e[o-3]*i+t*s>>8,e[o-2]=e[o-2]*i+r*s>>8,e[o-1]=e[o-1]*i+n*s>>8}}}function k(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=r?r[e[a]]:e[a];t[a]=t[a]*o*.00392156862745098|0}}function x(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=r?t[a]*r[o>>8]>>8:t[a]*o>>16}}function P(e,t,r,n){var a=n[0],o=n[1],i=n[2]-a,s=n[3]-o;0!==i&&0!==s&&(function(e,t,r,n,a,o,i,s,l,u,c){var f,d=!!o,h=d?o[0]:0,p=d?o[1]:0,v=d?o[2]:0;f="Luminosity"===a?x:k;for(var y=Math.min(n,Math.ceil(1048576/r)),m=0;m<n;m+=y){var g=Math.min(y,n-m),b=e.getImageData(s-u,m+(l-c),r,g),_=t.getImageData(s,m+l,r,g);d&&A(b.data,h,p,v),f(b.data,_.data,i),t.putImageData(_,s,m+l)}}(t.context,r,i,s,t.subtype,t.backdrop,t.transferMap,a,o,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}function C(e,t){var r=n.Util.singularValueDecompose2dScale(e);r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1]);var a=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:r[0]<=a||r[1]<=a}var T=["butt","round","square"],R=["miter","round","bevel"],E={},O={},F=function(){function e(t,r,n,a,o,i,s){l(this,e),this.ctx=t,this.current=new g(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=n,this.canvasFactory=a,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=i,this.cachedCanvases=new m(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=s,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,t&&y(t),this._cachedGetSinglePixelWidth=null}return c(e,[{key:"beginDrawing",value:function(e){var t=e.transform,r=e.viewport,n=e.transparency,a=void 0!==n&&n,o=e.background,i=void 0===o?null:o,s=this.ctx.canvas.width,l=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=i||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,l),this.ctx.restore(),a){var u=this.cachedCanvases.getCanvas("transparent",s,l,!0);this.compositeCtx=this.ctx,this.transparentCanvas=u.canvas,this.ctx=u.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),S(this.ctx),t&&(this.ctx.transform.apply(this.ctx,t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform.apply(this.ctx,r.transform),this.viewportScale=r.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(e,t,r,a){var o=e.argsArray,i=e.fnArray,l=t||0,u=o.length;if(u===l)return l;for(var c,f=u-l>10&&"function"==typeof r,d=f?Date.now()+15:0,h=0,p=this.commonObjs,v=this.objs;;){if(void 0!==a&&l===a.nextBreakPoint)return a.breakIt(l,r),l;if((c=i[l])!==n.OPS.dependency)this[c].apply(this,o[l]);else{var y,m=s(o[l]);try{for(m.s();!(y=m.n()).done;){var g=y.value,b=g.startsWith("g_")?p:v;if(!b.has(g))return b.get(g,r),l}}catch(e){m.e(e)}finally{m.f()}}if(++l===u)return l;if(f&&++h>10){if(Date.now()>d)return r(),l;h=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.cachedPatterns.clear(),this.imageLayer&&this.imageLayer.endLayout()}},{key:"_scaleImage",value:function(e,t){for(var r,n,a=e.width,o=e.height,i=Math.max(Math.hypot(t[0],t[1]),1),s=Math.max(Math.hypot(t[2],t[3]),1),l=a,u=o,c="prescale1";i>2&&l>1||s>2&&u>1;){var f=l,d=u;i>2&&l>1&&(i/=l/(f=Math.ceil(l/2))),s>2&&u>1&&(s/=u/(d=Math.ceil(u/2))),(n=(r=this.cachedCanvases.getCanvas(c,f,d)).context).clearRect(0,0,f,d),n.drawImage(e,0,0,l,u,0,0,f,d),e=r.canvas,l=f,u=d,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:u}}},{key:"_createMaskCanvas",value:function(e){var t=this.ctx,r=e.width,o=e.height,i=this.current.fillColor,s=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",r,o);_(l.context,e);var u=t.mozCurrentTransform,c=n.Util.transform(u,[1/r,0,0,-1/o,0,0]);c=n.Util.transform(c,[1,0,0,1,0,-o]);var f=n.Util.applyTransform([0,0],c),d=n.Util.applyTransform([r,o],c),h=n.Util.normalizeRect([f[0],f[1],d[0],d[1]]),p=Math.ceil(h[2]-h[0]),v=Math.ceil(h[3]-h[1]),y=this.cachedCanvases.getCanvas("fillCanvas",p,v,!0),m=y.context,g=Math.min(f[0],d[0]),b=Math.min(f[1],d[1]);m.translate(-g,-b),m.transform.apply(m,c);var w=this._scaleImage(l.canvas,m.mozCurrentTransformInverse);m.imageSmoothingEnabled=C(m.mozCurrentTransform,e.interpolate),m.drawImage(w.img,0,0,w.img.width,w.img.height,0,0,r,o),m.globalCompositeOperation="source-in";var S=n.Util.transform(m.mozCurrentTransformInverse,[1,0,0,1,-g,-b]);return m.fillStyle=s?i.getPattern(t,this,S,a.PathType.FILL):i,m.fillRect(0,0,r,o),{canvas:y.canvas,offsetX:Math.round(g),offsetY:Math.round(b)}}},{key:"setLineWidth",value:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e}},{key:"setLineCap",value:function(e){this.ctx.lineCap=T[e]}},{key:"setLineJoin",value:function(e){this.ctx.lineJoin=R[e]}},{key:"setMiterLimit",value:function(e){this.ctx.miterLimit=e}},{key:"setDash",value:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],a=n[0],o=n[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o[0],o[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=o;break;case"SMask":this.current.activeSMask=o?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=o}}}},{key:"inSMaskMode",get:function(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function(){var e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,e,t,!0);this.suspendedCtx=this.ctx,this.ctx=n.context;var a=this.ctx;a.setTransform.apply(a,this.suspendedCtx.mozCurrentTransform),w(this.suspendedCtx,a),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=function(){e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},e.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},e.transform=function(e,r,n,a,o,i){t.transform(e,r,n,a,o,i),this.__originalTransform(e,r,n,a,o,i)},e.setTransform=function(e,r,n,a,o,i){t.setTransform(e,r,n,a,o,i),this.__originalSetTransform(e,r,n,a,o,i)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},e.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},e.bezierCurveTo=function(e,r,n,a,o,i){t.bezierCurveTo(e,r,n,a,o,i),this.__originalBezierCurveTo(e,r,n,a,o,i)},e.rect=function(e,r,n,a){t.rect(e,r,n,a),this.__originalRect(e,r,n,a)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(a,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),w(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}},{key:"compose",value:function(e){if(this.current.activeSMask){e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var t=this.current.activeSMask;P(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}},{key:"save",value:function(){this.inSMaskMode?(w(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),w(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(e,t,r,n,a,o){this.ctx.transform(e,t,r,n,a,o),this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(e,t){for(var r,a,o=this.ctx,i=this.current,s=i.x,l=i.y,u=0,c=0,f=e.length;u<f;u++)switch(0|e[u]){case n.OPS.rectangle:s=t[c++],l=t[c++];var d=t[c++],h=t[c++],p=s+d,v=l+h;o.moveTo(s,l),0===d||0===h?o.lineTo(p,v):(o.lineTo(p,l),o.lineTo(p,v),o.lineTo(s,v)),i.updatePathMinMax(o.mozCurrentTransform,s,l),i.updatePathMinMax(o.mozCurrentTransform,p,v),o.closePath();break;case n.OPS.moveTo:s=t[c++],l=t[c++],o.moveTo(s,l),i.updatePathMinMax(o.mozCurrentTransform,s,l);break;case n.OPS.lineTo:s=t[c++],l=t[c++],o.lineTo(s,l),i.updatePathMinMax(o.mozCurrentTransform,s,l);break;case n.OPS.curveTo:r=s,a=l,s=t[c+4],l=t[c+5],o.bezierCurveTo(t[c],t[c+1],t[c+2],t[c+3],s,l),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],t[c+2],t[c+3],s,l),c+=6;break;case n.OPS.curveTo2:r=s,a=l,o.bezierCurveTo(s,l,t[c],t[c+1],t[c+2],t[c+3]),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,s,l,t[c],t[c+1],t[c+2],t[c+3]),s=t[c+2],l=t[c+3],c+=4;break;case n.OPS.curveTo3:r=s,a=l,s=t[c+2],l=t[c+3],o.bezierCurveTo(t[c],t[c+1],s,l,s,l),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],s,l,s,l),c+=4;break;case n.OPS.closePath:o.closePath()}i.setCurrentPoint(s,l)}},{key:"closePath",value:function(){this.ctx.closePath()}},{key:"stroke",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,this.contentVisible)if("object"===i(r)&&null!=r&&r.getPattern){var n=this.getSinglePixelWidth();t.save(),t.strokeStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.STROKE),t.lineWidth=Math.max(n,this.current.lineWidth),t.stroke(),t.restore()}else{var o=this.getSinglePixelWidth();o<0&&-o>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.floor(this._combinedScaleFactor),t.stroke(),t.restore()):(t.lineWidth=Math.max(o,this.current.lineWidth),t.stroke())}e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.FILL),n=!0);var o=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==o&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath(o)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=E}},{key:"eoClip",value:function(){this.pendingClip=O}},{key:"beginText",value:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setFont",value:function(e,t){var r=this.commonObjs.get(e),a=this.current;if(!r)throw new Error("Can't find font for ".concat(e));if(a.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var o=r.loadedName||"sans-serif",i="normal";r.black?i="900":r.bold&&(i="bold");var s=r.italic?"italic":"normal",l='"'.concat(o,'", ').concat(r.fallbackName),u=t;t<16?u=16:t>100&&(u=100),this.current.fontSizeScale=t/u,this.ctx.font="".concat(s," ").concat(i," ").concat(u,"px ").concat(l)}}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"moveText",value:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){this.current.textMatrix=[e,t,r,n,a,o],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(e,t,r,a,o){var i,s=this.ctx,l=this.current,u=l.font,c=l.textRenderingMode,f=l.fontSize/l.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=l.patternFill&&!u.missingFile;(u.disableFontFace||h||p)&&(i=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||p?(s.save(),s.translate(t,r),s.beginPath(),i(s,f),a&&s.setTransform.apply(s,a),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(o&&(s.resetTransform(),s.lineWidth=Math.floor(this._combinedScaleFactor)),s.stroke()),s.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(o?(s.save(),s.moveTo(t,r),s.resetTransform(),s.lineWidth=Math.floor(this._combinedScaleFactor),s.strokeText(e,0,0),s.restore()):s.strokeText(e,t,r))),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:t,y:r,fontSize:f,addToPath:i})}},{key:"isFontSubpixelAAEnabled",get:function(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a<t.length;a+=4)if(t[a]>0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var o=t.fontSize;if(0!==o){var i,s=this.ctx,l=t.fontSizeScale,u=t.charSpacing,c=t.wordSpacing,f=t.fontDirection,d=t.textHScale*f,h=e.length,p=r.vertical,v=p?1:-1,y=r.defaultVMetrics,m=o*t.fontMatrix[0],g=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(s.save(),s.transform.apply(s,t.textMatrix),s.translate(t.x,t.y+t.textRise),f>0?s.scale(d,-1):s.scale(d,1),t.patternFill){s.save();var b=t.fillColor.getPattern(s,this,s.mozCurrentTransformInverse,a.PathType.FILL);i=s.mozCurrentTransform,s.restore(),s.fillStyle=b}var _=t.lineWidth,w=!1,S=t.textMatrixScale;if(0===S||0===_){var A=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;A!==n.TextRenderingMode.STROKE&&A!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,w=(_=this.getSinglePixelWidth())<0)}else _/=S;1!==l&&(s.scale(l,l),_/=l),s.lineWidth=_;var k,x=0;for(k=0;k<h;++k){var P=e[k];if("number"!=typeof P){var C=!1,T=(P.isSpace?c:0)+u,R=P.fontChar,E=P.accent,O=void 0,F=void 0,M=P.width;if(p){var j=P.vmetric||y,I=-(P.vmetric?j[1]:.5*M)*m,D=j[2]*m;M=j?-j[0]:M,O=I/l,F=(x+D)/l}else O=x/l,F=0;if(r.remeasure&&M>0){var L=1e3*s.measureText(R).width/o*l;if(M<L&&this.isFontSubpixelAAEnabled){var N=M/L;C=!0,s.save(),s.scale(N,1),O/=N}else M!==L&&(O+=(M-L)/2e3*o/l)}if(this.contentVisible&&(P.isInFont||r.missingFile))if(g&&!E)s.fillText(R,O,F);else if(this.paintChar(R,O,F,i,w),E){var q=O+o*E.offset.x/l,B=F-o*E.offset.y/l;this.paintChar(E.fontChar,q,B,i,w)}x+=p?M*m-T*f:M*m+T*f,C&&s.restore()}else x+=v*P*o/1e3}p?t.y-=x:t.x+=x*d,s.restore(),this.compose()}}},{key:"showType3Text",value:function(e){var t,r,a,o,i=this.ctx,s=this.current,l=s.font,u=s.fontSize,c=s.fontDirection,f=l.vertical?1:-1,d=s.charSpacing,h=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,y=e.length;if(s.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==u){for(this._cachedGetSinglePixelWidth=null,i.save(),i.transform.apply(i,s.textMatrix),i.translate(s.x,s.y),i.scale(p,c),t=0;t<y;++t)if("number"!=typeof(r=e[t])){var m=(r.isSpace?h:0)+d,g=l.charProcOperatorList[r.operatorListId];g?(this.contentVisible&&(this.processingType3=r,this.save(),i.scale(u,u),i.transform.apply(i,v),this.executeOperatorList(g),this.restore()),a=n.Util.applyTransform([r.width,0],v)[0]*u+m,i.translate(a,0),s.x+=a*p):(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'))}else o=f*r*u/1e3,this.ctx.translate(o,0),s.x+=o*p;i.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function(e,t){}},{key:"setCharWidthAndBounds",value:function(e,t,r,n,a,o){this.ctx.rect(r,n,a-r,o-n),this.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function(t){var r,n=this;if("TilingPattern"===t[0]){var o=t[1],i=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory)}};r=new a.TilingPattern(t,o,this.ctx,s,i)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=a,this.current.strokeColor=a}},{key:"setFillRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}},{key:"_getPattern",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,a.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,t)),r&&(t.matrix=r),t}},{key:"shadingFill",value:function(e){if(this.contentVisible){var t=this.ctx;this.save();var r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.SHADING);var o=t.mozCurrentTransformInverse;if(o){var i=t.canvas,s=i.width,l=i.height,u=n.Util.applyTransform([0,0],o),c=n.Util.applyTransform([0,l],o),f=n.Util.applyTransform([s,0],o),d=n.Util.applyTransform([s,l],o),h=Math.min(u[0],c[0],f[0],d[0]),p=Math.min(u[1],c[1],f[1],d[1]),v=Math.max(u[0],c[0],f[0],d[0]),y=Math.max(u[1],c[1],f[1],d[1]);this.ctx.fillRect(h,p,v-h,y-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){(0,n.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,n.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)){var r=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[0],t[1]),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[2],t[3]),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(e){if(this.contentVisible){this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);var t=this.ctx;e.isolated||(0,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.warn)("Knockout groups not supported.");var r=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var a=n.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),o=[0,0,t.canvas.width,t.canvas.height];a=n.Util.intersect(a,o)||[0,0,0,0];var i=Math.floor(a[0]),s=Math.floor(a[1]),l=Math.max(Math.ceil(a[2])-i,1),u=Math.max(Math.ceil(a[3])-s,1),c=1,f=1;l>p&&(c=l/p,l=p),u>p&&(f=u/p,u=p),this.current.startNewPathAndClipBox([0,0,l,u]);var d="groupAt"+this.groupLevel;e.smask&&(d+="_smask_"+this.smaskCounter++%2);var h=this.cachedCanvases.getCanvas(d,l,u,!0),v=h.context;v.scale(1/c,1/f),v.translate(-i,-s),v.transform.apply(v,r),e.smask?this.smaskStack.push({canvas:h.canvas,context:v,offsetX:i,offsetY:s,scaleX:c,scaleY:f,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(i,s),t.scale(c,f),t.save()),w(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}}},{key:"endGroup",value:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();var a=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,a);var o=n.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],a);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(o)}}}},{key:"beginAnnotations",value:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function(){this.restore()}},{key:"beginAnnotation",value:function(e,t,r,a,o){if(this.save(),Array.isArray(t)&&4===t.length){var i=t[2]-t[0],s=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=s;var l=f(n.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),2),u=l[0],c=l[1],d=this.viewportScale,h=Math.ceil(i*this.outputScaleX*d),p=Math.ceil(s*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(h,p);var v=this.annotationCanvas,m=v.canvas,b=v.context;m.style.width="calc(".concat(i,"px * var(--viewport-scale-factor))"),m.style.height="calc(".concat(s,"px * var(--viewport-scale-factor))"),this.annotationCanvasMap.set(e,m),this.annotationCanvas.savedCtx=this.ctx,this.ctx=b,this.ctx.setTransform(u,0,0,-c,0,s*c),y(this.ctx),S(this.ctx)}else S(this.ctx),this.ctx.rect(t[0],t[1],i,s),this.clip(),this.endPath()}this.current=new g(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,r),this.transform.apply(this,a)}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore()}},{key:"paintImageMaskXObject",value:function(e){if(this.contentVisible){var t=this.ctx,r=e.width,n=e.height,a=this.processingType3;if(a&&void 0===a.compiled&&(a.compiled=r<=1e3&&n<=1e3?function(e){var t,r,n,a,o=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=e.width,s=e.height,l=i+1,u=new Uint8Array(l*(s+1)),c=i+7&-8,f=e.data,d=new Uint8Array(c*s),h=0;for(t=0,r=f.length;t<r;t++)for(var p=f[t],v=128;v>0;)d[h++]=p&v?0:255,v>>=1;var y=0;for(0!==d[h=0]&&(u[0]=1,++y),n=1;n<i;n++)d[h]!==d[h+1]&&(u[n]=d[h]?2:1,++y),h++;for(0!==d[h]&&(u[n]=2,++y),t=1;t<s;t++){a=t*l,d[(h=t*c)-c]!==d[h]&&(u[a]=d[h]?1:8,++y);var m=(d[h]?4:0)+(d[h-c]?8:0);for(n=1;n<i;n++)o[m=(m>>2)+(d[h+1]?4:0)+(d[h-c+1]?8:0)]&&(u[a+n]=o[m],++y),h++;if(d[h-c]!==d[h]&&(u[a+n]=d[h]?2:4,++y),y>1e3)return null}for(a=t*l,0!==d[h=c*(s-1)]&&(u[a]=8,++y),n=1;n<i;n++)d[h]!==d[h+1]&&(u[a+n]=d[h]?4:8,++y),h++;if(0!==d[h]&&(u[a+n]=4,++y),y>1e3)return null;var g=new Int32Array([0,l,-1,0,-l,0,0,0,1]),b=[];for(t=0;y&&t<=s;t++){for(var _=t*l,w=_+i;_<w&&!u[_];)_++;if(_!==w){var S=[_%l,t],A=_,k=u[_];do{var x=g[k];do{_+=x}while(!u[_]);var P=u[_];5!==P&&10!==P?(k=P,u[_]=0):(k=P&51*k>>4,u[_]&=k>>2|k<<2),S.push(_%l,_/l|0),u[_]||--y}while(A!==_);b.push(S),--t}}return function(e){e.save(),e.scale(1/i,-1/s),e.translate(0,-s),e.beginPath();for(var t=0,r=b.length;t<r;t++){var n=b[t];e.moveTo(n[0],n[1]);for(var a=2,o=n.length;a<o;a+=2)e.lineTo(n[a],n[a+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:r,height:n}):null),null!=a&&a.compiled)a.compiled(t);else{var o=this._createMaskCanvas(e),i=o.canvas;t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(i,o.offsetX,o.offsetY),t.restore(),this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var s=this.ctx;s.save();var l=s.mozCurrentTransform;s.transform(t,r,a,o,0,0);var u=this._createMaskCanvas(e);s.setTransform(1,0,0,1,0,0);for(var c=0,d=i.length;c<d;c+=2){var h=n.Util.transform(l,[t,r,a,o,i[c],i[c+1]]),p=f(n.Util.applyTransform([0,0],h),2),v=p[0],y=p[1];s.drawImage(u.canvas,v,y)}s.restore(),this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function(e){if(this.contentVisible){for(var t=this.ctx,r=this.current.fillColor,n=this.current.patternFill,o=0,i=e.length;o<i;o++){var s=e[o],l=s.width,u=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",l,u),f=c.context;f.save(),_(f,s),f.globalCompositeOperation="source-in",f.fillStyle=n?r.getPattern(f,this,t.mozCurrentTransformInverse,a.PathType.FILL):r,f.fillRect(0,0,l,u),f.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,l,u,0,-1,1,1),t.restore()}this.compose()}}},{key:"paintImageXObject",value:function(e){if(this.contentVisible){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function(e,t,r,a){if(this.contentVisible){var o=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(o){for(var i=o.width,s=o.height,l=[],u=0,c=a.length;u<c;u+=2)l.push({transform:[t,0,0,r,a[u],a[u+1]],x:0,y:0,w:i,h:s});this.paintInlineImageXObjectGroup(o,l)}else(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintInlineImageXObject",value:function(e){if(this.contentVisible){var t,r=e.width,n=e.height,a=this.ctx;if(this.save(),a.scale(1/r,-1/n),"function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)t=e;else{var o=this.cachedCanvases.getCanvas("inlineImage",r,n);b(o.context,e,this.current.transferMaps),t=o.canvas}var i=this._scaleImage(t,a.mozCurrentTransformInverse);if(a.imageSmoothingEnabled=C(a.mozCurrentTransform,e.interpolate),a.drawImage(i.img,0,0,i.paintWidth,i.paintHeight,0,-n,r,n),this.imageLayer){var s=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:s[0],top:s[1],width:r/a.mozCurrentTransformInverse[0],height:n/a.mozCurrentTransformInverse[3]})}this.compose(),this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function(e,t){if(this.contentVisible){var r=this.ctx,n=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",n,a);b(o.context,e,this.current.transferMaps);for(var i=0,s=t.length;i<s;i++){var l=t[i];if(r.save(),r.transform.apply(r,l.transform),r.scale(1,-1),r.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var u=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:e,left:u[0],top:u[1],width:n,height:a})}r.restore()}this.compose()}}},{key:"paintSolidColorImageMask",value:function(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}},{key:"markPoint",value:function(e){}},{key:"markPointProps",value:function(e,t){}},{key:"beginMarkedContent",value:function(e){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function(){}},{key:"endCompat",value:function(){}},{key:"consumePath",value:function(e){this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);var t=this.ctx;this.pendingClip&&(this.pendingClip===O?t.clip("evenodd"):t.clip(),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),t.beginPath()}},{key:"getSinglePixelWidth",value:function(){if(null===this._cachedGetSinglePixelWidth){var e=this.ctx.mozCurrentTransform,t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.pow(e[0],2)+Math.pow(e[2],2),n=Math.pow(e[1],2)+Math.pow(e[3],2),a=Math.sqrt(Math.max(r,n))/t;r!==n&&this._combinedScaleFactor*a>1?this._cachedGetSinglePixelWidth=-this._combinedScaleFactor*a:t>Number.EPSILON?this._cachedGetSinglePixelWidth=a:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},{key:"isContentVisible",value:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}]),e}();for(var M in t.CanvasGraphics=F,n.OPS)void 0!==F.prototype[M]&&(F.prototype[n.OPS[M]]=F.prototype[M])},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new m(e);case"Mesh":return new _(e);case"Dummy":return new w}throw new Error("Unknown IR type: ".concat(e[0]))};var a=r(1);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function v(e,t){if(t&&"undefined"!=typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],r,n),e.clip(a)}}t.PathType=p;var y=function(){function e(){f(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}return h(e,[{key:"getPattern",value:function(){(0,a.unreachable)("Abstract method `getPattern` called.")}}]),e}(),m=function(e){s(r,e);var t=u(r);function r(e){var n;return f(this,r),(n=t.call(this))._type=e[1],n._bbox=e[2],n._colorStops=e[3],n._p0=e[4],n._p1=e[5],n._r0=e[6],n._r1=e[7],n.matrix=null,n}return h(r,[{key:"_createGradient",value:function(e){var t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var r,n=o(this._colorStops);try{for(n.s();!(r=n.n()).done;){var a=r.value;t.addColorStop(a[0],a[1])}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"getPattern",value:function(e,t,r,n){var o;if(n===p.STROKE||n===p.FILL){var i=t.current.getClippedPathBoundingBox(n,e.mozCurrentTransform)||[0,0,0,0],s=Math.ceil(i[2]-i[0])||1,l=Math.ceil(i[3]-i[1])||1,u=t.cachedCanvases.getCanvas("pattern",s,l,!0),c=u.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-i[0],-i[1]),r=a.Util.transform(r,[1,0,0,1,i[0],i[1]]),c.transform.apply(c,t.baseTransform),this.matrix&&c.transform.apply(c,this.matrix),v(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),o=e.createPattern(u.canvas,"no-repeat");var f=new DOMMatrix(r);try{o.setTransform(f)}catch(e){(0,a.warn)('RadialAxialShadingPattern.getPattern: "'.concat(null==e?void 0:e.message,'".'))}}else v(e,this._bbox),o=this._createGradient(e);return o}}]),r}(y);function g(e,t,r,n,a,o,i,s){var l,u=t.coords,c=t.colors,f=e.data,d=4*e.width;u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=o,o=i,i=l),u[n+1]>u[a+1]&&(l=n,n=a,a=l,l=i,i=s,s=l),u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=o,o=i,i=l);var h=(u[r]+t.offsetX)*t.scaleX,p=(u[r+1]+t.offsetY)*t.scaleY,v=(u[n]+t.offsetX)*t.scaleX,y=(u[n+1]+t.offsetY)*t.scaleY,m=(u[a]+t.offsetX)*t.scaleX,g=(u[a+1]+t.offsetY)*t.scaleY;if(!(p>=g))for(var b,_,w,S,A,k,x,P,C=c[o],T=c[o+1],R=c[o+2],E=c[i],O=c[i+1],F=c[i+2],M=c[s],j=c[s+1],I=c[s+2],D=Math.round(p),L=Math.round(g),N=D;N<=L;N++){if(N<y){var q=void 0;b=h-(h-v)*(q=N<p?0:(p-N)/(p-y)),_=C-(C-E)*q,w=T-(T-O)*q,S=R-(R-F)*q}else{var B=void 0;b=v-(v-m)*(B=N>g?1:y===g?0:(y-N)/(y-g)),_=E-(E-M)*B,w=O-(O-j)*B,S=F-(F-I)*B}var W=void 0;A=h-(h-m)*(W=N<p?0:N>g?1:(p-N)/(p-g)),k=C-(C-M)*W,x=T-(T-j)*W,P=R-(R-I)*W;for(var U=Math.round(Math.min(b,A)),z=Math.round(Math.max(b,A)),G=d*N+4*U,H=U;H<=z;H++)(W=(b-H)/(b-A))<0?W=0:W>1&&(W=1),f[G++]=_-(_-k)*W|0,f[G++]=w-(w-x)*W|0,f[G++]=S-(S-P)*W|0,f[G++]=255}}function b(e,t,r){var n,a,o=t.coords,i=t.colors;switch(t.type){case"lattice":var s=t.verticesPerRow,l=Math.floor(o.length/s)-1,u=s-1;for(n=0;n<l;n++)for(var c=n*s,f=0;f<u;f++,c++)g(e,r,o[c],o[c+1],o[c+s],i[c],i[c+1],i[c+s]),g(e,r,o[c+s+1],o[c+1],o[c+s],i[c+s+1],i[c+1],i[c+s]);break;case"triangles":for(n=0,a=o.length;n<a;n+=3)g(e,r,o[n],o[n+1],o[n+2],i[n],i[n+1],i[n+2]);break;default:throw new Error("illegal figure")}}var _=function(e){s(r,e);var t=u(r);function r(e){var n;return f(this,r),(n=t.call(this))._coords=e[2],n._colors=e[3],n._figures=e[4],n._bounds=e[5],n._bbox=e[7],n._background=e[8],n.matrix=null,n}return h(r,[{key:"_createMeshCanvas",value:function(e,t,r){var n=Math.floor(this._bounds[0]),a=Math.floor(this._bounds[1]),i=Math.ceil(this._bounds[2])-n,s=Math.ceil(this._bounds[3])-a,l=Math.min(Math.ceil(Math.abs(i*e[0]*1.1)),3e3),u=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),c=i/l,f=s/u,d={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-a,scaleX:1/c,scaleY:1/f},h=l+4,p=u+4,v=r.getCanvas("mesh",h,p,!1),y=v.context,m=y.createImageData(l,u);if(t)for(var g=m.data,_=0,w=g.length;_<w;_+=4)g[_]=t[0],g[_+1]=t[1],g[_+2]=t[2],g[_+3]=255;var S,A=o(this._figures);try{for(A.s();!(S=A.n()).done;)b(m,S.value,d)}catch(e){A.e(e)}finally{A.f()}return y.putImageData(m,2,2),{canvas:v.canvas,offsetX:n-2*c,offsetY:a-2*f,scaleX:c,scaleY:f}}},{key:"getPattern",value:function(e,t,r,n){var o;if(v(e,this._bbox),n===p.SHADING)o=a.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(o=a.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){var i=a.Util.singularValueDecompose2dScale(this.matrix);o=[o[0]*i[0],o[1]*i[1]]}var s=this._createMeshCanvas(o,n===p.SHADING?null:this._background,t.cachedCanvases);return n!==p.SHADING&&(e.setTransform.apply(e,t.baseTransform),this.matrix&&e.transform.apply(e,this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}]),r}(y),w=function(e){s(r,e);var t=u(r);function r(){return f(this,r),t.apply(this,arguments)}return h(r,[{key:"getPattern",value:function(){return"hotpink"}}]),r}(y),S=1,A=2,k=function(){function e(t,r,n,a,o){f(this,e),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=n,this.canvasGraphicsFactory=a,this.baseTransform=o}return h(e,[{key:"createPatternCanvas",value:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,o=this.ystep,i=this.paintType,s=this.tilingType,l=this.color,u=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+s);var c=r[0],f=r[1],d=r[2],h=r[3],p=a.Util.singularValueDecompose2dScale(this.matrix),v=a.Util.singularValueDecompose2dScale(this.baseTransform),y=[p[0]*v[0],p[1]*v[1]],m=this.getSizeAndScale(n,this.ctx.canvas.width,y[0]),g=this.getSizeAndScale(o,this.ctx.canvas.height,y[1]),b=e.cachedCanvases.getCanvas("pattern",m.size,g.size,!0),_=b.context,w=u.createCanvasGraphics(_);w.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(w,i,l);var S=c,A=f,k=d,x=h;return c<0&&(S=0,k+=Math.abs(c)),f<0&&(A=0,x+=Math.abs(f)),_.translate(-m.scale*S,-g.scale*A),w.transform(m.scale,0,0,g.scale,0,0),_.save(),this.clipBbox(w,S,A,k,x),w.baseTransform=w.ctx.mozCurrentTransform.slice(),w.executeOperatorList(t),w.endDrawing(),{canvas:b.canvas,scaleX:m.scale,scaleY:g.scale,offsetX:S,offsetY:A}}},{key:"getSizeAndScale",value:function(t,r,n){t=Math.abs(t);var a=Math.max(e.MAX_PATTERN_SIZE,r),o=Math.ceil(t*n);return o>=a?o=a:n=o/t,{scale:n,size:o}}},{key:"clipBbox",value:function(e,t,r,n,a){var o=n-t,i=a-r;e.ctx.rect(t,r,o,i),e.clip(),e.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(e,t,r){var n=e.ctx,o=e.current;switch(t){case S:var i=this.ctx;n.fillStyle=i.fillStyle,n.strokeStyle=i.strokeStyle,o.fillColor=i.fillStyle,o.strokeColor=i.strokeStyle;break;case A:var s=a.Util.makeHexColor(r[0],r[1],r[2]);n.fillStyle=s,n.strokeStyle=s,o.fillColor=s,o.strokeColor=s;break;default:throw new a.FormatError("Unsupported paint type: ".concat(t))}}},{key:"getPattern",value:function(e,t,r,n){var o=r;n!==p.SHADING&&(o=a.Util.transform(o,t.baseTransform),this.matrix&&(o=a.Util.transform(o,this.matrix)));var i=this.createPatternCanvas(t),s=new DOMMatrix(o);s=(s=s.translate(i.offsetX,i.offsetY)).scale(1/i.scaleX,1/i.scaleY);var l=e.createPattern(i.canvas,"repeat");try{l.setTransform(s)}catch(e){(0,a.warn)('TilingPattern.getPattern: "'.concat(null==e?void 0:e.message,'".'))}return l}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,a.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),e}();t.TilingPattern=k},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1);function i(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var u=1,c=2,f=1,d=2,h=3,p=4,v=5,y=6,m=7,g=8;function b(e){switch(e instanceof Error||"object"===l(e)&&null!==e||(0,o.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new o.AbortException(e.message);case"MissingPDFException":return new o.MissingPDFException(e.message);case"PasswordException":return new o.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new o.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new o.UnknownErrorException(e.message,e.details);default:return new o.UnknownErrorException(e.message,e.toString())}}var _=function(){function e(t,r,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceName=t,this.targetName=r,this.comObj=n,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(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.callback){var r=t.callbackId,o=a.callbackCapabilities[r];if(!o)throw new Error("Cannot resolve callback ".concat(r));if(delete a.callbackCapabilities[r],t.callback===u)o.resolve(t.data);else{if(t.callback!==c)throw new Error("Unexpected callback case");o.reject(b(t.reason))}}else{var i=a.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var s=a.sourceName,l=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(e){n.postMessage({sourceName:s,targetName:l,callback:u,callbackId:t.callbackId,data:e})}),(function(e){n.postMessage({sourceName:s,targetName:l,callback:c,callbackId:t.callbackId,reason:b(e)})}))}else t.streamId?a._createStreamSink(t):i(t.data)}},n.addEventListener("message",this._onComObjOnMessage)}var t,r,n,l,_;return t=e,r=[{key:"on",value:function(e,t){var r=this.actionHandler;if(r[e])throw new Error('There is already an actionName called "'.concat(e,'"'));r[e]=t}},{key:"send",value:function(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}},{key:"sendWithPromise",value:function(e,t,r){var n=this.callbackId++,a=(0,o.createPromiseCapability)();this.callbackCapabilities[n]=a;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){a.reject(e)}return a.promise}},{key:"sendWithStream",value:function(e,t,r,n){var a=this,i=this.streamId++,s=this.sourceName,l=this.targetName,u=this.comObj;return new ReadableStream({start:function(r){var c=(0,o.createPromiseCapability)();return a.streamControllers[i]={controller:r,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},u.postMessage({sourceName:s,targetName:l,action:e,streamId:i,data:t,desiredSize:r.desiredSize},n),c.promise},pull:function(e){var t=(0,o.createPromiseCapability)();return a.streamControllers[i].pullCall=t,u.postMessage({sourceName:s,targetName:l,stream:y,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,o.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,o.createPromiseCapability)();return a.streamControllers[i].cancelCall=t,a.streamControllers[i].isClosed=!0,u.postMessage({sourceName:s,targetName:l,stream:f,streamId:i,reason:b(e)}),t.promise}},r)}},{key:"_createStreamSink",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj,i=this,s=this.actionHandler[e.action],l={enqueue:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var l=this.desiredSize;this.desiredSize-=i,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,o.createPromiseCapability)(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:r,targetName:n,stream:p,streamId:t,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:n,stream:h,streamId:t}),delete i.streamSinks[t])},error:function(e){(0,o.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)}))},sinkCapability:(0,o.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[t]=l,new Promise((function(t){t(s(e.data,l))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj,i=this.streamControllers[t],s=this.streamSinks[t];switch(e.stream){case g:e.success?i.startCall.resolve():i.startCall.reject(b(e.reason));break;case m:e.success?i.pullCall.resolve():i.pullCall.reject(b(e.reason));break;case y:if(!s){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve(),s.desiredSize=e.desiredSize,new Promise((function(e){e(s.onPull&&s.onPull())})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,reason:b(e)})}));break;case p:if((0,o.assert)(i,"enqueue should have stream controller"),i.isClosed)break;i.controller.enqueue(e.chunk);break;case h:if((0,o.assert)(i,"close should have stream controller"),i.isClosed)break;i.isClosed=!0,i.controller.close(),this._deleteStreamController(i,t);break;case v:(0,o.assert)(i,"error should have stream controller"),i.controller.error(b(e.reason)),this._deleteStreamController(i,t);break;case d:e.success?i.cancelCall.resolve():i.cancelCall.reject(b(e.reason)),this._deleteStreamController(i,t);break;case f:if(!s)break;new Promise((function(t){t(s.onCancel&&s.onCancel(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,reason:b(e)})})),s.sinkCapability.reject(b(e.reason)),s.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(l=a.default.mark((function e(t,r){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,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 e.stop()}}),e,this)})),_=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=l.apply(e,t);function o(e){i(a,r,n,o,s,"next",e)}function s(e){i(a,r,n,o,s,"throw",e)}o(void 0)}))},function(e,t){return _.apply(this,arguments)})},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}],r&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.MessageHandler=_},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(1);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function s(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,l(e,t,"set"),r),r}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,c=new WeakMap,f=function(){function e(t){var r=t.parsedData,n=t.rawData;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,u,{writable:!0,value:void 0}),o(this,c,{writable:!0,value:void 0}),s(this,u,r),s(this,c,n)}var t,r,l;return t=e,(r=[{key:"getRaw",value:function(){return i(this,c)}},{key:"get",value:function(e){var t;return null!==(t=i(this,u).get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,n.objectFromMap)(i(this,u))}},{key:"has",value:function(e){return i(this,u).has(e)}}])&&a(t.prototype,r),l&&a(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Metadata=f},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var n=r(1);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=s((function e(t,r){l(this,e),this.visible=!0,this.name=t,this.intent=r})),c=function(){function e(t){if(l(this,e),this.name=null,this.creator=null,this._order=null,this._groups=new Map,null!==t){this.name=t.name,this.creator=t.creator,this._order=t.order;var r,n=a(t.groups);try{for(n.s();!(r=n.n()).done;){var o=r.value;this._groups.set(o.id,new u(o.name,o.intent))}}catch(e){n.e(e)}finally{n.f()}if("OFF"===t.baseState){var i,s=a(this._groups);try{for(s.s();!(i=s.n()).done;)i.value.visible=!1}catch(e){s.e(e)}finally{s.f()}}var c,f=a(t.on);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._groups.get(d).visible=!0}}catch(e){f.e(e)}finally{f.f()}var h,p=a(t.off);try{for(p.s();!(h=p.n()).done;){var v=h.value;this._groups.get(v).visible=!1}}catch(e){p.e(e)}finally{p.f()}}}return s(e,[{key:"_evaluateVisibilityExpression",value:function(e){var t=e.length;if(t<2)return!0;for(var r=e[0],a=1;a<t;a++){var o=e[a],i=void 0;if(Array.isArray(o))i=this._evaluateVisibilityExpression(o);else{if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;i=this._groups.get(o).visible}switch(r){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return"And"===r}},{key:"isVisible",value:function(e){if(0===this._groups.size)return!0;if(!e)return(0,n.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return this._groups.has(e.id)?this._groups.get(e.id).visible:((0,n.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return this._evaluateVisibilityExpression(e.expression);if(!e.policy||"AnyOn"===e.policy){var t,r=a(e.ids);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;if(this._groups.get(o).visible)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}if("AllOn"===e.policy){var i,s=a(e.ids);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(!this._groups.has(l))return(0,n.warn)("Optional content group not found: ".concat(l)),!0;if(!this._groups.get(l).visible)return!1}}catch(e){s.e(e)}finally{s.f()}return!0}if("AnyOff"===e.policy){var u,c=a(e.ids);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(!this._groups.has(f))return(0,n.warn)("Optional content group not found: ".concat(f)),!0;if(!this._groups.get(f).visible)return!0}}catch(e){c.e(e)}finally{c.f()}return!1}if("AllOff"===e.policy){var d,h=a(e.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p))return(0,n.warn)("Optional content group not found: ".concat(p)),!0;if(this._groups.get(p).visible)return!1}}catch(e){h.e(e)}finally{h.f()}return!0}return(0,n.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,n.warn)("Unknown group type ".concat(e.type,".")),!0}},{key:"setVisibility",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,n.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size>0?(0,n.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}]),e}();t.OptionalContentConfig=c},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1),i=r(147);function s(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p=function(){function e(t,r){var n=this;f(this,e),(0,o.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1,this._contentDispositionFilename=t.contentDispositionFilename||null;var a=t.initialData;if((null==a?void 0:a.length)>0){var i=new Uint8Array(a).buffer;this._queuedChunks.push(i)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((function(e,t){n._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener((function(e,t){n._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((function(e){n._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((function(){n._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}return h(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,o.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;null!=r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,o.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new v(this,e,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new y(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=u(this._rangeReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}this._pdfDataRangeTransport.abort()}}]),e}();t.PDFDataTransportStream=p;var v=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;f(this,e),this._stream=t,this._done=n||!1,this._filename=(0,i.isPdfFile)(a)?a:null,this._queuedChunks=r||[],this._loaded=0;var o,s=u(this._queuedChunks);try{for(s.s();!(o=s.n()).done;){var l=o.value;this._loaded+=l.byteLength}}catch(e){s.e(e)}finally{s.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}var t;return h(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0;var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),y=function(){function e(t,r,n){f(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}var t;return h(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0;var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),e}()},(e,t)=>{"use strict";function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},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 i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"textContent",value:function(t){var n=[],a={items:n,styles:Object.create(null)};return function t(a){var o;if(a){var i=null,s=a.name;if("#text"===s)i=a.value;else{if(!e.shouldBuildText(s))return;null!=a&&null!==(o=a.attributes)&&void 0!==o&&o.textContent?i=a.attributes.textContent:a.value&&(i=a.value)}if(null!==i&&n.push({str:i}),a.children){var l,u=r(a.children);try{for(u.s();!(l=u.n()).done;)t(l.value)}catch(e){u.e(e)}finally{u.f()}}}}(t),a}},{key:"shouldBuildText",value:function(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}],(n=null)&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.XfaText=o},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var a=r(1),o=r(147),i=r(151),s=r(161),l=r(162);function u(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},c.apply(this,arguments)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){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 h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=m(e);if(t){var o=m(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}(this,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var x=1e3,P=new WeakSet;function C(e){return{width:e[2]-e[0],height:e[3]-e[1]}}var T=function(){function e(){S(this,e)}return k(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new E(e);case a.AnnotationType.TEXT:return new O(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new M(e);case"Btn":return e.data.radioButton?new I(e):e.data.checkBox?new j(e):new D(e);case"Ch":return new L(e)}return new F(e);case a.AnnotationType.POPUP:return new N(e);case a.AnnotationType.FREETEXT:return new B(e);case a.AnnotationType.LINE:return new W(e);case a.AnnotationType.SQUARE:return new U(e);case a.AnnotationType.CIRCLE:return new z(e);case a.AnnotationType.POLYLINE:return new G(e);case a.AnnotationType.CARET:return new V(e);case a.AnnotationType.INK:return new X(e);case a.AnnotationType.POLYGON:return new H(e);case a.AnnotationType.HIGHLIGHT:return new Y(e);case a.AnnotationType.UNDERLINE:return new K(e);case a.AnnotationType.SQUIGGLY:return new Q(e);case a.AnnotationType.STRIKEOUT:return new J(e);case a.AnnotationType.STAMP:return new $(e);case a.AnnotationType.FILEATTACHMENT:return new Z(e);default:return new R(e)}}}]),e}(),R=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,a=void 0!==n&&n,o=r.ignoreBorder,i=void 0!==o&&o,s=r.createQuadrilaterals,l=void 0!==s&&s;S(this,e),this.isRenderable=a,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,a&&(this.container=this._createContainer(i)),l&&(this.quadrilaterals=this._createQuadrilaterals(i))}return k(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,o=document.createElement("section"),i=C(t.rect),s=i.width,l=i.height;o.setAttribute("data-annotation-id",t.id);var u=a.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(t.hasOwnCanvas){var c=n.transform.slice(),f=b(a.Util.singularValueDecompose2dScale(c),2),d=f[0],h=f[1];s=Math.ceil(s*d),l=Math.ceil(l*h),u[0]*=d,u[1]*=h;for(var p=0;p<4;p++)c[p]=Math.sign(c[p]);o.style.transform="matrix(".concat(c.join(","),")")}else o.style.transform="matrix(".concat(n.transform.join(","),")");if(o.style.transformOrigin="".concat(-u[0],"px ").concat(-u[1],"px"),!e&&t.borderStyle.width>0){o.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(s-=2*t.borderStyle.width,l-=2*t.borderStyle.width);var v=t.borderStyle.horizontalCornerRadius,y=t.borderStyle.verticalCornerRadius;if(v>0||y>0){var m="".concat(v,"px / ").concat(y,"px");o.style.borderRadius=m}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:o.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:o.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:o.style.borderBottomStyle="solid"}t.borderColor||t.color?o.style.borderColor=a.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):o.style.borderWidth=0}return o.style.left="".concat(u[0],"px"),o.style.top="".concat(u[1],"px"),t.hasOwnCanvas?o.style.width=o.style.height="auto":(o.style.width="".concat(s,"px"),o.style.height="".concat(l,"px")),o}},{key:"_createQuadrilaterals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,r=[],n=this.data.rect,a=g(this.data.quadPoints);try{for(a.s();!(t=a.n()).done;){var o=t.value;this.data.rect=[o[2].x,o[2].y,o[1].x,o[1].y],r.push(this._createContainer(e))}}catch(e){a.e(e)}finally{a.f()}return this.data.rect=n,r}},{key:"_createPopup",value:function(e,t){var r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=r.style.height,e.style.width=r.style.width,r.appendChild(e));var n=new q({container:r,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();n.style.left=r.style.width,r.appendChild(n)}},{key:"_renderQuadrilaterals",value:function(e){var t,r=g(this.quadrilaterals);try{for(r.s();!(t=r.n()).done;)t.value.className=e}catch(e){r.e(e)}finally{r.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];if(this._fieldObjects){var n=this._fieldObjects[e];if(n){var o,i=g(n);try{for(i.s();!(o=i.n()).done;){var s=o.value,l=s.page,u=s.id,c=s.exportValues;if(-1!==l&&u!==t){var f="string"==typeof c?c:null,d=document.getElementById(u);!d||P.has(d)?r.push({id:u,exportValue:f,domElement:d}):(0,a.warn)("_getElementsByName - element not allowed: ".concat(u))}}}catch(e){i.e(e)}finally{i.f()}}return r}var h,p=g(document.getElementsByName(e));try{for(p.s();!(h=p.n()).done;){var v=h.value,y=v.id,m=v.exportValue;y!==t&&P.has(v)&&r.push({id:y,exportValue:m,domElement:v})}}catch(e){p.e(e)}finally{p.f()}return r}}],[{key:"platform",get:function(){var e="undefined"!=typeof navigator?navigator.platform:"";return(0,a.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}]),e}(),E=function(e){h(r,e);var t=v(r);function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;S(this,r);var a=!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.resetForm||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"]));return t.call(this,e,{isRenderable:a,ignoreBorder:!(null==n||!n.ignoreBorder),createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){var e,t=this.data,r=this.linkService,n=document.createElement("a");if(t.url)r.addLinkAttributes||(0,a.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(e=r.addLinkAttributes)||void 0===e||e.call(r,n,t.url,t.newWindow);else if(t.action)this._bindNamedAction(n,t.action);else if(t.dest)this._bindLink(n,t.dest);else{var o=!1;t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(o=!0,this._bindJSAction(n,t)),t.resetForm?this._bindResetFormAction(n,t.resetForm):o||this._bindLink(n,"")}return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((function(e,t){var r=0===t?n:n.cloneNode();return e.appendChild(r),e})):(this.container.className="linkAnnotation",this.container.appendChild(n),this.container)}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.goToDestination(t),!1},(t||""===t)&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}},{key:"_bindJSAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),a=function(){var a=i[o],s=n.get(a);if(!s)return"continue";e[s]=function(){var e;return null===(e=r.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:r,detail:{id:t.id,name:a}}),!1}},o=0,i=Object.keys(t.actions);o<i.length;o++)a();e.onclick||(e.onclick=function(){return!1}),e.className="internalLink"}},{key:"_bindResetFormAction",value:function(e,t){var r=this,n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects)return(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(e.onclick=function(){return!1}));e.onclick=function(){n&&n();var e=t.fields,a=t.refs,o=t.include,i=[];if(0!==e.length||0!==a.length){var s,l=new Set(a),u=g(e);try{for(u.s();!(s=u.n()).done;){var c,f=s.value,h=g(r._fieldObjects[f]||[]);try{for(h.s();!(c=h.n()).done;){var p=c.value.id;l.add(p)}}catch(e){h.e(e)}finally{h.f()}}}catch(e){u.e(e)}finally{u.f()}for(var v=0,y=Object.values(r._fieldObjects);v<y.length;v++){var m,b=g(y[v]);try{for(b.s();!(m=b.n()).done;){var _=m.value;l.has(_.id)===o&&i.push(_)}}catch(e){b.e(e)}finally{b.f()}}}else for(var w=0,S=Object.values(r._fieldObjects);w<S.length;w++){var A=S[w];i.push.apply(i,d(A))}for(var k,x=r.annotationStorage,C=[],T=0,R=i;T<R.length;T++){var E=R[T],O=E.id;switch(C.push(O),E.type){case"text":var F=E.defaultValue||"";x.setValue(O,{value:F,valueAsString:F});break;case"checkbox":case"radiobutton":var M=E.defaultValue===E.exportValues;x.setValue(O,{value:M});break;case"combobox":case"listbox":var j=E.defaultValue||"";x.setValue(O,{value:j});break;default:continue}var I=document.getElementById(O);I&&P.has(I)&&I.dispatchEvent(new Event("resetform"))}return r.enableScripting&&(null===(k=r.linkService.eventBus)||void 0===k||k.dispatch("dispatcheventinsandbox",{source:r,detail:{id:"app",ids:C,name:"ResetForm"}})),!1}}}]),r}(R),O=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return k(r,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.appendChild(e),this.container}}]),r}(R),F=function(e){h(r,e);var t=v(r);function r(){return S(this,r),t.apply(this,arguments)}return k(r,[{key:"render",value:function(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"_getKeyModifier",value:function(e){var t=R.platform,r=t.isWin,n=t.isMac;return r&&e.ctrlKey||n&&e.metaKey}},{key:"_setEventListener",value:function(e,t,r,n){var a=this;t.includes("mouse")?e.addEventListener(t,(function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:a._getKeyModifier(e)}})})):e.addEventListener(t,(function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e)}})}))}},{key:"_setEventListeners",value:function(e,t,r){var n,a=g(t);try{for(a.s();!(n=a.n()).done;){var o,i=b(n.value,2),s=i[0],l=i[1];("Action"===l||null!==(o=this.data.actions)&&void 0!==o&&o[l])&&this._setEventListener(e,s,l,r)}}catch(e){a.e(e)}finally{a.f()}}},{key:"_setBackgroundColor",value:function(e){var t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":a.Util.makeHexColor(t[0],t[1],t[2])}},{key:"_dispatchEventFromSandbox",value:function(e,t){for(var r=this,n=function(e,t,r){var n=r.detail[e];r.target.style[t]=s.ColorConverters["".concat(n[0],"_HTML")](n.slice(1))},a={display:function(e){var t=e.detail.display%2==1;e.target.style.visibility=t?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:function(e){r.annotationStorage.setValue(r.data.id,{print:e.detail.print})},hidden:function(e){e.target.style.visibility=e.detail.hidden?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:e.detail.hidden})},focus:function(e){setTimeout((function(){return e.target.focus({preventScroll:!1})}),0)},userName:function(e){e.target.title=e.detail.userName},readonly:function(e){e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:function(e){e.detail.required?e.target.setAttribute("required",""):e.target.removeAttribute("required")},bgColor:function(e){n("bgColor","backgroundColor",e)},fillColor:function(e){n("fillColor","backgroundColor",e)},fgColor:function(e){n("fgColor","color",e)},textColor:function(e){n("textColor","color",e)},borderColor:function(e){n("borderColor","borderColor",e)},strokeColor:function(e){n("strokeColor","borderColor",e)}},o=0,i=Object.keys(t.detail);o<i.length;o++){var l=i[o],u=e[l]||a[l];u&&u(t)}}}]),r}(R),M=function(e){h(r,e);var t=v(r);function r(e){S(this,r);var n=e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,{isRenderable:n})}return k(r,[{key:"setPropertyOnSiblings",value:function(e,t,r,n){var a,o=this.annotationStorage,i=g(this._getElementsByName(e.name,e.id));try{for(i.s();!(a=i.n()).done;){var s=a.value;s.domElement&&(s.domElement[t]=r),o.setValue(s.id,f({},n,r))}}catch(e){i.e(e)}finally{i.f()}}},{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderForms){var a=t.getValue(r,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),o=a.valueAsString||a.value||"",i={userValue:null,formattedValue:null};this.data.multiLine?(n=document.createElement("textarea")).textContent=o:((n=document.createElement("input")).type="text",n.setAttribute("value",o)),P.add(n),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=x,i.userValue=o,n.setAttribute("id",r),n.addEventListener("input",(function(a){t.setValue(r,{value:a.target.value}),e.setPropertyOnSiblings(n,"value",a.target.value,"value")})),n.addEventListener("resetform",(function(t){var r=e.data.defaultFieldValue||"";n.value=i.userValue=r,delete i.formattedValue}));var s=function(e){i.formattedValue&&(e.target.value=i.formattedValue),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var l;n.addEventListener("focus",(function(e){i.userValue&&(e.target.value=i.userValue)})),n.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){i.userValue=e.detail.value||"",t.setValue(r,{value:i.userValue.toString()}),i.formattedValue||(e.target.value=i.userValue)},valueAsString:function(e){i.formattedValue=e.detail.valueAsString||"",e.target!==document.activeElement&&(e.target.value=i.formattedValue),t.setValue(r,{formattedValue:i.formattedValue})},selRange:function(e){var t=b(e.detail.selRange,2),r=t[0],n=t[1];r>=0&&n<e.target.value.length&&e.target.setSelectionRange(r,n)}};e._dispatchEventFromSandbox(a,n)})),n.addEventListener("keydown",(function(t){var n,a=-1;"Escape"===t.key?a=0:"Enter"===t.key?a=2:"Tab"===t.key&&(a=3),-1!==a&&(i.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:a,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}));var u=s;s=null,n.addEventListener("blur",(function(t){var n;i.userValue=t.target.value,e._mouseState.isDown&&(null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:1,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})),u(t)})),null!==(l=this.data.actions)&&void 0!==l&&l.Keystroke&&n.addEventListener("beforeinput",(function(t){var n;i.formattedValue="";var a=t.data,o=t.target,s=o.value,l=o.selectionStart,u=o.selectionEnd;null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:s,change:a,willCommit:!1,selStart:l,selEnd:u}})})),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.value}))}if(s&&n.addEventListener("blur",s),null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var c=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(c,"px - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this._setBackgroundColor(n),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e){var t=this.data.defaultAppearanceData,r=t.fontSize,n=t.fontColor,o=e.style;r&&(o.fontSize="".concat(r,"px")),o.color=a.Util.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(o.textAlign=["left","center","right"][this.data.textAlignment])}}]),r}(F),j=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{isRenderable:e.renderForms})}return k(r,[{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.exportValue===r.fieldValue}).value;"string"==typeof a&&(a="Off"!==a,t.setValue(n,{value:a})),this.container.className="buttonWidgetAnnotation checkBox";var o=document.createElement("input");return P.add(o),o.disabled=r.readOnly,o.type="checkbox",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.setAttribute("exportValue",r.exportValue),o.tabIndex=x,o.addEventListener("change",(function(a){var o,i=a.target,s=i.name,l=i.checked,u=g(e._getElementsByName(s,n));try{for(u.s();!(o=u.n()).done;){var c=o.value,f=l&&c.exportValue===r.exportValue;c.domElement&&(c.domElement.checked=f),t.setValue(c.id,{value:f})}}catch(e){u.e(e)}finally{u.f()}t.setValue(n,{value:l})})),o.addEventListener("resetform",(function(e){var t=r.defaultFieldValue||"Off";e.target.checked=t===r.exportValue})),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",(function(r){var a={value:function(e){e.target.checked="Off"!==e.detail.value,t.setValue(n,{value:e.target.checked})}};e._dispatchEventFromSandbox(a,r)})),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),I=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{isRenderable:e.renderForms})}return k(r,[{key:"render",value:function(){var e=this;this.container.className="buttonWidgetAnnotation radioButton";var t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.fieldValue===r.buttonValue}).value;"string"==typeof a&&(a=a!==r.buttonValue,t.setValue(n,{value:a}));var o=document.createElement("input");if(P.add(o),o.disabled=r.readOnly,o.type="radio",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.tabIndex=x,o.addEventListener("change",(function(r){var a,o=r.target,i=o.name,s=o.checked,l=g(e._getElementsByName(i,n));try{for(l.s();!(a=l.n()).done;){var u=a.value;t.setValue(u.id,{value:!1})}}catch(e){l.e(e)}finally{l.f()}t.setValue(n,{value:s})})),o.addEventListener("resetform",(function(e){var t=r.defaultFieldValue;e.target.checked=null!=t&&t===r.buttonValue})),this.enableScripting&&this.hasJSActions){var i=r.buttonValue;o.addEventListener("updatefromsandbox",(function(r){var a={value:function(r){var a,o=i===r.detail.value,s=g(e._getElementsByName(r.target.name));try{for(s.s();!(a=s.n()).done;){var l=a.value,u=o&&l.id===n;l.domElement&&(l.domElement.checked=u),t.setValue(l.id,{value:u})}}catch(e){s.e(e)}finally{s.f()}}};e._dispatchEventFromSandbox(a,r)})),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))}return this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),D=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{ignoreBorder:e.data.hasAppearance})}return k(r,[{key:"render",value:function(){var e=c(m(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),e}}]),r}(E),L=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{isRenderable:e.renderForms})}return k(r,[{key:"render",value:function(){var e=this;this.container.className="choiceWidgetAnnotation";var t=this.annotationStorage,r=this.data.id;t.getValue(r,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var n=this.data.defaultAppearanceData.fontSize;n||(n=9);var a="calc(".concat(n,"px * var(--zoom-factor))"),o=document.createElement("select");P.add(o),o.disabled=this.data.readOnly,o.name=this.data.fieldName,o.setAttribute("id",r),o.tabIndex=x,o.style.fontSize="".concat(n,"px"),this.data.combo||(o.size=this.data.options.length,this.data.multiSelect&&(o.multiple=!0)),o.addEventListener("resetform",(function(t){var r,n=e.data.defaultFieldValue,a=g(o.options);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.selected=i.value===n}}catch(e){a.e(e)}finally{a.f()}}));var i,s=g(this.data.options);try{for(s.s();!(i=s.n()).done;){var l=i.value,u=document.createElement("option");u.textContent=l.displayValue,u.value=l.exportValue,this.data.combo&&(u.style.fontSize=a),this.data.fieldValue.includes(l.exportValue)&&u.setAttribute("selected",!0),o.appendChild(u)}}catch(e){s.e(e)}finally{s.f()}var c=function(e,t){var r=t?"value":"textContent",n=e.target.options;return e.target.multiple?Array.prototype.filter.call(n,(function(e){return e.selected})).map((function(e){return e[r]})):-1===n.selectedIndex?null:n[n.selectedIndex][r]},f=function(e){var t=e.target.options;return Array.prototype.map.call(t,(function(e){return{displayValue:e.textContent,exportValue:e.value}}))};return this.enableScripting&&this.hasJSActions?(o.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){var n,a=e.detail.value,i=new Set(Array.isArray(a)?a:[a]),s=g(o.options);try{for(s.s();!(n=s.n()).done;){var l=n.value;l.selected=i.has(l.value)}}catch(e){s.e(e)}finally{s.f()}t.setValue(r,{value:c(e,!0)})},multipleSelection:function(e){o.multiple=!0},remove:function(e){var n=o.options,a=e.detail.remove;if(n[a].selected=!1,o.remove(a),n.length>0){var i=Array.prototype.findIndex.call(n,(function(e){return e.selected}));-1===i&&(n[0].selected=!0)}t.setValue(r,{value:c(e,!0),items:f(e)})},clear:function(e){for(;0!==o.length;)o.remove(0);t.setValue(r,{value:null,items:[]})},insert:function(e){var n=e.detail.insert,a=n.index,i=n.displayValue,s=n.exportValue,l=document.createElement("option");l.textContent=i,l.value=s,o.insertBefore(l,o.children[a]),t.setValue(r,{value:c(e,!0),items:f(e)})},items:function(e){for(var n=e.detail.items;0!==o.length;)o.remove(0);var a,i=g(n);try{for(i.s();!(a=i.n()).done;){var s=a.value,l=s.displayValue,u=s.exportValue,d=document.createElement("option");d.textContent=l,d.value=u,o.appendChild(d)}}catch(e){i.e(e)}finally{i.f()}o.options.length>0&&(o.options[0].selected=!0),t.setValue(r,{value:c(e,!0),items:f(e)})},indices:function(e){var n,a=new Set(e.detail.indices),o=g(e.target.options);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.selected=a.has(i.index)}}catch(e){o.e(e)}finally{o.f()}t.setValue(r,{value:c(e,!0)})},editable:function(e){e.target.disabled=!e.detail.editable}};e._dispatchEventFromSandbox(a,n)})),o.addEventListener("input",(function(n){var a,o=c(n,!0),i=c(n,!1);t.setValue(r,{value:o}),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:i,changeEx:o,willCommit:!0,commitKey:1,keyDown:!1}})})),this._setEventListeners(o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],(function(e){return e.target.checked}))):o.addEventListener("input",(function(e){t.setValue(r,{value:c(e)})})),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),N=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return k(r,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;var r=new q({container:this.container,trigger:Array.from(t),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),n=this.page,o=a.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),i=o[0]+this.data.parentRect[2]-this.data.parentRect[0],s=o[1];return this.container.style.transformOrigin="".concat(-i,"px ").concat(-s,"px"),this.container.style.left="".concat(i,"px"),this.container.style.top="".concat(s,"px"),this.container.appendChild(r.render()),this.container}}]),r}(R),q=function(){function e(t){S(this,e),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}return k(e,[{key:"render",value:function(){var e,t,r=document.createElement("div");r.className="popupWrapper",this.hideElement=this.hideWrapper?r:this.container,this.hideElement.hidden=!0;var n=document.createElement("div");n.className="popup";var i=this.color;if(i){var s=.7*(255-i[0])+i[0],u=.7*(255-i[1])+i[1],c=.7*(255-i[2])+i[2];n.style.backgroundColor=a.Util.makeHexColor(0|s,0|u,0|c)}var f=document.createElement("h1");f.dir=this.titleObj.dir,f.textContent=this.titleObj.str,n.appendChild(f);var d=o.PDFDateString.toDateObject(this.modificationDate);if(d){var h=document.createElement("span");h.className="popupDate",h.textContent="{{date}}, {{time}}",h.dataset.l10nId="annotation_date_string",h.dataset.l10nArgs=JSON.stringify({date:d.toLocaleDateString(),time:d.toLocaleTimeString()}),n.appendChild(h)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){var p=this._formatContents(this.contentsObj);n.appendChild(p)}else l.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:n}),n.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var v,y=g(this.trigger);try{for(y.s();!(v=y.n()).done;){var m=v.value;m.addEventListener("click",this._toggle.bind(this)),m.addEventListener("mouseover",this._show.bind(this,!1)),m.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(e){y.e(e)}finally{y.f()}return n.addEventListener("click",this._hide.bind(this,!0)),r.appendChild(n),r}},{key:"_formatContents",value:function(e){var t=e.str,r=e.dir,n=document.createElement("p");n.className="popupContent",n.dir=r;for(var a=t.split(/(?:\r\n?|\n)/),o=0,i=a.length;o<i;++o){var s=a[o];n.appendChild(document.createTextNode(s)),o<i-1&&n.appendChild(document.createElement("br"))}return n}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),e}(),B=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),W=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=C(e.rect),r=t.width,n=t.height,a=this.svgFactory.create(r,n),o=this.svgFactory.createElement("svg:line");return o.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),o.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),o.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),o.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),o.setAttribute("stroke-width",e.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),a.appendChild(o),this.container.append(a),this._createPopup(o,e),this.container}}]),r}(R),U=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=C(e.rect),r=t.width,n=t.height,a=this.svgFactory.create(r,n),o=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",o/2),i.setAttribute("y",o/2),i.setAttribute("width",r-o),i.setAttribute("height",n-o),i.setAttribute("stroke-width",o||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.appendChild(i),this.container.append(a),this._createPopup(i,e),this.container}}]),r}(R),z=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=C(e.rect),r=t.width,n=t.height,a=this.svgFactory.create(r,n),o=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",r/2),i.setAttribute("cy",n/2),i.setAttribute("rx",r/2-o/2),i.setAttribute("ry",n/2-o/2),i.setAttribute("stroke-width",o||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.appendChild(i),this.container.append(a),this._createPopup(i,e),this.container}}]),r}(R),G=function(e){h(r,e);var t=v(r);function r(e){var n,a,o,i;S(this,r);var s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="polylineAnnotation",i.svgElementName="svg:polyline",i}return k(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=C(t.rect),n=r.width,a=r.height,o=this.svgFactory.create(n,a),i=[],s=g(t.vertices);try{for(s.s();!(e=s.n()).done;){var l=e.value,u=l.x-t.rect[0],c=t.rect[3]-l.y;i.push(u+","+c)}}catch(e){s.e(e)}finally{s.f()}i=i.join(" ");var f=this.svgFactory.createElement(this.svgElementName);return f.setAttribute("points",i),f.setAttribute("stroke-width",t.borderStyle.width||1),f.setAttribute("stroke","transparent"),f.setAttribute("fill","transparent"),o.appendChild(f),this.container.append(o),this._createPopup(f,t),this.container}}]),r}(R),H=function(e){h(r,e);var t=v(r);function r(e){var n;return S(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return k(r)}(G),V=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),X=function(e){h(r,e);var t=v(r);function r(e){var n,a,o,i;S(this,r);var s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="inkAnnotation",i.svgElementName="svg:polyline",i}return k(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=C(t.rect),n=r.width,a=r.height,o=this.svgFactory.create(n,a),i=g(t.inkLists);try{for(i.s();!(e=i.n()).done;){var s,l=e.value,u=[],c=g(l);try{for(c.s();!(s=c.n()).done;){var f=s.value,d=f.x-t.rect[0],h=t.rect[3]-f.y;u.push("".concat(d,",").concat(h))}}catch(e){c.e(e)}finally{c.f()}u=u.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",u),p.setAttribute("stroke-width",t.borderStyle.width||1),p.setAttribute("stroke","transparent"),p.setAttribute("fill","transparent"),this._createPopup(p,t),o.appendChild(p)}}catch(e){i.e(e)}finally{i.f()}return this.container.append(o),this.container}}]),r}(R),Y=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),r}(R),K=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),r}(R),Q=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),r}(R),J=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),r}(R),$=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),Z=function(e){h(r,e);var t=v(r);function r(e){var n,i;S(this,r);var s=(i=t.call(this,e,{isRenderable:!0})).data.file,l=s.filename,u=s.content;return i.filename=(0,o.getFilenameFromUrl)(l),i.content=u,null===(n=i.linkService.eventBus)||void 0===n||n.dispatch("fileattachmentannotation",{source:y(i),id:(0,a.stringToPDFString)(l),filename:l,content:u}),i}return k(r,[{key:"render",value:function(){var e,t;this.container.className="fileAttachmentAnnotation";var r=document.createElement("div");return r.style.height=this.container.style.height,r.style.width=this.container.style.width,r.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(r,this.data),this.container.appendChild(r),this.container}},{key:"_download",value:function(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}]),r}(R),ee=function(){function e(){S(this,e)}return k(e,null,[{key:"render",value:function(t){var r,n=[],s=[],l=g(t.annotations);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c){var f=C(c.rect),d=f.width,h=f.height;d<=0||h<=0||(c.annotationType!==a.AnnotationType.POPUP?n.push(c):s.push(c))}}}catch(e){l.e(e)}finally{l.f()}s.length&&n.push.apply(n,s);for(var p=t.div,v=0,y=n;v<y.length;v++){var m=y[v],b=T.create({data:m,layer:p,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 i.AnnotationStorage,enableScripting:t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,mouseState:t.mouseState||{isDown:!1}});if(b.isRenderable){var _=b.render();if(m.hidden&&(_.style.visibility="hidden"),Array.isArray(_)){var w,S=g(_);try{for(S.s();!(w=S.n()).done;){var A=w.value;p.appendChild(A)}}catch(e){S.e(e)}finally{S.f()}}else b instanceof N?p.prepend(_):p.appendChild(_)}}u(this,e,te).call(this,p,t.annotationCanvasMap)}},{key:"update",value:function(t){var r,n,o,i=t.page,s=t.viewport,l=t.annotations,c=t.annotationCanvasMap,f=t.div,d=s.transform,h="matrix(".concat(d.join(","),")"),p=g(l);try{for(p.s();!(o=p.n()).done;){var v=o.value,y=f.querySelectorAll('[data-annotation-id="'.concat(v.id,'"]'));if(y){var m,b=g(y);try{for(b.s();!(m=b.n()).done;){var _=m.value;if(v.hasOwnCanvas){var w=a.Util.normalizeRect([v.rect[0],i.view[3]-v.rect[1]+i.view[1],v.rect[2],i.view[3]-v.rect[3]+i.view[1]]);if(!n){r=Math.abs(d[0]||d[1]);for(var S=d.slice(),A=0;A<4;A++)S[A]=Math.sign(S[A]);n="matrix(".concat(S.join(","),")")}var k=w[0]*r,x=w[1]*r;_.style.left="".concat(k,"px"),_.style.top="".concat(x,"px"),_.style.transformOrigin="".concat(-k,"px ").concat(-x,"px"),_.style.transform=n}else _.style.transform=h}}catch(e){b.e(e)}finally{b.f()}}}}catch(e){p.e(e)}finally{p.f()}u(this,e,te).call(this,f,c),f.hidden=!1}}]),e}();function te(e,t){if(t){var r,n=g(t);try{for(n.s();!(r=n.n()).done;){var a=b(r.value,2),o=a[0],i=a[1],s=e.querySelector('[data-annotation-id="'.concat(o,'"]'));if(s){var l=s.firstChild;"CANVAS"===l.nodeName?s.replaceChild(i,l):s.insertBefore(i,l)}}}catch(e){n.e(e)}finally{n.f()}t.clear()}}t.AnnotationLayer=ee},(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"CMYK_G",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["G",1-Math.min(1,.3*n+.59*o+.11*a+i)]}},{key:"G_CMYK",value:function(e){return["CMYK",0,0,0,1-r(e,1)[0]]}},{key:"G_RGB",value:function(e){var t=r(e,1)[0];return["RGB",t,t,t]}},{key:"G_HTML",value:function(e){var t=o(r(e,1)[0]);return"#".concat(t).concat(t).concat(t)}},{key:"RGB_G",value:function(e){var t=r(e,3);return["G",.3*t[0]+.59*t[1]+.11*t[2]]}},{key:"RGB_HTML",value:function(e){var t=r(e,3),n=t[0],a=t[1],i=t[2],s=o(n),l=o(a),u=o(i);return"#".concat(s).concat(l).concat(u)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["RGB",1-Math.min(1,n+i),1-Math.min(1,o+i),1-Math.min(1,a+i)]}},{key:"CMYK_HTML",value:function(e){return this.RGB_HTML(this.CMYK_RGB(e))}},{key:"RGB_CMYK",value:function(e){var t=r(e,3),n=1-t[0],a=1-t[1],o=1-t[2];return["CMYK",n,a,o,Math.min(n,a,o)]}}],(n=null)&&a(t.prototype,n),i&&a(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ColorConverters=i},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var n=r(1),a=r(159);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw o}}}}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,s;return t=e,s=[{key:"setupStorage",value:function(e,t,r,n,a){var o=n.getValue(t,{value:null});switch(r.name){case"textarea":if(null!==o.value&&(e.textContent=o.value),"print"===a)break;e.addEventListener("input",(function(e){n.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(o.value===r.attributes.xfaOn?e.setAttribute("checked",!0):o.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(function(e){n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==o.value&&e.setAttribute("value",o.value),"print"===a)break;e.addEventListener("input",(function(e){n.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==o.value){var s,l=i(r.children);try{for(l.s();!(s=l.n()).done;){var u=s.value;u.attributes.value===o.value&&(u.attributes.selected=!0)}}catch(e){l.e(e)}finally{l.f()}}e.addEventListener("input",(function(e){var r=e.target.options,a=-1===r.selectedIndex?"":r[r.selectedIndex].value;n.setValue(t,{value:a})}))}}},{key:"setAttributes",value:function(e){var t,r=e.html,a=e.element,i=e.storage,s=void 0===i?null:i,l=e.intent,u=e.linkService,c=a.attributes,f=r instanceof HTMLAnchorElement;"radio"===c.type&&(c.name="".concat(c.name,"-").concat(l));for(var d=0,h=Object.entries(c);d<h.length;d++){var p=o(h[d],2),v=p[0],y=p[1];if(null!=y&&"dataId"!==v)if("style"!==v)if("textContent"===v)r.textContent=y;else if("class"===v)y.length&&r.setAttribute(v,y.join(" "));else{if(f&&("href"===v||"newWindow"===v))continue;r.setAttribute(v,y)}else Object.assign(r.style,y)}f&&(u.addLinkAttributes||(0,n.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(t=u.addLinkAttributes)||void 0===t||t.call(u,r,c.href,c.newWindow)),s&&c.dataId&&this.setupStorage(r,c.dataId,a,s)}},{key:"render",value:function(e){var t=e.annotationStorage,r=e.linkService,n=e.xfaHtml,s=e.intent||"display",l=document.createElement(n.name);n.attributes&&this.setAttributes({html:l,element:n,intent:s,linkService:r});var u=[[n,-1,l]],c=e.div;if(c.appendChild(l),e.viewport){var f="matrix(".concat(e.viewport.transform.join(","),")");c.style.transform=f}"richText"!==s&&c.setAttribute("class","xfaLayer xfaFont");for(var d=[];u.length>0;){var h,p=o(u[u.length-1],3),v=p[0],y=p[1],m=p[2];if(y+1!==v.children.length){var g=v.children[++u[u.length-1][1]];if(null!==g){var b=g.name;if("#text"!==b){var _=void 0;if(_=null!=g&&null!==(h=g.attributes)&&void 0!==h&&h.xmlns?document.createElementNS(g.attributes.xmlns,b):document.createElement(b),m.appendChild(_),g.attributes&&this.setAttributes({html:_,element:g,storage:t,intent:s,linkService:r}),g.children&&g.children.length>0)u.push([g,-1,_]);else if(g.value){var w=document.createTextNode(g.value);a.XfaText.shouldBuildText(b)&&d.push(w),_.appendChild(w)}}else{var S=document.createTextNode(g.value);d.push(S),m.appendChild(S)}}}else u.pop()}var A,k=i(c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(k.s();!(A=k.n()).done;)A.value.setAttribute("readOnly",!0)}catch(e){k.e(e)}finally{k.f()}return{textDivs:d}}},{key:"update",value:function(e){var t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}],(r=null)&&u(t.prototype,r),s&&u(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.XfaLayer=c},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=function(e){var t=new y({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t};var n=r(1);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=30,l=.8,u=new Map,c=/^\s+$/g;function f(e,t,r,a){var o=document.createElement("span"),i=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL};e._textDivs.push(o);var f=n.Util.transform(e._viewport.transform,t.transform),d=Math.atan2(f[1],f[0]),h=r[t.fontName];h.vertical&&(d+=Math.PI/2);var p,v,y=Math.hypot(f[2],f[3]),m=y*function(e,t){var r=u.get(e);if(r)return r;t.save(),t.font="".concat(s,"px ").concat(e);var n=t.measureText(""),a=n.fontBoundingBoxAscent,o=Math.abs(n.fontBoundingBoxDescent);if(a){t.restore();var i=a/(a+o);return u.set(e,i),i}t.strokeStyle="red",t.clearRect(0,0,s,s),t.strokeText("g",0,0);var c=t.getImageData(0,0,s,s).data;o=0;for(var f=c.length-1-3;f>=0;f-=4)if(c[f]>0){o=Math.ceil(f/4/s);break}t.clearRect(0,0,s,s),t.strokeText("A",0,s),a=0;for(var d=0,h=(c=t.getImageData(0,0,s,s).data).length;d<h;d+=4)if(c[d]>0){a=s-Math.floor(d/4/s);break}if(t.restore(),a){var p=a/(a+o);return u.set(e,p),p}return u.set(e,l),l}(h.fontFamily,a);0===d?(p=f[4],v=f[5]-m):(p=f[4]+m*Math.sin(d),v=f[5]-m*Math.cos(d)),o.style.left="".concat(p,"px"),o.style.top="".concat(v,"px"),o.style.fontSize="".concat(y,"px"),o.style.fontFamily=h.fontFamily,o.setAttribute("role","presentation"),o.textContent=t.str,o.dir=t.dir,e._fontInspectorEnabled&&(o.dataset.fontName=t.fontName),0!==d&&(i.angle=d*(180/Math.PI));var g=!1;if(t.str.length>1||e._enhanceTextSelection&&c.test(t.str))g=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var b=Math.abs(t.transform[0]),_=Math.abs(t.transform[3]);b!==_&&Math.max(b,_)/Math.min(b,_)>1.5&&(g=!0)}if(g&&(h.vertical?i.canvasWidth=t.height*e._viewport.scale:i.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(o,i),e._textContentStream&&e._layoutText(o),e._enhanceTextSelection&&i.hasText){var w=1,S=0;0!==d&&(w=Math.cos(d),S=Math.sin(d));var A,k,x=(h.vertical?t.height:t.width)*e._viewport.scale,P=y;0!==d?(A=[w,S,-S,w,p,v],k=n.Util.getAxialAlignedBoundingBox([0,0,x,P],A)):k=[p,v,p+x,v+P],e._bounds.push({left:k[0],top:k[1],right:k[2],bottom:k[3],div:o,size:[x,P],m:A})}}function d(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var a=0;a<n;a++)e._layoutText(t[a]);e._renderingDone=!0,r.resolve()}}function h(e,t,r){for(var n=0,a=0;a<r;a++){var o=e[t++];o>0&&(n=n?Math.min(o,n):o)}return n}function p(e){for(var t=e._bounds,r=e._viewport,a=function(e,t,r){var n=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));v(e,n);var a,i=new Array(r.length),s=o(n);try{for(s.s();!(a=s.n()).done;){var l=a.value,u=l.index;i[u]={left:l.x1New,top:0,right:l.x2New,bottom:0}}}catch(e){s.e(e)}finally{s.f()}r.map((function(t,r){var a=i[r],o=n[r];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0})),v(t,n);var c,f=o(n);try{for(f.s();!(c=f.n()).done;){var d=c.value,h=d.index;i[h].top=d.x1New,i[h].bottom=d.x2New}}catch(e){f.e(e)}finally{f.f()}return i}(r.width,r.height,t),i=0;i<a.length;i++){var s=t[i].div,l=e._textDivProperties.get(s);if(0!==l.angle){for(var u=a[i],c=t[i],f=c.m,d=f[0],p=f[1],y=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],m=new Float64Array(64),g=0,b=y.length;g<b;g++){var _=n.Util.applyTransform(y[g],f);m[g+0]=d&&(u.left-_[0])/d,m[g+4]=p&&(u.top-_[1])/p,m[g+8]=d&&(u.right-_[0])/d,m[g+12]=p&&(u.bottom-_[1])/p,m[g+16]=p&&(u.left-_[0])/-p,m[g+20]=d&&(u.top-_[1])/d,m[g+24]=p&&(u.right-_[0])/-p,m[g+28]=d&&(u.bottom-_[1])/d,m[g+32]=d&&(u.left-_[0])/-d,m[g+36]=p&&(u.top-_[1])/-p,m[g+40]=d&&(u.right-_[0])/-d,m[g+44]=p&&(u.bottom-_[1])/-p,m[g+48]=p&&(u.left-_[0])/p,m[g+52]=d&&(u.top-_[1])/-d,m[g+56]=p&&(u.right-_[0])/p,m[g+60]=d&&(u.bottom-_[1])/-d}var w=1+Math.min(Math.abs(d),Math.abs(p));l.paddingLeft=h(m,32,16)/w,l.paddingTop=h(m,48,16)/w,l.paddingRight=h(m,0,16)/w,l.paddingBottom=h(m,16,16)/w,e._textDivProperties.set(s,l)}else l.paddingLeft=t[i].left-a[i].left,l.paddingTop=t[i].top-a[i].top,l.paddingRight=a[i].right-t[i].right,l.paddingBottom=a[i].bottom-t[i].bottom,e._textDivProperties.set(s,l)}}function v(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var r,n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}],a=o(t);try{for(a.s();!(r=a.n()).done;){for(var i=r.value,s=0;s<n.length&&n[s].end<=i.y1;)s++;for(var l=n.length-1;l>=0&&n[l].start>=i.y2;)l--;var u=void 0,c=void 0,f=void 0,d=void 0,h=-1/0;for(f=s;f<=l;f++){c=(u=n[f]).boundary;var p=void 0;(p=c.x2>i.x1?c.index>i.index?c.x1New:i.x1:void 0===c.x2New?(c.x2+i.x1)/2:c.x2New)>h&&(h=p)}for(i.x1New=h,f=s;f<=l;f++)void 0===(c=(u=n[f]).boundary).x2New?c.x2>i.x1?c.index>i.index&&(c.x2New=c.x2):c.x2New=h:c.x2New>h&&(c.x2New=Math.max(h,c.x2));var v=[],y=null;for(f=s;f<=l;f++){var m=(c=(u=n[f]).boundary).x2>i.x2?c:i;y===m?v[v.length-1].end=u.end:(v.push({start:u.start,end:u.end,boundary:m}),y=m)}for(n[s].start<i.y1&&(v[0].start=i.y1,v.unshift({start:n[s].start,end:i.y1,boundary:n[s].boundary})),i.y2<n[l].end&&(v[v.length-1].end=i.y2,v.push({start:i.y2,end:n[l].end,boundary:n[l].boundary})),f=s;f<=l;f++)if(void 0===(c=(u=n[f]).boundary).x2New){var g=!1;for(d=s-1;!g&&d>=0&&n[d].start>=c.y1;d--)g=n[d].boundary===c;for(d=l+1;!g&&d<n.length&&n[d].end<=c.y2;d++)g=n[d].boundary===c;for(d=0;!g&&d<v.length;d++)g=v[d].boundary===c;g||(c.x2New=h)}Array.prototype.splice.apply(n,[s,l-s+1].concat(v))}}catch(e){a.e(e)}finally{a.f()}for(var b=0,_=n;b<_.length;b++){var w=_[b].boundary;void 0===w.x2New&&(w.x2New=Math.max(e,w.x2))}}var y=function(){function e(t){var r,a=this,o=t.textContent,i=t.textContentStream,s=t.container,l=t.viewport,u=t.textDivs,c=t.textContentItemsStr,f=t.enhanceTextSelection;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._textContent=o,this._textContentStream=i,this._container=s,this._document=s.ownerDocument,this._viewport=l,this._textDivs=u||[],this._textContentItemsStr=c||[],this._enhanceTextSelection=!!f,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,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally((function(){a._enhanceTextSelection||(a._textDivProperties=null),a._layoutTextCtx&&(a._layoutTextCtx.canvas.width=0,a._layoutTextCtx.canvas.height=0,a._layoutTextCtx=null)})).catch((function(){}))}var t,r,o;return t=e,r=[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")).catch((function(){})),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}},{key:"_processItems",value:function(e,t){for(var r=0,n=e.length;r<n;r++)if(void 0!==e[r].str)this._textContentItemsStr.push(e[r].str),f(this,e[r],t,this._layoutTextCtx);else if("beginMarkedContentProps"===e[r].type||"beginMarkedContent"===e[r].type){var a=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==e[r].id&&this._container.setAttribute("id","".concat(e[r].id)),a.appendChild(this._container)}else"endMarkedContent"===e[r].type&&(this._container=this._container.parentNode)}},{key:"_layoutText",value:function(e){var t=this._textDivProperties.get(e),r="";if(0!==t.canvasWidth&&t.hasText){var n=e.style,a=n.fontSize,o=n.fontFamily;a===this._layoutTextLastFontSize&&o===this._layoutTextLastFontFamily||(this._layoutTextCtx.font="".concat(a," ").concat(o),this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=o);var i=this._layoutTextCtx.measureText(e.textContent).width;if(i>0){var s=t.canvasWidth/i;this._enhanceTextSelection&&(t.scale=s),r="scaleX(".concat(s,")")}}if(0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(r)),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),t.hasText&&this._container.appendChild(e),t.hasEOL){var l=document.createElement("br");l.setAttribute("role","presentation"),this._container.appendChild(l)}}},{key:"_render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(0,n.createPromiseCapability)(),a=Object.create(null),o=this._document.createElement("canvas");if(o.height=o.width=s,o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var i=this._textContent.items,l=this._textContent.styles;this._processItems(i,l),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function t(){e._reader.read().then((function(n){var o=n.value;n.done?r.resolve():(Object.assign(a,o.styles),e._processItems(o.items,a),t())}),r.reject)}()}r.promise.then((function(){a=null,t?e._renderTimer=setTimeout((function(){d(e),e._renderTimer=null}),t):d(e)}),this._capability.reject)}},{key:"expandTextDivs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(p(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n<a;n++){var o=this._textDivs[n],i=this._textDivProperties.get(o);i.hasText&&(e?(t.length=0,r.length=0,i.originalTransform&&t.push(i.originalTransform),i.paddingTop>0?(r.push("".concat(i.paddingTop,"px")),t.push("translateY(".concat(-i.paddingTop,"px)"))):r.push(0),i.paddingRight>0?r.push("".concat(i.paddingRight/i.scale,"px")):r.push(0),i.paddingBottom>0?r.push("".concat(i.paddingBottom,"px")):r.push(0),i.paddingLeft>0?(r.push("".concat(i.paddingLeft/i.scale,"px")),t.push("translateX(".concat(-i.paddingLeft/i.scale,"px)"))):r.push(0),o.style.padding=r.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=i.originalTransform))}}}}],r&&a(t.prototype,r),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(1),a=r(147),o=r(3);function i(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=d((function e(){h(this,e),(0,n.unreachable)("Not implemented: SVGGraphics")}));t.SVGGraphics=p;var v=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)},y=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(v(e[0])," ").concat(v(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(v(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(v(e[4])," ").concat(v(e[5]),")");return"matrix(".concat(v(e[0])," ").concat(v(e[1])," ").concat(v(e[2])," ").concat(v(e[3])," ").concat(v(e[4])," ")+"".concat(v(e[5]),")")},m={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},g=["butt","round","square"],b=["miter","round","bevel"],_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!r)return URL.createObjectURL(new Blob([e],{type:t}));for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),o=0,i=e.length;o<i;o+=3){var s=255&e[o],l=255&e[o+1],u=255&e[o+2];a+=n[s>>2]+n[(3&s)<<4|l>>4]+n[o+1<i?(15&l)<<2|u>>6:64]+n[o+2<i?63&u:64]}return a},w=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256),r=0;r<256;r++){for(var a=r,i=0;i<8;i++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;t[r]=a}function s(e,r,n,a){var o=a,i=r.length;n[o]=i>>24&255,n[o+1]=i>>16&255,n[o+2]=i>>8&255,n[o+3]=255&i,n[o+=4]=255&e.charCodeAt(0),n[o+1]=255&e.charCodeAt(1),n[o+2]=255&e.charCodeAt(2),n[o+3]=255&e.charCodeAt(3),o+=4,n.set(r,o);var s=function(e,r,n){for(var a=-1,o=r;o<n;o++){var i=255&(a^e[o]);a=a>>>8^t[i]}return-1^a}(n,a+4,o+=r.length);n[o]=s>>24&255,n[o+1]=s>>16&255,n[o+2]=s>>8&255,n[o+3]=255&s}function l(e){var t=e.length,r=65535,n=Math.ceil(t/r),a=new Uint8Array(2+t+5*n+4),o=0;a[o++]=120,a[o++]=156;for(var i=0;t>r;)a[o++]=0,a[o++]=255,a[o++]=255,a[o++]=0,a[o++]=0,a.set(e.subarray(i,i+r),o),o+=r,i+=r,t-=r;a[o++]=1,a[o++]=255&t,a[o++]=t>>8&255,a[o++]=255&~t,a[o++]=(65535&~t)>>8&255,a.set(e.subarray(i),o),o+=e.length-i;var s=function(e,t,r){for(var n=1,a=0,o=t;o<r;++o)a=(a+(n=(n+(255&e[o]))%65521))%65521;return a<<16|n}(e,0,e.length);return a[o++]=s>>24&255,a[o++]=s>>16&255,a[o++]=s>>8&255,a[o++]=255&s,a}function u(t,r,a,i){var u,c,f,d=t.width,h=t.height,p=t.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:c=0,u=1,f=d+7>>3;break;case n.ImageKind.RGB_24BPP:c=2,u=8,f=3*d;break;case n.ImageKind.RGBA_32BPP:c=6,u=8,f=4*d;break;default:throw new Error("invalid format")}for(var v=new Uint8Array((1+f)*h),y=0,m=0,g=0;g<h;++g)v[y++]=0,v.set(p.subarray(m,m+f),y),m+=f,y+=f;if(r===n.ImageKind.GRAYSCALE_1BPP&&i){y=0;for(var b=0;b<h;b++){y++;for(var w=0;w<f;w++)v[y++]^=255}}var S=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,h>>24&255,h>>16&255,h>>8&255,255&h,u,c,0,0,0]),A=function(e){if(!o.isNodeJS)return l(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var r=__webpack_require__(324).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return l(e)}(v),k=e.length+36+S.length+A.length,x=new Uint8Array(k),P=0;return x.set(e,P),s("IHDR",S,x,P+=e.length),s("IDATA",A,x,P+=12+S.length),P+=12+A.length,s("IEND",new Uint8Array(0),x,P),_(x,"image/png",a)}return function(e,t,r){return u(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),S=function(){function e(){h(this,e),this.fontSizeScale=1,this.fontWeight=m.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=m.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=""}return d(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),A=0,k=0,x=0;t.SVGGraphics=p=function(){function e(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var i in h(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new S,this.transformMatrix=n.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=!!o,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[i]]=i}return d(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,a=e.argsArray,o=0,i=r.length;o<i;o++)if(r[o]===n.OPS.dependency){var s,u=l(a[o]);try{var c=function(){var e=s.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise((function(t){r.get(e,t)}));t.current.dependencies.push(n)};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,a,o,i){var s=[e,t,r,a,o,i];this.transformMatrix=n.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var a=this._initialize(t);return this.loadDependencies(e).then((function(){return r.transformMatrix=n.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),a}))}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,a=[],o=0,i=n.length;o<i;o++){var s=n[o];a.push({fnId:s,fn:t[s],args:r[o]})}return function(e){var t,r=[],n=[],a=l(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;"save"!==o.fn?"restore"===o.fn?r=n.pop():r.push(o):(r.push({fnId:92,fn:"group",items:[]}),n.push(r),r=r[r.length-1].items)}}catch(e){a.e(e)}finally{a.f()}return r}(a)}},{key:"executeOpTree",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,o=a.fn,i=a.fnId,s=a.args;switch(0|i){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(s);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case n.OPS.setFont:this.setFont(s);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(s[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(s[0],s[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case n.OPS.setHScale:this.setHScale(s[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.setTextRise:this.setTextRise(s[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case n.OPS.setLineWidth:this.setLineWidth(s[0]);break;case n.OPS.setLineJoin:this.setLineJoin(s[0]);break;case n.OPS.setLineCap:this.setLineCap(s[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case n.OPS.setFillColorN:this.setFillColorN(s);break;case n.OPS.shadingFill:this.shadingFill(s[0]);break;case n.OPS.setDash:this.setDash(s[0],s[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case n.OPS.setFlatness:this.setFlatness(s[0]);break;case n.OPS.setGState:this.setGState(s[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.constructPath:this.constructPath(s[0],s[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,n.warn)("Unimplemented operator ".concat(o))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){var i=this.current;i.textMatrix=i.lineMatrix=[e,t,r,n,a,o],i.textMatrixScale=Math.hypot(e,t),i.x=i.lineX=0,i.y=i.lineY=0,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size","".concat(v(i.fontSize),"px")),i.tspan.setAttributeNS(null,"y",v(-i.y)),i.txtElement=this.svgFactory.createElement("svg:text"),i.txtElement.appendChild(i.tspan)}},{key:"beginText",value:function(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=n.IDENTITY_MATRIX,e.lineMatrix=n.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(v(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",v(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,a=t.fontSize;if(0!==a){var o,i=t.fontSizeScale,s=t.charSpacing,u=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=r.vertical,h=d?1:-1,p=r.defaultVMetrics,g=a*t.fontMatrix[0],b=0,_=l(e);try{for(_.s();!(o=_.n()).done;){var w=o.value;if(null!==w)if("number"!=typeof w){var S=(w.isSpace?u:0)+s,A=w.fontChar,k=void 0,x=void 0,P=w.width;if(d){var C=void 0,T=w.vmetric||p;C=-(C=w.vmetric?T[1]:.5*P)*g;var R=T[2]*g;P=T?-T[0]:P,k=C/i,x=(b+R)/i}else k=b/i,x=0;(w.isInFont||r.missingFile)&&(t.xcoords.push(t.x+k),d&&t.ycoords.push(-t.y+x),t.tspan.textContent+=A),b+=d?P*g-S*c:P*g+S*c}else b+=h*w*a/1e3;else b+=c*u}}catch(e){_.e(e)}finally{_.f()}t.tspan.setAttributeNS(null,"x",t.xcoords.map(v).join(" ")),d?t.tspan.setAttributeNS(null,"y",t.ycoords.map(v).join(" ")):t.tspan.setAttributeNS(null,"y",v(-t.y)),d?t.y-=b:t.x+=b*f,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(v(t.fontSize),"px")),t.fontStyle!==m.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==m.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var E=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;if(E===n.TextRenderingMode.FILL||E===n.TextRenderingMode.FILL_STROKE?(t.fillColor!==m.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),E===n.TextRenderingMode.STROKE||E===n.TextRenderingMode.FILL_STROKE){var O=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,O)}var F=t.textMatrix;0!==t.textRise&&((F=F.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(y(F)," scale(").concat(v(f),", -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=_(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),a=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX;var o="normal";r.black?o="900":r.bold&&(o="bold");var i=r.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=r.loadedName,t.fontWeight=o,t.fontStyle=i,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",v(-t.y)),t.xcoords=[],t.ycoords=[]}},{key:"endText",value:function(){var e,t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=g[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=b[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=n.Util.makeHexColor(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,a=n.Util.inverseTransform(this.transformMatrix),o=n.Util.applyTransform([0,0],a),i=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),l=n.Util.applyTransform([t,r],a),u=Math.min(o[0],i[0],s[0],l[0]),c=Math.min(o[1],i[1],s[1],l[1]),f=Math.max(o[0],i[0],s[0],l[0]),d=Math.max(o[1],i[1],s[1],l[1]),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",u),h.setAttributeNS(null,"y",c),h.setAttributeNS(null,"width",f-u),h.setAttributeNS(null,"height",d-c),h.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(h)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],a=e[3]||n.IDENTITY_MATRIX,o=s(e[4],4),l=o[0],u=o[1],c=o[2],f=o[3],d=e[5],h=e[6],p=e[7],v="shading".concat(x++),y=s(n.Util.normalizeRect([].concat(i(n.Util.applyTransform([l,u],a)),i(n.Util.applyTransform([c,f],a)))),4),m=y[0],g=y[1],b=y[2],_=y[3],w=s(n.Util.singularValueDecompose2dScale(a),2),S=d*w[0],A=h*w[1],k=this.svgFactory.createElement("svg:pattern");k.setAttributeNS(null,"id",v),k.setAttributeNS(null,"patternUnits","userSpaceOnUse"),k.setAttributeNS(null,"width",S),k.setAttributeNS(null,"height",A),k.setAttributeNS(null,"x","".concat(m)),k.setAttributeNS(null,"y","".concat(g));var P=this.svg,C=this.transformMatrix,T=this.current.fillColor,R=this.current.strokeColor,E=this.svgFactory.create(b-m,_-g);if(this.svg=E,this.transformMatrix=a,2===p){var O=n.Util.makeHexColor.apply(n.Util,i(t));this.current.fillColor=O,this.current.strokeColor=O}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=C,this.current.fillColor=T,this.current.strokeColor=R,k.appendChild(E.childNodes[0]),this.defs.appendChild(k),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":var t,r="shading".concat(x++),a=e[3];switch(e[1]){case"axial":var o=e[4],i=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",o[0]),t.setAttributeNS(null,"y1",o[1]),t.setAttributeNS(null,"x2",i[0]),t.setAttributeNS(null,"y2",i[1]);break;case"radial":var s=e[4],u=e[5],c=e[6],f=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",f),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",c);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var d,h=l(a);try{for(h.s();!(d=h.n()).done;){var p=d.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",p[0]),v.setAttributeNS(null,"stop-color",p[1]),t.appendChild(v)}}catch(e){h.e(e)}finally{h.f()}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r,a=this.current,o=a.x,i=a.y,s=[],u=0,c=l(e);try{for(c.s();!(r=c.n()).done;)switch(0|r.value){case n.OPS.rectangle:o=t[u++],i=t[u++];var f=t[u++],d=t[u++],h=o+f,p=i+d;s.push("M",v(o),v(i),"L",v(h),v(i),"L",v(h),v(p),"L",v(o),v(p),"Z");break;case n.OPS.moveTo:o=t[u++],i=t[u++],s.push("M",v(o),v(i));break;case n.OPS.lineTo:o=t[u++],i=t[u++],s.push("L",v(o),v(i));break;case n.OPS.curveTo:o=t[u+4],i=t[u+5],s.push("C",v(t[u]),v(t[u+1]),v(t[u+2]),v(t[u+3]),v(o),v(i)),u+=6;break;case n.OPS.curveTo2:s.push("C",v(o),v(i),v(t[u]),v(t[u+1]),v(t[u+2]),v(t[u+3])),o=t[u+2],i=t[u+3],u+=4;break;case n.OPS.curveTo3:o=t[u+2],i=t[u+3],s.push("C",v(t[u]),v(t[u+1]),v(o),v(i),v(o),v(i)),u+=4;break;case n.OPS.closePath:s.push("Z")}}catch(e){c.e(e)}finally{c.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(o,i)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(A++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",y(this.transformMatrix));var n=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),this.defs.appendChild(r),e.activeClipUrl){e.clipGroup=null;var a,o=l(this.extraStack);try{for(o.s();!(a=o.n()).done;)a.value.clipGroup=null}catch(e){o.e(e)}finally{o.f()}r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=s(t.value,2),o=a[0],i=a[1];switch(o){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(o))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",v(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",v(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(v).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",v(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,a=w(e,this.forceDataSchema,!!t),o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",v(r)),o.setAttributeNS(null,"height",v(n)),this.current.element=o,this.clip("nonzero");var i=this.svgFactory.createElement("svg:image");i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",v(-n)),i.setAttributeNS(null,"width",v(r)+"px"),i.setAttributeNS(null,"height",v(n)+"px"),i.setAttributeNS(null,"transform","scale(".concat(v(1/r)," ").concat(v(-1/n),")")),t?t.appendChild(i):this._ensureTransformGroup().appendChild(i)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,a=t.fillColor;t.maskId="mask".concat(k++);var o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",t.maskId);var i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",v(r)),i.setAttributeNS(null,"height",v(n)),i.setAttributeNS(null,"fill",a),i.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(o),this._ensureTransformGroup().appendChild(i),this.paintInlineImageXObject(e,o)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=t[3]-t[1],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",v(r)),a.setAttributeNS(null,"height",v(n)),this.current.element=a,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",y(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a,o=(a=r(145))&&a.__esModule?a:{default:a},i=r(1),s=r(166);function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var o=f(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){d(o,n,a,i,s,"next",e)}function s(e){d(o,n,a,i,s,"throw",e)}i(void 0)}))}}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var b=__webpack_require__(767),_=__webpack_require__(251),w=__webpack_require__(677),S=__webpack_require__(543),A=/^file:\/\/\/[a-zA-Z]:\//,k=function(){function e(t){var r,n;y(this,e),this.source=t,this.url=(r=t.url,"file:"===(n=S.parse(r)).protocol||n.host?n:/^[a-z]:[/\\]/i.test(r)?S.parse("file:///".concat(r)):(n.host||(n.protocol="file:"),n)),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=[]}return g(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new E(this):new T(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new O(this,e,t):new R(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=p(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFNodeStream=k;var x=function(){function e(t){y(this,e),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,i.createPromiseCapability)(),this._headersCapability=(0,i.createPromiseCapability)()}var t;return g(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=h(o.default.mark((function e(){var t,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}(),P=function(){function e(t){y(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}var t;return g(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=h(o.default.mark((function e(){var t,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}();function C(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var T=function(e){l(r,e);var t=c(r);function r(e){var n;y(this,r);var a=function(t){if(404===t.statusCode){var r=new i.MissingPDFException('Missing PDF "'.concat(n._url,'".'));return n._storedError=r,void n._headersCapability.reject(r)}n._headersCapability.resolve(),n._setReadableStream(t);var a=function(e){return n._readableStream.headers[e.toLowerCase()]},o=(0,s.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:e.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),l=o.allowRangeRequests,u=o.suggestedLength;n._isRangeSupported=l,n._contentLength=u||n._contentLength,n._filename=(0,s.extractFilenameFromHeader)(a)};return(n=t.call(this,e))._request=null,"http:"===n._url.protocol?n._request=_.request(C(n._url,e.httpHeaders),a):n._request=w.request(C(n._url,e.httpHeaders),a),n._request.on("error",(function(e){n._storedError=e,n._headersCapability.reject(e)})),n._request.end(),n}return g(r)}(x),R=function(e){l(r,e);var t=c(r);function r(e,n,a){var o;for(var s in y(this,r),(o=t.call(this,e))._httpHeaders={},e.httpHeaders){var l=e.httpHeaders[s];void 0!==l&&(o._httpHeaders[s]=l)}o._httpHeaders.Range="bytes=".concat(n,"-").concat(a-1);var u=function(e){if(404!==e.statusCode)o._setReadableStream(e);else{var t=new i.MissingPDFException('Missing PDF "'.concat(o._url,'".'));o._storedError=t}};return o._request=null,"http:"===o._url.protocol?o._request=_.request(C(o._url,o._httpHeaders),u):o._request=w.request(C(o._url,o._httpHeaders),u),o._request.on("error",(function(e){o._storedError=e})),o._request.end(),o}return g(r)}(P),E=function(e){l(r,e);var t=c(r);function r(e){var n;y(this,r),n=t.call(this,e);var a=decodeURIComponent(n._url.path);return A.test(n._url.href)&&(a=a.replace(/^\//,"")),b.lstat(a,(function(e,t){if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException('Missing PDF "'.concat(a,'".'))),n._storedError=e,void n._headersCapability.reject(e);n._contentLength=t.size,n._setReadableStream(b.createReadStream(a)),n._headersCapability.resolve()})),n}return g(r)}(x),O=function(e){l(r,e);var t=c(r);function r(e,n,a){var o;y(this,r),o=t.call(this,e);var i=decodeURIComponent(o._url.path);return A.test(o._url.href)&&(i=i.replace(/^\//,"")),o._setReadableStream(b.createReadStream(i,{start:n,end:a-1})),o}return g(r)}(P)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var r=(0,a.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(e){}if((0,o.isPdfFile)(r))return r}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,a=e.rangeChunkSize,o=e.disableRange;(0,n.assert)(a>0,"Range chunk size must be larger than zero");var i={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(i.suggestedLength=s,s<=2*a||o||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(1),a=r(167),o=r(147)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,r=s("filename\\*","i").exec(e);if(r){var o=c(r=r[1]);return u(o=d(o=f(o=unescape(o))))}if(r=function(e){for(var t,r=[],n=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=n.exec(e));){var o=a(t,4),i=o[1],l=o[2],u=o[3];if((i=parseInt(i,10))in r){if(0===i)break}else r[i]=[l,u]}for(var d=[],h=0;h<r.length&&h in r;++h){var p=a(r[h],2),v=p[0],y=p[1];y=c(y),v&&(y=unescape(y),0===h&&(y=f(y))),d.push(y)}return d.join("")}(e))return u(d(r));if(r=s("filename","i").exec(e)){var i=c(r=r[1]);return u(i=d(i))}function s(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function l(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var a=new TextDecoder(e,{fatal:!0}),o=(0,n.stringToBytes)(r);r=a.decode(o),t=!1}catch(e){}}return r}function u(e){return t&&/[\x80-\xff]/.test(e)&&(e=l("utf-8",e),t&&(e=l("iso-8859-1",e))),e}function c(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function f(e){var t=e.indexOf("'");return-1===t?e:l(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function d(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,n){if("q"===r||"Q"===r)return l(t,n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{n=atob(n)}catch(e){}return l(t,n)}))}return""};var n=r(1);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1),i=r(166);function s(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),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(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return h(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var a in r)n[a]=r[a];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};for(var a in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var o=this.httpHeaders[a];void 0!==o&&t.setRequestHeader(a,o)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=206):n.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r,n=this.pendingRequests[e];n&&(null===(r=n.onProgress)||void 0===r||r.call(n,t))}},{key:"onStateChange",value:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp){var a;null===(a=r.onError)||void 0===a||a.call(r,n.status)}else{var i=n.status||200;if(200===i&&206===r.expectedStatus||i===r.expectedStatus){var s=function(e){var t=e.response;return"string"!=typeof t?t:(0,o.stringToBytes)(t).buffer}(n);if(206===i){var l=n.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);r.onDone({begin:parseInt(u[1],10),chunk:s})}else if(s)r.onDone({begin:0,chunk:s});else{var c;null===(c=r.onError)||void 0===c||c.call(r,n.status)}}else{var f;null===(f=r.onError)||void 0===f||f.call(r,n.status)}}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),v=function(){function e(t){f(this,e),this._source=t,this._manager=new p(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new y(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new m(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var r,n=u(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(e)}catch(e){n.e(e)}finally{n.f()}}}]),e}();t.PDFNetworkStream=v;var y=function(){function e(t,r){f(this,e),this._manager=t;var n={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(n),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}var t;return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,o=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(e){this._storedError=(0,i.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e);var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),e}(),m=function(){function e(t,r,n){f(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}var t;return h(e,[{key:"_close",value:function(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;var r,n=u(this._requests);try{for(n.s();!(r=n.n()).done;)r.value.resolve({value:void 0,done:!0})}catch(e){n.e(e)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(e){this._storedError=(0,i.createResponseStatusError)(e,this._url);var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){e.next=6;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 6:if(!this._done){e.next=8;break}return e.abrupt("return",{value:void 0,done:!0});case 8:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0;var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1),i=r(166);function s(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return{method:"GET",headers:e,signal:null==r?void 0:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function v(e){var t=new Headers;for(var r in e){var n=e[r];void 0!==n&&t.append(r,n)}return t}var y=function(){function e(t){f(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new m(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new g(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=u(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFFetchStream=y;var m=function(){function e(t){var r=this;f(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,o.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=v(this._stream.httpHeaders);var a=n.url;fetch(a,p(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,a);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),s=n.allowRangeRequests,l=n.suggestedLength;r._isRangeSupported=s,r._contentLength=l||r._contentLength,r._filename=(0,i.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new o.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}var t;return h(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}(),g=function(){function e(t,r,n){var a=this;f(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,o.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=v(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var l=s.url;fetch(l,p(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);a._readCapability.resolve(),a._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}var t;return h(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e](r,r.exports,__w_pdfjs_require__),r.loaded=!0,r.exports}__w_pdfjs_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __nested_webpack_exports__={};return(()=>{"use strict";var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(144),n=__w_pdfjs_require__(147),a=__w_pdfjs_require__(160),o=__w_pdfjs_require__(154),i=__w_pdfjs_require__(3),s=__w_pdfjs_require__(163),l=__w_pdfjs_require__(164),u=__w_pdfjs_require__(162);if(i.isNodeJS){var c=__w_pdfjs_require__(165).PDFNodeStream;(0,r.setPDFNetworkStreamFactory)((function(e){return new c(e)}))}else{var f=__w_pdfjs_require__(168).PDFNetworkStream,d=__w_pdfjs_require__(169).PDFFetchStream;(0,r.setPDFNetworkStreamFactory)((function(e){return(0,n.isValidFetchUrl)(e.url)?new d(e):new f(e)}))}})(),__nested_webpack_exports__})()},module.exports=factory()},320:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(243);function s(e){var t=new Map;return e.forEach((function(e){t.set(e,(t.get(e)||0)+1)})),t}t.default=function(e,t){var r,l,u=e.length<=t.length?e:t,c=e.length>t.length?e:t,f=s(u),d=s(c),h=function(e,t){var r=a([],n(d.keys()),!1).find((function(t){return i.Equal.ValEqual(t,e)}));if(!r||r&&d.get(r)!==t)return{value:!1}};try{for(var p=o(f.entries()),v=p.next();!v.done;v=p.next()){var y=n(v.value,2),m=h(y[0],y[1]);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{v&&!v.done&&(l=p.return)&&l.call(p)}finally{if(r)throw r.error}}return!0}},442:function(e,t){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var n="+",a="-",o="|",i=" ",s="";function l(e){var t,n,a=0;try{for(var o=r(e),i=o.next();!i.done;i=o.next()){var s=i.value;a+=s.charCodeAt(0)<128&&s.charCodeAt(0)>=0?1:2}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a}function u(e,t){void 0===t&&(t=!1);var r=e.length,o="";return e.forEach((function(e,i){o+=n+function(e){for(var t="",r=0;r<=e;r++)t+=a;return t}(e+1),o+=i===r-1?n+(t?s:"\n"):s})),o}function c(e){for(var t="",r=0;r<=e;r++)t+=i;return t}t.default=function(e,t){var n=e.length,a=function(e){var t,n,a=Object.keys(e[0]).map((function(e){return+e}));try{for(var o=r(e),i=o.next();!i.done;i=o.next())i.value.forEach((function(e,t){var r=l(e.toString());a[t]=Math.max(r,a[t])}))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a}(e),f="";e.forEach((function(e,t){t<=1&&(f+=u(a)),f+=function(e,t){var r=e.length,n="";return e.forEach((function(e,a){var u=t[a],f="";isNaN(+u)?f+=i+(null!=u?u:"")+c(e-l((null!=u?u:"").toString())):f+=c(e-l(u.toString()))+u+i,n+=o+f,n+=a===r-1?o+"\n":s})),n}(a,e),t===n-1&&(f+=u(a,!0))})),console.log(f),t&&t(f)}},84:(e,t)=>{"use strict";function r(e,t){void 0===t&&(t={});var r,n,a=t.benchmark,o=t.textType,i=void 0===o?"lowercase":o,s={lowercase:["零","一","二","三","四","五","六","七","八","九"],uppercase:["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"]},l={lowercase:["","十","百","千"],uppercase:["","拾","佰","仟"]},u={lowercase:["","万","亿","兆"],uppercase:["","万","亿","兆"]},c="";if(a&&(e=+(e*=a).toFixed(4)),e>1e16)return"超出转换范围";var f=e.toString();if(r=f.split(".")[0],n=f.split(".")[1],r)for(var d=0,h=0;h<r.length;h++){var p=r.length-h-1,v=+r[h],y=Math.floor(p/4),m=p%(4*(0===y?1:y));0==+r[h]?d++:(d>0&&(c+=s[i][0],d=0),c+="".concat(s[i][v]+l[i][m]),p%4==0&&(c+=u[i][y]))}if(n){c+="点";for(h=0;h<n.length;h++){var g=+n[h];0==+n[h]?c+="".concat(s[i][0]):c+="".concat(s[i][g])}}return""===c&&(c+=s[i][0]),c}Object.defineProperty(t,"__esModule",{value:!0}),t.toChineseNum=void 0,t.toChineseNum=r;var n={toChineseNum:r};t.default=n},819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(243);t.default=function e(t){if("date"===(0,n.Typeof)(t))return new Date(t.toISOString());if("formdata"===(0,n.Typeof)(t)){var r=t,a=new FormData;return r.forEach((function(e,t){a.append(t,e)})),a}if("map"===(0,n.Typeof)(t)){r=t;var o=new Map;return r.forEach((function(e,t){o.set(t,e)})),o}if("set"===(0,n.Typeof)(t)){r=t;var i=new Set;return r.forEach((function(e){i.add(e)})),i}if(Array.isArray(t))return t.map((function(t){return"object"==typeof t?e(t):t}));if(t&&"object"===(0,n.Typeof)(t)){var s=t,l={};return Object.keys(s).forEach((function(t){var r=s[t];l[t]="object"==typeof r?e(r):r})),l}return t}},769:(e,t)=>{"use strict";function r(e,t){if(e.startsWith("http")){var r=document.createElement("a");r.href=e,r.download=decodeURI(t||""),document.body.appendChild(r),r.click(),document.body.removeChild(r)}else!function(e,t){fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){n(e,t)}))}(e,t)}function n(e,t){if("string"!=typeof e){var n=new Blob([e]),a=document.createElement("a"),o=window.URL.createObjectURL(n);a.href=o,a.download=decodeURI(t||""),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}else r(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjEqual=t.ValEqual=t.TypeEqual=void 0;var n=r(243);function a(e,t){return(0,n.Typeof)(e)===(0,n.Typeof)(t)}function o(e,t){return null===e&&void 0===t||void 0===e&&null===t||("object"==typeof e&&"object"==typeof t?i(e,t):"function"==typeof e&&"function"==typeof t?JSON.stringify(e)===JSON.stringify(t):e===t)}function i(e,t){var r=!1,a=(0,n.deepCopy)(e),i=(0,n.deepCopy)(t);if(null!==a&&null!==i){if(Array.isArray(a)&&Array.isArray(i))if(a.sort(),i.sort(),a.length!==i.length)r=!1;else{r=!0;for(var s=0;s<a.length&&(r=o(a[s],i[s]));s++);}else if("object"==typeof a&&"object"==typeof i)if(Object.keys(a).length!==Object.keys(i).length)r=!1;else for(var l in r=!0,a)if(!(r=o(a[l],i[l])))break}else null===a&&null===i&&(r=!0);return r}t.TypeEqual=a,t.ValEqual=o,t.ObjEqual=i;var s={ValEqual:o,TypeEqual:a,ObjEqual:i};t.default=s},285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r=0);var n=t.style,a=void 0===n?"normal":n,o=t.variant,i=void 0===o?"normal":o,s=t.weight,l=void 0===s?"normal":s,u=t.size,c=void 0===u?12:u,f=t.lineHeight,d=void 0===f?1:f,h=t.family,p=void 0===h?"微软雅黑":h,v=document.createElement("canvas").getContext("2d");v.font="".concat(a," ").concat(i," ").concat(l," ").concat(c,"px/").concat(d," ").concat(p);var y=+(+v.measureText(e).width.toFixed(2)+.01).toFixed(2);return y+=(e.length>0?e.length-1:0)*r}},676:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a={},o={};t.default=function(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){return o[e]?[2,o[e]]:a[e]?[2,a[e]]:(t=new Promise((function(t,r){var n=new Image;n.src=e,n.onload=function(){t(n),o[e]=n},n.onerror=function(){r()}})),a[e]=t,[2,t])}))}))}},928:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(783);function i(e,t,r){e.getPage(r).then((function(e){var n=document.createElement("div");n.setAttribute("id","".concat(t.id,"-page-").concat(r)),n.setAttribute("style","position: relative; "),t.appendChild(n);var a=document.createElement("canvas");n.appendChild(a);var o=a.getContext("2d"),i=2*window.devicePixelRatio,s=e.getViewport({scale:1*i});a.style.width="100%",a.style.height="100%",a.width=s.width,a.height=s.height;var l={canvasContext:o,viewport:s};e.render(l)}))}o.GlobalWorkerOptions.workerSrc="https://cdn.bootcss.com/pdf.js/2.13.216/pdf.worker.js",t.default=function(e){var t=e.pdfUrl,r=e.containerId,s=e.startPageNum,l=e.endPageNum;return n(this,void 0,void 0,(function(){var e,n,u,c,f;return a(this,(function(a){switch(a.label){case 0:return function(e){var t=document.getElementById(e),r=document.querySelectorAll('[id^="'.concat(e,'-page-"]'));null==r||r.forEach((function(e){null==t||t.removeChild(e)}))}(r),[4,(0,o.getDocument)({url:t,cMapUrl:"https://unpkg.com/browse/pdfjs-dist@2.13.216/cmaps/",cMapPacked:!0}).promise];case 1:if(e=a.sent(),!(n=document.getElementById(r)))return[2];for(u=null!=s?s:1,c=null!=l?l:e.numPages,f=u;f<=c;f++)i(e,n,f);return[2]}}))}))}},332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=Object.prototype.toString.call(e),n=new RegExp(" (.+?)]"),a=r.match(n)[1].toLowerCase();return t?"object"!=typeof e?typeof e===t:a===t:a}},243:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.array_is_includes=t.downloadFile=t.renderPDF=t.loadImage=t.ConvertNumbers=t.get_string_width=t.Typeof=t.Equal=t.deepCopy=t.console_table=void 0;var a=n(r(442));t.console_table=a.default;var o=n(r(819));t.deepCopy=o.default;var i=n(r(962));t.Equal=i.default;var s=n(r(332));t.Typeof=s.default;var l=n(r(285));t.get_string_width=l.default;var u=n(r(84));t.ConvertNumbers=u.default;var c=n(r(676));t.loadImage=c.default;var f=n(r(928));t.renderPDF=f.default;var d=n(r(769));t.downloadFile=d.default;var h=n(r(320));t.array_is_includes=h.default},800:function(e,t,r){!function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol(".concat(e,")")};function n(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e){return this instanceof o?(this.v=e,this):new o(e)}function i(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,a=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){a[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{u(a[e](t))}catch(e){d(i[0][3],e)}}function u(e){e.value instanceof o?Promise.resolve(e.value.v).then(c,f):d(i[0][2],e)}function c(e){l("next",e)}function f(e){l("throw",e)}function d(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function s(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:o(e[n](t)),done:!1}:a?a(t):t}:a}}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof a?a(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){o(n,a,(t=e[r](t)).done,t.value)}))}}function o(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}}function u(){}function c(e){return"object"==typeof e&&null!==e||"function"==typeof e}"function"==typeof SuppressedError&&SuppressedError;var f=u;function d(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}var h=Promise,p=Promise.prototype.then,v=Promise.reject.bind(h);function y(e){return new h(e)}function m(e){return y((function(t){return t(e)}))}function g(e){return v(e)}function b(e,t,r){return p.call(e,t,r)}function _(e,t,r){b(b(e,t,r),void 0,f)}function w(e,t){_(e,t)}function S(e,t){_(e,void 0,t)}function A(e,t,r){return b(e,t,r)}function k(e){b(e,void 0,f)}var x=function(e){if("function"==typeof queueMicrotask)x=queueMicrotask;else{var t=m(void 0);x=function(e){return b(t,e)}}return x(e)};function P(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function C(e,t,r){try{return m(P(e,t,r))}catch(e){return g(e)}}var T=16384,R=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;t._elements.length===T-1&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,a=e._elements,o=a[r];return n===T&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,o},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}(),E=t("[[AbortSteps]]"),O=t("[[ErrorSteps]]"),F=t("[[CancelSteps]]"),M=t("[[PullSteps]]"),j=t("[[ReleaseSteps]]");function I(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?q(e):"closed"===t._state?W(e):B(e,t._storedError)}function D(e,t){return oa(e._ownerReadableStream,t)}function L(e){var t=e._ownerReadableStream;"readable"===t._state?U(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):z(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[j](),t._reader=void 0,e._ownerReadableStream=void 0}function N(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function q(e){e._closedPromise=y((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function B(e,t){q(e),U(e,t)}function W(e){q(e),G(e)}function U(e,t){void 0!==e._closedPromise_reject&&(k(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function z(e,t){B(e,t)}function G(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var H=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},V=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function X(e){return"object"==typeof e||"function"==typeof e}function Y(e,t){if(void 0!==e&&!X(e))throw new TypeError("".concat(t," is not an object."))}function K(e,t){if("function"!=typeof e)throw new TypeError("".concat(t," is not a function."))}function Q(e){return"object"==typeof e&&null!==e||"function"==typeof e}function J(e,t){if(!Q(e))throw new TypeError("".concat(t," is not an object."))}function $(e,t,r){if(void 0===e)throw new TypeError("Parameter ".concat(t," is required in '").concat(r,"'."))}function Z(e,t,r){if(void 0===e)throw new TypeError("".concat(t," is required in '").concat(r,"'."))}function ee(e){return Number(e)}function te(e){return 0===e?0:e}function re(e){return te(V(e))}function ne(e,t){var r=0,n=Number.MAX_SAFE_INTEGER,a=Number(e);if(a=te(a),!H(a))throw new TypeError("".concat(t," is not a finite number"));if((a=re(a))<r||a>n)throw new TypeError("".concat(t," is outside the accepted range of ").concat(r," to ").concat(n,", inclusive"));return H(a)&&0!==a?a:0}function ae(e,t){if(!na(e))throw new TypeError("".concat(t," is not a ReadableStream."))}function oe(e){return new he(e)}function ie(e,t){e._reader._readRequests.push(t)}function se(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function le(e){return e._reader._readRequests.length}function ue(e){var t=e._reader;return void 0!==t&&!!pe(t)}var ce,fe,de,he=function(){function e(e){if($(e,1,"ReadableStreamDefaultReader"),ae(e,"First parameter"),aa(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");I(this,e),this._readRequests=new R}return Object.defineProperty(e.prototype,"closed",{get:function(){return pe(this)?this._closedPromise:g(ge("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),pe(this)?void 0===this._ownerReadableStream?g(N("cancel")):D(this,e):g(ge("cancel"))},e.prototype.read=function(){if(!pe(this))return g(ge("read"));if(void 0===this._ownerReadableStream)return g(N("read from"));var e,t,r=y((function(r,n){e=r,t=n}));return ve(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!pe(this))throw ge("releaseLock");void 0!==this._ownerReadableStream&&ye(this)},e}();function pe(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof he}function ve(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[M](t)}function ye(e){L(e),me(e,new TypeError("Reader was released"))}function me(e,t){var r=e._readRequests;e._readRequests=new R,r.forEach((function(e){e._errorSteps(t)}))}function ge(e){return new TypeError("ReadableStreamDefaultReader.prototype.".concat(e," can only be used on a ReadableStreamDefaultReader"))}function be(e){return e.slice()}function _e(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}Object.defineProperties(he.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),d(he.prototype.cancel,"cancel"),d(he.prototype.read,"read"),d(he.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(he.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});var we=function(e){return(we="function"==typeof e.transfer?function(e){return e.transfer()}:"function"==typeof structuredClone?function(e){return structuredClone(e,{transfer:[e]})}:function(e){return e})(e)},Se=function(e){return(Se="boolean"==typeof e.detached?function(e){return e.detached}:function(e){return 0===e.byteLength})(e)};function Ae(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,a=new ArrayBuffer(n);return _e(a,0,e,t,n),a}function ke(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError("".concat(String(t)," is not a function"));return r}}function xe(e){var r,u=((r={})[t.iterator]=function(){return e.iterator},r),c=function(){return i(this,arguments,(function(){return n(this,(function(e){switch(e.label){case 0:return[5,a(s(l(u)))];case 1:case 2:return[4,o.apply(void 0,[e.sent()])];case 3:return[2,e.sent()]}}))}))}();return{iterator:c,nextMethod:c.next,done:!1}}var Pe,Ce=null!==(de=null!==(ce=t.asyncIterator)&&void 0!==ce?ce:null===(fe=t.for)||void 0===fe?void 0:fe.call(t,"Symbol.asyncIterator"))&&void 0!==de?de:"@@asyncIterator";function Te(e,r,n){if(void 0===r&&(r="sync"),void 0===n)if("async"===r){if(void 0===(n=ke(e,Ce)))return xe(Te(e,"sync",ke(e,t.iterator)))}else n=ke(e,t.iterator);if(void 0===n)throw new TypeError("The object is not iterable");var a=P(n,e,[]);if(!c(a))throw new TypeError("The iterator method must return an object");return{iterator:a,nextMethod:a.next,done:!1}}function Re(e){var t=P(e.nextMethod,e.iterator,[]);if(!c(t))throw new TypeError("The iterator.next() method must return an object");return t}function Ee(e){return Boolean(e.done)}function Oe(e){return e.value}var Fe=((Pe={})[Ce]=function(){return this},Pe);Object.defineProperty(Fe,Ce,{enumerable:!1});var Me=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?A(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?A(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader,a=y((function(e,n){t=e,r=n}));return ve(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,x((function(){return t({value:r,done:!1})}))},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,L(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,L(n),r(t)}}),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(!this._preventCancel){var r=D(t,e);return L(t),A(r,(function(){return{value:e,done:!0}}))}return L(t),m({value:e,done:!0})},e}(),je={next:function(){return De(this)?this._asyncIteratorImpl.next():g(Le("next"))},return:function(e){return De(this)?this._asyncIteratorImpl.return(e):g(Le("return"))}};function Ie(e,t){var r=oe(e),n=new Me(r,t),a=Object.create(je);return a._asyncIteratorImpl=n,a}function De(e){if(!c(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof Me}catch(e){return!1}}function Le(e){return new TypeError("ReadableStreamAsyncIterator.".concat(e," can only be used on a ReadableSteamAsyncIterator"))}Object.setPrototypeOf(je,Fe);var Ne=Number.isNaN||function(e){return e!=e};function qe(e){return!("number"!=typeof e||Ne(e)||e<0)}function Be(e){var t=Ae(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function We(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Ue(e,t,r){if(!qe(r)||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function ze(e){return e._queue.peek().value}function Ge(e){e._queue=new R,e._queueTotalSize=0}function He(e){return e===DataView}function Ve(e){return He(e.constructor)}function Xe(e){return He(e)?1:e.BYTES_PER_ELEMENT}var Ye=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Je(this))throw Rt("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!Je(this))throw Rt("respond");if($(e,1,"respond"),e=ne(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(Se(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");kt(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!Je(this))throw Rt("respondWithNewView");if($(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(Se(e.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");xt(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(Ye.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),d(Ye.prototype.respond,"respond"),d(Ye.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ye.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ke=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!Qe(this))throw Et("byobRequest");return St(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Qe(this))throw Et("desiredSize");return At(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Qe(this))throw Et("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in ".concat(e," state) is not in the readable state and cannot be closed"));gt(this)},e.prototype.enqueue=function(e){if(!Qe(this))throw Et("enqueue");if($(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in ".concat(t," state) is not in the readable state and cannot be enqueued to"));bt(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Qe(this))throw Et("error");_t(this,e)},e.prototype[F]=function(e){Ze(this),Ge(this);var t=this._cancelAlgorithm(e);return mt(this),t},e.prototype[M]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0)wt(this,e);else{var r=this._autoAllocateChunkSize;if(void 0!==r){var n=void 0;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}var a={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}ie(t,e),$e(this)}},e.prototype[j]=function(){if(this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new R,this._pendingPullIntos.push(e)}},e}();function Qe(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Ke}function Je(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof Ye}function $e(e){yt(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,_(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,$e(e)),null}),(function(t){return _t(e,t),null}))))}function Ze(e){lt(e),e._pendingPullIntos=new R}function et(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=tt(t);"default"===t.readerType?se(e,n,r):Dt(e,n,r)}function tt(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function rt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function nt(e,t,r,n){var a;try{a=Ae(t,r,r+n)}catch(t){throw _t(e,t),t}rt(e,a,0,n)}function at(e,t){t.bytesFilled>0&&nt(e,t.buffer,t.byteOffset,t.bytesFilled),vt(e)}function ot(e,t){var r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+r,a=r,o=!1,i=n-n%t.elementSize;i>=t.minimumFill&&(a=i-t.bytesFilled,o=!0);for(var s=e._queue;a>0;){var l=s.peek(),u=Math.min(a,l.byteLength),c=t.byteOffset+t.bytesFilled;_e(t.buffer,c,l.buffer,l.byteOffset,u),l.byteLength===u?s.shift():(l.byteOffset+=u,l.byteLength-=u),e._queueTotalSize-=u,it(e,u,t),a-=u}return o}function it(e,t,r){r.bytesFilled+=t}function st(e){0===e._queueTotalSize&&e._closeRequested?(mt(e),ia(e._controlledReadableByteStream)):$e(e)}function lt(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function ut(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();ot(e,t)&&(vt(e),et(e._controlledReadableByteStream,t))}}function ct(e){for(var t=e._controlledReadableByteStream._reader;t._readRequests.length>0;){if(0===e._queueTotalSize)return;wt(e,t._readRequests.shift())}}function ft(e,t,r,n){var a,o=e._controlledReadableByteStream,i=t.constructor,s=Xe(i),l=t.byteOffset,u=t.byteLength,c=r*s;try{a=we(t.buffer)}catch(h){return void n._errorSteps(h)}var f={buffer:a,bufferByteLength:a.byteLength,byteOffset:l,byteLength:u,bytesFilled:0,minimumFill:c,elementSize:s,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(f),void It(o,n);if("closed"!==o._state){if(e._queueTotalSize>0){if(ot(e,f)){var d=tt(f);return st(e),void n._chunkSteps(d)}if(e._closeRequested){var h=new TypeError("Insufficient bytes to fill elements in the given buffer");return _t(e,h),void n._errorSteps(h)}}e._pendingPullIntos.push(f),It(o,n),$e(e)}else{var p=new i(f.buffer,f.byteOffset,0);n._closeSteps(p)}}function dt(e,t){"none"===t.readerType&&vt(e);var r=e._controlledReadableByteStream;if(Nt(r))for(;Lt(r)>0;)et(r,vt(e))}function ht(e,t,r){if(it(e,t,r),"none"===r.readerType)return at(e,r),void ut(e);if(!(r.bytesFilled<r.minimumFill)){vt(e);var n=r.bytesFilled%r.elementSize;if(n>0){var a=r.byteOffset+r.bytesFilled;nt(e,r.buffer,a-n,n)}r.bytesFilled-=n,et(e._controlledReadableByteStream,r),ut(e)}}function pt(e,t){var r=e._pendingPullIntos.peek();lt(e),"closed"===e._controlledReadableByteStream._state?dt(e,r):ht(e,t,r),$e(e)}function vt(e){return e._pendingPullIntos.shift()}function yt(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!e._closeRequested&&!!e._started&&(!!(ue(t)&&le(t)>0)||!!(Nt(t)&&Lt(t)>0)||At(e)>0)}function mt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function gt(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!=0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw _t(e,n),n}}mt(e),ia(t)}}function bt(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,a=t.byteOffset,o=t.byteLength;if(Se(n))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");var i=we(n);if(e._pendingPullIntos.length>0){var s=e._pendingPullIntos.peek();if(Se(s.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");lt(e),s.buffer=we(s.buffer),"none"===s.readerType&&at(e,s)}ue(r)?(ct(e),0===le(r)?rt(e,i,a,o):(e._pendingPullIntos.length>0&&vt(e),se(r,new Uint8Array(i,a,o),!1))):Nt(r)?(rt(e,i,a,o),ut(e)):rt(e,i,a,o),$e(e)}}function _t(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Ze(e),Ge(e),mt(e),sa(r,t))}function wt(e,t){var r=e._queue.shift();e._queueTotalSize-=r.byteLength,st(e);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function St(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(Ye.prototype);Tt(n,e,r),e._byobRequest=n}return e._byobRequest}function At(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function kt(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=we(r.buffer),pt(e,t)}function xt(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var n=t.byteLength;r.buffer=we(t.buffer),pt(e,n)}function Pt(e,t,r,n,a,o,i){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Ge(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=i,t._pendingPullIntos=new R,e._readableStreamController=t,_(m(r()),(function(){return t._started=!0,$e(t),null}),(function(e){return _t(t,e),null}))}function Ct(e,t,r){var n,a,o,i=Object.create(Ke.prototype);n=void 0!==t.start?function(){return t.start(i)}:function(){},a=void 0!==t.pull?function(){return t.pull(i)}:function(){return m(void 0)},o=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)};var s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");Pt(e,i,n,a,o,r,s)}function Tt(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Rt(e){return new TypeError("ReadableStreamBYOBRequest.prototype.".concat(e," can only be used on a ReadableStreamBYOBRequest"))}function Et(e){return new TypeError("ReadableByteStreamController.prototype.".concat(e," can only be used on a ReadableByteStreamController"))}function Ot(e,t){Y(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:Ft(r,"".concat(t," has member 'mode' that"))}}function Ft(e,t){if("byob"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamReaderMode"));return e}function Mt(e,t){var r;return Y(e,t),{min:ne(null!==(r=null==e?void 0:e.min)&&void 0!==r?r:1,"".concat(t," has member 'min' that"))}}function jt(e){return new qt(e)}function It(e,t){e._reader._readIntoRequests.push(t)}function Dt(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}function Lt(e){return e._reader._readIntoRequests.length}function Nt(e){var t=e._reader;return void 0!==t&&!!Bt(t)}Object.defineProperties(Ke.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),d(Ke.prototype.close,"close"),d(Ke.prototype.enqueue,"enqueue"),d(Ke.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ke.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var qt=function(){function e(e){if($(e,1,"ReadableStreamBYOBReader"),ae(e,"First parameter"),aa(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Qe(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");I(this,e),this._readIntoRequests=new R}return Object.defineProperty(e.prototype,"closed",{get:function(){return Bt(this)?this._closedPromise:g(Gt("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Bt(this)?void 0===this._ownerReadableStream?g(N("cancel")):D(this,e):g(Gt("cancel"))},e.prototype.read=function(e,t){if(void 0===t&&(t={}),!Bt(this))return g(Gt("read"));if(!ArrayBuffer.isView(e))return g(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return g(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return g(new TypeError("view's buffer must have non-zero byteLength"));if(Se(e.buffer))return g(new TypeError("view's buffer has been detached"));var r;try{r=Mt(t,"options")}catch(e){return g(e)}var n,a,o=r.min;if(0===o)return g(new TypeError("options.min must be greater than 0"));if(Ve(e)){if(o>e.byteLength)return g(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(o>e.length)return g(new RangeError("options.min must be less than or equal to view's length"));if(void 0===this._ownerReadableStream)return g(N("read from"));var i=y((function(e,t){n=e,a=t}));return Wt(this,e,o,{_chunkSteps:function(e){return n({value:e,done:!1})},_closeSteps:function(e){return n({value:e,done:!0})},_errorSteps:function(e){return a(e)}}),i},e.prototype.releaseLock=function(){if(!Bt(this))throw Gt("releaseLock");void 0!==this._ownerReadableStream&&Ut(this)},e}();function Bt(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof qt}function Wt(e,t,r,n){var a=e._ownerReadableStream;a._disturbed=!0,"errored"===a._state?n._errorSteps(a._storedError):ft(a._readableStreamController,t,r,n)}function Ut(e){L(e),zt(e,new TypeError("Reader was released"))}function zt(e,t){var r=e._readIntoRequests;e._readIntoRequests=new R,r.forEach((function(e){e._errorSteps(t)}))}function Gt(e){return new TypeError("ReadableStreamBYOBReader.prototype.".concat(e," can only be used on a ReadableStreamBYOBReader"))}function Ht(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(Ne(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Vt(e){var t=e.size;return t||function(){return 1}}function Xt(e,t){Y(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:ee(r),size:void 0===n?void 0:Yt(n,"".concat(t," has member 'size' that"))}}function Yt(e,t){return K(e,t),function(t){return ee(e(t))}}function Kt(e,t){Y(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,a=null==e?void 0:e.start,o=null==e?void 0:e.type,i=null==e?void 0:e.write;return{abort:void 0===r?void 0:Qt(r,e,"".concat(t," has member 'abort' that")),close:void 0===n?void 0:Jt(n,e,"".concat(t," has member 'close' that")),start:void 0===a?void 0:$t(a,e,"".concat(t," has member 'start' that")),write:void 0===i?void 0:Zt(i,e,"".concat(t," has member 'write' that")),type:o}}function Qt(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function Jt(e,t,r){return K(e,r),function(){return C(e,t,[])}}function $t(e,t,r){return K(e,r),function(r){return P(e,t,[r])}}function Zt(e,t,r){return K(e,r),function(r,n){return C(e,t,[r,n])}}function er(e,t){if(!lr(e))throw new TypeError("".concat(t," is not a WritableStream."))}function tr(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}Object.defineProperties(qt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),d(qt.prototype.cancel,"cancel"),d(qt.prototype.read,"read"),d(qt.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(qt.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var rr="function"==typeof AbortController;function nr(){if(rr)return new AbortController}var ar=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:J(e,"First parameter");var r=Xt(t,"Second parameter"),n=Kt(e,"First parameter");if(sr(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var a=Vt(r);Br(this,n,Ht(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!lr(this))throw $r("locked");return ur(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),lr(this)?ur(this)?g(new TypeError("Cannot abort a stream that already has a writer")):cr(this,e):g($r("abort"))},e.prototype.close=function(){return lr(this)?ur(this)?g(new TypeError("Cannot close a stream that already has a writer")):_r(this)?g(new TypeError("Cannot close an already-closing stream")):fr(this):g($r("close"))},e.prototype.getWriter=function(){if(!lr(this))throw $r("getWriter");return or(this)},e}();function or(e){return new Pr(e)}function ir(e,t,r,n,a,o){void 0===a&&(a=1),void 0===o&&(o=function(){return 1});var i=Object.create(ar.prototype);return sr(i),qr(i,Object.create(Lr.prototype),e,t,r,n,a,o),i}function sr(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new R,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function lr(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof ar}function ur(e){return void 0!==e._writer}function cr(e,t){var r;if("closed"===e._state||"errored"===e._state)return m(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);var n=e._state;if("closed"===n||"errored"===n)return m(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var a=!1;"erroring"===n&&(a=!0,t=void 0);var o=y((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:a}}));return e._pendingAbortRequest._promise=o,a||pr(e,t),o}function fr(e){var t=e._state;if("closed"===t||"errored"===t)return g(new TypeError("The stream (in ".concat(t," state) is not in the writable state and cannot be closed")));var r=y((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&e._backpressure&&"writable"===t&&vn(n),Ur(e._writableStreamController),r}function dr(e){return y((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}function hr(e,t){"writable"!==e._state?vr(e):pr(e,t)}function pr(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Fr(n,t),!wr(e)&&r._started&&vr(e)}function vr(e){e._state="errored",e._writableStreamController[O]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new R,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void kr(e);_(e._writableStreamController[E](r._reason),(function(){return r._resolve(),kr(e),null}),(function(t){return r._reject(t),kr(e),null}))}else kr(e)}function yr(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function mr(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,hr(e,t)}function gr(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&ln(t)}function br(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),hr(e,t)}function _r(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function wr(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Sr(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ar(e){e._inFlightWriteRequest=e._writeRequests.shift()}function kr(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&on(t,e._storedError)}function xr(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?hn(r):vn(r)),e._backpressure=t}Object.defineProperties(ar.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),d(ar.prototype.abort,"abort"),d(ar.prototype.close,"close"),d(ar.prototype.getWriter,"getWriter"),"symbol"==typeof t.toStringTag&&Object.defineProperty(ar.prototype,t.toStringTag,{value:"WritableStream",configurable:!0});var Pr=function(){function e(e){if($(e,1,"WritableStreamDefaultWriter"),er(e,"First parameter"),ur(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!_r(e)&&e._backpressure?un(this):fn(this),rn(this);else if("erroring"===t)cn(this,e._storedError),rn(this);else if("closed"===t)fn(this),an(this);else{var r=e._storedError;cn(this,r),nn(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return Cr(this)?this._closedPromise:g(en("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Cr(this))throw en("desiredSize");if(void 0===this._ownerWritableStream)throw tn("desiredSize");return Mr(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return Cr(this)?this._readyPromise:g(en("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Cr(this)?void 0===this._ownerWritableStream?g(tn("abort")):Tr(this,e):g(en("abort"))},e.prototype.close=function(){if(!Cr(this))return g(en("close"));var e=this._ownerWritableStream;return void 0===e?g(tn("close")):_r(e)?g(new TypeError("Cannot close an already-closing stream")):Rr(this)},e.prototype.releaseLock=function(){if(!Cr(this))throw en("releaseLock");void 0!==this._ownerWritableStream&&jr(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),Cr(this)?void 0===this._ownerWritableStream?g(tn("write to")):Ir(this,e):g(en("write"))},e}();function Cr(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof Pr}function Tr(e,t){return cr(e._ownerWritableStream,t)}function Rr(e){return fr(e._ownerWritableStream)}function Er(e){var t=e._ownerWritableStream,r=t._state;return _r(t)||"closed"===r?m(void 0):"errored"===r?g(t._storedError):Rr(e)}function Or(e,t){"pending"===e._closedPromiseState?on(e,t):sn(e,t)}function Fr(e,t){"pending"===e._readyPromiseState?dn(e,t):pn(e,t)}function Mr(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Gr(t._writableStreamController)}function jr(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Fr(e,r),Or(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Ir(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=zr(n,t);if(r!==e._ownerWritableStream)return g(tn("write to"));var o=r._state;if("errored"===o)return g(r._storedError);if(_r(r)||"closed"===o)return g(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return g(r._storedError);var i=dr(r);return Hr(n,t,a),i}Object.defineProperties(Pr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),d(Pr.prototype.abort,"abort"),d(Pr.prototype.close,"close"),d(Pr.prototype.releaseLock,"releaseLock"),d(Pr.prototype.write,"write"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Pr.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Dr={},Lr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Nr(this))throw Zr("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Nr(this))throw Zr("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Nr(this))throw Zr("error");"writable"===this._controlledWritableStream._state&&Jr(this,e)},e.prototype[E]=function(e){var t=this._abortAlgorithm(e);return Wr(this),t},e.prototype[O]=function(){Ge(this)},e}();function Nr(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Lr}function qr(e,t,r,n,a,o,i,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Ge(t),t._abortReason=void 0,t._abortController=nr(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=i,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=o;var l=Qr(t);xr(e,l),_(m(r()),(function(){return t._started=!0,Vr(t),null}),(function(r){return t._started=!0,hr(e,r),null}))}function Br(e,t,r,n){var a,o,i,s,l=Object.create(Lr.prototype);a=void 0!==t.start?function(){return t.start(l)}:function(){},o=void 0!==t.write?function(e){return t.write(e,l)}:function(){return m(void 0)},i=void 0!==t.close?function(){return t.close()}:function(){return m(void 0)},s=void 0!==t.abort?function(e){return t.abort(e)}:function(){return m(void 0)},qr(e,l,a,o,i,s,r,n)}function Wr(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ur(e){Ue(e,Dr,0),Vr(e)}function zr(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Xr(e,t),1}}function Gr(e){return e._strategyHWM-e._queueTotalSize}function Hr(e,t,r){try{Ue(e,t,r)}catch(t){return void Xr(e,t)}var n=e._controlledWritableStream;_r(n)||"writable"!==n._state||xr(n,Qr(e)),Vr(e)}function Vr(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=ze(e);r===Dr?Yr(e):Kr(e,r)}}else vr(t)}function Xr(e,t){"writable"===e._controlledWritableStream._state&&Jr(e,t)}function Yr(e){var t=e._controlledWritableStream;Sr(t),We(e);var r=e._closeAlgorithm();Wr(e),_(r,(function(){return gr(t),null}),(function(e){return br(t,e),null}))}function Kr(e,t){var r=e._controlledWritableStream;Ar(r),_(e._writeAlgorithm(t),(function(){yr(r);var t=r._state;if(We(e),!_r(r)&&"writable"===t){var n=Qr(e);xr(r,n)}return Vr(e),null}),(function(t){return"writable"===r._state&&Wr(e),mr(r,t),null}))}function Qr(e){return Gr(e)<=0}function Jr(e,t){var r=e._controlledWritableStream;Wr(e),pr(r,t)}function $r(e){return new TypeError("WritableStream.prototype.".concat(e," can only be used on a WritableStream"))}function Zr(e){return new TypeError("WritableStreamDefaultController.prototype.".concat(e," can only be used on a WritableStreamDefaultController"))}function en(e){return new TypeError("WritableStreamDefaultWriter.prototype.".concat(e," can only be used on a WritableStreamDefaultWriter"))}function tn(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function rn(e){e._closedPromise=y((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function nn(e,t){rn(e),on(e,t)}function an(e){rn(e),ln(e)}function on(e,t){void 0!==e._closedPromise_reject&&(k(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function sn(e,t){nn(e,t)}function ln(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function un(e){e._readyPromise=y((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function cn(e,t){un(e),dn(e,t)}function fn(e){un(e),vn(e)}function dn(e,t){void 0!==e._readyPromise_reject&&(k(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function hn(e){un(e)}function pn(e,t){cn(e,t)}function vn(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function yn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==r.g?r.g:void 0}Object.defineProperties(Lr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Lr.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var mn=yn();function gn(e){if("function"!=typeof e&&"object"!=typeof e)return!1;if("DOMException"!==e.name)return!1;try{return new e,!0}catch(e){return!1}}function bn(){var e=null==mn?void 0:mn.DOMException;return gn(e)?e:void 0}function _n(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return d(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var wn=bn()||_n();function Sn(e,t,r,n,a,o){var i=oe(e),s=or(t);e._disturbed=!0;var l=!1,c=m(void 0);return y((function(f,d){var h;if(void 0!==o){if(h=function(){var r=void 0!==o.reason?o.reason:new wn("Aborted","AbortError"),i=[];n||i.push((function(){return"writable"===t._state?cr(t,r):m(void 0)})),a||i.push((function(){return"readable"===e._state?oa(e,r):m(void 0)})),C((function(){return Promise.all(i.map((function(e){return e()})))}),!0,r)},o.aborted)return void h();o.addEventListener("abort",h)}function p(){return y((function(e,t){function r(n){n?e():b(v(),r,t)}r(!1)}))}function v(){return l?m(!0):b(s._readyPromise,(function(){return y((function(e,t){ve(i,{_chunkSteps:function(t){c=b(Ir(s,t),void 0,u),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))}))}if(x(e,i._closedPromise,(function(e){return n?T(!0,e):C((function(){return cr(t,e)}),!0,e),null})),x(t,s._closedPromise,(function(t){return a?T(!0,t):C((function(){return oa(e,t)}),!0,t),null})),P(e,i._closedPromise,(function(){return r?T():C((function(){return Er(s)})),null})),_r(t)||"closed"===t._state){var g=new TypeError("the destination writable stream closed before all data could be piped to it");a?T(!0,g):C((function(){return oa(e,g)}),!0,g)}function A(){var e=c;return b(c,(function(){return e!==c?A():void 0}))}function x(e,t,r){"errored"===e._state?r(e._storedError):S(t,r)}function P(e,t,r){"closed"===e._state?r():w(t,r)}function C(e,r,n){function a(){return _(e(),(function(){return R(r,n)}),(function(e){return R(!0,e)})),null}l||(l=!0,"writable"!==t._state||_r(t)?a():w(A(),a))}function T(e,r){l||(l=!0,"writable"!==t._state||_r(t)?R(e,r):w(A(),(function(){return R(e,r)})))}function R(e,t){return jr(s),L(i),void 0!==o&&o.removeEventListener("abort",h),e?d(t):f(void 0),null}k(p())}))}var An=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!kn(this))throw Dn("desiredSize");return On(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!kn(this))throw Dn("close");if(!Mn(this))throw new TypeError("The stream is not in a state that permits close");Tn(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!kn(this))throw Dn("enqueue");if(!Mn(this))throw new TypeError("The stream is not in a state that permits enqueue");return Rn(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!kn(this))throw Dn("error");En(this,e)},e.prototype[F]=function(e){Ge(this);var t=this._cancelAlgorithm(e);return Cn(this),t},e.prototype[M]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=We(this);this._closeRequested&&0===this._queue.length?(Cn(this),ia(t)):xn(this),e._chunkSteps(r)}else ie(t,e),xn(this)},e.prototype[j]=function(){},e}();function kn(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof An}function xn(e){Pn(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,_(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,xn(e)),null}),(function(t){return En(e,t),null}))))}function Pn(e){var t=e._controlledReadableStream;return!!Mn(e)&&!!e._started&&(!!(aa(t)&&le(t)>0)||On(e)>0)}function Cn(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Tn(e){if(Mn(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Cn(e),ia(t))}}function Rn(e,t){if(Mn(e)){var r=e._controlledReadableStream;if(aa(r)&&le(r)>0)se(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw En(e,t),t}try{Ue(e,t,n)}catch(t){throw En(e,t),t}}xn(e)}}function En(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(Ge(e),Cn(e),sa(r,t))}function On(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Fn(e){return!Pn(e)}function Mn(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function jn(e,t,r,n,a,o,i){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Ge(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=i,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,_(m(r()),(function(){return t._started=!0,xn(t),null}),(function(e){return En(t,e),null}))}function In(e,t,r,n){var a,o,i,s=Object.create(An.prototype);a=void 0!==t.start?function(){return t.start(s)}:function(){},o=void 0!==t.pull?function(){return t.pull(s)}:function(){return m(void 0)},i=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)},jn(e,s,a,o,i,r,n)}function Dn(e){return new TypeError("ReadableStreamDefaultController.prototype.".concat(e," can only be used on a ReadableStreamDefaultController"))}function Ln(e,t){return Qe(e._readableStreamController)?qn(e):Nn(e)}function Nn(e,t){var r,n,a,o,i,s=oe(e),l=!1,u=!1,c=!1,f=!1,d=y((function(e){i=e}));function h(){return l?(u=!0,m(void 0)):(l=!0,ve(s,{_chunkSteps:function(e){x((function(){u=!1;var t=e,r=e;c||Rn(a._readableStreamController,t),f||Rn(o._readableStreamController,r),l=!1,u&&h()}))},_closeSteps:function(){l=!1,c||Tn(a._readableStreamController),f||Tn(o._readableStreamController),c&&f||i(void 0)},_errorSteps:function(){l=!1}}),m(void 0))}function p(t){if(c=!0,r=t,f){var a=be([r,n]),o=oa(e,a);i(o)}return d}function v(t){if(f=!0,n=t,c){var a=be([r,n]),o=oa(e,a);i(o)}return d}function g(){}return a=ea(g,h,p),o=ea(g,h,v),S(s._closedPromise,(function(e){return En(a._readableStreamController,e),En(o._readableStreamController,e),c&&f||i(void 0),null})),[a,o]}function qn(e){var t,r,n,a,o,i=oe(e),s=!1,l=!1,u=!1,c=!1,f=!1,d=y((function(e){o=e}));function h(e){S(e._closedPromise,(function(t){return e!==i||(_t(n._readableStreamController,t),_t(a._readableStreamController,t),c&&f||o(void 0)),null}))}function p(){Bt(i)&&(L(i),h(i=oe(e))),ve(i,{_chunkSteps:function(t){x((function(){l=!1,u=!1;var r=t,i=t;if(!c&&!f)try{i=Be(t)}catch(t){return _t(n._readableStreamController,t),_t(a._readableStreamController,t),void o(oa(e,t))}c||bt(n._readableStreamController,r),f||bt(a._readableStreamController,i),s=!1,l?g():u&&b()}))},_closeSteps:function(){s=!1,c||gt(n._readableStreamController),f||gt(a._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&kt(n._readableStreamController,0),a._readableStreamController._pendingPullIntos.length>0&&kt(a._readableStreamController,0),c&&f||o(void 0)},_errorSteps:function(){s=!1}})}function v(t,r){pe(i)&&(L(i),h(i=jt(e)));var d=r?a:n,p=r?n:a;Wt(i,t,1,{_chunkSteps:function(t){x((function(){l=!1,u=!1;var n=r?f:c;if(r?c:f)n||xt(d._readableStreamController,t);else{var a=void 0;try{a=Be(t)}catch(t){return _t(d._readableStreamController,t),_t(p._readableStreamController,t),void o(oa(e,t))}n||xt(d._readableStreamController,t),bt(p._readableStreamController,a)}s=!1,l?g():u&&b()}))},_closeSteps:function(e){s=!1;var t=r?f:c,n=r?c:f;t||gt(d._readableStreamController),n||gt(p._readableStreamController),void 0!==e&&(t||xt(d._readableStreamController,e),!n&&p._readableStreamController._pendingPullIntos.length>0&&kt(p._readableStreamController,0)),t&&n||o(void 0)},_errorSteps:function(){s=!1}})}function g(){if(s)return l=!0,m(void 0);s=!0;var e=St(n._readableStreamController);return null===e?p():v(e._view,!1),m(void 0)}function b(){if(s)return u=!0,m(void 0);s=!0;var e=St(a._readableStreamController);return null===e?p():v(e._view,!0),m(void 0)}function _(n){if(c=!0,t=n,f){var a=be([t,r]),i=oa(e,a);o(i)}return d}function w(n){if(f=!0,r=n,c){var a=be([t,r]),i=oa(e,a);o(i)}return d}function A(){}return n=ta(A,g,_),a=ta(A,b,w),h(i),[n,a]}function Bn(e){return c(e)&&void 0!==e.getReader}function Wn(e){return Bn(e)?zn(e.getReader()):Un(e)}function Un(e){var t,r=Te(e,"async");function n(){var e;try{e=Re(r)}catch(e){return g(e)}return A(m(e),(function(e){if(!c(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ee(e))Tn(t._readableStreamController);else{var r=Oe(e);Rn(t._readableStreamController,r)}}))}function a(e){var t,n,a=r.iterator;try{t=ke(a,"return")}catch(e){return g(e)}if(void 0===t)return m(void 0);try{n=P(t,a,[e])}catch(e){return g(e)}return A(m(n),(function(e){if(!c(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}))}return t=ea(u,n,a,0)}function zn(e){var t;function r(){var r;try{r=e.read()}catch(e){return g(e)}return A(r,(function(e){if(!c(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(e.done)Tn(t._readableStreamController);else{var r=e.value;Rn(t._readableStreamController,r)}}))}function n(t){try{return m(e.cancel(t))}catch(e){return g(e)}}return t=ea(u,r,n,0)}function Gn(e,t){Y(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,a=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,i=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:ne(n,"".concat(t," has member 'autoAllocateChunkSize' that")),cancel:void 0===a?void 0:Hn(a,r,"".concat(t," has member 'cancel' that")),pull:void 0===o?void 0:Vn(o,r,"".concat(t," has member 'pull' that")),start:void 0===i?void 0:Xn(i,r,"".concat(t," has member 'start' that")),type:void 0===s?void 0:Yn(s,"".concat(t," has member 'type' that"))}}function Hn(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function Vn(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function Xn(e,t,r){return K(e,r),function(r){return P(e,t,[r])}}function Yn(e,t){if("bytes"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamType"));return e}function Kn(e,t){Y(e,t);var r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}function Qn(e,t){Y(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,a=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&Jn(o,"".concat(t," has member 'signal' that")),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(a),signal:o}}function Jn(e,t){if(!tr(e))throw new TypeError("".concat(t," is not an AbortSignal."))}function $n(e,t){Y(e,t);var r=null==e?void 0:e.readable;Z(r,"readable","ReadableWritablePair"),ae(r,"".concat(t," has member 'readable' that"));var n=null==e?void 0:e.writable;return Z(n,"writable","ReadableWritablePair"),er(n,"".concat(t," has member 'writable' that")),{readable:r,writable:n}}Object.defineProperties(An.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),d(An.prototype.close,"close"),d(An.prototype.enqueue,"enqueue"),d(An.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(An.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var Zn=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:J(e,"First parameter");var r=Xt(t,"Second parameter"),n=Gn(e,"First parameter");if(ra(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");Ct(this,n,Ht(r,0))}else{var a=Vt(r);In(this,n,Ht(r,1),a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!na(this))throw la("locked");return aa(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),na(this)?aa(this)?g(new TypeError("Cannot cancel a stream that already has a reader")):oa(this,e):g(la("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!na(this))throw la("getReader");return void 0===Ot(e,"First parameter").mode?oe(this):jt(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!na(this))throw la("pipeThrough");$(e,1,"pipeThrough");var r=$n(e,"First parameter"),n=Qn(t,"Second parameter");if(aa(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ur(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return k(Sn(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!na(this))return g(la("pipeTo"));if(void 0===e)return g("Parameter 1 is required in 'pipeTo'.");if(!lr(e))return g(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=Qn(t,"Second parameter")}catch(e){return g(e)}return aa(this)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ur(e)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Sn(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!na(this))throw la("tee");return be(Ln(this))},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!na(this))throw la("values");return Ie(this,Kn(e,"First parameter").preventCancel)},e.prototype[Ce]=function(e){return this.values(e)},e.from=function(e){return Wn(e)},e}();function ea(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var o=Object.create(Zn.prototype);return ra(o),jn(o,Object.create(An.prototype),e,t,r,n,a),o}function ta(e,t,r){var n=Object.create(Zn.prototype);return ra(n),Pt(n,Object.create(Ke.prototype),e,t,r,0,void 0),n}function ra(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function na(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Zn}function aa(e){return void 0!==e._reader}function oa(e,t){if(e._disturbed=!0,"closed"===e._state)return m(void 0);if("errored"===e._state)return g(e._storedError);ia(e);var r=e._reader;if(void 0!==r&&Bt(r)){var n=r._readIntoRequests;r._readIntoRequests=new R,n.forEach((function(e){e._closeSteps(void 0)}))}return A(e._readableStreamController[F](t),u)}function ia(e){e._state="closed";var t=e._reader;if(void 0!==t&&(G(t),pe(t))){var r=t._readRequests;t._readRequests=new R,r.forEach((function(e){e._closeSteps()}))}}function sa(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(U(r,t),pe(r)?me(r,t):zt(r,t))}function la(e){return new TypeError("ReadableStream.prototype.".concat(e," can only be used on a ReadableStream"))}function ua(e,t){Y(e,t);var r=null==e?void 0:e.highWaterMark;return Z(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:ee(r)}}Object.defineProperties(Zn,{from:{enumerable:!0}}),Object.defineProperties(Zn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),d(Zn.from,"from"),d(Zn.prototype.cancel,"cancel"),d(Zn.prototype.getReader,"getReader"),d(Zn.prototype.pipeThrough,"pipeThrough"),d(Zn.prototype.pipeTo,"pipeTo"),d(Zn.prototype.tee,"tee"),d(Zn.prototype.values,"values"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Zn.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Zn.prototype,Ce,{value:Zn.prototype.values,writable:!0,configurable:!0});var ca=function(e){return e.byteLength};d(ca,"size");var fa=function(){function e(e){$(e,1,"ByteLengthQueuingStrategy"),e=ua(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ha(this))throw da("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ha(this))throw da("size");return ca},enumerable:!1,configurable:!0}),e}();function da(e){return new TypeError("ByteLengthQueuingStrategy.prototype.".concat(e," can only be used on a ByteLengthQueuingStrategy"))}function ha(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof fa}Object.defineProperties(fa.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(fa.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var pa=function(){return 1};d(pa,"size");var va=function(){function e(e){$(e,1,"CountQueuingStrategy"),e=ua(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ma(this))throw ya("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ma(this))throw ya("size");return pa},enumerable:!1,configurable:!0}),e}();function ya(e){return new TypeError("CountQueuingStrategy.prototype.".concat(e," can only be used on a CountQueuingStrategy"))}function ma(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof va}function ga(e,t){Y(e,t);var r=null==e?void 0:e.cancel,n=null==e?void 0:e.flush,a=null==e?void 0:e.readableType,o=null==e?void 0:e.start,i=null==e?void 0:e.transform,s=null==e?void 0:e.writableType;return{cancel:void 0===r?void 0:Sa(r,e,"".concat(t," has member 'cancel' that")),flush:void 0===n?void 0:ba(n,e,"".concat(t," has member 'flush' that")),readableType:a,start:void 0===o?void 0:_a(o,e,"".concat(t," has member 'start' that")),transform:void 0===i?void 0:wa(i,e,"".concat(t," has member 'transform' that")),writableType:s}}function ba(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function _a(e,t,r){return K(e,r),function(r){return P(e,t,[r])}}function wa(e,t,r){return K(e,r),function(r,n){return C(e,t,[r,n])}}function Sa(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}Object.defineProperties(va.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(va.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var Aa=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=Xt(t,"Second parameter"),a=Xt(r,"Third parameter"),o=ga(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");var i,s=Ht(a,0),l=Vt(a),u=Ht(n,1),c=Vt(n);ka(this,y((function(e){i=e})),u,c,s,l),Ma(this,o),void 0!==o.start?i(o.start(this._transformStreamController)):i(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!xa(this))throw Xa("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!xa(this))throw Xa("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function ka(e,t,r,n,a,o){function i(){return t}function s(t){return qa(e,t)}function l(t){return Ba(e,t)}function u(){return Wa(e)}function c(){return Ua(e)}function f(t){return za(e,t)}e._writable=ir(i,s,u,l,r,n),e._readable=ea(i,c,f,a,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Ra(e,!0),e._transformStreamController=void 0}function xa(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof Aa}function Pa(e,t){En(e._readable._readableStreamController,t),Ca(e,t)}function Ca(e,t){ja(e._transformStreamController),Xr(e._writable._writableStreamController,t),Ta(e)}function Ta(e){e._backpressure&&Ra(e,!1)}function Ra(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=y((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Aa.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Aa.prototype,t.toStringTag,{value:"TransformStream",configurable:!0});var Ea=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Oa(this))throw Ga("desiredSize");return On(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Oa(this))throw Ga("enqueue");Ia(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Oa(this))throw Ga("error");Da(this,e)},e.prototype.terminate=function(){if(!Oa(this))throw Ga("terminate");Na(this)},e}();function Oa(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof Ea}function Fa(e,t,r,n,a){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n,t._cancelAlgorithm=a,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Ma(e,t){var r,n,a,o=Object.create(Ea.prototype);r=void 0!==t.transform?function(e){return t.transform(e,o)}:function(e){try{return Ia(o,e),m(void 0)}catch(e){return g(e)}},n=void 0!==t.flush?function(){return t.flush(o)}:function(){return m(void 0)},a=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)},Fa(e,o,r,n,a)}function ja(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ia(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!Mn(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Rn(n,t)}catch(e){throw Ca(r,e),r._readable._storedError}Fn(n)!==r._backpressure&&Ra(r,!0)}function Da(e,t){Pa(e._controlledTransformStream,t)}function La(e,t){return A(e._transformAlgorithm(t),void 0,(function(t){throw Pa(e._controlledTransformStream,t),t}))}function Na(e){var t=e._controlledTransformStream;Tn(t._readable._readableStreamController),Ca(t,new TypeError("TransformStream terminated"))}function qa(e,t){var r=e._transformStreamController;return e._backpressure?A(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return La(r,t)})):La(r,t)}function Ba(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._readable;r._finishPromise=y((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var a=r._cancelAlgorithm(t);return ja(r),_(a,(function(){return"errored"===n._state?Va(r,n._storedError):(En(n._readableStreamController,t),Ha(r)),null}),(function(e){return En(n._readableStreamController,e),Va(r,e),null})),r._finishPromise}function Wa(e){var t=e._transformStreamController;if(void 0!==t._finishPromise)return t._finishPromise;var r=e._readable;t._finishPromise=y((function(e,r){t._finishPromise_resolve=e,t._finishPromise_reject=r}));var n=t._flushAlgorithm();return ja(t),_(n,(function(){return"errored"===r._state?Va(t,r._storedError):(Tn(r._readableStreamController),Ha(t)),null}),(function(e){return En(r._readableStreamController,e),Va(t,e),null})),t._finishPromise}function Ua(e){return Ra(e,!1),e._backpressureChangePromise}function za(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._writable;r._finishPromise=y((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var a=r._cancelAlgorithm(t);return ja(r),_(a,(function(){return"errored"===n._state?Va(r,n._storedError):(Xr(n._writableStreamController,t),Ta(e),Ha(r)),null}),(function(t){return Xr(n._writableStreamController,t),Ta(e),Va(r,t),null})),r._finishPromise}function Ga(e){return new TypeError("TransformStreamDefaultController.prototype.".concat(e," can only be used on a TransformStreamDefaultController"))}function Ha(e){void 0!==e._finishPromise_resolve&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Va(e,t){void 0!==e._finishPromise_reject&&(k(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Xa(e){return new TypeError("TransformStream.prototype.".concat(e," can only be used on a TransformStream"))}Object.defineProperties(Ea.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),d(Ea.prototype.enqueue,"enqueue"),d(Ea.prototype.error,"error"),d(Ea.prototype.terminate,"terminate"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ea.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=fa,e.CountQueuingStrategy=va,e.ReadableByteStreamController=Ke,e.ReadableStream=Zn,e.ReadableStreamBYOBReader=qt,e.ReadableStreamBYOBRequest=Ye,e.ReadableStreamDefaultController=An,e.ReadableStreamDefaultReader=he,e.TransformStream=Aa,e.TransformStreamDefaultController=Ea,e.WritableStream=ar,e.WritableStreamDefaultController=Lr,e.WritableStreamDefaultWriter=Pr}(t)},601:()=>{},767:()=>{},251:()=>{},677:()=>{},543:()=>{},324:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var __webpack_exports__=__webpack_require__(243);return __webpack_exports__})()));
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["hsu-utils"]=t():e["hsu-utils"]=t()}(this,(()=>(()=>{var __webpack_modules__={783:function(module,__unused_webpack_exports,__webpack_require__){var factory;factory=function(){return(()=>{var __webpack_modules__=[,(e,t,r)=>{"use strict";function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){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 a(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.UNSUPPORTED_FEATURES=t.TextRenderingMode=t.StreamType=t.RenderingIntentFlag=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.IsLittleEndianCached=t.IsEvalSupportedCached=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FontType=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.arrayByteLength=T,t.arraysToBytes=function(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=T(e[n]);for(var a=0,o=new Uint8Array(r),i=0;i<t;i++){var s=e[i];s instanceof Uint8Array||(s="string"==typeof s?C(s):new Uint8Array(s));var l=s.byteLength;o.set(s,a),a+=l}return o},t.assert=function(e,t){e||m(t)},t.bytesToString=function(e){"object"===i(e)&&null!==e&&void 0!==e.length||m("Invalid argument for bytesToString");var t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);for(var n=[],a=0;a<t;a+=r){var o=Math.min(a+r,t),s=e.subarray(a,o);n.push(String.fromCharCode.apply(null,s))}return n.join("")},t.createPromiseCapability=function(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}})),e},t.createValidAbsoluteUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var n=e.match(/\./g);n&&n.length>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=j(e)}catch(e){}}var a=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(e){}return null},t.escapeString=function(e){return e.replace(/([()\\\n\r])/g,(function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)}))},t.getModificationDate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return v},t.info=function(e){v>=p.INFOS&&console.log("Info: ".concat(e))},t.isArrayBuffer=function(e){return"object"===i(e)&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isSameOrigin=function(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.objectFromMap=function(e){var t,r,n,o=Object.create(null),i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}(e);try{for(i.s();!(t=i.n()).done;){var s=(r=t.value,n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(r,n)||a(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=s[0],u=s[1];o[l]=u}}catch(e){i.e(e)}finally{i.f()}return o},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(v=e)},t.shadow=g,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=C,t.stringToPDFString=function(e){var t;if(e[0]>="ï"&&("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t))try{var r=new TextDecoder(t,{fatal:!0}),n=C(e);return r.decode(n)}catch(e){y('stringToPDFString: "'.concat(e,'".'))}for(var a=[],o=0,i=e.length;o<i;o++){var s=M[e.charCodeAt(o)];a.push(s?String.fromCharCode(s):e.charAt(o))}return a.join("")},t.stringToUTF16BEString=function(e){for(var t=["þÿ"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")},t.stringToUTF8String=j,t.unreachable=m,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=y,r(2),t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"},t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var p={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=p,t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",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"},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var v=p.WARNINGS;function y(e){v>=p.WARNINGS&&console.log("Warning: ".concat(e))}function m(e){throw new Error(e)}function g(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var b=function(){function e(t,r){this.constructor===e&&m("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=b;var _=function(e){c(r,e);var t=d(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"PasswordException")).code=n,a}return l(r)}(b);t.PasswordException=_;var w=function(e){c(r,e);var t=d(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"UnknownErrorException")).details=n,a}return l(r)}(b);t.UnknownErrorException=w;var S=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"InvalidPDFException")}return l(r)}(b);t.InvalidPDFException=S;var A=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"MissingPDFException")}return l(r)}(b);t.MissingPDFException=A;var k=function(e){c(r,e);var t=d(r);function r(e,n){var a;return u(this,r),(a=t.call(this,e,"UnexpectedResponseException")).status=n,a}return l(r)}(b);t.UnexpectedResponseException=k;var x=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"FormatError")}return l(r)}(b);t.FormatError=x;var P=function(e){c(r,e);var t=d(r);function r(e){return u(this,r),t.call(this,e,"AbortException")}return l(r)}(b);function C(e){"string"!=typeof e&&m("Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function T(e){return void 0!==e.length?e.length:void 0!==e.byteLength?e.byteLength:void m("Invalid argument for arrayByteLength")}t.AbortException=P;var R={get value(){return g(this,"value",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}};t.IsLittleEndianCached=R;var E={get value(){return g(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=E;var O=n(Array(256).keys()).map((function(e){return e.toString(16).padStart(2,"0")})),F=function(){function e(){u(this,e)}return l(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(O[e]).concat(O[t]).concat(O[r])}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),o=e.applyTransform([t[0],t[3]],r),i=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],o[0],i[0]),Math.min(n[1],a[1],o[1],i[1]),Math.max(n[0],a[0],o[0],i[0]),Math.max(n[1],a[1],o[1],i[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],i=(r+o)/2,s=Math.sqrt(Math.pow(r+o,2)-4*(r*o-a*n))/2,l=i+s||1,u=i-s||1;return[Math.sqrt(l),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var a=[t[0],t[2],r[0],r[2]].sort(n),o=[t[1],t[3],r[1],r[3]].sort(n),i=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),a[0]===t[0]&&a[1]===r[0]||a[0]===r[0]&&a[1]===t[0]?(i[0]=a[1],i[2]=a[2],o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]?(i[1]=o[1],i[3]=o[2],i):null):null}},{key:"bezierBoundingBox",value:function(e,t,r,a,o,i,s,l){for(var u,c,f,d,h,p,v,y,m=[],g=[[],[]],b=0;b<2;++b)if(0===b?(c=6*e-12*r+6*o,u=-3*e+9*r-9*o+3*s,f=3*r-3*e):(c=6*t-12*a+6*i,u=-3*t+9*a-9*i+3*l,f=3*a-3*t),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;0<(d=-f/c)&&d<1&&m.push(d)}else v=c*c-4*f*u,y=Math.sqrt(v),v<0||(0<(h=(-c+y)/(2*u))&&h<1&&m.push(h),0<(p=(-c-y)/(2*u))&&p<1&&m.push(p));for(var _,w=m.length,S=w;w--;)_=1-(d=m[w]),g[0][w]=_*_*_*e+3*_*_*d*r+3*_*d*d*o+d*d*d*s,g[1][w]=_*_*_*t+3*_*_*d*a+3*_*d*d*i+d*d*d*l;return g[0][S]=e,g[1][S]=t,g[0][S+1]=s,g[1][S+1]=l,g[0].length=g[1].length=S+2,[Math.min.apply(Math,n(g[0])),Math.min.apply(Math,n(g[1])),Math.max.apply(Math,n(g[0])),Math.max.apply(Math,n(g[1]))]}}]),e}();t.Util=F;var M=[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 j(e){return decodeURIComponent(escape(e))}},(e,t,r)=>{"use strict";var n=r(3);globalThis._pdfjsCompatibilityChecked||(globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),!globalThis.DOMMatrix&&n.isNodeJS&&(globalThis.DOMMatrix=r(4)),globalThis.Promise.allSettled||(globalThis.Promise=r(5)),!globalThis.ReadableStream&&n.isNodeJS&&(globalThis.ReadableStream=__webpack_require__(800).ReadableStream),globalThis.structuredClone||r(129))},(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;var n=!("object"!==("undefined"==typeof process?"undefined":r(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,r)=>{"use strict";var n,a,o;function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}o=function(){function e(e){var t=new f,r=Array.from(e);if(!r.every((function(e){return!Number.isNaN(e)})))throw TypeError('CSSMatrix: "'+e+'" must only have numbers.');if(16===r.length){var n=r[0],a=r[1],o=r[2],i=r[3],s=r[4],l=r[5],u=r[6],c=r[7],d=r[8],h=r[9],p=r[10],v=r[11],y=r[12],m=r[13],g=r[14],b=r[15];t.m11=n,t.a=n,t.m21=s,t.c=s,t.m31=d,t.m41=y,t.e=y,t.m12=a,t.b=a,t.m22=l,t.d=l,t.m32=h,t.m42=m,t.f=m,t.m13=o,t.m23=u,t.m33=p,t.m43=g,t.m14=i,t.m24=c,t.m34=v,t.m44=b}else{if(6!==r.length)throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");var _=r[0],w=r[1],S=r[2],A=r[3],k=r[4],x=r[5];t.m11=_,t.a=_,t.m12=w,t.b=w,t.m21=S,t.c=S,t.m22=A,t.d=A,t.m41=k,t.e=k,t.m42=x,t.f=x}return t}function t(t){var r=Object.keys(new f);if("object"===i(t)&&r.every((function(e){return e in t})))return e([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]);throw TypeError('CSSMatrix: "'+t+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function r(t){if("string"!=typeof t)throw TypeError('CSSMatrix: "'+t+'" is not a string.');var r=String(t).replace(/\s/g,""),n=new f,a='CSSMatrix: invalid transform string "'+t+'"';return r.split(")").filter((function(e){return e})).forEach((function(t){var r=t.split("("),o=r[0],i=r[1];if(!i)throw TypeError(a);var s=i.split(",").map((function(e){return e.includes("rad")?parseFloat(e)*(180/Math.PI):parseFloat(e)})),l=s[0],u=s[1],c=s[2],f=s[3],d=[l,u,c],h=[l,u,c,f];if("perspective"===o&&l&&[u,c].every((function(e){return void 0===e})))n.m34=-1/l;else if(o.includes("matrix")&&[6,16].includes(s.length)&&s.every((function(e){return!Number.isNaN(+e)}))){var p=s.map((function(e){return Math.abs(e)<1e-6?0:e}));n=n.multiply(e(p))}else if("translate3d"===o&&d.every((function(e){return!Number.isNaN(+e)})))n=n.translate(l,u,c);else if("translate"===o&&l&&void 0===c)n=n.translate(l,u||0,0);else if("rotate3d"===o&&h.every((function(e){return!Number.isNaN(+e)}))&&f)n=n.rotateAxisAngle(l,u,c,f);else if("rotate"===o&&l&&[u,c].every((function(e){return void 0===e})))n=n.rotate(0,0,l);else if("scale3d"===o&&d.every((function(e){return!Number.isNaN(+e)}))&&d.some((function(e){return 1!==e})))n=n.scale(l,u,c);else if("scale"!==o||Number.isNaN(l)||1===l||void 0!==c)if("skew"===o&&l&&void 0===c)n=n.skewX(l),n=u?n.skewY(u):n;else{if(!(/[XYZ]/.test(o)&&l&&[u,c].every((function(e){return void 0===e}))&&["translate","rotate","scale","skew"].some((function(e){return o.includes(e)}))))throw TypeError(a);if(["skewX","skewY"].includes(o))n=n[o](l);else{var v=o.replace(/[XYZ]/,""),y=o.replace(v,""),m=["X","Y","Z"].indexOf(y),g=[0===m?l:0,1===m?l:0,2===m?l:0];n=n[v].apply(n,g)}}else{var b=Number.isNaN(+u)?l:u;n=n.scale(l,b,1)}})),n}function n(e,t,r){var n=new f;return n.m41=e,n.e=e,n.m42=t,n.f=t,n.m43=r,n}function a(e,t,r){var n=new f,a=Math.PI/180,o=e*a,i=t*a,s=r*a,l=Math.cos(o),u=-Math.sin(o),c=Math.cos(i),d=-Math.sin(i),h=Math.cos(s),p=-Math.sin(s),v=c*h,y=-c*p;n.m11=v,n.a=v,n.m12=y,n.b=y,n.m13=d;var m=u*d*h+l*p;n.m21=m,n.c=m;var g=l*h-u*d*p;return n.m22=g,n.d=g,n.m23=-u*c,n.m31=u*p-l*d*h,n.m32=u*h+l*d*p,n.m33=l*c,n}function o(e,t,r,n){var a=new f,o=n*(Math.PI/360),i=Math.sin(o),s=Math.cos(o),l=i*i,u=Math.sqrt(e*e+t*t+r*r),c=e,d=t,h=r;0===u?(c=0,d=0,h=1):(c/=u,d/=u,h/=u);var p=c*c,v=d*d,y=h*h,m=1-2*(v+y)*l;a.m11=m,a.a=m;var g=2*(c*d*l+h*i*s);a.m12=g,a.b=g,a.m13=2*(c*h*l-d*i*s);var b=2*(d*c*l-h*i*s);a.m21=b,a.c=b;var _=1-2*(y+p)*l;return a.m22=_,a.d=_,a.m23=2*(d*h*l+c*i*s),a.m31=2*(h*c*l+d*i*s),a.m32=2*(h*d*l-c*i*s),a.m33=1-2*(p+v)*l,a}function s(e,t,r){var n=new f;return n.m11=e,n.a=e,n.m22=t,n.d=t,n.m33=r,n}function l(e){var t=new f,r=e*Math.PI/180,n=Math.tan(r);return t.m21=n,t.c=n,t}function u(e){var t=new f,r=e*Math.PI/180,n=Math.tan(r);return t.m12=n,t.b=n,t}function c(t,r){return e([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 f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if(r.a=1,r.b=0,r.c=0,r.d=1,r.e=0,r.f=0,r.m11=1,r.m12=0,r.m13=0,r.m14=0,r.m21=0,r.m22=1,r.m23=0,r.m24=0,r.m31=0,r.m32=0,r.m33=1,r.m34=0,r.m41=0,r.m42=0,r.m43=0,r.m44=1,e&&e.length){var n=[16,6].some((function(t){return t===e.length}))?e:e[0];return r.setMatrixValue(n)}return r},d={isIdentity:{configurable:!0},is2D:{configurable:!0}};return d.isIdentity.set=function(e){this.isIdentity=e},d.isIdentity.get=function(){var e=this;return 1===e.m11&&0===e.m12&&0===e.m13&&0===e.m14&&0===e.m21&&1===e.m22&&0===e.m23&&0===e.m24&&0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m41&&0===e.m42&&0===e.m43&&1===e.m44},d.is2D.get=function(){var e=this;return 0===e.m31&&0===e.m32&&1===e.m33&&0===e.m34&&0===e.m43&&1===e.m44},d.is2D.set=function(e){this.is2D=e},f.prototype.setMatrixValue=function(n){return[Array,Float64Array,Float32Array].some((function(e){return n instanceof e}))?e(n):"string"==typeof n&&n.length&&"none"!==n?r(n):"object"===i(n)?t(n):this},f.prototype.toArray=function(){var e=this,t=Math.pow(10,6);return(e.is2D?[e.a,e.b,e.c,e.d,e.e,e.f]:[e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44]).map((function(e){return Math.abs(e)<1e-6?0:(e*t>>0)/t}))},f.prototype.toString=function(){var e=this.toArray();return(this.is2D?"matrix":"matrix3d")+"("+e+")"},f.prototype.toJSON=function(){var e=this,t=e.is2D,r=e.isIdentity;return Object.assign({},e,{is2D:t,isIdentity:r})},f.prototype.multiply=function(e){return c(this,e)},f.prototype.translate=function(e,t,r){var a=t,o=r;return void 0===o&&(o=0),void 0===a&&(a=0),c(this,n(e,a,o))},f.prototype.scale=function(e,t,r){var n=t,a=r;return void 0===n&&(n=e),void 0===a&&(a=1),c(this,s(e,n,a))},f.prototype.rotate=function(e,t,r){var n=e,o=t,i=r;return void 0===o&&(o=0),void 0===i&&(i=n,n=0),c(this,a(n,o,i))},f.prototype.rotateAxisAngle=function(e,t,r,n){if([e,t,r,n].some((function(e){return Number.isNaN(e)})))throw new TypeError("CSSMatrix: expecting 4 values");return c(this,o(e,t,r,n))},f.prototype.skewX=function(e){return c(this,l(e))},f.prototype.skewY=function(e){return c(this,u(e))},f.prototype.transformPoint=function(e){var t=n(e.x,e.y,e.z);return t.m44=e.w||1,{x:(t=this.multiply(t)).m41,y:t.m42,z:t.m43,w:t.m44}},f.prototype.transform=function(e){var t=this,r=t.m11*e.x+t.m12*e.y+t.m13*e.z+t.m14*e.w,n=t.m21*e.x+t.m22*e.y+t.m23*e.z+t.m24*e.w,a=t.m31*e.x+t.m32*e.y+t.m33*e.z+t.m34*e.w,o=t.m41*e.x+t.m42*e.y+t.m43*e.z+t.m44*e.w;return{x:r/o,y:n/o,z:a/o,w:o}},Object.defineProperties(f.prototype,d),Object.assign(f,{Translate:n,Rotate:a,RotateAxisAngle:o,Scale:s,SkewX:l,SkewY:u,Multiply:c,fromArray:e,fromMatrix:t,fromString:r}),Object.assign(f,{Version:"0.0.24"}),f},"object"===i(t)?e.exports=o():void 0===(a="function"==typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=a)},(e,t,r)=>{r(6),r(91),r(97),r(99),r(123),r(124),r(125),r(126);var n=r(128);e.exports=n.Promise},(e,t,r)=>{"use strict";var n=r(7),a=r(8),o=r(27),i=r(69),s=r(71),l=r(57),u=r(73),c=r(46),f=r(15),d=r(77),h=r(78),p=r(79),v=r(88),y=r(36),m=r(90),g=y("toStringTag"),b=a.Error,_=[].push,w=function(e,t){var r,n=arguments.length>2?arguments[2]:void 0,a=o(S,this);s?r=s(new b,a?i(this):S):(r=a?this:u(S),c(r,g,"Error")),void 0!==t&&c(r,"message",v(t)),m&&c(r,"stack",d(r.stack,1)),h(r,n);var l=[];return p(e,_,{that:l}),c(r,"errors",l),r};s?s(w,b):l(w,b,{name:!0});var S=w.prototype=u(b.prototype,{constructor:f(1,w),message:f(1,""),name:f(1,"AggregateError")});n({global:!0},{AggregateError:w})},(e,t,r)=>{var n=r(8),a=r(9).f,o=r(46),i=r(50),s=r(40),l=r(57),u=r(68);e.exports=function(e,t){var r,c,f,d,h,p=e.target,v=e.global,y=e.stat;if(r=v?n:y?n[p]||s(p,{}):(n[p]||{}).prototype)for(c in t){if(d=t[c],f=e.noTargetGet?(h=a(r,c))&&h.value:r[c],!u(v?c:p+(y?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&o(d,"sham",!0),i(r,c,d,e)}}},e=>{var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof __webpack_require__.g&&__webpack_require__.g)||function(){return this}()||Function("return this")()},(e,t,r)=>{var n=r(10),a=r(12),o=r(14),i=r(15),s=r(16),l=r(21),u=r(41),c=r(44),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=l(t),c)try{return f(e,t)}catch(e){}if(u(e,t))return i(!a(o.f,e,t),e[t])}},(e,t,r)=>{var n=r(11);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,r)=>{var n=r(13),a=Function.prototype.call;e.exports=n?a.bind(a):function(){return a.apply(a,arguments)}},(e,t,r)=>{var n=r(11);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,a=n&&!r.call({1:2},1);t.f=a?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,r)=>{var n=r(17),a=r(20);e.exports=function(e){return n(a(e))}},(e,t,r)=>{var n=r(8),a=r(18),o=r(11),i=r(19),s=n.Object,l=a("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?l(e,""):s(e)}:s},(e,t,r)=>{var n=r(13),a=Function.prototype,o=a.bind,i=a.call,s=n&&o.bind(i,i);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return i.apply(e,arguments)}}},(e,t,r)=>{var n=r(18),a=n({}.toString),o=n("".slice);e.exports=function(e){return o(a(e),8,-1)}},(e,t,r)=>{var n=r(8).TypeError;e.exports=function(e){if(null==e)throw n("Can't call method on "+e);return e}},(e,t,r)=>{var n=r(22),a=r(25);e.exports=function(e){var t=n(e,"string");return a(t)?t:t+""}},(e,t,r)=>{var n=r(8),a=r(12),o=r(23),i=r(25),s=r(32),l=r(35),u=r(36),c=n.TypeError,f=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,n=s(e,f);if(n){if(void 0===t&&(t="default"),r=a(n,e,t),!o(r)||i(r))return r;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},(e,t,r)=>{var n=r(24);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},e=>{e.exports=function(e){return"function"==typeof e}},(e,t,r)=>{var n=r(8),a=r(26),o=r(24),i=r(27),s=r(28),l=n.Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=a("Symbol");return o(t)&&i(t.prototype,l(e))}},(e,t,r)=>{var n=r(8),a=r(24);e.exports=function(e,t){return arguments.length<2?(r=n[e],a(r)?r:void 0):n[e]&&n[e][t];var r}},(e,t,r)=>{var n=r(18);e.exports=n({}.isPrototypeOf)},(e,t,r)=>{var n=r(29);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,r)=>{var n=r(30),a=r(11);e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},(e,t,r)=>{var n,a,o=r(8),i=r(31),s=o.process,l=o.Deno,u=s&&s.versions||l&&l.version,c=u&&u.v8;c&&(a=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(a=+n[1]),e.exports=a},(e,t,r)=>{var n=r(26);e.exports=n("navigator","userAgent")||""},(e,t,r)=>{var n=r(33);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},(e,t,r)=>{var n=r(8),a=r(24),o=r(34),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a function")}},(e,t,r)=>{var n=r(8).String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},(e,t,r)=>{var n=r(8),a=r(12),o=r(24),i=r(23),s=n.TypeError;e.exports=function(e,t){var r,n;if("string"===t&&o(r=e.toString)&&!i(n=a(r,e)))return n;if(o(r=e.valueOf)&&!i(n=a(r,e)))return n;if("string"!==t&&o(r=e.toString)&&!i(n=a(r,e)))return n;throw s("Can't convert object to primitive value")}},(e,t,r)=>{var n=r(8),a=r(37),o=r(41),i=r(43),s=r(29),l=r(28),u=a("wks"),c=n.Symbol,f=c&&c.for,d=l?c:c&&c.withoutSetter||i;e.exports=function(e){if(!o(u,e)||!s&&"string"!=typeof u[e]){var t="Symbol."+e;s&&o(c,e)?u[e]=c[e]:u[e]=l&&f?f(t):d(t)}return u[e]}},(e,t,r)=>{var n=r(38),a=r(39);(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:n?"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"})},e=>{e.exports=!1},(e,t,r)=>{var n=r(8),a=r(40),o="__core-js_shared__",i=n[o]||a(o,{});e.exports=i},(e,t,r)=>{var n=r(8),a=Object.defineProperty;e.exports=function(e,t){try{a(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},(e,t,r)=>{var n=r(18),a=r(42),o=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(a(e),t)}},(e,t,r)=>{var n=r(8),a=r(20),o=n.Object;e.exports=function(e){return o(a(e))}},(e,t,r)=>{var n=r(18),a=0,o=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++a+o,36)}},(e,t,r)=>{var n=r(10),a=r(11),o=r(45);e.exports=!n&&!a((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},(e,t,r)=>{var n=r(8),a=r(23),o=n.document,i=a(o)&&a(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},(e,t,r)=>{var n=r(10),a=r(47),o=r(15);e.exports=n?function(e,t,r){return a.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},(e,t,r)=>{var n=r(8),a=r(10),o=r(44),i=r(48),s=r(49),l=r(21),u=n.TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",p="writable";t.f=a?i?function(e,t,r){if(s(e),t=l(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]){var n=f(e,t);n&&n[p]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:d in r?r[d]:n[d],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(s(e),t=l(t),s(r),o)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},(e,t,r)=>{var n=r(10),a=r(11);e.exports=n&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,r)=>{var n=r(8),a=r(23),o=n.String,i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not an object")}},(e,t,r)=>{var n=r(8),a=r(24),o=r(41),i=r(46),s=r(40),l=r(51),u=r(52),c=r(56).CONFIGURABLE,f=u.get,d=u.enforce,h=String(String).split("String");(e.exports=function(e,t,r,l){var u,f=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,v=!!l&&!!l.noTargetGet,y=l&&void 0!==l.name?l.name:t;a(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||c&&r.name!==y)&&i(r,"name",y),(u=d(r)).source||(u.source=h.join("string"==typeof y?y:""))),e!==n?(f?!v&&e[t]&&(p=!0):delete e[t],p?e[t]=r:i(e,t,r)):p?e[t]=r:s(t,r)})(Function.prototype,"toString",(function(){return a(this)&&f(this).source||l(this)}))},(e,t,r)=>{var n=r(18),a=r(24),o=r(39),i=n(Function.toString);a(o.inspectSource)||(o.inspectSource=function(e){return i(e)}),e.exports=o.inspectSource},(e,t,r)=>{var n,a,o,i=r(53),s=r(8),l=r(18),u=r(23),c=r(46),f=r(41),d=r(39),h=r(54),p=r(55),v="Object already initialized",y=s.TypeError,m=s.WeakMap;if(i||d.state){var g=d.state||(d.state=new m),b=l(g.get),_=l(g.has),w=l(g.set);n=function(e,t){if(_(g,e))throw new y(v);return t.facade=e,w(g,e,t),t},a=function(e){return b(g,e)||{}},o=function(e){return _(g,e)}}else{var S=h("state");p[S]=!0,n=function(e,t){if(f(e,S))throw new y(v);return t.facade=e,c(e,S,t),t},a=function(e){return f(e,S)?e[S]:{}},o=function(e){return f(e,S)}}e.exports={set:n,get:a,has:o,enforce:function(e){return o(e)?a(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!u(t)||(r=a(t)).type!==e)throw y("Incompatible receiver, "+e+" required");return r}}}},(e,t,r)=>{var n=r(8),a=r(24),o=r(51),i=n.WeakMap;e.exports=a(i)&&/native code/.test(o(i))},(e,t,r)=>{var n=r(37),a=r(43),o=n("keys");e.exports=function(e){return o[e]||(o[e]=a(e))}},e=>{e.exports={}},(e,t,r)=>{var n=r(10),a=r(41),o=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,s=a(o,"name"),l=s&&"something"===function(){}.name,u=s&&(!n||n&&i(o,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:u}},(e,t,r)=>{var n=r(41),a=r(58),o=r(9),i=r(47);e.exports=function(e,t,r){for(var s=a(t),l=i.f,u=o.f,c=0;c<s.length;c++){var f=s[c];n(e,f)||r&&n(r,f)||l(e,f,u(t,f))}}},(e,t,r)=>{var n=r(26),a=r(18),o=r(59),i=r(67),s=r(49),l=a([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(s(e)),r=i.f;return r?l(t,r(e)):t}},(e,t,r)=>{var n=r(60),a=r(66).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},(e,t,r)=>{var n=r(18),a=r(41),o=r(16),i=r(61).indexOf,s=r(55),l=n([].push);e.exports=function(e,t){var r,n=o(e),u=0,c=[];for(r in n)!a(s,r)&&a(n,r)&&l(c,r);for(;t.length>u;)a(n,r=t[u++])&&(~i(c,r)||l(c,r));return c}},(e,t,r)=>{var n=r(16),a=r(62),o=r(64),i=function(e){return function(t,r,i){var s,l=n(t),u=o(l),c=a(i,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,r)=>{var n=r(63),a=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?a(r+t,0):o(r,t)}},e=>{var t=Math.ceil,r=Math.floor;e.exports=function(e){var n=+e;return n!=n||0===n?0:(n>0?r:t)(n)}},(e,t,r)=>{var n=r(65);e.exports=function(e){return n(e.length)}},(e,t,r)=>{var n=r(63),a=Math.min;e.exports=function(e){return e>0?a(n(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,r)=>{var n=r(11),a=r(24),o=/#|\.prototype\./,i=function(e,t){var r=l[s(e)];return r==c||r!=u&&(a(t)?n(t):!!t)},s=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=i.data={},u=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},(e,t,r)=>{var n=r(8),a=r(41),o=r(24),i=r(42),s=r(54),l=r(70),u=s("IE_PROTO"),c=n.Object,f=c.prototype;e.exports=l?c.getPrototypeOf:function(e){var t=i(e);if(a(t,u))return t[u];var r=t.constructor;return o(r)&&t instanceof r?r.prototype:t instanceof c?f:null}},(e,t,r)=>{var n=r(11);e.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},(e,t,r)=>{var n=r(18),a=r(49),o=r(72);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return a(r),o(n),t?e(r,n):r.__proto__=n,r}}():void 0)},(e,t,r)=>{var n=r(8),a=r(24),o=n.String,i=n.TypeError;e.exports=function(e){if("object"==typeof e||a(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},(e,t,r)=>{var n,a=r(49),o=r(74),i=r(66),s=r(55),l=r(76),u=r(45),c=r(54),f="prototype",d="script",h=c("IE_PROTO"),p=function(){},v=function(e){return"<"+d+">"+e+"</"+d+">"},y=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;m="undefined"!=typeof document?document.domain&&n?y(n):(t=u("iframe"),r="java"+d+":",t.style.display="none",l.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):y(n);for(var a=i.length;a--;)delete m[f][i[a]];return m()};s[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(p[f]=a(e),r=new p,p[f]=null,r[h]=e):r=m(),void 0===t?r:o.f(r,t)}},(e,t,r)=>{var n=r(10),a=r(48),o=r(47),i=r(49),s=r(16),l=r(75);t.f=n&&!a?Object.defineProperties:function(e,t){i(e);for(var r,n=s(t),a=l(t),u=a.length,c=0;u>c;)o.f(e,r=a[c++],n[r]);return e}},(e,t,r)=>{var n=r(60),a=r(66);e.exports=Object.keys||function(e){return n(e,a)}},(e,t,r)=>{var n=r(26);e.exports=n("document","documentElement")},(e,t,r)=>{var n=r(18)("".replace),a=String(Error("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(a);e.exports=function(e,t){if(i&&"string"==typeof e)for(;t--;)e=n(e,o,"");return e}},(e,t,r)=>{var n=r(23),a=r(46);e.exports=function(e,t){n(t)&&"cause"in t&&a(e,"cause",t.cause)}},(e,t,r)=>{var n=r(8),a=r(80),o=r(12),i=r(49),s=r(34),l=r(81),u=r(64),c=r(27),f=r(83),d=r(84),h=r(87),p=n.TypeError,v=function(e,t){this.stopped=e,this.result=t},y=v.prototype;e.exports=function(e,t,r){var n,m,g,b,_,w,S,A=r&&r.that,k=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),C=a(t,A),T=function(e){return n&&h(n,"normal",e),new v(!0,e)},R=function(e){return k?(i(e),P?C(e[0],e[1],T):C(e[0],e[1])):P?C(e,T):C(e)};if(x)n=e;else{if(!(m=d(e)))throw p(s(e)+" is not iterable");if(l(m)){for(g=0,b=u(e);b>g;g++)if((_=R(e[g]))&&c(y,_))return _;return new v(!1)}n=f(e,m)}for(w=n.next;!(S=o(w,n)).done;){try{_=R(S.value)}catch(e){h(n,"throw",e)}if("object"==typeof _&&_&&c(y,_))return _}return new v(!1)}},(e,t,r)=>{var n=r(18),a=r(33),o=r(13),i=n(n.bind);e.exports=function(e,t){return a(e),void 0===t?e:o?i(e,t):function(){return e.apply(t,arguments)}}},(e,t,r)=>{var n=r(36),a=r(82),o=n("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||i[o]===e)}},e=>{e.exports={}},(e,t,r)=>{var n=r(8),a=r(12),o=r(33),i=r(49),s=r(34),l=r(84),u=n.TypeError;e.exports=function(e,t){var r=arguments.length<2?l(e):t;if(o(r))return i(a(r,e));throw u(s(e)+" is not iterable")}},(e,t,r)=>{var n=r(85),a=r(32),o=r(82),i=r(36)("iterator");e.exports=function(e){if(null!=e)return a(e,i)||a(e,"@@iterator")||o[n(e)]}},(e,t,r)=>{var n=r(8),a=r(86),o=r(24),i=r(19),s=r(36)("toStringTag"),l=n.Object,u="Arguments"==i(function(){return arguments}());e.exports=a?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=l(e),s))?r:u?i(t):"Object"==(n=i(t))&&o(t.callee)?"Arguments":n}},(e,t,r)=>{var n={};n[r(36)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,r)=>{var n=r(12),a=r(49),o=r(32);e.exports=function(e,t,r){var i,s;a(e);try{if(!(i=o(e,"return"))){if("throw"===t)throw r;return r}i=n(i,e)}catch(e){s=!0,i=e}if("throw"===t)throw r;if(s)throw i;return a(i),r}},(e,t,r)=>{var n=r(89);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},(e,t,r)=>{var n=r(8),a=r(85),o=n.String;e.exports=function(e){if("Symbol"===a(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},(e,t,r)=>{var n=r(11),a=r(15);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",a(1,7)),7!==e.stack)}))},(e,t,r)=>{"use strict";var n=r(16),a=r(92),o=r(82),i=r(52),s=r(47).f,l=r(93),u=r(38),c=r(10),f="Array Iterator",d=i.set,h=i.getterFor(f);e.exports=l(Array,"Array",(function(e,t){d(this,{type:f,target:n(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var p=o.Arguments=o.Array;if(a("keys"),a("values"),a("entries"),!u&&c&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(e){}},(e,t,r)=>{var n=r(36),a=r(73),o=r(47),i=n("unscopables"),s=Array.prototype;null==s[i]&&o.f(s,i,{configurable:!0,value:a(null)}),e.exports=function(e){s[i][e]=!0}},(e,t,r)=>{"use strict";var n=r(7),a=r(12),o=r(38),i=r(56),s=r(24),l=r(94),u=r(69),c=r(71),f=r(96),d=r(46),h=r(50),p=r(36),v=r(82),y=r(95),m=i.PROPER,g=i.CONFIGURABLE,b=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,w=p("iterator"),S="keys",A="values",k="entries",x=function(){return this};e.exports=function(e,t,r,i,p,y,P){l(r,t,i);var C,T,R,E=function(e){if(e===p&&I)return I;if(!_&&e in M)return M[e];switch(e){case S:case A:case k:return function(){return new r(this,e)}}return function(){return new r(this)}},O=t+" Iterator",F=!1,M=e.prototype,j=M[w]||M["@@iterator"]||p&&M[p],I=!_&&j||E(p),D="Array"==t&&M.entries||j;if(D&&(C=u(D.call(new e)))!==Object.prototype&&C.next&&(o||u(C)===b||(c?c(C,b):s(C[w])||h(C,w,x)),f(C,O,!0,!0),o&&(v[O]=x)),m&&p==A&&j&&j.name!==A&&(!o&&g?d(M,"name",A):(F=!0,I=function(){return a(j,this)})),p)if(T={values:E(A),keys:y?I:E(S),entries:E(k)},P)for(R in T)(_||F||!(R in M))&&h(M,R,T[R]);else n({target:t,proto:!0,forced:_||F},T);return o&&!P||M[w]===I||h(M,w,I,{name:p}),v[t]=I,T}},(e,t,r)=>{"use strict";var n=r(95).IteratorPrototype,a=r(73),o=r(15),i=r(96),s=r(82),l=function(){return this};e.exports=function(e,t,r,u){var c=t+" Iterator";return e.prototype=a(n,{next:o(+!u,r)}),i(e,c,!1,!0),s[c]=l,e}},(e,t,r)=>{"use strict";var n,a,o,i=r(11),s=r(24),l=r(73),u=r(69),c=r(50),f=r(36),d=r(38),h=f("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(a=u(u(o)))!==Object.prototype&&(n=a):p=!0),null==n||i((function(){var e={};return n[h].call(e)!==e}))?n={}:d&&(n=l(n)),s(n[h])||c(n,h,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},(e,t,r)=>{var n=r(47).f,a=r(41),o=r(36)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!a(e,o)&&n(e,o,{configurable:!0,value:t})}},(e,t,r)=>{var n=r(86),a=r(50),o=r(98);n||a(Object.prototype,"toString",o,{unsafe:!0})},(e,t,r)=>{"use strict";var n=r(86),a=r(85);e.exports=n?{}.toString:function(){return"[object "+a(this)+"]"}},(e,t,r)=>{"use strict";var n,a,o,i,s=r(7),l=r(38),u=r(8),c=r(26),f=r(12),d=r(100),h=r(50),p=r(101),v=r(71),y=r(96),m=r(102),g=r(33),b=r(24),_=r(23),w=r(103),S=r(51),A=r(79),k=r(104),x=r(105),P=r(108).set,C=r(114),T=r(117),R=r(119),E=r(118),O=r(120),F=r(121),M=r(52),j=r(68),I=r(36),D=r(122),L=r(113),N=r(30),q=I("species"),B="Promise",W=M.getterFor(B),U=M.set,z=M.getterFor(B),G=d&&d.prototype,H=d,V=G,X=u.TypeError,Y=u.document,K=u.process,Q=E.f,J=Q,$=!!(Y&&Y.createEvent&&u.dispatchEvent),Z=b(u.PromiseRejectionEvent),ee="unhandledrejection",te=!1,re=j(B,(function(){var e=S(H),t=e!==String(H);if(!t&&66===N)return!0;if(l&&!V.finally)return!0;if(N>=51&&/native code/.test(e))return!1;var r=new H((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[q]=n,!(te=r.then((function(){}))instanceof n)||!t&&D&&!Z})),ne=re||!k((function(e){H.all(e).catch((function(){}))})),ae=function(e){var t;return!(!_(e)||!b(t=e.then))&&t},oe=function(e,t){var r,n,a,o=t.value,i=1==t.state,s=i?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(i||(2===t.rejection&&ce(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),a=!0)),r===e.promise?u(X("Promise-chain cycle")):(n=ae(r))?f(n,r,l,u):l(r)):u(o)}catch(e){c&&!a&&c.exit(),u(e)}},ie=function(e,t){e.notified||(e.notified=!0,C((function(){for(var r,n=e.reactions;r=n.get();)oe(r,e);e.notified=!1,t&&!e.rejection&&le(e)})))},se=function(e,t,r){var n,a;$?((n=Y.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!Z&&(a=u["on"+e])?a(n):e===ee&&R("Unhandled promise rejection",r)},le=function(e){f(P,u,(function(){var t,r=e.facade,n=e.value;if(ue(e)&&(t=O((function(){L?K.emit("unhandledRejection",n,r):se(ee,r,n)})),e.rejection=L||ue(e)?2:1,t.error))throw t.value}))},ue=function(e){return 1!==e.rejection&&!e.parent},ce=function(e){f(P,u,(function(){var t=e.facade;L?K.emit("rejectionHandled",t):se("rejectionhandled",t,e.value)}))},fe=function(e,t,r){return function(n){e(t,n,r)}},de=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ie(e,!0))},he=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw X("Promise can't be resolved itself");var n=ae(t);n?C((function(){var r={done:!1};try{f(n,t,fe(he,r,e),fe(de,r,e))}catch(t){de(r,t,e)}})):(e.value=t,e.state=1,ie(e,!1))}catch(t){de({done:!1},t,e)}}};if(re&&(V=(H=function(e){w(this,V),g(e),f(n,this);var t=W(this);try{e(fe(he,t),fe(de,t))}catch(e){de(t,e)}}).prototype,(n=function(e){U(this,{type:B,done:!1,notified:!1,parent:!1,reactions:new F,rejection:!1,state:0,value:void 0})}).prototype=p(V,{then:function(e,t){var r=z(this),n=Q(x(this,H));return r.parent=!0,n.ok=!b(e)||e,n.fail=b(t)&&t,n.domain=L?K.domain:void 0,0==r.state?r.reactions.add(n):C((function(){oe(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new n,t=W(e);this.promise=e,this.resolve=fe(he,t),this.reject=fe(de,t)},E.f=Q=function(e){return e===H||e===o?new a(e):J(e)},!l&&b(d)&&G!==Object.prototype)){i=G.then,te||(h(G,"then",(function(e,t){var r=this;return new H((function(e,t){f(i,r,e,t)})).then(e,t)}),{unsafe:!0}),h(G,"catch",V.catch,{unsafe:!0}));try{delete G.constructor}catch(e){}v&&v(G,V)}s({global:!0,wrap:!0,forced:re},{Promise:H}),y(H,B,!1,!0),m(B),o=c(B),s({target:B,stat:!0,forced:re},{reject:function(e){var t=Q(this);return f(t.reject,void 0,e),t.promise}}),s({target:B,stat:!0,forced:l||re},{resolve:function(e){return T(l&&this===o?H:this,e)}}),s({target:B,stat:!0,forced:ne},{all:function(e){var t=this,r=Q(t),n=r.resolve,a=r.reject,o=O((function(){var r=g(t.resolve),o=[],i=0,s=1;A(e,(function(e){var l=i++,u=!1;s++,f(r,t,e).then((function(e){u||(u=!0,o[l]=e,--s||n(o))}),a)})),--s||n(o)}));return o.error&&a(o.value),r.promise},race:function(e){var t=this,r=Q(t),n=r.reject,a=O((function(){var a=g(t.resolve);A(e,(function(e){f(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}})},(e,t,r)=>{var n=r(8);e.exports=n.Promise},(e,t,r)=>{var n=r(50);e.exports=function(e,t,r){for(var a in t)n(e,a,t[a],r);return e}},(e,t,r)=>{"use strict";var n=r(26),a=r(47),o=r(36),i=r(10),s=o("species");e.exports=function(e){var t=n(e),r=a.f;i&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},(e,t,r)=>{var n=r(8),a=r(27),o=n.TypeError;e.exports=function(e,t){if(a(t,e))return e;throw o("Incorrect invocation")}},(e,t,r)=>{var n=r(36)("iterator"),a=!1;try{var o=0,i={next:function(){return{done:!!o++}},return:function(){a=!0}};i[n]=function(){return this},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}},e(o)}catch(e){}return r}},(e,t,r)=>{var n=r(49),a=r(106),o=r(36)("species");e.exports=function(e,t){var r,i=n(e).constructor;return void 0===i||null==(r=n(i)[o])?t:a(r)}},(e,t,r)=>{var n=r(8),a=r(107),o=r(34),i=n.TypeError;e.exports=function(e){if(a(e))return e;throw i(o(e)+" is not a constructor")}},(e,t,r)=>{var n=r(18),a=r(11),o=r(24),i=r(85),s=r(26),l=r(51),u=function(){},c=[],f=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=n(d.exec),p=!d.exec(u),v=function(e){if(!o(e))return!1;try{return f(u,c,e),!0}catch(e){return!1}},y=function(e){if(!o(e))return!1;switch(i(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(d,l(e))}catch(e){return!0}};y.sham=!0,e.exports=!f||a((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?y:v},(e,t,r)=>{var n,a,o,i,s=r(8),l=r(109),u=r(80),c=r(24),f=r(41),d=r(11),h=r(76),p=r(110),v=r(45),y=r(111),m=r(112),g=r(113),b=s.setImmediate,_=s.clearImmediate,w=s.process,S=s.Dispatch,A=s.Function,k=s.MessageChannel,x=s.String,P=0,C={},T="onreadystatechange";try{n=s.location}catch(e){}var R=function(e){if(f(C,e)){var t=C[e];delete C[e],t()}},E=function(e){return function(){R(e)}},O=function(e){R(e.data)},F=function(e){s.postMessage(x(e),n.protocol+"//"+n.host)};b&&_||(b=function(e){y(arguments.length,1);var t=c(e)?e:A(e),r=p(arguments,1);return C[++P]=function(){l(t,void 0,r)},a(P),P},_=function(e){delete C[e]},g?a=function(e){w.nextTick(E(e))}:S&&S.now?a=function(e){S.now(E(e))}:k&&!m?(i=(o=new k).port2,o.port1.onmessage=O,a=u(i.postMessage,i)):s.addEventListener&&c(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!d(F)?(a=F,s.addEventListener("message",O,!1)):a=T in v("script")?function(e){h.appendChild(v("script"))[T]=function(){h.removeChild(this),R(e)}}:function(e){setTimeout(E(e),0)}),e.exports={set:b,clear:_}},(e,t,r)=>{var n=r(13),a=Function.prototype,o=a.apply,i=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(o):function(){return i.apply(o,arguments)})},(e,t,r)=>{var n=r(18);e.exports=n([].slice)},(e,t,r)=>{var n=r(8).TypeError;e.exports=function(e,t){if(e<t)throw n("Not enough arguments");return e}},(e,t,r)=>{var n=r(31);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},(e,t,r)=>{var n=r(19),a=r(8);e.exports="process"==n(a.process)},(e,t,r)=>{var n,a,o,i,s,l,u,c,f=r(8),d=r(80),h=r(9).f,p=r(108).set,v=r(112),y=r(115),m=r(116),g=r(113),b=f.MutationObserver||f.WebKitMutationObserver,_=f.document,w=f.process,S=f.Promise,A=h(f,"queueMicrotask"),k=A&&A.value;k||(n=function(){var e,t;for(g&&(e=w.domain)&&e.exit();a;){t=a.fn,a=a.next;try{t()}catch(e){throw a?i():o=void 0,e}}o=void 0,e&&e.enter()},v||g||m||!b||!_?!y&&S&&S.resolve?((u=S.resolve(void 0)).constructor=S,c=d(u.then,u),i=function(){c(n)}):g?i=function(){w.nextTick(n)}:(p=d(p,f),i=function(){p(n)}):(s=!0,l=_.createTextNode(""),new b(n).observe(l,{characterData:!0}),i=function(){l.data=s=!s})),e.exports=k||function(e){var t={fn:e,next:void 0};o&&(o.next=t),a||(a=t,i()),o=t}},(e,t,r)=>{var n=r(31),a=r(8);e.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==a.Pebble},(e,t,r)=>{var n=r(31);e.exports=/web0s(?!.*chrome)/i.test(n)},(e,t,r)=>{var n=r(49),a=r(23),o=r(118);e.exports=function(e,t){if(n(e),a(t)&&t.constructor===e)return t;var r=o.f(e);return(0,r.resolve)(t),r.promise}},(e,t,r)=>{"use strict";var n=r(33),a=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new a(e)}},(e,t,r)=>{var n=r(8);e.exports=function(e,t){var r=n.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}},e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=t},e=>{e.exports="object"==typeof window},(e,t,r)=>{"use strict";var n=r(7),a=r(12),o=r(33),i=r(118),s=r(120),l=r(79);n({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=i.f(t),n=r.resolve,u=r.reject,c=s((function(){var r=o(t.resolve),i=[],s=0,u=1;l(e,(function(e){var o=s++,l=!1;u++,a(r,t,e).then((function(e){l||(l=!0,i[o]={status:"fulfilled",value:e},--u||n(i))}),(function(e){l||(l=!0,i[o]={status:"rejected",reason:e},--u||n(i))}))})),--u||n(i)}));return c.error&&u(c.value),r.promise}})},(e,t,r)=>{"use strict";var n=r(7),a=r(33),o=r(26),i=r(12),s=r(118),l=r(120),u=r(79),c="No one promise resolved";n({target:"Promise",stat:!0},{any:function(e){var t=this,r=o("AggregateError"),n=s.f(t),f=n.resolve,d=n.reject,h=l((function(){var n=a(t.resolve),o=[],s=0,l=1,h=!1;u(e,(function(e){var a=s++,u=!1;l++,i(n,t,e).then((function(e){u||h||(h=!0,f(e))}),(function(e){u||h||(u=!0,o[a]=e,--l||d(new r(o,c)))}))})),--l||d(new r(o,c))}));return h.error&&d(h.value),n.promise}})},(e,t,r)=>{"use strict";var n=r(7),a=r(38),o=r(100),i=r(11),s=r(26),l=r(24),u=r(105),c=r(117),f=r(50);if(n({target:"Promise",proto:!0,real:!0,forced:!!o&&i((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),r=l(e);return this.then(r?function(r){return c(t,e()).then((function(){return r}))}:e,r?function(r){return c(t,e()).then((function(){throw r}))}:e)}}),!a&&l(o)){var d=s("Promise").prototype.finally;o.prototype.finally!==d&&f(o.prototype,"finally",d,{unsafe:!0})}},(e,t,r)=>{"use strict";var n=r(127).charAt,a=r(89),o=r(52),i=r(93),s="String Iterator",l=o.set,u=o.getterFor(s);i(String,"String",(function(e){l(this,{type:s,string:a(e),index:0})}),(function(){var e,t=u(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=n(r,a),t.index+=e.length,{value:e,done:!1})}))},(e,t,r)=>{var n=r(18),a=r(63),o=r(89),i=r(20),s=n("".charAt),l=n("".charCodeAt),u=n("".slice),c=function(e){return function(t,r){var n,c,f=o(i(t)),d=a(r),h=f.length;return d<0||d>=h?e?"":void 0:(n=l(f,d))<55296||n>56319||d+1===h||(c=l(f,d+1))<56320||c>57343?e?s(f,d):n:e?u(f,d,d+2):c-56320+(n-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},(e,t,r)=>{var n=r(8);e.exports=n},(e,t,r)=>{r(91),r(97),r(130),r(141),r(142);var n=r(128);e.exports=n.structuredClone},(e,t,r)=>{"use strict";r(131)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(140))},(e,t,r)=>{"use strict";var n=r(7),a=r(8),o=r(18),i=r(68),s=r(50),l=r(132),u=r(79),c=r(103),f=r(24),d=r(23),h=r(11),p=r(104),v=r(96),y=r(139);e.exports=function(e,t,r){var m=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),b=m?"set":"add",_=a[e],w=_&&_.prototype,S=_,A={},k=function(e){var t=o(w[e]);s(w,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!d(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return g&&!d(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!d(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(i(e,!f(_)||!(g||w.forEach&&!h((function(){(new _).entries().next()})))))S=r.getConstructor(t,e,m,b),l.enable();else if(i(e,!0)){var x=new S,P=x[b](g?{}:-0,1)!=x,C=h((function(){x.has(1)})),T=p((function(e){new _(e)})),R=!g&&h((function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)}));T||((S=t((function(e,t){c(e,w);var r=y(new _,e,S);return null!=t&&u(t,r[b],{that:r,AS_ENTRIES:m}),r}))).prototype=w,w.constructor=S),(C||R)&&(k("delete"),k("has"),m&&k("get")),(R||P)&&k(b),g&&w.clear&&delete w.clear}return A[e]=S,n({global:!0,forced:S!=_},A),v(S,e),g||r.setStrong(S,e,m),S}},(e,t,r)=>{var n=r(7),a=r(18),o=r(55),i=r(23),s=r(41),l=r(47).f,u=r(59),c=r(133),f=r(136),d=r(43),h=r(138),p=!1,v=d("meta"),y=0,m=function(e){l(e,v,{value:{objectID:"O"+y++,weakData:{}}})},g=e.exports={enable:function(){g.enable=function(){},p=!0;var e=u.f,t=a([].splice),r={};r[v]=1,e(r).length&&(u.f=function(r){for(var n=e(r),a=0,o=n.length;a<o;a++)if(n[a]===v){t(n,a,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,v)){if(!f(e))return"F";if(!t)return"E";m(e)}return e[v].objectID},getWeakData:function(e,t){if(!s(e,v)){if(!f(e))return!0;if(!t)return!1;m(e)}return e[v].weakData},onFreeze:function(e){return h&&p&&f(e)&&!s(e,v)&&m(e),e}};o[v]=!0},(e,t,r)=>{var n=r(19),a=r(16),o=r(59).f,i=r(134),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"Window"==n(e)?function(e){try{return o(e)}catch(e){return i(s)}}(e):o(a(e))}},(e,t,r)=>{var n=r(8),a=r(62),o=r(64),i=r(135),s=n.Array,l=Math.max;e.exports=function(e,t,r){for(var n=o(e),u=a(t,n),c=a(void 0===r?n:r,n),f=s(l(c-u,0)),d=0;u<c;u++,d++)i(f,d,e[u]);return f.length=d,f}},(e,t,r)=>{"use strict";var n=r(21),a=r(47),o=r(15);e.exports=function(e,t,r){var i=n(t);i in e?a.f(e,i,o(0,r)):e[i]=r}},(e,t,r)=>{var n=r(11),a=r(23),o=r(19),i=r(137),s=Object.isExtensible,l=n((function(){s(1)}));e.exports=l||i?function(e){return!!a(e)&&(!i||"ArrayBuffer"!=o(e))&&(!s||s(e))}:s},(e,t,r)=>{var n=r(11);e.exports=n((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},(e,t,r)=>{var n=r(11);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(e,t,r)=>{var n=r(24),a=r(23),o=r(71);e.exports=function(e,t,r){var i,s;return o&&n(i=t.constructor)&&i!==r&&a(s=i.prototype)&&s!==r.prototype&&o(e,s),e}},(e,t,r)=>{"use strict";var n=r(47).f,a=r(73),o=r(101),i=r(80),s=r(103),l=r(79),u=r(93),c=r(102),f=r(10),d=r(132).fastKey,h=r(52),p=h.set,v=h.getterFor;e.exports={getConstructor:function(e,t,r,u){var c=e((function(e,n){s(e,h),p(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=n&&l(n,e[u],{that:e,AS_ENTRIES:r})})),h=c.prototype,y=v(t),m=function(e,t,r){var n,a,o=y(e),i=g(e,t);return i?i.value=r:(o.last=i={index:a=d(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=i),n&&(n.next=i),f?o.size++:e.size++,"F"!==a&&(o.index[a]=i)),e},g=function(e,t){var r,n=y(e),a=d(t);if("F"!==a)return n.index[a];for(r=n.first;r;r=r.next)if(r.key==t)return r};return o(h,{clear:function(){for(var e=y(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=this,r=y(t),n=g(t,e);if(n){var a=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=a),a&&(a.previous=o),r.first==n&&(r.first=a),r.last==n&&(r.last=o),f?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=y(this),n=i(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),o(h,r?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&n(h,"size",{get:function(){return y(this).size}}),c},setStrong:function(e,t,r){var n=t+" Iterator",a=v(t),o=v(n);u(e,t,(function(e,t){p(this,{type:n,target:e,state:a(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),c(t)}}},(e,t,r)=>{"use strict";r(131)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(140))},(e,t,r)=>{var n,a=r(38),o=r(7),i=r(8),s=r(26),l=r(18),u=r(11),c=r(43),f=r(24),d=r(107),h=r(23),p=r(25),v=r(79),y=r(49),m=r(85),g=r(41),b=r(135),_=r(46),w=r(64),S=r(111),A=r(143),k=r(90),x=i.Object,P=i.Date,C=i.Error,T=i.EvalError,R=i.RangeError,E=i.ReferenceError,O=i.SyntaxError,F=i.TypeError,M=i.URIError,j=i.PerformanceMark,I=i.WebAssembly,D=I&&I.CompileError||C,L=I&&I.LinkError||C,N=I&&I.RuntimeError||C,q=s("DOMException"),B=s("Set"),W=s("Map"),U=W.prototype,z=l(U.has),G=l(U.get),H=l(U.set),V=l(B.prototype.add),X=s("Object","keys"),Y=l([].push),K=l((!0).valueOf),Q=l(1..valueOf),J=l("".valueOf),$=l(A),Z=l(P.prototype.getTime),ee=c("structuredClone"),te="DataCloneError",re="Transferring",ne=function(e){return!u((function(){var t=new i.Set([7]),r=e(t),n=e(x(7));return r==t||!r.has(7)||"object"!=typeof n||7!=n}))&&e},ae=i.structuredClone,oe=a||(n=ae,!(!u((function(){var e=n(new i.AggregateError([1],ee,{cause:3}));return"AggregateError"!=e.name||1!=e.errors[0]||e.message!=ee||3!=e.cause}))&&n)),ie=!ae&&ne((function(e){return new j(ee,{detail:e}).detail})),se=ne(ae)||ie,le=function(e){throw new q("Uncloneable type: "+e,te)},ue=function(e,t){throw new q((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",te)},ce=function(e,t){if(p(e)&&le("Symbol"),!h(e))return e;if(t){if(z(t,e))return G(t,e)}else t=new W;var r,n,a,o,l,u,c,v,y,S,A=m(e),j=!1;switch(A){case"Array":a=[],j=!0;break;case"Object":a={},j=!0;break;case"Map":a=new W,j=!0;break;case"Set":a=new B,j=!0;break;case"RegExp":a=new RegExp(e.source,"flags"in e?e.flags:$(e));break;case"Error":switch(n=e.name){case"AggregateError":a=s("AggregateError")([]);break;case"EvalError":a=T();break;case"RangeError":a=R();break;case"ReferenceError":a=E();break;case"SyntaxError":a=O();break;case"TypeError":a=F();break;case"URIError":a=M();break;case"CompileError":a=D();break;case"LinkError":a=L();break;case"RuntimeError":a=N();break;default:a=C()}j=!0;break;case"DOMException":a=new q(e.message,e.name),j=!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":r=i[A],h(r)||ue(A),a=new r(ce(e.buffer,t),e.byteOffset,"DataView"===A?e.byteLength:e.length);break;case"DOMQuad":try{a=new DOMQuad(ce(e.p1,t),ce(e.p2,t),ce(e.p3,t),ce(e.p4,t))}catch(t){se?a=se(e):ue(A)}break;case"FileList":if(r=i.DataTransfer,d(r)){for(o=new r,l=0,u=w(e);l<u;l++)o.items.add(ce(e[l],t));a=o.files}else se?a=se(e):ue(A);break;case"ImageData":try{a=new ImageData(ce(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch(t){se?a=se(e):ue(A)}break;default:if(se)a=se(e);else switch(A){case"BigInt":a=x(e.valueOf());break;case"Boolean":a=x(K(e));break;case"Number":a=x(Q(e));break;case"String":a=x(J(e));break;case"Date":a=new P(Z(e));break;case"ArrayBuffer":(r=i.DataView)||"function"==typeof e.slice||ue(A);try{if("function"==typeof e.slice)a=e.slice(0);else for(u=e.byteLength,a=new ArrayBuffer(u),y=new r(e),S=new r(a),l=0;l<u;l++)S.setUint8(l,y.getUint8(l))}catch(e){throw new q("ArrayBuffer is detached",te)}break;case"SharedArrayBuffer":a=e;break;case"Blob":try{a=e.slice(0,e.size,e.type)}catch(e){ue(A)}break;case"DOMPoint":case"DOMPointReadOnly":r=i[A];try{a=r.fromPoint?r.fromPoint(e):new r(e.x,e.y,e.z,e.w)}catch(e){ue(A)}break;case"DOMRect":case"DOMRectReadOnly":r=i[A];try{a=r.fromRect?r.fromRect(e):new r(e.x,e.y,e.width,e.height)}catch(e){ue(A)}break;case"DOMMatrix":case"DOMMatrixReadOnly":r=i[A];try{a=r.fromMatrix?r.fromMatrix(e):new r(e)}catch(e){ue(A)}break;case"AudioData":case"VideoFrame":f(e.clone)||ue(A);try{a=e.clone()}catch(e){le(A)}break;case"File":try{a=new File([e],e.name,e)}catch(e){ue(A)}break;case"CryptoKey":case"GPUCompilationMessage":case"GPUCompilationInfo":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ue(A);default:le(A)}}if(H(t,e,a),j)switch(A){case"Array":case"Object":for(c=X(e),l=0,u=w(c);l<u;l++)v=c[l],b(a,v,ce(e[v],t));break;case"Map":e.forEach((function(e,r){H(a,ce(r,t),ce(e,t))}));break;case"Set":e.forEach((function(e){V(a,ce(e,t))}));break;case"Error":_(a,"message",ce(e.message,t)),g(e,"cause")&&_(a,"cause",ce(e.cause,t)),"AggregateError"==n&&(a.errors=ce(e.errors,t));case"DOMException":k&&_(a,"stack",ce(e.stack,t))}return a},fe=ae&&!u((function(){var e=new ArrayBuffer(8),t=ae(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength}));o({global:!0,enumerable:!0,sham:!fe,forced:oe},{structuredClone:function(e){var t,r=S(arguments.length,1)>1?y(arguments[1]):void 0,n=r?r.transfer:void 0;return void 0!==n&&function(e,t){if(!h(e))throw F("Transfer option cannot be converted to a sequence");var r=[];v(e,(function(e){Y(r,y(e))}));var n,a,o,s,l,u,c=0,p=w(r);if(fe)for(s=ae(r,{transfer:r});c<p;)H(t,r[c],s[c++]);else for(;c<p;){if(n=r[c++],z(t,n))throw new q("Duplicate transferable",te);switch(a=m(n)){case"ImageBitmap":o=i.OffscreenCanvas,d(o)||ue(a,re);try{(u=new o(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),l=u.transferToImageBitmap()}catch(e){}break;case"AudioData":case"VideoFrame":f(n.clone)&&f(n.close)||ue(a,re);try{l=n.clone(),n.close()}catch(e){}break;case"ArrayBuffer":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":ue(a,re)}if(void 0===l)throw new q("This object cannot be transferred: "+a,te);H(t,n,l)}}(n,t=new W),ce(e,t)}})},(e,t,r)=>{"use strict";var n=r(49);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},(__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(e){return e&&e.__esModule?e:{default:e}}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateMethodGet(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return _classApplyDescriptorSet(e,_classExtractFieldDescriptor(e,t,"set"),r),r}function _classApplyDescriptorSet(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}function _classPrivateFieldGet(e,t){return _classApplyDescriptorGet(e,_classExtractFieldDescriptor(e,t,"get"))}function _classExtractFieldDescriptor(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_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(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function asyncGeneratorStep(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){asyncGeneratorStep(o,n,a,i,s,"next",e)}function s(e){asyncGeneratorStep(o,n,a,i,s,"throw",e)}i(void 0)}))}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_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(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}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;function setPDFNetworkStreamFactory(e){createPDFNetworkStream=e}function getDocument(e){var t,r=new PDFDocumentLoadingTask;if("string"==typeof e||e instanceof URL)t={url:e};else if((0,_util.isArrayBuffer)(e))t={data:e};else if(e instanceof PDFDataRangeTransport)t={range:e};else{if("object"!==_typeof(e))throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");t=e}var n=Object.create(null),a=null,o=null;for(var i in t){var s=t[i];switch(i){case"url":if("undefined"!=typeof window)try{n[i]=new URL(s,window.location).href;continue}catch(e){(0,_util.warn)('Cannot create valid URL: "'.concat(e,'".'))}else if("string"==typeof s||s instanceof URL){n[i]=s.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":a=s;continue;case"worker":o=s;continue;case"data":if(_is_node.isNodeJS&&"undefined"!=typeof Buffer&&s instanceof Buffer)n[i]=new Uint8Array(s);else{if(s instanceof Uint8Array)break;if("string"==typeof s)n[i]=(0,_util.stringToBytes)(s);else if("object"!==_typeof(s)||null===s||isNaN(s.length)){if(!(0,_util.isArrayBuffer)(s))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");n[i]=new Uint8Array(s)}else n[i]=new Uint8Array(s)}continue}n[i]=s}if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CMapReaderFactory=n.CMapReaderFactory||DefaultCMapReaderFactory,n.StandardFontDataFactory=n.StandardFontDataFactory||DefaultStandardFontDataFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,n.enableXfa=!0===n.enableXfa,("string"!=typeof n.docBaseUrl||(0,_display_utils.isDataScheme)(n.docBaseUrl))&&(n.docBaseUrl=null),Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!=typeof n.useWorkerFetch&&(n.useWorkerFetch=n.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&n.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=_is_node.isNodeJS),"boolean"!=typeof n.useSystemFonts&&(n.useSystemFonts=!_is_node.isNodeJS&&!n.disableFontFace),void 0===n.ownerDocument&&(n.ownerDocument=globalThis.document),"boolean"!=typeof n.disableRange&&(n.disableRange=!1),"boolean"!=typeof n.disableStream&&(n.disableStream=!1),"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!o){var l={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};o=l.port?PDFWorker.fromPort(l):new PDFWorker(l),r._worker=o}var u=r.docId;return o.promise.then((function(){if(r.destroyed)throw new Error("Loading aborted");var e=_fetchDocument(o,n,a,u),t=new Promise((function(e){var t;a?t=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,contentDispositionFilename:n.contentDispositionFilename,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(t=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),e(t)}));return Promise.all([e,t]).then((function(e){var t=_slicedToArray(e,2),a=t[0],i=t[1];if(r.destroyed)throw new Error("Loading aborted");var s=new _message_handler.MessageHandler(u,a,o.port),l=new WorkerTransport(s,r,i,n);r._transport=l,s.send("Ready",null)}))})).catch(r._capability.reject),r}function _fetchDocument(e,t,r,n){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regenerator.default.mark((function e(t,r,n,a){var o;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.destroyed){e.next=2;break}throw new Error("Worker was destroyed");case 2:return n&&(r.length=n.length,r.initialData=n.initialData,r.progressiveDone=n.progressiveDone,r.contentDispositionFilename=n.contentDispositionFilename),e.next=5,t.messageHandler.sendWithPromise("GetDocRequest",{docId:a,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:if(o=e.sent,!t.destroyed){e.next=8;break}throw new Error("Worker was destroyed");case 8:return e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;var PDFDocumentLoadingTask=function(){function e(){_classCallCheck(this,e),this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d".concat(e.idCounters.doc++),this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}var t;return _createClass(e,[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:(t=_asyncToGenerator(_regenerator.default.mark((function e(){var t;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.destroyed=!0,e.next=3,null===(t=this._transport)||void 0===t?void 0:t.destroy();case 3:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"idCounters",get:function(){return(0,_util.shadow)(this,"idCounters",{doc:0})}}]),e}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,e),this.length=t,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(e,[{key:"addRangeListener",value:function(e){this._rangeListeners.push(e)}},{key:"addProgressListener",value:function(e){this._progressListeners.push(e)}},{key:"addProgressiveReadListener",value:function(e){this._progressiveReadListeners.push(e)}},{key:"addProgressiveDoneListener",value:function(e){this._progressiveDoneListeners.push(e)}},{key:"onDataRange",value:function(e,t){var r,n=_createForOfIteratorHelper(this._rangeListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(e,t)}catch(e){n.e(e)}finally{n.f()}}},{key:"onDataProgress",value:function(e,t){var r=this;this._readyCapability.promise.then((function(){var n,a=_createForOfIteratorHelper(r._progressListeners);try{for(a.s();!(n=a.n()).done;)(0,n.value)(e,t)}catch(e){a.e(e)}finally{a.f()}}))}},{key:"onDataProgressiveRead",value:function(e){var t=this;this._readyCapability.promise.then((function(){var r,n=_createForOfIteratorHelper(t._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(e)}catch(e){n.e(e)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var e=this;this._readyCapability.promise.then((function(){var t,r=_createForOfIteratorHelper(e._progressiveDoneListeners);try{for(r.s();!(t=r.n()).done;)(0,t.value)()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),e}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function e(t,r){var n,a=this;_classCallCheck(this,e),this._pdfInfo=t,this._transport=r,Object.defineProperty(this,"fingerprint",{get:function(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:(n=_asyncToGenerator(_regenerator.default.mark((function e(){return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),e.abrupt("return",a.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})}return _createClass(e,[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"stats",get:function(){return this._transport.stats}},{key:"isPureXfa",get:function(){return!!this._transport._htmlForXfa}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{key:"getPage",value:function(e){return this._transport.getPage(e)}},{key:"getPageIndex",value:function(e){return this._transport.getPageIndex(e)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(e){return this._transport.getDestination(e)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(e||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),e}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function e(t,r,n,a){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(this,e),this._pageIndex=t,this._pageInfo=r,this._ownerDocument=a,this._transport=n,this._stats=o?new _display_utils.StatTimer:null,this._pdfBug=o,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}var t;return _createClass(e,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scale,r=e.rotation,n=void 0===r?this.rotate:r,a=e.offsetX,o=void 0===a?0:a,i=e.offsetY,s=void 0===i?0:i,l=e.dontFlip,u=void 0!==l&&l;return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:n,offsetX:o,offsetY:s,dontFlip:u})}},{key:"getAnnotations",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,t=void 0===e?"display":e,r=this._transport.getRenderingIntent(t),n=this._annotationPromises.get(r.cacheKey);return n||(n=this._transport.getAnnotations(this._pageIndex,r.renderingIntent),this._annotationPromises.set(r.cacheKey,n),n=n.then((function(e){var t,r=_createForOfIteratorHelper(e);try{var n=function(){var e=t.value;void 0!==e.titleObj&&Object.defineProperty(e,"title",{get:function(){return(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),e.titleObj.str}}),void 0!==e.contentsObj&&Object.defineProperty(e,"contents",{get:function(){return(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),e.contentsObj.str}})};for(r.s();!(t=r.n()).done;)n()}catch(e){r.e(e)}finally{r.f()}return e}))),n}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:(t=_asyncToGenerator(_regenerator.default.mark((function e(){var t;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(e){var t,r,n,a=this,o=e.canvasContext,i=e.viewport,s=e.intent,l=void 0===s?"display":s,u=e.annotationMode,c=void 0===u?_util.AnnotationMode.ENABLE:u,f=e.transform,d=void 0===f?null:f,h=e.imageLayer,p=void 0===h?null:h,v=e.canvasFactory,y=void 0===v?null:v,m=e.background,g=void 0===m?null:m,b=e.optionalContentConfigPromise,_=void 0===b?null:b,w=e.annotationCanvasMap,S=void 0===w?null:w;void 0!==(null===(t=arguments[0])||void 0===t?void 0:t.renderInteractiveForms)&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_FORMS)),void 0!==(null===(r=arguments[0])||void 0===r?void 0:r.includeAnnotationStorage)&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&c===_util.AnnotationMode.ENABLE&&(c=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");var A=this._transport.getRenderingIntent(l,c);this.pendingCleanup=!1,_||(_=this._transport.getOptionalContentConfig());var k=this._intentStates.get(A.cacheKey);k||(k=Object.create(null),this._intentStates.set(A.cacheKey,k)),k.streamReaderCancelTimeout&&(clearTimeout(k.streamReaderCancelTimeout),k.streamReaderCancelTimeout=null);var x=y||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),P=!!(A.renderingIntent&_util.RenderingIntentFlag.PRINT);k.displayReadyCapability||(k.displayReadyCapability=(0,_util.createPromiseCapability)(),k.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(A));var C=function(e){k.renderTasks.delete(T),(a.cleanupAfterRender||P)&&(a.pendingCleanup=!0),a._tryCleanup(),e?(T.capability.reject(e),a._abortOperatorList({intentState:k,reason:e instanceof Error?e:new Error(e)})):T.capability.resolve(),a._stats&&(a._stats.timeEnd("Rendering"),a._stats.timeEnd("Overall"))},T=new InternalRenderTask({callback:C,params:{canvasContext:o,viewport:i,transform:d,imageLayer:p,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:S,operatorList:k.operatorList,pageIndex:this._pageIndex,canvasFactory:x,useRequestAnimationFrame:!P,pdfBug:this._pdfBug});((n=k).renderTasks||(n.renderTasks=new Set)).add(T);var R=T.task;return Promise.all([k.displayReadyCapability.promise,_]).then((function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];a.pendingCleanup?C():(a._stats&&a._stats.time("Rendering"),T.initializeGraphics({transparency:r,optionalContentConfig:n}),T.operatorListChanged())})).catch(C),R}},{key:"getOperatorList",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.intent,a=void 0===n?"display":n,o=r.annotationMode,i=void 0===o?_util.AnnotationMode.ENABLE:o,s=this._transport.getRenderingIntent(a,i,!0),l=this._intentStates.get(s.cacheKey);return l||(l=Object.create(null),this._intentStates.set(s.cacheKey,l)),l.opListReadCapability||((e=Object.create(null)).operatorListChanged=function(){l.operatorList.lastChunk&&(l.opListReadCapability.resolve(l.operatorList),l.renderTasks.delete(e))},l.opListReadCapability=(0,_util.createPromiseCapability)(),((t=l).renderTasks||(t.renderTasks=new Set)).add(e),l.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(s)),l.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableCombineTextItems,r=void 0!==t&&t,n=e.includeMarkedContent,a=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==r,includeMarkedContent:!0===a},{highWaterMark:100,size:function(e){return e.items.length}})}},{key:"getTextContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(e){return _xfa_text.XfaText.textContent(e)}));var t=this.streamTextContent(e);return new Promise((function(e,r){var n=t.getReader(),a={items:[],styles:Object.create(null)};!function t(){n.read().then((function(r){var n,o=r.value;r.done?e(a):(Object.assign(a.styles,o.styles),(n=a.items).push.apply(n,_toConsumableArray(o.items)),t())}),r)}()}))}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0;var e,t=[],r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability){var a,o=_createForOfIteratorHelper(n.renderTasks);try{for(o.s();!(a=o.n()).done;){var i=a.value;t.push(i.completed),i.cancel()}}catch(e){o.e(e)}finally{o.f()}}}}catch(e){r.e(e)}finally{r.f()}return this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.pendingCleanup=!0,this._tryCleanup(e)}},{key:"_tryCleanup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.pendingCleanup)return!1;var t,r=_createForOfIteratorHelper(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value,a=n.renderTasks,o=n.operatorList;if(a.size>0||!o.lastChunk)return!1}}catch(e){r.e(e)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(e,t){var r=this._intentStates.get(t);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(e))}},{key:"_renderPageChunk",value:function(e,t){for(var r=0,n=e.length;r<n;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk;var a,o=_createForOfIteratorHelper(t.renderTasks);try{for(o.s();!(a=o.n()).done;)a.value.operatorListChanged()}catch(e){o.e(e)}finally{o.f()}e.lastChunk&&this._tryCleanup()}},{key:"_pumpOperatorList",value:function(e){var t=this,r=e.renderingIntent,n=e.cacheKey,a=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:r,cacheKey:n,annotationStorage:r&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}).getReader(),o=this._intentStates.get(n);o.streamReader=a,function e(){a.read().then((function(r){var n=r.value;r.done?o.streamReader=null:t._transport.destroyed||(t._renderPageChunk(n,o),e())}),(function(e){if(o.streamReader=null,!t._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;var r,n=_createForOfIteratorHelper(o.renderTasks);try{for(n.s();!(r=n.n()).done;)r.value.operatorListChanged()}catch(e){n.e(e)}finally{n.f()}t._tryCleanup()}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}}))}()}},{key:"_abortOperatorList",value:function(e){var t=this,r=e.intentState,n=e.reason,a=e.force,o=void 0!==a&&a;if(r.streamReader){if(!o){if(r.renderTasks.size>0)return;if(n instanceof _display_utils.RenderingCancelledException)return void(r.streamReaderCancelTimeout=setTimeout((function(){t._abortOperatorList({intentState:r,reason:n,force:!0}),r.streamReaderCancelTimeout=null}),RENDERING_CANCELLED_TIMEOUT))}if(r.streamReader.cancel(new _util.AbortException(n.message)).catch((function(){})),r.streamReader=null,!this._transport.destroyed){var i,s=_createForOfIteratorHelper(this._intentStates);try{for(s.s();!(i=s.n()).done;){var l=_slicedToArray(i.value,2),u=l[0];if(l[1]===r){this._intentStates.delete(u);break}}}catch(e){s.e(e)}finally{s.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),e}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function e(){_classCallCheck(this,e),this._listeners=[],this._deferred=Promise.resolve()}return _createClass(e,[{key:"postMessage",value:function(e,t){var r=this,n={data:t?structuredClone(e,t):structuredClone(e)};this._deferred.then((function(){var e,t=_createForOfIteratorHelper(r._listeners);try{for(t.s();!(e=t.n()).done;)e.value.call(r,n)}catch(e){t.e(e)}finally{t.f()}}))}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),e}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(_is_node.isNodeJS)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(e){var t='importScripts("'.concat(e,'");');return URL.createObjectURL(new Blob([t]))};var PDFWorker=function(){function PDFWorker(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,r=void 0===t?null:t,n=e.port,a=void 0===n?null:n,o=e.verbosity,i=void 0===o?(0,_util.getVerbosityLevel)():o;if(_classCallCheck(this,PDFWorker),a&&PDFWorker._workerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=r,this.destroyed=!1,this.verbosity=i,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return PDFWorker._workerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}return _createClass(PDFWorker,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var e=this;if("undefined"!=typeof Worker&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var t=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),n=new _message_handler.MessageHandler("main","worker",r),a=function(){r.removeEventListener("error",o),n.destroy(),r.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},o=function(){e._webWorker||a()};r.addEventListener("error",o),n.on("test",(function(t){r.removeEventListener("error",o),e.destroyed?a():t?(e._messageHandler=n,e._port=r,e._webWorker=r,e._readyCapability.resolve(),n.send("configure",{verbosity:e.verbosity})):(e._setupFakeWorker(),n.destroy(),r.terminate())})),n.on("ready",(function(t){if(r.removeEventListener("error",o),e.destroyed)a();else try{i()}catch(t){e._setupFakeWorker()}}));var i=function(){var e=new Uint8Array([255]);try{n.send("test",e,[e.buffer])}catch(t){(0,_util.warn)("Cannot use postMessage transfers."),e[0]=0,n.send("test",e)}};return void i()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var e=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=new LoopbackPort;e._port=r;var n="fake".concat(PDFWorkerUtil.fakeWorkerId++),a=new _message_handler.MessageHandler(n+"_worker",n,r);t.setup(a,r);var o=new _message_handler.MessageHandler(n,n+"_worker",r);e._messageHandler=o,e._readyCapability.resolve(),o.send("configure",{verbosity:e.verbosity})}})).catch((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker._workerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"_workerPorts",get:function(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}},{key:"fromPort",value:function(e){if(null==e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(e.port)?this._workerPorts.get(e.port):new PDFWorker(e)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function(){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(e){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:if(mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler,!mainWorkerMessageHandler){_context4.next=3;break}return _context4.abrupt("return",mainWorkerMessageHandler);case 3:if(!_is_node.isNodeJS){_context4.next=6;break}return worker=eval("require")(_this11.workerSrc),_context4.abrupt("return",worker.WorkerMessageHandler);case 6:return _context4.next=8,(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(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]),PDFWorker}();exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap,WorkerTransport=function(){function e(t,r,n,a){_classCallCheck(this,e),_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:a.ownerDocument,styleElement:a.styleElement}),this._params=a,a.useWorkerFetch||(this.CMapReaderFactory=new a.CMapReaderFactory({baseUrl:a.cMapUrl,isCompressed:a.cMapPacked}),this.StandardFontDataFactory=new a.StandardFontDataFactory({baseUrl:a.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}var t;return _createClass(e,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"stats",get:function(){return _classPrivateFieldGet(this,_docStats)}},{key:"getRenderingIntent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=_util.RenderingIntentFlag.DISPLAY,a="";switch(e){case"any":n=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":n=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(e))}switch(t){case _util.AnnotationMode.DISABLE:n+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:n+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:n+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,a=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(t))}return r&&(n+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:n,cacheKey:"".concat(n,"_").concat(a)}}},{key:"destroy",value:function(){var e=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 t,r=[],n=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(n.s();!(t=n.n()).done;){var a=t.value;r.push(a._destroy())}}catch(e){n.e(e)}finally{n.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var o=this.messageHandler.sendWithPromise("Terminate",null);return r.push(o),Promise.all(r).then((function(){e.commonObjs.clear(),e.fontLoader.clear(),_classPrivateFieldSet(e,_metadataPromise,null),e._getFieldObjectsPromise=null,e._hasJSActionsPromise=null,e._networkStream&&e._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var e=this,t=this.messageHandler,r=this.loadingTask;t.on("GetReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetReader - no `IPDFStream` instance available."),e._fullReader=e._networkStream.getFullReader(),e._fullReader.onProgress=function(t){e._lastProgress={loaded:t.loaded,total:t.total}},r.onPull=function(){e._fullReader.read().then((function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){r.error(e)}))},r.onCancel=function(t){e._fullReader.cancel(t),r.ready.catch((function(t){if(!e.destroyed)throw t}))}})),t.on("ReaderHeadersReady",(function(t){var n=(0,_util.createPromiseCapability)(),a=e._fullReader;return a.headersReady.then((function(){var t;a.isStreamingSupported&&a.isRangeSupported||(e._lastProgress&&(null===(t=r.onProgress)||void 0===t||t.call(r,e._lastProgress)),a.onProgress=function(e){var t;null===(t=r.onProgress)||void 0===t||t.call(r,{loaded:e.loaded,total:e.total})});n.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})}),n.reject),n.promise})),t.on("GetRangeReader",(function(t,r){(0,_util.assert)(e._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var n=e._networkStream.getRangeReader(t.begin,t.end);n?(r.onPull=function(){n.read().then((function(e){var t=e.value;e.done?r.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(t),1,[t]))})).catch((function(e){r.error(e)}))},r.onCancel=function(t){n.cancel(t),r.ready.catch((function(t){if(!e.destroyed)throw t}))}):r.close()})),t.on("GetDoc",(function(t){var n=t.pdfInfo;e._numPages=n.numPages,e._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,r._capability.resolve(new PDFDocumentProxy(n,e))})),t.on("DocException",(function(e){var t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}r._capability.reject(t)})),t.on("PasswordRequest",(function(t){if(e._passwordCapability=(0,_util.createPromiseCapability)(),r.onPassword)try{r.onPassword((function(t){t instanceof Error?e._passwordCapability.reject(t):e._passwordCapability.resolve({password:t})}),t.code)}catch(t){e._passwordCapability.reject(t)}else e._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return e._passwordCapability.promise})),t.on("DataLoaded",(function(t){var n;null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.length,total:t.length}),e.downloadInfoCapability.resolve(t)})),t.on("StartRenderPage",(function(t){e.destroyed||_classPrivateFieldGet(e,_pageCache).get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)})),t.on("commonobj",(function(r){var n,a=_slicedToArray(r,3),o=a[0],i=a[1],s=a[2];if(!e.destroyed&&!e.commonObjs.has(o))switch(i){case"Font":var l=e._params;if("error"in s){var u=s.error;(0,_util.warn)("Error during font loading: ".concat(u)),e.commonObjs.resolve(o,u);break}var c=null;l.pdfBug&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled&&(c={registerFont:function(e,t){globalThis.FontInspector.fontAdded(e,t)}});var f=new _font_loader.FontFaceObject(s,{isEvalSupported:l.isEvalSupported,disableFontFace:l.disableFontFace,ignoreErrors:l.ignoreErrors,onUnsupportedFeature:e._onUnsupportedFeature.bind(e),fontRegistry:c});e.fontLoader.bind(f).catch((function(e){return t.sendWithPromise("FontFallback",{id:o})})).finally((function(){!l.fontExtraProperties&&f.data&&(f.data=null),e.commonObjs.resolve(o,f)}));break;case"FontPath":case"Image":e.commonObjs.resolve(o,s);break;default:throw new Error("Got unknown common object type ".concat(i))}})),t.on("obj",(function(t){var r,n=_slicedToArray(t,4),a=n[0],o=n[1],i=n[2],s=n[3];if(!e.destroyed){var l=_classPrivateFieldGet(e,_pageCache).get(o);if(!l.objs.has(a))switch(i){case"Image":l.objs.resolve(a,s),(null==s||null===(r=s.data)||void 0===r?void 0:r.length)>8e6&&(l.cleanupAfterRender=!0);break;case"Pattern":l.objs.resolve(a,s);break;default:throw new Error("Got unknown object type ".concat(i))}}})),t.on("DocProgress",(function(t){var n;e.destroyed||null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:t.loaded,total:t.total})})),t.on("DocStats",(function(t){e.destroyed||_classPrivateFieldSet(e,_docStats,Object.freeze({streamTypes:Object.freeze(t.streamTypes),fontTypes:Object.freeze(t.fontTypes)}))})),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.CMapReaderFactory?e.CMapReaderFactory.fetch(t):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))})),t.on("FetchStandardFontData",(function(t){return e.destroyed?Promise.reject(new Error("Worker was destroyed.")):e.StandardFontDataFactory?e.StandardFontDataFactory.fetch(t):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"_onUnsupportedFeature",value:function(e){var t,r,n=e.featureId;this.destroyed||null===(t=(r=this.loadingTask).onUnsupportedFeature)||void 0===t||t.call(r,n)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(e){var t=this;if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));var r=e-1,n=_classPrivateFieldGet(this,_pagePromises).get(r);if(n)return n;var a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(e){if(t.destroyed)throw new Error("Transport destroyed");var n=new PDFPageProxy(r,e,t,t._params.ownerDocument,t._params.pdfBug);return _classPrivateFieldGet(t,_pageCache).set(r,n),n}));return _classPrivateFieldGet(this,_pagePromises).set(r,a),a}},{key:"getPageIndex",value:function(e){return"object"!==_typeof(e)||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}},{key:"getAnnotations",value:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}},{key:"saveDocument",value:function(){var e,t,r=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:null!==(e=null===(t=this._fullReader)||void 0===t?void 0:t.filename)&&void 0!==e?e:null}).finally((function(){r.annotationStorage.resetModified()}))}},{key:"getFieldObjects",value:function(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}},{key:"getStructTree",value:function(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(e){return new _optional_content_config.OptionalContentConfig(e)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var e=this;return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then((function(t){var r,n,a,o;return{info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:null!==(r=null===(n=e._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(a=null===(o=e._fullReader)||void 0===o?void 0:o.contentLength)&&void 0!==a?a:null}})))}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=_asyncToGenerator(_regenerator.default.mark((function e(){var t,r,n,a,o=arguments;return _regenerator.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]&&o[0],e.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){e.next=5;break}return e.abrupt("return");case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),e.prev=6,r.s();case 8:if((n=r.n()).done){e.next=15;break}if((a=n.value).cleanup()){e.next=13;break}throw new Error("startCleanup: Page ".concat(a.pageNumber," is currently rendering."));case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),r.e(e.t0);case 20:return e.prev=20,r.f(),e.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 e.stop()}}),e,this,[[6,17,20,23]])}))),function(){return t.apply(this,arguments)})},{key:"loadingParams",get:function(){var e=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e.disableAutoFetch,enableXfa:e.enableXfa})}}]),e}(),_objs=new WeakMap,_ensureObj=new WeakSet,PDFObjects=function(){function e(){_classCallCheck(this,e),_classPrivateMethodInitSpec(this,_ensureObj),_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}return _createClass(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){var r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);return r.capability.promise.then((function(){return t(r.data)})),null}var n=_classPrivateFieldGet(this,_objs)[e];if(null==n||!n.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(e,"."));return n.data}},{key:"has",value:function(e){var t=_classPrivateFieldGet(this,_objs)[e];return(null==t?void 0:t.capability.settled)||!1}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,e);r.data=t,r.capability.resolve()}},{key:"clear",value:function(){_classPrivateFieldSet(this,_objs,Object.create(null))}}]),e}();function _ensureObj2(e){var t=_classPrivateFieldGet(this,_objs)[e];return t||(_classPrivateFieldGet(this,_objs)[e]={capability:(0,_util.createPromiseCapability)(),data:null})}var RenderTask=function(){function e(t){_classCallCheck(this,e),this._internalRenderTask=t,this.onContinue=null}return _createClass(e,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),e}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function e(t){var r=t.callback,n=t.params,a=t.objs,o=t.commonObjs,i=t.annotationCanvasMap,s=t.operatorList,l=t.pageIndex,u=t.canvasFactory,c=t.useRequestAnimationFrame,f=void 0!==c&&c,d=t.pdfBug,h=void 0!==d&&d;_classCallCheck(this,e),this.callback=r,this.params=n,this.objs=a,this.commonObjs=o,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=l,this.canvasFactory=u,this._pdfBug=h,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===f&&"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=n.canvasContext.canvas}var t;return _createClass(e,[{key:"completed",get:function(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function(t){var r,n=t.transparency,a=void 0!==n&&n,o=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(e.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.");e.canvasInUse.add(this._canvas)}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 i=this.params,s=i.canvasContext,l=i.viewport,u=i.transform,c=i.imageLayer,f=i.background;this.gfx=new _canvas.CanvasGraphics(s,this.commonObjs,this.objs,this.canvasFactory,c,o,this.annotationCanvasMap),this.gfx.beginDrawing({transform:u,viewport:l,transparency:a,background:f}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){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&&e.canvasInUse.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var e=this;this._useRequestAnimationFrame?window.requestAnimationFrame((function(){e._nextBound().catch(e._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:(t=_asyncToGenerator(_regenerator.default.mark((function t(){return _regenerator.default.wrap((function(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),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&e.canvasInUse.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}],[{key:"canvasInUse",get:function(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]),e}(),version="2.13.216";exports.version=version;var build="399a0ec60";exports.build=build},(e,t,r)=>{"use strict";e.exports=r(146)},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var a=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n=d;return function(a,o){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===a)throw o;return O()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=P(i,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var l=f(e,t,r);if("normal"===l.type){if(n=r.done?v:h,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=v,r.method="throw",r.arg=l.arg)}}}(e,r,i),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var _={};u(_,i,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(E([])));S&&S!==r&&a.call(S,i)&&(_=S);var A=b.prototype=m.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,i,s,l){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,l)}))}l(u.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}}function P(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var a=f(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}return{next:O}}function O(){return{value:t,done:!0}}return g.prototype=b,u(A,"constructor",b),u(b,"constructor",g),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(A),e},e.awrap=function(e){return{__await:e}},k(x.prototype),u(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new x(c(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(A),u(A,l,"Generator"),u(A,i,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;T(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}("object"===n(e=r.nmd(e))?e.exports:{});try{regeneratorRuntime=a}catch(e){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.getPdfFilenameFromUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(T(e))return(0,s.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e),a=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(a&&(a=a[0]).includes("%"))try{a=r.exec(decodeURIComponent(a))[0]}catch(e){}return a||t},t.getXfaPageViewport=function(e,t){var r=t.scale,n=void 0===r?1:r,a=t.rotation,o=void 0===a?0:a,i=e.attributes.style,s=i.width,l=i.height,u=[0,0,parseInt(s),parseInt(l)];return new P({viewBox:u,scale:n,rotation:o})},t.isDataScheme=T,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=O,t.loadScript=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r,n){var a=document.createElement("script");a.src=e,a.onload=function(e){t&&a.remove(),r(e)},a.onerror=function(){n(new Error("Cannot load script at: ".concat(a.src)))},(document.head||document.documentElement).appendChild(a)}))};var a,o=(a=r(145))&&a.__esModule?a:{default:a},i=r(148),s=r(1);function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p(e);if(t){var o=p(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var b=y((function e(){m(this,e)}));t.PixelsPerInch=b,g(b,"CSS",96),g(b,"PDF",72),g(b,"PDF_TO_CSS_UNITS",b.CSS/b.PDF);var _=function(e){f(r,e);var t=h(r);function r(){var e,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,a=void 0===n?globalThis.document:n;return m(this,r),(e=t.call(this))._document=a,e}return y(r,[{key:"_createCanvas",value:function(e,t){var r=this._document.createElement("canvas");return r.width=e,r.height=t,r}}]),r}(i.BaseCanvasFactory);function w(e){return S.apply(this,arguments)}function S(){var e;return e=o.default.mark((function e(t){var r,n,a=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>1&&void 0!==a[1]&&a[1],!O(t,document.baseURI)){e.next=21;break}return e.next=4,fetch(t);case 4:if((n=e.sent).ok){e.next=7;break}throw new Error(n.statusText);case 7:if(!r){e.next=15;break}return e.t1=Uint8Array,e.next=11,n.arrayBuffer();case 11:e.t2=e.sent,e.t0=new e.t1(e.t2),e.next=20;break;case 15:return e.t3=s.stringToBytes,e.next=18,n.text();case 18:e.t4=e.sent,e.t0=(0,e.t3)(e.t4);case 20:return e.abrupt("return",e.t0);case 21:return e.abrupt("return",new Promise((function(e,n){var a=new XMLHttpRequest;a.open("GET",t,!0),r&&(a.responseType="arraybuffer"),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var t;if((200===a.status||0===a.status)&&(r&&a.response?t=new Uint8Array(a.response):!r&&a.responseText&&(t=(0,s.stringToBytes)(a.responseText)),t))return void e(t);n(new Error(a.statusText))}},a.send(null)})));case 22:case"end":return e.stop()}}),e)})),S=function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))},S.apply(this,arguments)}t.DOMCanvasFactory=_;var A=function(e){f(r,e);var t=h(r);function r(){return m(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e,t){return w(e,this.isCompressed).then((function(e){return{cMapData:e,compressionType:t}}))}}]),r}(i.BaseCMapReaderFactory);t.DOMCMapReaderFactory=A;var k=function(e){f(r,e);var t=h(r);function r(){return m(this,r),t.apply(this,arguments)}return y(r,[{key:"_fetchData",value:function(e){return w(e,!0)}}]),r}(i.BaseStandardFontDataFactory);t.DOMStandardFontDataFactory=k;var x=function(e){f(r,e);var t=h(r);function r(){return m(this,r),t.apply(this,arguments)}return y(r,[{key:"_createSVG",value:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}]),r}(i.BaseSVGFactory);t.DOMSVGFactory=x;var P=function(){function e(t){var r=t.viewBox,n=t.scale,a=t.rotation,o=t.offsetX,i=void 0===o?0:o,s=t.offsetY,l=void 0===s?0:s,u=t.dontFlip,c=void 0!==u&&u;m(this,e),this.viewBox=r,this.scale=n,this.rotation=a,this.offsetX=i,this.offsetY=l;var f,d,h,p,v,y,g,b,_=(r[2]+r[0])/2,w=(r[3]+r[1])/2;switch((a%=360)<0&&(a+=360),a){case 180:f=-1,d=0,h=0,p=1;break;case 90:f=0,d=1,h=1,p=0;break;case 270:f=0,d=-1,h=-1,p=0;break;case 0:f=1,d=0,h=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}c&&(h=-h,p=-p),0===f?(v=Math.abs(w-r[1])*n+i,y=Math.abs(_-r[0])*n+l,g=Math.abs(r[3]-r[1])*n,b=Math.abs(r[2]-r[0])*n):(v=Math.abs(_-r[0])*n+i,y=Math.abs(w-r[1])*n+l,g=Math.abs(r[2]-r[0])*n,b=Math.abs(r[3]-r[1])*n),this.transform=[f*n,d*n,h*n,p*n,v-f*n*_-h*n*w,y-d*n*_-p*n*w],this.width=g,this.height=b}return y(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,a=t.rotation,o=void 0===a?this.rotation:a,i=t.offsetX,s=void 0===i?this.offsetX:i,l=t.offsetY,u=void 0===l?this.offsetY:l,c=t.dontFlip,f=void 0!==c&&c;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:o,offsetX:s,offsetY:u,dontFlip:f})}},{key:"convertToViewportPoint",value:function(e,t){return s.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=s.Util.applyTransform([e[0],e[1]],this.transform),r=s.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return s.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=P;var C=function(e){f(r,e);var t=h(r);function r(e,n){var a;return m(this,r),(a=t.call(this,e,"RenderingCancelledException")).type=n,a}return y(r)}(s.BaseException);function T(e){for(var t=e.length,r=0;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}t.RenderingCancelledException=C;var R,E=function(){function e(){m(this,e),this.started=Object.create(null),this.times=[]}return y(e,[{key:"time",value:function(e){e in this.started&&(0,s.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,s.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,n=l(this.times);try{for(n.s();!(e=n.n()).done;){var a=e.value.name;a.length>r&&(r=a.length)}}catch(e){n.e(e)}finally{n.f()}var o,i=l(this.times);try{for(i.s();!(o=i.n()).done;){var s=o.value,u=s.end-s.start;t.push("".concat(s.name.padEnd(r)," ").concat(u,"ms\n"))}}catch(e){i.e(e)}finally{i.f()}return t.join("")}}]),e}();function O(e,t){try{var r=(t?new URL(e,t):new URL(e)).protocol;return"http:"===r||"https:"===r}catch(e){return!1}}t.StatTimer=E;var F=function(){function e(){m(this,e)}return y(e,null,[{key:"toDateObject",value:function(e){if(!e||"string"!=typeof e)return null;R||(R=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=R.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var a=parseInt(t[3],10);a=a>=1&&a<=31?a:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var i=parseInt(t[5],10);i=i>=0&&i<=59?i:0;var s=parseInt(t[6],10);s=s>=0&&s<=59?s:0;var l=t[7]||"Z",u=parseInt(t[8],10);u=u>=0&&u<=23?u:0;var c=parseInt(t[9],10)||0;return c=c>=0&&c<=59?c:0,"-"===l?(o+=u,i+=c):"+"===l&&(o-=u,i-=c),new Date(Date.UTC(r,n,a,o,i,s))}}]),e}();t.PDFDateString=F},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1);function i(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function s(e){i(o,n,a,s,l,"next",e)}function l(e){i(o,n,a,s,l,"throw",e)}s(void 0)}))}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=function(){function e(){l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseCanvasFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}},{key:"_createCanvas",value:function(e,t){(0,o.unreachable)("Abstract method `_createCanvas` called.")}}]),e}();t.BaseCanvasFactory=f;var d=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,a=t.isCompressed,i=void 0!==a&&a;l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=n,this.isCompressed=i}var t;return c(e,[{key:"fetch",value:(t=s(a.default.mark((function e(t){var r,n,i,s=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.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){e.next=5;break}throw new Error("CMap name must be specified.");case 5:return n=this.baseUrl+r+(this.isCompressed?".bcmap":""),i=this.isCompressed?o.CMapCompressionType.BINARY:o.CMapCompressionType.NONE,e.abrupt("return",this._fetchData(n,i).catch((function(e){throw new Error("Unable to load ".concat(s.isCompressed?"binary ":"","CMap at: ").concat(n))})));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_fetchData",value:function(e,t){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseCMapReaderFactory=d;var h=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r;l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=n}var t;return c(e,[{key:"fetch",value:(t=s(a.default.mark((function e(t){var r,n;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.filename,this.baseUrl){e.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){e.next=5;break}throw new Error("Font filename must be specified.");case 5:return n="".concat(this.baseUrl).concat(r),e.abrupt("return",this._fetchData(n).catch((function(e){throw new Error("Unable to load font data at: ".concat(n))})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_fetchData",value:function(e){(0,o.unreachable)("Abstract method `_fetchData` called.")}}]),e}();t.BaseStandardFontDataFactory=h;var p=function(){function e(){l(this,e),this.constructor===e&&(0,o.unreachable)("Cannot initialize BaseSVGFactory.")}return c(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");var r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width","".concat(e,"px")),r.setAttribute("height","".concat(t,"px")),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 ".concat(e," ").concat(t)),r}},{key:"createElement",value:function(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}},{key:"_createSVG",value:function(e){(0,o.unreachable)("Abstract method `_createSVG` called.")}}]),e}();t.BaseSVGFactory=p},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a,o=(a=r(145))&&a.__esModule?a:{default:a},i=r(1);function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=u(e);if(t){var o=u(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var y,m=function(){function e(t){var r=t.docId,n=t.onUnsupportedFeature,a=t.ownerDocument,o=void 0===a?globalThis.document:a;t.styleElement,h(this,e),this.constructor===e&&(0,i.unreachable)("Cannot initialize BaseFontLoader."),this.docId=r,this._onUnsupportedFeature=n,this._document=o,this.nativeFontFaces=[],this.styleElement=null}var t,r;return v(e,[{key:"addNativeFontFace",value:function(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}},{key:"insertRule",value:function(e){var t=this.styleElement;t||((t=this.styleElement=this._document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_".concat(this.docId),this._document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)}},{key:"clear",value:function(){var e,t=f(this.nativeFontFaces);try{for(t.s();!(e=t.n()).done;){var r=e.value;this._document.fonts.delete(r)}}catch(e){t.e(e)}finally{t.f()}this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"bind",value:(t=o.default.mark((function e(t){var r,n,a=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.attached&&!t.missingFile){e.next=2;break}return e.abrupt("return");case 2:if(t.attached=!0,!this.isFontLoadingAPISupported){e.next=19;break}if(!(r=t.createNativeFontFace())){e.next=18;break}return this.addNativeFontFace(r),e.prev=7,e.next=10,r.loaded;case 10:e.next=18;break;case 12:throw e.prev=12,e.t0=e.catch(7),this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,i.warn)("Failed to load font '".concat(r.family,"': '").concat(e.t0,"'.")),t.disableFontFace=!0,e.t0;case 18:return e.abrupt("return");case 19:if(!(n=t.createFontFaceRule())){e.next=26;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,new Promise((function(e){var r=a._queueLoadingCallback(e);a._prepareFontLoadEvent([n],[t],r)}));case 26:case"end":return e.stop()}}),e,this,[[7,12]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function i(e){c(o,n,a,i,s,"next",e)}function s(e){c(o,n,a,i,s,"throw",e)}i(void 0)}))},function(e){return r.apply(this,arguments)})},{key:"_queueLoadingCallback",value:function(e){(0,i.unreachable)("Abstract method `_queueLoadingCallback`.")}},{key:"isFontLoadingAPISupported",get:function(){var e,t=!(null===(e=this._document)||void 0===e||!e.fonts);return(0,i.shadow)(this,"isFontLoadingAPISupported",t)}},{key:"isSyncFontLoadingSupported",get:function(){(0,i.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}},{key:"_loadTestFont",get:function(){(0,i.unreachable)("Abstract method `_loadTestFont`.")}},{key:"_prepareFontLoadEvent",value:function(e,t,r){(0,i.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}]),e}();t.FontLoader=y,t.FontLoader=y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(r,e);var t=l(r);function r(e){var n;return h(this,r),(n=t.call(this,e)).loadingContext={requests:[],nextRequestId:0},n.loadTestFontId=0,n}return v(r,[{key:"isSyncFontLoadingSupported",get:function(){var e=!1;if("undefined"==typeof navigator)e=!0;else{var t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);(null==t?void 0:t[1])>=14&&(e=!0)}return(0,i.shadow)(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-".concat(t.nextRequestId++),done:!1,complete:function(){for((0,i.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.requests.length>0&&t.requests[0].done;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e};return t.requests.push(r),r}},{key:"_loadTestFont",get:function(){return(0,i.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substring(0,t)+n+e.substring(t+r)}var o,s,l=this._document.createElement("canvas");l.width=1,l.height=1;var u=l.getContext("2d"),c=0,d="lt".concat(Date.now()).concat(this.loadTestFontId++),h=this._loadTestFont,p=1482184792,v=n(h=a(h,976,d.length,d),16);for(o=0,s=d.length-3;o<s;o+=4)v=v-p+n(d,o)|0;o<d.length&&(v=v-p+n(d+"XXX",o)|0),h=a(h,16,4,(0,i.string32)(v));var y="url(data:font/opentype;base64,".concat(btoa(h),");"),m='@font-face {font-family:"'.concat(d,'";src:').concat(y,"}");this.insertRule(m);var g,b=[],_=f(t);try{for(_.s();!(g=_.n()).done;){var w=g.value;b.push(w.loadedName)}}catch(e){_.e(e)}finally{_.f()}b.push(d);var S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(var A=0,k=b;A<k.length;A++){var x=k[A],P=this._document.createElement("span");P.textContent="Hi",P.style.fontFamily=x,S.appendChild(P)}this._document.body.appendChild(S),function e(t,r){if(++c>30)return(0,i.warn)("Load test font never loaded."),void r();u.font="30px "+t,u.fillText(".",0,20),u.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(d,(function(){S.remove(),r.complete()}))}}]),r}(m);var g=function(){function e(t,r){var n=r.isEvalSupported,a=void 0===n||n,o=r.disableFontFace,i=void 0!==o&&o,s=r.ignoreErrors,l=void 0!==s&&s,u=r.onUnsupportedFeature,c=r.fontRegistry,f=void 0===c?null:c;for(var d in h(this,e),this.compiledGlyphs=Object.create(null),t)this[d]=t[d];this.isEvalSupported=!1!==a,this.disableFontFace=!0===i,this.ignoreErrors=!0===l,this._onUnsupportedFeature=u,this.fontRegistry=f}return v(e,[{key:"createNativeFontFace",value:function(){if(!this.data||this.disableFontFace)return null;var e;if(this.cssFontInfo){var t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),e}},{key:"createFontFaceRule",value:function(){if(!this.data||this.disableFontFace)return null;var e,t=(0,i.bytesToString)(this.data),r="url(data:".concat(this.mimetype,";base64,").concat(btoa(t),");");if(this.cssFontInfo){var n="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(n+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(n,"src:").concat(r,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(r,"}");return this.fontRegistry&&this.fontRegistry.registerFont(this,r),e}},{key:"getPathGenerator",value:function(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];var r;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:i.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,i.warn)('getPathGenerator - ignoring character: "'.concat(e,'".')),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&i.IsEvalSupportedCached.value){var n,a=[],o=f(r);try{for(o.s();!(n=o.n()).done;){var s=n.value,l=void 0!==s.args?s.args.join(","):"";a.push("c.",s.cmd,"(",l,");\n")}}catch(e){o.e(e)}finally{o.f()}return this.compiledGlyphs[t]=new Function("c","size",a.join(""))}return this.compiledGlyphs[t]=function(e,t){var n,a=f(r);try{for(a.s();!(n=a.n()).done;){var o=n.value;"scale"===o.cmd&&(o.args=[t,-t]),e[o.cmd].apply(e,o.args)}}catch(e){a.e(e)}finally{a.f()}}}}]),e}();t.FontFaceObject=g},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var a=r(148),o=r(3),i=r(1);function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=d((function e(){h(this,e),(0,i.unreachable)("Not implemented: NodeCanvasFactory")}));t.NodeCanvasFactory=p;var v=d((function e(){h(this,e),(0,i.unreachable)("Not implemented: NodeCMapReaderFactory")}));t.NodeCMapReaderFactory=v;var y=d((function e(){h(this,e),(0,i.unreachable)("Not implemented: NodeStandardFontDataFactory")}));if(t.NodeStandardFontDataFactory=y,o.isNodeJS){var m=function(e){return new Promise((function(t,r){__webpack_require__(767).readFile(e,(function(e,n){!e&&n?t(new Uint8Array(n)):r(new Error(e))}))}))};t.NodeCanvasFactory=p=function(e){s(r,e);var t=u(r);function r(){return h(this,r),t.apply(this,arguments)}return d(r,[{key:"_createCanvas",value:function(e,t){return __webpack_require__(601).createCanvas(e,t)}}]),r}(a.BaseCanvasFactory),t.NodeCMapReaderFactory=v=function(e){s(r,e);var t=u(r);function r(){return h(this,r),t.apply(this,arguments)}return d(r,[{key:"_fetchData",value:function(e,t){return m(e).then((function(e){return{cMapData:e,compressionType:t}}))}}]),r}(a.BaseCMapReaderFactory),t.NodeStandardFontDataFactory=y=function(e){s(r,e);var t=u(r);function r(){return h(this,r),t.apply(this,arguments)}return d(r,[{key:"_fetchData",value:function(e){return m(e)}}]),r}(a.BaseStandardFontDataFactory)}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationStorage=void 0;var n=r(1);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._storage=new Map,this._timeStamp=Date.now(),this._modified=!1,this.onSetModified=null,this.onResetModified=null}var t,r,o;return t=e,(r=[{key:"getValue",value:function(e,t){var r=this._storage.get(e);return void 0===r?t:Object.assign(t,r)}},{key:"setValue",value:function(e,t){var r=this._storage.get(e),n=!1;if(void 0!==r)for(var o=0,i=Object.entries(t);o<i.length;o++){var s=a(i[o],2),l=s[0],u=s[1];r[l]!==u&&(n=!0,r[l]=u)}else n=!0,this._storage.set(e,t);n&&(this._timeStamp=Date.now(),this._setModified())}},{key:"getAll",value:function(){return this._storage.size>0?(0,n.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function(){return this._timeStamp.toString()}}])&&i(t.prototype,r),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.AnnotationStorage=s},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var n=r(1),a=r(153),o=r(147);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=4096,v=16;function y(e){if(e._transformStack&&(e._transformStack=[]),!e.mozCurrentTransform){e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._originalResetTransform=e.resetTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[];try{var t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"lineWidth");e._setLineWidth=t.set,e._getLineWidth=t.get,Object.defineProperty(e,"lineWidth",{set:function(e){this._setLineWidth(1.000001*e)},get:function(){return this._getLineWidth()}})}catch(e){}Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=f(this._transformMatrix,6),t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5],s=t*a-r*n,l=r*n-t*a;return[a/s,r/l,n/l,t/s,(a*o-n*i)/l,(r*o-t*i)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){0===this._transformStack.length&&(0,n.warn)("Tried to restore a ctx when the stack was already empty.");var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]*=e,r[1]*=e,r[2]*=t,r[3]*=t,this._originalScale(e,t)},e.transform=function(t,r,n,a,o,i){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*a,s[1]*n+s[3]*a,s[0]*o+s[2]*i+s[4],s[1]*o+s[3]*i+s[5]],e._originalTransform(t,r,n,a,o,i)},e.setTransform=function(t,r,n,a,o,i){this._transformMatrix=[t,r,n,a,o,i],e._originalSetTransform(t,r,n,a,o,i)},e.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],e._originalResetTransform()},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)}}}var m=function(){function e(t){l(this,e),this.canvasFactory=t,this.cache=Object.create(null)}return c(e,[{key:"getCanvas",value:function(e,t,r,n){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),n&&y(a.context),a}},{key:"clear",value:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}]),e}(),g=function(){function e(t,r){l(this,e),this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.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=n.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])}return c(e,[{key:"clone",value:function(){var e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}},{key:"updatePathMinMax",value:function(e,t,r){var a=f(n.Util.applyTransform([t,r],e),2);t=a[0],r=a[1],this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}},{key:"updateCurvePathMinMax",value:function(e,t,r,a,o,i,s,l,u){var c=n.Util.bezierBoundingBox(t,r,a,o,i,s,l,u);this.updatePathMinMax(e,c[0],c[1]),this.updatePathMinMax(e,c[2],c[3])}},{key:"getPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[this.minX,this.minY,this.maxX,this.maxY];if(e===a.PathType.STROKE){t||(0,n.unreachable)("Stroke bounding box must include transform.");var o=n.Util.singularValueDecompose2dScale(t),i=o[0]*this.lineWidth/2,s=o[1]*this.lineWidth/2;r[0]-=i,r[1]-=s,r[2]+=i,r[3]+=s}return r}},{key:"updateClipFromPath",value:function(){var e=n.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.PathType.FILL,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}]),e}();function b(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var a,o,i,s,l,u,c,f,d,h=t.height,p=t.width,y=h%v,m=(h-y)/v,g=0===y?m:m+1,b=e.createImageData(p,v),_=0,w=t.data,S=b.data;if(r)switch(r.length){case 1:u=r[0],c=r[0],f=r[0],d=r[0];break;case 4:u=r[0],c=r[1],f=r[2],d=r[3]}if(t.kind===n.ImageKind.GRAYSCALE_1BPP){var A=w.byteLength,k=new Uint32Array(S.buffer,0,S.byteLength>>2),x=k.length,P=p+7>>3,C=4294967295,T=n.IsLittleEndianCached.value?4278190080:255;if(d&&255===d[0]&&0===d[255]){var R=[T,C];C=R[0],T=R[1]}for(o=0;o<g;o++){for(s=o<m?v:y,a=0,i=0;i<s;i++){for(var E=A-_,O=0,F=E>P?p:8*E-7,M=-8&F,j=0,I=0;O<M;O+=8)I=w[_++],k[a++]=128&I?C:T,k[a++]=64&I?C:T,k[a++]=32&I?C:T,k[a++]=16&I?C:T,k[a++]=8&I?C:T,k[a++]=4&I?C:T,k[a++]=2&I?C:T,k[a++]=1&I?C:T;for(;O<F;O++)0===j&&(I=w[_++],j=128),k[a++]=I&j?C:T,j>>=1}for(;a<x;)k[a++]=0;e.putImageData(b,0,o*v)}}else if(t.kind===n.ImageKind.RGBA_32BPP){var D=!!(u||c||f);for(i=0,l=p*v*4,o=0;o<m;o++){if(S.set(w.subarray(_,_+l)),_+=l,D)for(var L=0;L<l;L+=4)u&&(S[L+0]=u[S[L+0]]),c&&(S[L+1]=c[S[L+1]]),f&&(S[L+2]=f[S[L+2]]);e.putImageData(b,0,i),i+=v}if(o<g){if(l=p*y*4,S.set(w.subarray(_,_+l)),D)for(var N=0;N<l;N+=4)u&&(S[N+0]=u[S[N+0]]),c&&(S[N+1]=c[S[N+1]]),f&&(S[N+2]=f[S[N+2]]);e.putImageData(b,0,i)}}else{if(t.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(t.kind));var q=!!(u||c||f);for(l=p*(s=v),o=0;o<g;o++){for(o>=m&&(l=p*(s=y)),a=0,i=l;i--;)S[a++]=w[_++],S[a++]=w[_++],S[a++]=w[_++],S[a++]=255;if(q)for(var B=0;B<a;B+=4)u&&(S[B+0]=u[S[B+0]]),c&&(S[B+1]=c[S[B+1]]),f&&(S[B+2]=f[S[B+2]]);e.putImageData(b,0,o*v)}}}}function _(e,t){for(var r=t.height,n=t.width,a=r%v,o=(r-a)/v,i=0===a?o:o+1,s=e.createImageData(n,v),l=0,u=t.data,c=s.data,f=0;f<i;f++){for(var d=f<o?v:a,h=3,p=0;p<d;p++)for(var y=void 0,m=0,g=0;g<n;g++)m||(y=u[l++],m=128),c[h]=y&m?0:255,h+=4,m>>=1;e.putImageData(s,0,f*v)}}function w(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=r.length;n<a;n++){var o=r[n];void 0!==e[o]&&(t[o]=e[o])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function S(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function A(e,t,r,n){for(var a=e.length,o=3;o<a;o+=4){var i=e[o];if(0===i)e[o-3]=t,e[o-2]=r,e[o-1]=n;else if(i<255){var s=255-i;e[o-3]=e[o-3]*i+t*s>>8,e[o-2]=e[o-2]*i+r*s>>8,e[o-1]=e[o-1]*i+n*s>>8}}}function k(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=r?r[e[a]]:e[a];t[a]=t[a]*o*.00392156862745098|0}}function x(e,t,r){for(var n=e.length,a=3;a<n;a+=4){var o=77*e[a-3]+152*e[a-2]+28*e[a-1];t[a]=r?t[a]*r[o>>8]>>8:t[a]*o>>16}}function P(e,t,r,n){var a=n[0],o=n[1],i=n[2]-a,s=n[3]-o;0!==i&&0!==s&&(function(e,t,r,n,a,o,i,s,l,u,c){var f,d=!!o,h=d?o[0]:0,p=d?o[1]:0,v=d?o[2]:0;f="Luminosity"===a?x:k;for(var y=Math.min(n,Math.ceil(1048576/r)),m=0;m<n;m+=y){var g=Math.min(y,n-m),b=e.getImageData(s-u,m+(l-c),r,g),_=t.getImageData(s,m+l,r,g);d&&A(b.data,h,p,v),f(b.data,_.data,i),t.putImageData(_,s,m+l)}}(t.context,r,i,s,t.subtype,t.backdrop,t.transferMap,a,o,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}function C(e,t){var r=n.Util.singularValueDecompose2dScale(e);r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1]);var a=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:r[0]<=a||r[1]<=a}var T=["butt","round","square"],R=["miter","round","bevel"],E={},O={},F=function(){function e(t,r,n,a,o,i,s){l(this,e),this.ctx=t,this.current=new g(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=n,this.canvasFactory=a,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=i,this.cachedCanvases=new m(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=s,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,t&&y(t),this._cachedGetSinglePixelWidth=null}return c(e,[{key:"beginDrawing",value:function(e){var t=e.transform,r=e.viewport,n=e.transparency,a=void 0!==n&&n,o=e.background,i=void 0===o?null:o,s=this.ctx.canvas.width,l=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=i||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,s,l),this.ctx.restore(),a){var u=this.cachedCanvases.getCanvas("transparent",s,l,!0);this.compositeCtx=this.ctx,this.transparentCanvas=u.canvas,this.ctx=u.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),S(this.ctx),t&&(this.ctx.transform.apply(this.ctx,t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform.apply(this.ctx,r.transform),this.viewportScale=r.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(e,t,r,a){var o=e.argsArray,i=e.fnArray,l=t||0,u=o.length;if(u===l)return l;for(var c,f=u-l>10&&"function"==typeof r,d=f?Date.now()+15:0,h=0,p=this.commonObjs,v=this.objs;;){if(void 0!==a&&l===a.nextBreakPoint)return a.breakIt(l,r),l;if((c=i[l])!==n.OPS.dependency)this[c].apply(this,o[l]);else{var y,m=s(o[l]);try{for(m.s();!(y=m.n()).done;){var g=y.value,b=g.startsWith("g_")?p:v;if(!b.has(g))return b.get(g,r),l}}catch(e){m.e(e)}finally{m.f()}}if(++l===u)return l;if(f&&++h>10){if(Date.now()>d)return r(),l;h=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.cachedPatterns.clear(),this.imageLayer&&this.imageLayer.endLayout()}},{key:"_scaleImage",value:function(e,t){for(var r,n,a=e.width,o=e.height,i=Math.max(Math.hypot(t[0],t[1]),1),s=Math.max(Math.hypot(t[2],t[3]),1),l=a,u=o,c="prescale1";i>2&&l>1||s>2&&u>1;){var f=l,d=u;i>2&&l>1&&(i/=l/(f=Math.ceil(l/2))),s>2&&u>1&&(s/=u/(d=Math.ceil(u/2))),(n=(r=this.cachedCanvases.getCanvas(c,f,d)).context).clearRect(0,0,f,d),n.drawImage(e,0,0,l,u,0,0,f,d),e=r.canvas,l=f,u=d,c="prescale1"===c?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:u}}},{key:"_createMaskCanvas",value:function(e){var t=this.ctx,r=e.width,o=e.height,i=this.current.fillColor,s=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",r,o);_(l.context,e);var u=t.mozCurrentTransform,c=n.Util.transform(u,[1/r,0,0,-1/o,0,0]);c=n.Util.transform(c,[1,0,0,1,0,-o]);var f=n.Util.applyTransform([0,0],c),d=n.Util.applyTransform([r,o],c),h=n.Util.normalizeRect([f[0],f[1],d[0],d[1]]),p=Math.ceil(h[2]-h[0]),v=Math.ceil(h[3]-h[1]),y=this.cachedCanvases.getCanvas("fillCanvas",p,v,!0),m=y.context,g=Math.min(f[0],d[0]),b=Math.min(f[1],d[1]);m.translate(-g,-b),m.transform.apply(m,c);var w=this._scaleImage(l.canvas,m.mozCurrentTransformInverse);m.imageSmoothingEnabled=C(m.mozCurrentTransform,e.interpolate),m.drawImage(w.img,0,0,w.img.width,w.img.height,0,0,r,o),m.globalCompositeOperation="source-in";var S=n.Util.transform(m.mozCurrentTransformInverse,[1,0,0,1,-g,-b]);return m.fillStyle=s?i.getPattern(t,this,S,a.PathType.FILL):i,m.fillRect(0,0,r,o),{canvas:y.canvas,offsetX:Math.round(g),offsetY:Math.round(b)}}},{key:"setLineWidth",value:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e}},{key:"setLineCap",value:function(e){this.ctx.lineCap=T[e]}},{key:"setLineJoin",value:function(e){this.ctx.lineJoin=R[e]}},{key:"setMiterLimit",value:function(e){this.ctx.miterLimit=e}},{key:"setDash",value:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],a=n[0],o=n[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"RI":this.setRenderingIntent(o);break;case"FL":this.setFlatness(o);break;case"Font":this.setFont(o[0],o[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=o;break;case"SMask":this.current.activeSMask=o?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=o}}}},{key:"inSMaskMode",get:function(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function(){var e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,e,t,!0);this.suspendedCtx=this.ctx,this.ctx=n.context;var a=this.ctx;a.setTransform.apply(a,this.suspendedCtx.mozCurrentTransform),w(this.suspendedCtx,a),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=function(){e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},e.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},e.transform=function(e,r,n,a,o,i){t.transform(e,r,n,a,o,i),this.__originalTransform(e,r,n,a,o,i)},e.setTransform=function(e,r,n,a,o,i){t.setTransform(e,r,n,a,o,i),this.__originalSetTransform(e,r,n,a,o,i)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},e.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},e.bezierCurveTo=function(e,r,n,a,o,i){t.bezierCurveTo(e,r,n,a,o,i),this.__originalBezierCurveTo(e,r,n,a,o,i)},e.rect=function(e,r,n,a){t.rect(e,r,n,a),this.__originalRect(e,r,n,a)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(a,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),w(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}},{key:"compose",value:function(e){if(this.current.activeSMask){e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var t=this.current.activeSMask;P(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}},{key:"save",value:function(){this.inSMaskMode?(w(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),w(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(e,t,r,n,a,o){this.ctx.transform(e,t,r,n,a,o),this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(e,t){for(var r,a,o=this.ctx,i=this.current,s=i.x,l=i.y,u=0,c=0,f=e.length;u<f;u++)switch(0|e[u]){case n.OPS.rectangle:s=t[c++],l=t[c++];var d=t[c++],h=t[c++],p=s+d,v=l+h;o.moveTo(s,l),0===d||0===h?o.lineTo(p,v):(o.lineTo(p,l),o.lineTo(p,v),o.lineTo(s,v)),i.updatePathMinMax(o.mozCurrentTransform,s,l),i.updatePathMinMax(o.mozCurrentTransform,p,v),o.closePath();break;case n.OPS.moveTo:s=t[c++],l=t[c++],o.moveTo(s,l),i.updatePathMinMax(o.mozCurrentTransform,s,l);break;case n.OPS.lineTo:s=t[c++],l=t[c++],o.lineTo(s,l),i.updatePathMinMax(o.mozCurrentTransform,s,l);break;case n.OPS.curveTo:r=s,a=l,s=t[c+4],l=t[c+5],o.bezierCurveTo(t[c],t[c+1],t[c+2],t[c+3],s,l),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],t[c+2],t[c+3],s,l),c+=6;break;case n.OPS.curveTo2:r=s,a=l,o.bezierCurveTo(s,l,t[c],t[c+1],t[c+2],t[c+3]),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,s,l,t[c],t[c+1],t[c+2],t[c+3]),s=t[c+2],l=t[c+3],c+=4;break;case n.OPS.curveTo3:r=s,a=l,s=t[c+2],l=t[c+3],o.bezierCurveTo(t[c],t[c+1],s,l,s,l),i.updateCurvePathMinMax(o.mozCurrentTransform,r,a,t[c],t[c+1],s,l,s,l),c+=4;break;case n.OPS.closePath:o.closePath()}i.setCurrentPoint(s,l)}},{key:"closePath",value:function(){this.ctx.closePath()}},{key:"stroke",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;if(t.globalAlpha=this.current.strokeAlpha,this.contentVisible)if("object"===i(r)&&null!=r&&r.getPattern){var n=this.getSinglePixelWidth();t.save(),t.strokeStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.STROKE),t.lineWidth=Math.max(n,this.current.lineWidth),t.stroke(),t.restore()}else{var o=this.getSinglePixelWidth();o<0&&-o>=this.current.lineWidth?(t.save(),t.resetTransform(),t.lineWidth=Math.floor(this._combinedScaleFactor),t.stroke(),t.restore()):(t.lineWidth=Math.max(o,this.current.lineWidth),t.stroke())}e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.FILL),n=!0);var o=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==o&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath(o)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=E}},{key:"eoClip",value:function(){this.pendingClip=O}},{key:"beginText",value:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setFont",value:function(e,t){var r=this.commonObjs.get(e),a=this.current;if(!r)throw new Error("Can't find font for ".concat(e));if(a.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+e),t<0?(t=-t,a.fontDirection=-1):a.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var o=r.loadedName||"sans-serif",i="normal";r.black?i="900":r.bold&&(i="bold");var s=r.italic?"italic":"normal",l='"'.concat(o,'", ').concat(r.fallbackName),u=t;t<16?u=16:t>100&&(u=100),this.current.fontSizeScale=t/u,this.ctx.font="".concat(s," ").concat(i," ").concat(u,"px ").concat(l)}}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"moveText",value:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){this.current.textMatrix=[e,t,r,n,a,o],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(e,t,r,a,o){var i,s=this.ctx,l=this.current,u=l.font,c=l.textRenderingMode,f=l.fontSize/l.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG),p=l.patternFill&&!u.missingFile;(u.disableFontFace||h||p)&&(i=u.getPathGenerator(this.commonObjs,e)),u.disableFontFace||p?(s.save(),s.translate(t,r),s.beginPath(),i(s,f),a&&s.setTransform.apply(s,a),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(o&&(s.resetTransform(),s.lineWidth=Math.floor(this._combinedScaleFactor)),s.stroke()),s.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||(o?(s.save(),s.moveTo(t,r),s.resetTransform(),s.lineWidth=Math.floor(this._combinedScaleFactor),s.strokeText(e,0,0),s.restore()):s.strokeText(e,t,r))),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:t,y:r,fontSize:f,addToPath:i})}},{key:"isFontSubpixelAAEnabled",get:function(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,a=3;a<t.length;a+=4)if(t[a]>0&&t[a]<255){r=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var o=t.fontSize;if(0!==o){var i,s=this.ctx,l=t.fontSizeScale,u=t.charSpacing,c=t.wordSpacing,f=t.fontDirection,d=t.textHScale*f,h=e.length,p=r.vertical,v=p?1:-1,y=r.defaultVMetrics,m=o*t.fontMatrix[0],g=t.textRenderingMode===n.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;if(s.save(),s.transform.apply(s,t.textMatrix),s.translate(t.x,t.y+t.textRise),f>0?s.scale(d,-1):s.scale(d,1),t.patternFill){s.save();var b=t.fillColor.getPattern(s,this,s.mozCurrentTransformInverse,a.PathType.FILL);i=s.mozCurrentTransform,s.restore(),s.fillStyle=b}var _=t.lineWidth,w=!1,S=t.textMatrixScale;if(0===S||0===_){var A=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;A!==n.TextRenderingMode.STROKE&&A!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,w=(_=this.getSinglePixelWidth())<0)}else _/=S;1!==l&&(s.scale(l,l),_/=l),s.lineWidth=_;var k,x=0;for(k=0;k<h;++k){var P=e[k];if("number"!=typeof P){var C=!1,T=(P.isSpace?c:0)+u,R=P.fontChar,E=P.accent,O=void 0,F=void 0,M=P.width;if(p){var j=P.vmetric||y,I=-(P.vmetric?j[1]:.5*M)*m,D=j[2]*m;M=j?-j[0]:M,O=I/l,F=(x+D)/l}else O=x/l,F=0;if(r.remeasure&&M>0){var L=1e3*s.measureText(R).width/o*l;if(M<L&&this.isFontSubpixelAAEnabled){var N=M/L;C=!0,s.save(),s.scale(N,1),O/=N}else M!==L&&(O+=(M-L)/2e3*o/l)}if(this.contentVisible&&(P.isInFont||r.missingFile))if(g&&!E)s.fillText(R,O,F);else if(this.paintChar(R,O,F,i,w),E){var q=O+o*E.offset.x/l,B=F-o*E.offset.y/l;this.paintChar(E.fontChar,q,B,i,w)}x+=p?M*m-T*f:M*m+T*f,C&&s.restore()}else x+=v*P*o/1e3}p?t.y-=x:t.x+=x*d,s.restore(),this.compose()}}},{key:"showType3Text",value:function(e){var t,r,a,o,i=this.ctx,s=this.current,l=s.font,u=s.fontSize,c=s.fontDirection,f=l.vertical?1:-1,d=s.charSpacing,h=s.wordSpacing,p=s.textHScale*c,v=s.fontMatrix||n.FONT_IDENTITY_MATRIX,y=e.length;if(s.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==u){for(this._cachedGetSinglePixelWidth=null,i.save(),i.transform.apply(i,s.textMatrix),i.translate(s.x,s.y),i.scale(p,c),t=0;t<y;++t)if("number"!=typeof(r=e[t])){var m=(r.isSpace?h:0)+d,g=l.charProcOperatorList[r.operatorListId];g?(this.contentVisible&&(this.processingType3=r,this.save(),i.scale(u,u),i.transform.apply(i,v),this.executeOperatorList(g),this.restore()),a=n.Util.applyTransform([r.width,0],v)[0]*u+m,i.translate(a,0),s.x+=a*p):(0,n.warn)('Type3 character "'.concat(r.operatorListId,'" is not available.'))}else o=f*r*u/1e3,this.ctx.translate(o,0),s.x+=o*p;i.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function(e,t){}},{key:"setCharWidthAndBounds",value:function(e,t,r,n,a,o){this.ctx.rect(r,n,a-r,o-n),this.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function(t){var r,n=this;if("TilingPattern"===t[0]){var o=t[1],i=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory)}};r=new a.TilingPattern(t,o,this.ctx,s,i)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=a,this.current.strokeColor=a}},{key:"setFillRGBColor",value:function(e,t,r){var a=n.Util.makeHexColor(e,t,r);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}},{key:"_getPattern",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,a.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,t)),r&&(t.matrix=r),t}},{key:"shadingFill",value:function(e){if(this.contentVisible){var t=this.ctx;this.save();var r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,t.mozCurrentTransformInverse,a.PathType.SHADING);var o=t.mozCurrentTransformInverse;if(o){var i=t.canvas,s=i.width,l=i.height,u=n.Util.applyTransform([0,0],o),c=n.Util.applyTransform([0,l],o),f=n.Util.applyTransform([s,0],o),d=n.Util.applyTransform([s,l],o),h=Math.min(u[0],c[0],f[0],d[0]),p=Math.min(u[1],c[1],f[1],d[1]),v=Math.max(u[0],c[0],f[0],d[0]),y=Math.max(u[1],c[1],f[1],d[1]);this.ctx.fillRect(h,p,v-h,y-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){(0,n.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,n.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)){var r=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[0],t[1]),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,t[2],t[3]),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(e){if(this.contentVisible){this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);var t=this.ctx;e.isolated||(0,n.info)("TODO: Support non-isolated groups."),e.knockout&&(0,n.warn)("Knockout groups not supported.");var r=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var a=n.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),o=[0,0,t.canvas.width,t.canvas.height];a=n.Util.intersect(a,o)||[0,0,0,0];var i=Math.floor(a[0]),s=Math.floor(a[1]),l=Math.max(Math.ceil(a[2])-i,1),u=Math.max(Math.ceil(a[3])-s,1),c=1,f=1;l>p&&(c=l/p,l=p),u>p&&(f=u/p,u=p),this.current.startNewPathAndClipBox([0,0,l,u]);var d="groupAt"+this.groupLevel;e.smask&&(d+="_smask_"+this.smaskCounter++%2);var h=this.cachedCanvases.getCanvas(d,l,u,!0),v=h.context;v.scale(1/c,1/f),v.translate(-i,-s),v.transform.apply(v,r),e.smask?this.smaskStack.push({canvas:h.canvas,context:v,offsetX:i,offsetY:s,scaleX:c,scaleY:f,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(i,s),t.scale(c,f),t.save()),w(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}}},{key:"endGroup",value:function(e){if(this.contentVisible){this.groupLevel--;var t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();var a=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,a);var o=n.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],a);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(o)}}}},{key:"beginAnnotations",value:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function(){this.restore()}},{key:"beginAnnotation",value:function(e,t,r,a,o){if(this.save(),Array.isArray(t)&&4===t.length){var i=t[2]-t[0],s=t[3]-t[1];if(o&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=s;var l=f(n.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),2),u=l[0],c=l[1],d=this.viewportScale,h=Math.ceil(i*this.outputScaleX*d),p=Math.ceil(s*this.outputScaleY*d);this.annotationCanvas=this.canvasFactory.create(h,p);var v=this.annotationCanvas,m=v.canvas,b=v.context;m.style.width="calc(".concat(i,"px * var(--viewport-scale-factor))"),m.style.height="calc(".concat(s,"px * var(--viewport-scale-factor))"),this.annotationCanvasMap.set(e,m),this.annotationCanvas.savedCtx=this.ctx,this.ctx=b,this.ctx.setTransform(u,0,0,-c,0,s*c),y(this.ctx),S(this.ctx)}else S(this.ctx),this.ctx.rect(t[0],t[1],i,s),this.clip(),this.endPath()}this.current=new g(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,r),this.transform.apply(this,a)}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore()}},{key:"paintImageMaskXObject",value:function(e){if(this.contentVisible){var t=this.ctx,r=e.width,n=e.height,a=this.processingType3;if(a&&void 0===a.compiled&&(a.compiled=r<=1e3&&n<=1e3?function(e){var t,r,n,a,o=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=e.width,s=e.height,l=i+1,u=new Uint8Array(l*(s+1)),c=i+7&-8,f=e.data,d=new Uint8Array(c*s),h=0;for(t=0,r=f.length;t<r;t++)for(var p=f[t],v=128;v>0;)d[h++]=p&v?0:255,v>>=1;var y=0;for(0!==d[h=0]&&(u[0]=1,++y),n=1;n<i;n++)d[h]!==d[h+1]&&(u[n]=d[h]?2:1,++y),h++;for(0!==d[h]&&(u[n]=2,++y),t=1;t<s;t++){a=t*l,d[(h=t*c)-c]!==d[h]&&(u[a]=d[h]?1:8,++y);var m=(d[h]?4:0)+(d[h-c]?8:0);for(n=1;n<i;n++)o[m=(m>>2)+(d[h+1]?4:0)+(d[h-c+1]?8:0)]&&(u[a+n]=o[m],++y),h++;if(d[h-c]!==d[h]&&(u[a+n]=d[h]?2:4,++y),y>1e3)return null}for(a=t*l,0!==d[h=c*(s-1)]&&(u[a]=8,++y),n=1;n<i;n++)d[h]!==d[h+1]&&(u[a+n]=d[h]?4:8,++y),h++;if(0!==d[h]&&(u[a+n]=4,++y),y>1e3)return null;var g=new Int32Array([0,l,-1,0,-l,0,0,0,1]),b=[];for(t=0;y&&t<=s;t++){for(var _=t*l,w=_+i;_<w&&!u[_];)_++;if(_!==w){var S=[_%l,t],A=_,k=u[_];do{var x=g[k];do{_+=x}while(!u[_]);var P=u[_];5!==P&&10!==P?(k=P,u[_]=0):(k=P&51*k>>4,u[_]&=k>>2|k<<2),S.push(_%l,_/l|0),u[_]||--y}while(A!==_);b.push(S),--t}}return function(e){e.save(),e.scale(1/i,-1/s),e.translate(0,-s),e.beginPath();for(var t=0,r=b.length;t<r;t++){var n=b[t];e.moveTo(n[0],n[1]);for(var a=2,o=n.length;a<o;a+=2)e.lineTo(n[a],n[a+1])}e.fill(),e.beginPath(),e.restore()}}({data:e.data,width:r,height:n}):null),null!=a&&a.compiled)a.compiled(t);else{var o=this._createMaskCanvas(e),i=o.canvas;t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(i,o.offsetX,o.offsetY),t.restore(),this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){var s=this.ctx;s.save();var l=s.mozCurrentTransform;s.transform(t,r,a,o,0,0);var u=this._createMaskCanvas(e);s.setTransform(1,0,0,1,0,0);for(var c=0,d=i.length;c<d;c+=2){var h=n.Util.transform(l,[t,r,a,o,i[c],i[c+1]]),p=f(n.Util.applyTransform([0,0],h),2),v=p[0],y=p[1];s.drawImage(u.canvas,v,y)}s.restore(),this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function(e){if(this.contentVisible){for(var t=this.ctx,r=this.current.fillColor,n=this.current.patternFill,o=0,i=e.length;o<i;o++){var s=e[o],l=s.width,u=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",l,u),f=c.context;f.save(),_(f,s),f.globalCompositeOperation="source-in",f.fillStyle=n?r.getPattern(f,this,t.mozCurrentTransformInverse,a.PathType.FILL):r,f.fillRect(0,0,l,u),f.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,l,u,0,-1,1,1),t.restore()}this.compose()}}},{key:"paintImageXObject",value:function(e){if(this.contentVisible){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function(e,t,r,a){if(this.contentVisible){var o=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);if(o){for(var i=o.width,s=o.height,l=[],u=0,c=a.length;u<c;u+=2)l.push({transform:[t,0,0,r,a[u],a[u+1]],x:0,y:0,w:i,h:s});this.paintInlineImageXObjectGroup(o,l)}else(0,n.warn)("Dependent image isn't ready yet")}}},{key:"paintInlineImageXObject",value:function(e){if(this.contentVisible){var t,r=e.width,n=e.height,a=this.ctx;if(this.save(),a.scale(1/r,-1/n),"function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)t=e;else{var o=this.cachedCanvases.getCanvas("inlineImage",r,n);b(o.context,e,this.current.transferMaps),t=o.canvas}var i=this._scaleImage(t,a.mozCurrentTransformInverse);if(a.imageSmoothingEnabled=C(a.mozCurrentTransform,e.interpolate),a.drawImage(i.img,0,0,i.paintWidth,i.paintHeight,0,-n,r,n),this.imageLayer){var s=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:s[0],top:s[1],width:r/a.mozCurrentTransformInverse[0],height:n/a.mozCurrentTransformInverse[3]})}this.compose(),this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function(e,t){if(this.contentVisible){var r=this.ctx,n=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",n,a);b(o.context,e,this.current.transferMaps);for(var i=0,s=t.length;i<s;i++){var l=t[i];if(r.save(),r.transform.apply(r,l.transform),r.scale(1,-1),r.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var u=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:e,left:u[0],top:u[1],width:n,height:a})}r.restore()}this.compose()}}},{key:"paintSolidColorImageMask",value:function(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}},{key:"markPoint",value:function(e){}},{key:"markPointProps",value:function(e,t){}},{key:"beginMarkedContent",value:function(e){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function(){}},{key:"endCompat",value:function(){}},{key:"consumePath",value:function(e){this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);var t=this.ctx;this.pendingClip&&(this.pendingClip===O?t.clip("evenodd"):t.clip(),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),t.beginPath()}},{key:"getSinglePixelWidth",value:function(){if(null===this._cachedGetSinglePixelWidth){var e=this.ctx.mozCurrentTransform,t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.pow(e[0],2)+Math.pow(e[2],2),n=Math.pow(e[1],2)+Math.pow(e[3],2),a=Math.sqrt(Math.max(r,n))/t;r!==n&&this._combinedScaleFactor*a>1?this._cachedGetSinglePixelWidth=-this._combinedScaleFactor*a:t>Number.EPSILON?this._cachedGetSinglePixelWidth=a:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}},{key:"isContentVisible",value:function(){for(var e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}]),e}();for(var M in t.CanvasGraphics=F,n.OPS)void 0!==F.prototype[M]&&(F.prototype[n.OPS[M]]=F.prototype[M])},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new m(e);case"Mesh":return new _(e);case"Dummy":return new w}throw new Error("Unknown IR type: ".concat(e[0]))};var a=r(1);function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function v(e,t){if(t&&"undefined"!=typeof Path2D){var r=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],r,n),e.clip(a)}}t.PathType=p;var y=function(){function e(){f(this,e),this.constructor===e&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}return h(e,[{key:"getPattern",value:function(){(0,a.unreachable)("Abstract method `getPattern` called.")}}]),e}(),m=function(e){s(r,e);var t=u(r);function r(e){var n;return f(this,r),(n=t.call(this))._type=e[1],n._bbox=e[2],n._colorStops=e[3],n._p0=e[4],n._p1=e[5],n._r0=e[6],n._r1=e[7],n.matrix=null,n}return h(r,[{key:"_createGradient",value:function(e){var t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var r,n=o(this._colorStops);try{for(n.s();!(r=n.n()).done;){var a=r.value;t.addColorStop(a[0],a[1])}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"getPattern",value:function(e,t,r,n){var o;if(n===p.STROKE||n===p.FILL){var i=t.current.getClippedPathBoundingBox(n,e.mozCurrentTransform)||[0,0,0,0],s=Math.ceil(i[2]-i[0])||1,l=Math.ceil(i[3]-i[1])||1,u=t.cachedCanvases.getCanvas("pattern",s,l,!0),c=u.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-i[0],-i[1]),r=a.Util.transform(r,[1,0,0,1,i[0],i[1]]),c.transform.apply(c,t.baseTransform),this.matrix&&c.transform.apply(c,this.matrix),v(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),o=e.createPattern(u.canvas,"no-repeat");var f=new DOMMatrix(r);try{o.setTransform(f)}catch(e){(0,a.warn)('RadialAxialShadingPattern.getPattern: "'.concat(null==e?void 0:e.message,'".'))}}else v(e,this._bbox),o=this._createGradient(e);return o}}]),r}(y);function g(e,t,r,n,a,o,i,s){var l,u=t.coords,c=t.colors,f=e.data,d=4*e.width;u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=o,o=i,i=l),u[n+1]>u[a+1]&&(l=n,n=a,a=l,l=i,i=s,s=l),u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=o,o=i,i=l);var h=(u[r]+t.offsetX)*t.scaleX,p=(u[r+1]+t.offsetY)*t.scaleY,v=(u[n]+t.offsetX)*t.scaleX,y=(u[n+1]+t.offsetY)*t.scaleY,m=(u[a]+t.offsetX)*t.scaleX,g=(u[a+1]+t.offsetY)*t.scaleY;if(!(p>=g))for(var b,_,w,S,A,k,x,P,C=c[o],T=c[o+1],R=c[o+2],E=c[i],O=c[i+1],F=c[i+2],M=c[s],j=c[s+1],I=c[s+2],D=Math.round(p),L=Math.round(g),N=D;N<=L;N++){if(N<y){var q=void 0;b=h-(h-v)*(q=N<p?0:(p-N)/(p-y)),_=C-(C-E)*q,w=T-(T-O)*q,S=R-(R-F)*q}else{var B=void 0;b=v-(v-m)*(B=N>g?1:y===g?0:(y-N)/(y-g)),_=E-(E-M)*B,w=O-(O-j)*B,S=F-(F-I)*B}var W=void 0;A=h-(h-m)*(W=N<p?0:N>g?1:(p-N)/(p-g)),k=C-(C-M)*W,x=T-(T-j)*W,P=R-(R-I)*W;for(var U=Math.round(Math.min(b,A)),z=Math.round(Math.max(b,A)),G=d*N+4*U,H=U;H<=z;H++)(W=(b-H)/(b-A))<0?W=0:W>1&&(W=1),f[G++]=_-(_-k)*W|0,f[G++]=w-(w-x)*W|0,f[G++]=S-(S-P)*W|0,f[G++]=255}}function b(e,t,r){var n,a,o=t.coords,i=t.colors;switch(t.type){case"lattice":var s=t.verticesPerRow,l=Math.floor(o.length/s)-1,u=s-1;for(n=0;n<l;n++)for(var c=n*s,f=0;f<u;f++,c++)g(e,r,o[c],o[c+1],o[c+s],i[c],i[c+1],i[c+s]),g(e,r,o[c+s+1],o[c+1],o[c+s],i[c+s+1],i[c+1],i[c+s]);break;case"triangles":for(n=0,a=o.length;n<a;n+=3)g(e,r,o[n],o[n+1],o[n+2],i[n],i[n+1],i[n+2]);break;default:throw new Error("illegal figure")}}var _=function(e){s(r,e);var t=u(r);function r(e){var n;return f(this,r),(n=t.call(this))._coords=e[2],n._colors=e[3],n._figures=e[4],n._bounds=e[5],n._bbox=e[7],n._background=e[8],n.matrix=null,n}return h(r,[{key:"_createMeshCanvas",value:function(e,t,r){var n=Math.floor(this._bounds[0]),a=Math.floor(this._bounds[1]),i=Math.ceil(this._bounds[2])-n,s=Math.ceil(this._bounds[3])-a,l=Math.min(Math.ceil(Math.abs(i*e[0]*1.1)),3e3),u=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),c=i/l,f=s/u,d={coords:this._coords,colors:this._colors,offsetX:-n,offsetY:-a,scaleX:1/c,scaleY:1/f},h=l+4,p=u+4,v=r.getCanvas("mesh",h,p,!1),y=v.context,m=y.createImageData(l,u);if(t)for(var g=m.data,_=0,w=g.length;_<w;_+=4)g[_]=t[0],g[_+1]=t[1],g[_+2]=t[2],g[_+3]=255;var S,A=o(this._figures);try{for(A.s();!(S=A.n()).done;)b(m,S.value,d)}catch(e){A.e(e)}finally{A.f()}return y.putImageData(m,2,2),{canvas:v.canvas,offsetX:n-2*c,offsetY:a-2*f,scaleX:c,scaleY:f}}},{key:"getPattern",value:function(e,t,r,n){var o;if(v(e,this._bbox),n===p.SHADING)o=a.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(o=a.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){var i=a.Util.singularValueDecompose2dScale(this.matrix);o=[o[0]*i[0],o[1]*i[1]]}var s=this._createMeshCanvas(o,n===p.SHADING?null:this._background,t.cachedCanvases);return n!==p.SHADING&&(e.setTransform.apply(e,t.baseTransform),this.matrix&&e.transform.apply(e,this.matrix)),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}]),r}(y),w=function(e){s(r,e);var t=u(r);function r(){return f(this,r),t.apply(this,arguments)}return h(r,[{key:"getPattern",value:function(){return"hotpink"}}]),r}(y),S=1,A=2,k=function(){function e(t,r,n,a,o){f(this,e),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=n,this.canvasGraphicsFactory=a,this.baseTransform=o}return h(e,[{key:"createPatternCanvas",value:function(e){var t=this.operatorList,r=this.bbox,n=this.xstep,o=this.ystep,i=this.paintType,s=this.tilingType,l=this.color,u=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+s);var c=r[0],f=r[1],d=r[2],h=r[3],p=a.Util.singularValueDecompose2dScale(this.matrix),v=a.Util.singularValueDecompose2dScale(this.baseTransform),y=[p[0]*v[0],p[1]*v[1]],m=this.getSizeAndScale(n,this.ctx.canvas.width,y[0]),g=this.getSizeAndScale(o,this.ctx.canvas.height,y[1]),b=e.cachedCanvases.getCanvas("pattern",m.size,g.size,!0),_=b.context,w=u.createCanvasGraphics(_);w.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(w,i,l);var S=c,A=f,k=d,x=h;return c<0&&(S=0,k+=Math.abs(c)),f<0&&(A=0,x+=Math.abs(f)),_.translate(-m.scale*S,-g.scale*A),w.transform(m.scale,0,0,g.scale,0,0),_.save(),this.clipBbox(w,S,A,k,x),w.baseTransform=w.ctx.mozCurrentTransform.slice(),w.executeOperatorList(t),w.endDrawing(),{canvas:b.canvas,scaleX:m.scale,scaleY:g.scale,offsetX:S,offsetY:A}}},{key:"getSizeAndScale",value:function(t,r,n){t=Math.abs(t);var a=Math.max(e.MAX_PATTERN_SIZE,r),o=Math.ceil(t*n);return o>=a?o=a:n=o/t,{scale:n,size:o}}},{key:"clipBbox",value:function(e,t,r,n,a){var o=n-t,i=a-r;e.ctx.rect(t,r,o,i),e.clip(),e.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(e,t,r){var n=e.ctx,o=e.current;switch(t){case S:var i=this.ctx;n.fillStyle=i.fillStyle,n.strokeStyle=i.strokeStyle,o.fillColor=i.fillStyle,o.strokeColor=i.strokeStyle;break;case A:var s=a.Util.makeHexColor(r[0],r[1],r[2]);n.fillStyle=s,n.strokeStyle=s,o.fillColor=s,o.strokeColor=s;break;default:throw new a.FormatError("Unsupported paint type: ".concat(t))}}},{key:"getPattern",value:function(e,t,r,n){var o=r;n!==p.SHADING&&(o=a.Util.transform(o,t.baseTransform),this.matrix&&(o=a.Util.transform(o,this.matrix)));var i=this.createPatternCanvas(t),s=new DOMMatrix(o);s=(s=s.translate(i.offsetX,i.offsetY)).scale(1/i.scaleX,1/i.scaleY);var l=e.createPattern(i.canvas,"repeat");try{l.setTransform(s)}catch(e){(0,a.warn)('TilingPattern.getPattern: "'.concat(null==e?void 0:e.message,'".'))}return l}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,a.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),e}();t.TilingPattern=k},(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=void 0===r.workerPort?null:r.workerPort,r.workerSrc=void 0===r.workerSrc?"":r.workerSrc},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1);function i(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var u=1,c=2,f=1,d=2,h=3,p=4,v=5,y=6,m=7,g=8;function b(e){switch(e instanceof Error||"object"===l(e)&&null!==e||(0,o.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new o.AbortException(e.message);case"MissingPDFException":return new o.MissingPDFException(e.message);case"PasswordException":return new o.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new o.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new o.UnknownErrorException(e.message,e.details);default:return new o.UnknownErrorException(e.message,e.toString())}}var _=function(){function e(t,r,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceName=t,this.targetName=r,this.comObj=n,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(e){var t=e.data;if(t.targetName===a.sourceName)if(t.stream)a._processStreamMessage(t);else if(t.callback){var r=t.callbackId,o=a.callbackCapabilities[r];if(!o)throw new Error("Cannot resolve callback ".concat(r));if(delete a.callbackCapabilities[r],t.callback===u)o.resolve(t.data);else{if(t.callback!==c)throw new Error("Unexpected callback case");o.reject(b(t.reason))}}else{var i=a.actionHandler[t.action];if(!i)throw new Error("Unknown action from worker: ".concat(t.action));if(t.callbackId){var s=a.sourceName,l=t.sourceName;new Promise((function(e){e(i(t.data))})).then((function(e){n.postMessage({sourceName:s,targetName:l,callback:u,callbackId:t.callbackId,data:e})}),(function(e){n.postMessage({sourceName:s,targetName:l,callback:c,callbackId:t.callbackId,reason:b(e)})}))}else t.streamId?a._createStreamSink(t):i(t.data)}},n.addEventListener("message",this._onComObjOnMessage)}var t,r,n,l,_;return t=e,r=[{key:"on",value:function(e,t){var r=this.actionHandler;if(r[e])throw new Error('There is already an actionName called "'.concat(e,'"'));r[e]=t}},{key:"send",value:function(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}},{key:"sendWithPromise",value:function(e,t,r){var n=this.callbackId++,a=(0,o.createPromiseCapability)();this.callbackCapabilities[n]=a;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){a.reject(e)}return a.promise}},{key:"sendWithStream",value:function(e,t,r,n){var a=this,i=this.streamId++,s=this.sourceName,l=this.targetName,u=this.comObj;return new ReadableStream({start:function(r){var c=(0,o.createPromiseCapability)();return a.streamControllers[i]={controller:r,startCall:c,pullCall:null,cancelCall:null,isClosed:!1},u.postMessage({sourceName:s,targetName:l,action:e,streamId:i,data:t,desiredSize:r.desiredSize},n),c.promise},pull:function(e){var t=(0,o.createPromiseCapability)();return a.streamControllers[i].pullCall=t,u.postMessage({sourceName:s,targetName:l,stream:y,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:function(e){(0,o.assert)(e instanceof Error,"cancel must have a valid reason");var t=(0,o.createPromiseCapability)();return a.streamControllers[i].cancelCall=t,a.streamControllers[i].isClosed=!0,u.postMessage({sourceName:s,targetName:l,stream:f,streamId:i,reason:b(e)}),t.promise}},r)}},{key:"_createStreamSink",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj,i=this,s=this.actionHandler[e.action],l={enqueue:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var l=this.desiredSize;this.desiredSize-=i,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,o.createPromiseCapability)(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:r,targetName:n,stream:p,streamId:t,chunk:e},s)}},close:function(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:n,stream:h,streamId:t}),delete i.streamSinks[t])},error:function(e){(0,o.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:r,targetName:n,stream:v,streamId:t,reason:b(e)}))},sinkCapability:(0,o.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[t]=l,new Promise((function(t){t(s(e.data,l))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:g,streamId:t,reason:b(e)})}))}},{key:"_processStreamMessage",value:function(e){var t=e.streamId,r=this.sourceName,n=e.sourceName,a=this.comObj,i=this.streamControllers[t],s=this.streamSinks[t];switch(e.stream){case g:e.success?i.startCall.resolve():i.startCall.reject(b(e.reason));break;case m:e.success?i.pullCall.resolve():i.pullCall.reject(b(e.reason));break;case y:if(!s){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve(),s.desiredSize=e.desiredSize,new Promise((function(e){e(s.onPull&&s.onPull())})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:m,streamId:t,reason:b(e)})}));break;case p:if((0,o.assert)(i,"enqueue should have stream controller"),i.isClosed)break;i.controller.enqueue(e.chunk);break;case h:if((0,o.assert)(i,"close should have stream controller"),i.isClosed)break;i.isClosed=!0,i.controller.close(),this._deleteStreamController(i,t);break;case v:(0,o.assert)(i,"error should have stream controller"),i.controller.error(b(e.reason)),this._deleteStreamController(i,t);break;case d:e.success?i.cancelCall.resolve():i.cancelCall.reject(b(e.reason)),this._deleteStreamController(i,t);break;case f:if(!s)break;new Promise((function(t){t(s.onCancel&&s.onCancel(b(e.reason)))})).then((function(){a.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,reason:b(e)})})),s.sinkCapability.reject(b(e.reason)),s.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:(l=a.default.mark((function e(t,r){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,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 e.stop()}}),e,this)})),_=function(){var e=this,t=arguments;return new Promise((function(r,n){var a=l.apply(e,t);function o(e){i(a,r,n,o,s,"next",e)}function s(e){i(a,r,n,o,s,"throw",e)}o(void 0)}))},function(e,t){return _.apply(this,arguments)})},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}],r&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.MessageHandler=_},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=r(1);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,l(e,t,"get"))}function s(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,l(e,t,"set"),r),r}function l(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,c=new WeakMap,f=function(){function e(t){var r=t.parsedData,n=t.rawData;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,u,{writable:!0,value:void 0}),o(this,c,{writable:!0,value:void 0}),s(this,u,r),s(this,c,n)}var t,r,l;return t=e,(r=[{key:"getRaw",value:function(){return i(this,c)}},{key:"get",value:function(e){var t;return null!==(t=i(this,u).get(e))&&void 0!==t?t:null}},{key:"getAll",value:function(){return(0,n.objectFromMap)(i(this,u))}},{key:"has",value:function(e){return i(this,u).has(e)}}])&&a(t.prototype,r),l&&a(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Metadata=f},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var n=r(1);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=s((function e(t,r){l(this,e),this.visible=!0,this.name=t,this.intent=r})),c=function(){function e(t){if(l(this,e),this.name=null,this.creator=null,this._order=null,this._groups=new Map,null!==t){this.name=t.name,this.creator=t.creator,this._order=t.order;var r,n=a(t.groups);try{for(n.s();!(r=n.n()).done;){var o=r.value;this._groups.set(o.id,new u(o.name,o.intent))}}catch(e){n.e(e)}finally{n.f()}if("OFF"===t.baseState){var i,s=a(this._groups);try{for(s.s();!(i=s.n()).done;)i.value.visible=!1}catch(e){s.e(e)}finally{s.f()}}var c,f=a(t.on);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._groups.get(d).visible=!0}}catch(e){f.e(e)}finally{f.f()}var h,p=a(t.off);try{for(p.s();!(h=p.n()).done;){var v=h.value;this._groups.get(v).visible=!1}}catch(e){p.e(e)}finally{p.f()}}}return s(e,[{key:"_evaluateVisibilityExpression",value:function(e){var t=e.length;if(t<2)return!0;for(var r=e[0],a=1;a<t;a++){var o=e[a],i=void 0;if(Array.isArray(o))i=this._evaluateVisibilityExpression(o);else{if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;i=this._groups.get(o).visible}switch(r){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return"And"===r}},{key:"isVisible",value:function(e){if(0===this._groups.size)return!0;if(!e)return(0,n.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return this._groups.has(e.id)?this._groups.get(e.id).visible:((0,n.warn)("Optional content group not found: ".concat(e.id)),!0);if("OCMD"===e.type){if(e.expression)return this._evaluateVisibilityExpression(e.expression);if(!e.policy||"AnyOn"===e.policy){var t,r=a(e.ids);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!this._groups.has(o))return(0,n.warn)("Optional content group not found: ".concat(o)),!0;if(this._groups.get(o).visible)return!0}}catch(e){r.e(e)}finally{r.f()}return!1}if("AllOn"===e.policy){var i,s=a(e.ids);try{for(s.s();!(i=s.n()).done;){var l=i.value;if(!this._groups.has(l))return(0,n.warn)("Optional content group not found: ".concat(l)),!0;if(!this._groups.get(l).visible)return!1}}catch(e){s.e(e)}finally{s.f()}return!0}if("AnyOff"===e.policy){var u,c=a(e.ids);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(!this._groups.has(f))return(0,n.warn)("Optional content group not found: ".concat(f)),!0;if(!this._groups.get(f).visible)return!0}}catch(e){c.e(e)}finally{c.f()}return!1}if("AllOff"===e.policy){var d,h=a(e.ids);try{for(h.s();!(d=h.n()).done;){var p=d.value;if(!this._groups.has(p))return(0,n.warn)("Optional content group not found: ".concat(p)),!0;if(this._groups.get(p).visible)return!1}}catch(e){h.e(e)}finally{h.f()}return!0}return(0,n.warn)("Unknown optional content policy ".concat(e.policy,".")),!0}return(0,n.warn)("Unknown group type ".concat(e.type,".")),!0}},{key:"setVisibility",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._groups.has(e)?this._groups.get(e).visible=!!t:(0,n.warn)("Optional content group not found: ".concat(e))}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size>0?(0,n.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(e){return this._groups.get(e)||null}}]),e}();t.OptionalContentConfig=c},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1),i=r(147);function s(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p=function(){function e(t,r){var n=this;f(this,e),(0,o.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1,this._contentDispositionFilename=t.contentDispositionFilename||null;var a=t.initialData;if((null==a?void 0:a.length)>0){var i=new Uint8Array(a).buffer;this._queuedChunks.push(i)}this._pdfDataRangeTransport=r,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((function(e,t){n._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener((function(e,t){n._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((function(e){n._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((function(){n._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}return h(e,[{key:"_onReceiveData",value:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some((function(r){return r._begin===e.begin&&(r._enqueue(t),!0)}));(0,o.assert)(r,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"_onProgress",value:function(e){if(void 0===e.total){var t=this._rangeReaders[0];null!=t&&t.onProgress&&t.onProgress({loaded:e.loaded})}else{var r=this._fullRequestReader;null!=r&&r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}},{key:"getFullReader",value:function(){(0,o.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new v(this,e,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new y(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=u(this._rangeReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}this._pdfDataRangeTransport.abort()}}]),e}();t.PDFDataTransportStream=p;var v=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;f(this,e),this._stream=t,this._done=n||!1,this._filename=(0,i.isPdfFile)(a)?a:null,this._queuedChunks=r||[],this._loaded=0;var o,s=u(this._queuedChunks);try{for(s.s();!(o=s.n()).done;){var l=o.value;this._loaded+=l.byteLength}}catch(e){s.e(e)}finally{s.f()}this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}var t;return h(e,[{key:"_enqueue",value:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._queuedChunks.length>0)){e.next=3;break}return t=this._queuedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 3:if(!this._done){e.next=5;break}return e.abrupt("return",{value:void 0,done:!0});case 5:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0;var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),e}(),y=function(){function e(t,r,n){f(this,e),this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}var t;return h(e,[{key:"_enqueue",value:function(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._queuedChunk){e.next=4;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 4:if(!this._done){e.next=6;break}return e.abrupt("return",{value:void 0,done:!0});case 6:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0;var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),e}()},(e,t)=>{"use strict";function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,o=function(){};return{s:o,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},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 i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"textContent",value:function(t){var n=[],a={items:n,styles:Object.create(null)};return function t(a){var o;if(a){var i=null,s=a.name;if("#text"===s)i=a.value;else{if(!e.shouldBuildText(s))return;null!=a&&null!==(o=a.attributes)&&void 0!==o&&o.textContent?i=a.attributes.textContent:a.value&&(i=a.value)}if(null!==i&&n.push({str:i}),a.children){var l,u=r(a.children);try{for(u.s();!(l=u.n()).done;)t(l.value)}catch(e){u.e(e)}finally{u.f()}}}}(t),a}},{key:"shouldBuildText",value:function(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}],(n=null)&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.XfaText=o},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var a=r(1),o=r(147),i=r(151),s=r(161),l=r(162);function u(e,t,r){return function(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}(e,t),r}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},c.apply(this,arguments)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(e)||function(){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 h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=m(e);if(t){var o=m(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}(this,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var x=1e3,P=new WeakSet;function C(e){return{width:e[2]-e[0],height:e[3]-e[1]}}var T=function(){function e(){S(this,e)}return k(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new E(e);case a.AnnotationType.TEXT:return new O(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new M(e);case"Btn":return e.data.radioButton?new I(e):e.data.checkBox?new j(e):new D(e);case"Ch":return new L(e)}return new F(e);case a.AnnotationType.POPUP:return new N(e);case a.AnnotationType.FREETEXT:return new B(e);case a.AnnotationType.LINE:return new W(e);case a.AnnotationType.SQUARE:return new U(e);case a.AnnotationType.CIRCLE:return new z(e);case a.AnnotationType.POLYLINE:return new G(e);case a.AnnotationType.CARET:return new V(e);case a.AnnotationType.INK:return new X(e);case a.AnnotationType.POLYGON:return new H(e);case a.AnnotationType.HIGHLIGHT:return new Y(e);case a.AnnotationType.UNDERLINE:return new K(e);case a.AnnotationType.SQUIGGLY:return new Q(e);case a.AnnotationType.STRIKEOUT:return new J(e);case a.AnnotationType.STAMP:return new $(e);case a.AnnotationType.FILEATTACHMENT:return new Z(e);default:return new R(e)}}}]),e}(),R=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,a=void 0!==n&&n,o=r.ignoreBorder,i=void 0!==o&&o,s=r.createQuadrilaterals,l=void 0!==s&&s;S(this,e),this.isRenderable=a,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,a&&(this.container=this._createContainer(i)),l&&(this.quadrilaterals=this._createQuadrilaterals(i))}return k(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,o=document.createElement("section"),i=C(t.rect),s=i.width,l=i.height;o.setAttribute("data-annotation-id",t.id);var u=a.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(t.hasOwnCanvas){var c=n.transform.slice(),f=b(a.Util.singularValueDecompose2dScale(c),2),d=f[0],h=f[1];s=Math.ceil(s*d),l=Math.ceil(l*h),u[0]*=d,u[1]*=h;for(var p=0;p<4;p++)c[p]=Math.sign(c[p]);o.style.transform="matrix(".concat(c.join(","),")")}else o.style.transform="matrix(".concat(n.transform.join(","),")");if(o.style.transformOrigin="".concat(-u[0],"px ").concat(-u[1],"px"),!e&&t.borderStyle.width>0){o.style.borderWidth="".concat(t.borderStyle.width,"px"),t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(s-=2*t.borderStyle.width,l-=2*t.borderStyle.width);var v=t.borderStyle.horizontalCornerRadius,y=t.borderStyle.verticalCornerRadius;if(v>0||y>0){var m="".concat(v,"px / ").concat(y,"px");o.style.borderRadius=m}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:o.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:o.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:o.style.borderBottomStyle="solid"}t.borderColor||t.color?o.style.borderColor=a.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):o.style.borderWidth=0}return o.style.left="".concat(u[0],"px"),o.style.top="".concat(u[1],"px"),t.hasOwnCanvas?o.style.width=o.style.height="auto":(o.style.width="".concat(s,"px"),o.style.height="".concat(l,"px")),o}},{key:"_createQuadrilaterals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.data.quadPoints)return null;var t,r=[],n=this.data.rect,a=g(this.data.quadPoints);try{for(a.s();!(t=a.n()).done;){var o=t.value;this.data.rect=[o[2].x,o[2].y,o[1].x,o[1].y],r.push(this._createContainer(e))}}catch(e){a.e(e)}finally{a.f()}return this.data.rect=n,r}},{key:"_createPopup",value:function(e,t){var r=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,r=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=r.style.height,e.style.width=r.style.width,r.appendChild(e));var n=new q({container:r,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();n.style.left=r.style.width,r.appendChild(n)}},{key:"_renderQuadrilaterals",value:function(e){var t,r=g(this.quadrilaterals);try{for(r.s();!(t=r.n()).done;)t.value.className=e}catch(e){r.e(e)}finally{r.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];if(this._fieldObjects){var n=this._fieldObjects[e];if(n){var o,i=g(n);try{for(i.s();!(o=i.n()).done;){var s=o.value,l=s.page,u=s.id,c=s.exportValues;if(-1!==l&&u!==t){var f="string"==typeof c?c:null,d=document.getElementById(u);!d||P.has(d)?r.push({id:u,exportValue:f,domElement:d}):(0,a.warn)("_getElementsByName - element not allowed: ".concat(u))}}}catch(e){i.e(e)}finally{i.f()}}return r}var h,p=g(document.getElementsByName(e));try{for(p.s();!(h=p.n()).done;){var v=h.value,y=v.id,m=v.exportValue;y!==t&&P.has(v)&&r.push({id:y,exportValue:m,domElement:v})}}catch(e){p.e(e)}finally{p.f()}return r}}],[{key:"platform",get:function(){var e="undefined"!=typeof navigator?navigator.platform:"";return(0,a.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}]),e}(),E=function(e){h(r,e);var t=v(r);function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;S(this,r);var a=!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.resetForm||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"]));return t.call(this,e,{isRenderable:a,ignoreBorder:!(null==n||!n.ignoreBorder),createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){var e,t=this.data,r=this.linkService,n=document.createElement("a");if(t.url)r.addLinkAttributes||(0,a.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(e=r.addLinkAttributes)||void 0===e||e.call(r,n,t.url,t.newWindow);else if(t.action)this._bindNamedAction(n,t.action);else if(t.dest)this._bindLink(n,t.dest);else{var o=!1;t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(o=!0,this._bindJSAction(n,t)),t.resetForm?this._bindResetFormAction(n,t.resetForm):o||this._bindLink(n,"")}return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((function(e,t){var r=0===t?n:n.cloneNode();return e.appendChild(r),e})):(this.container.className="linkAnnotation",this.container.appendChild(n),this.container)}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.goToDestination(t),!1},(t||""===t)&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}},{key:"_bindJSAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),a=function(){var a=i[o],s=n.get(a);if(!s)return"continue";e[s]=function(){var e;return null===(e=r.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:r,detail:{id:t.id,name:a}}),!1}},o=0,i=Object.keys(t.actions);o<i.length;o++)a();e.onclick||(e.onclick=function(){return!1}),e.className="internalLink"}},{key:"_bindResetFormAction",value:function(e,t){var r=this,n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects)return(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(e.onclick=function(){return!1}));e.onclick=function(){n&&n();var e=t.fields,a=t.refs,o=t.include,i=[];if(0!==e.length||0!==a.length){var s,l=new Set(a),u=g(e);try{for(u.s();!(s=u.n()).done;){var c,f=s.value,h=g(r._fieldObjects[f]||[]);try{for(h.s();!(c=h.n()).done;){var p=c.value.id;l.add(p)}}catch(e){h.e(e)}finally{h.f()}}}catch(e){u.e(e)}finally{u.f()}for(var v=0,y=Object.values(r._fieldObjects);v<y.length;v++){var m,b=g(y[v]);try{for(b.s();!(m=b.n()).done;){var _=m.value;l.has(_.id)===o&&i.push(_)}}catch(e){b.e(e)}finally{b.f()}}}else for(var w=0,S=Object.values(r._fieldObjects);w<S.length;w++){var A=S[w];i.push.apply(i,d(A))}for(var k,x=r.annotationStorage,C=[],T=0,R=i;T<R.length;T++){var E=R[T],O=E.id;switch(C.push(O),E.type){case"text":var F=E.defaultValue||"";x.setValue(O,{value:F,valueAsString:F});break;case"checkbox":case"radiobutton":var M=E.defaultValue===E.exportValues;x.setValue(O,{value:M});break;case"combobox":case"listbox":var j=E.defaultValue||"";x.setValue(O,{value:j});break;default:continue}var I=document.getElementById(O);I&&P.has(I)&&I.dispatchEvent(new Event("resetform"))}return r.enableScripting&&(null===(k=r.linkService.eventBus)||void 0===k||k.dispatch("dispatcheventinsandbox",{source:r,detail:{id:"app",ids:C,name:"ResetForm"}})),!1}}}]),r}(R),O=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return k(r,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.appendChild(e),this.container}}]),r}(R),F=function(e){h(r,e);var t=v(r);function r(){return S(this,r),t.apply(this,arguments)}return k(r,[{key:"render",value:function(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"_getKeyModifier",value:function(e){var t=R.platform,r=t.isWin,n=t.isMac;return r&&e.ctrlKey||n&&e.metaKey}},{key:"_setEventListener",value:function(e,t,r,n){var a=this;t.includes("mouse")?e.addEventListener(t,(function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e),shift:e.shiftKey,modifier:a._getKeyModifier(e)}})})):e.addEventListener(t,(function(e){var t;null===(t=a.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:r,value:n(e)}})}))}},{key:"_setEventListeners",value:function(e,t,r){var n,a=g(t);try{for(a.s();!(n=a.n()).done;){var o,i=b(n.value,2),s=i[0],l=i[1];("Action"===l||null!==(o=this.data.actions)&&void 0!==o&&o[l])&&this._setEventListener(e,s,l,r)}}catch(e){a.e(e)}finally{a.f()}}},{key:"_setBackgroundColor",value:function(e){var t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":a.Util.makeHexColor(t[0],t[1],t[2])}},{key:"_dispatchEventFromSandbox",value:function(e,t){for(var r=this,n=function(e,t,r){var n=r.detail[e];r.target.style[t]=s.ColorConverters["".concat(n[0],"_HTML")](n.slice(1))},a={display:function(e){var t=e.detail.display%2==1;e.target.style.visibility=t?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:function(e){r.annotationStorage.setValue(r.data.id,{print:e.detail.print})},hidden:function(e){e.target.style.visibility=e.detail.hidden?"hidden":"visible",r.annotationStorage.setValue(r.data.id,{hidden:e.detail.hidden})},focus:function(e){setTimeout((function(){return e.target.focus({preventScroll:!1})}),0)},userName:function(e){e.target.title=e.detail.userName},readonly:function(e){e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:function(e){e.detail.required?e.target.setAttribute("required",""):e.target.removeAttribute("required")},bgColor:function(e){n("bgColor","backgroundColor",e)},fillColor:function(e){n("fillColor","backgroundColor",e)},fgColor:function(e){n("fgColor","color",e)},textColor:function(e){n("textColor","color",e)},borderColor:function(e){n("borderColor","borderColor",e)},strokeColor:function(e){n("strokeColor","borderColor",e)}},o=0,i=Object.keys(t.detail);o<i.length;o++){var l=i[o],u=e[l]||a[l];u&&u(t)}}}]),r}(R),M=function(e){h(r,e);var t=v(r);function r(e){S(this,r);var n=e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue;return t.call(this,e,{isRenderable:n})}return k(r,[{key:"setPropertyOnSiblings",value:function(e,t,r,n){var a,o=this.annotationStorage,i=g(this._getElementsByName(e.name,e.id));try{for(i.s();!(a=i.n()).done;){var s=a.value;s.domElement&&(s.domElement[t]=r),o.setValue(s.id,f({},n,r))}}catch(e){i.e(e)}finally{i.f()}}},{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data.id;this.container.className="textWidgetAnnotation";var n=null;if(this.renderForms){var a=t.getValue(r,{value:this.data.fieldValue,valueAsString:this.data.fieldValue}),o=a.valueAsString||a.value||"",i={userValue:null,formattedValue:null};this.data.multiLine?(n=document.createElement("textarea")).textContent=o:((n=document.createElement("input")).type="text",n.setAttribute("value",o)),P.add(n),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=x,i.userValue=o,n.setAttribute("id",r),n.addEventListener("input",(function(a){t.setValue(r,{value:a.target.value}),e.setPropertyOnSiblings(n,"value",a.target.value,"value")})),n.addEventListener("resetform",(function(t){var r=e.data.defaultFieldValue||"";n.value=i.userValue=r,delete i.formattedValue}));var s=function(e){i.formattedValue&&(e.target.value=i.formattedValue),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var l;n.addEventListener("focus",(function(e){i.userValue&&(e.target.value=i.userValue)})),n.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){i.userValue=e.detail.value||"",t.setValue(r,{value:i.userValue.toString()}),i.formattedValue||(e.target.value=i.userValue)},valueAsString:function(e){i.formattedValue=e.detail.valueAsString||"",e.target!==document.activeElement&&(e.target.value=i.formattedValue),t.setValue(r,{formattedValue:i.formattedValue})},selRange:function(e){var t=b(e.detail.selRange,2),r=t[0],n=t[1];r>=0&&n<e.target.value.length&&e.target.setSelectionRange(r,n)}};e._dispatchEventFromSandbox(a,n)})),n.addEventListener("keydown",(function(t){var n,a=-1;"Escape"===t.key?a=0:"Enter"===t.key?a=2:"Tab"===t.key&&(a=3),-1!==a&&(i.userValue=t.target.value,null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:a,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))}));var u=s;s=null,n.addEventListener("blur",(function(t){var n;i.userValue=t.target.value,e._mouseState.isDown&&(null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:t.target.value,willCommit:!0,commitKey:1,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}})),u(t)})),null!==(l=this.data.actions)&&void 0!==l&&l.Keystroke&&n.addEventListener("beforeinput",(function(t){var n;i.formattedValue="";var a=t.data,o=t.target,s=o.value,l=o.selectionStart,u=o.selectionEnd;null===(n=e.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:s,change:a,willCommit:!1,selStart:l,selEnd:u}})})),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.value}))}if(s&&n.addEventListener("blur",s),null!==this.data.maxLen&&(n.maxLength=this.data.maxLen),this.data.comb){var c=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(c,"px - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this._setBackgroundColor(n),this.container.appendChild(n),this.container}},{key:"_setTextStyle",value:function(e){var t=this.data.defaultAppearanceData,r=t.fontSize,n=t.fontColor,o=e.style;r&&(o.fontSize="".concat(r,"px")),o.color=a.Util.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(o.textAlign=["left","center","right"][this.data.textAlignment])}}]),r}(F),j=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{isRenderable:e.renderForms})}return k(r,[{key:"render",value:function(){var e=this,t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.exportValue===r.fieldValue}).value;"string"==typeof a&&(a="Off"!==a,t.setValue(n,{value:a})),this.container.className="buttonWidgetAnnotation checkBox";var o=document.createElement("input");return P.add(o),o.disabled=r.readOnly,o.type="checkbox",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.setAttribute("exportValue",r.exportValue),o.tabIndex=x,o.addEventListener("change",(function(a){var o,i=a.target,s=i.name,l=i.checked,u=g(e._getElementsByName(s,n));try{for(u.s();!(o=u.n()).done;){var c=o.value,f=l&&c.exportValue===r.exportValue;c.domElement&&(c.domElement.checked=f),t.setValue(c.id,{value:f})}}catch(e){u.e(e)}finally{u.f()}t.setValue(n,{value:l})})),o.addEventListener("resetform",(function(e){var t=r.defaultFieldValue||"Off";e.target.checked=t===r.exportValue})),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",(function(r){var a={value:function(e){e.target.checked="Off"!==e.detail.value,t.setValue(n,{value:e.target.checked})}};e._dispatchEventFromSandbox(a,r)})),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),I=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{isRenderable:e.renderForms})}return k(r,[{key:"render",value:function(){var e=this;this.container.className="buttonWidgetAnnotation radioButton";var t=this.annotationStorage,r=this.data,n=r.id,a=t.getValue(n,{value:r.fieldValue===r.buttonValue}).value;"string"==typeof a&&(a=a!==r.buttonValue,t.setValue(n,{value:a}));var o=document.createElement("input");if(P.add(o),o.disabled=r.readOnly,o.type="radio",o.name=r.fieldName,a&&o.setAttribute("checked",!0),o.setAttribute("id",n),o.tabIndex=x,o.addEventListener("change",(function(r){var a,o=r.target,i=o.name,s=o.checked,l=g(e._getElementsByName(i,n));try{for(l.s();!(a=l.n()).done;){var u=a.value;t.setValue(u.id,{value:!1})}}catch(e){l.e(e)}finally{l.f()}t.setValue(n,{value:s})})),o.addEventListener("resetform",(function(e){var t=r.defaultFieldValue;e.target.checked=null!=t&&t===r.buttonValue})),this.enableScripting&&this.hasJSActions){var i=r.buttonValue;o.addEventListener("updatefromsandbox",(function(r){var a={value:function(r){var a,o=i===r.detail.value,s=g(e._getElementsByName(r.target.name));try{for(s.s();!(a=s.n()).done;){var l=a.value,u=o&&l.id===n;l.domElement&&(l.domElement.checked=u),t.setValue(l.id,{value:u})}}catch(e){s.e(e)}finally{s.f()}}};e._dispatchEventFromSandbox(a,r)})),this._setEventListeners(o,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(e){return e.target.checked}))}return this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),D=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{ignoreBorder:e.data.hasAppearance})}return k(r,[{key:"render",value:function(){var e=c(m(r.prototype),"render",this).call(this);return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),e}}]),r}(E),L=function(e){h(r,e);var t=v(r);function r(e){return S(this,r),t.call(this,e,{isRenderable:e.renderForms})}return k(r,[{key:"render",value:function(){var e=this;this.container.className="choiceWidgetAnnotation";var t=this.annotationStorage,r=this.data.id;t.getValue(r,{value:this.data.fieldValue.length>0?this.data.fieldValue[0]:void 0});var n=this.data.defaultAppearanceData.fontSize;n||(n=9);var a="calc(".concat(n,"px * var(--zoom-factor))"),o=document.createElement("select");P.add(o),o.disabled=this.data.readOnly,o.name=this.data.fieldName,o.setAttribute("id",r),o.tabIndex=x,o.style.fontSize="".concat(n,"px"),this.data.combo||(o.size=this.data.options.length,this.data.multiSelect&&(o.multiple=!0)),o.addEventListener("resetform",(function(t){var r,n=e.data.defaultFieldValue,a=g(o.options);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.selected=i.value===n}}catch(e){a.e(e)}finally{a.f()}}));var i,s=g(this.data.options);try{for(s.s();!(i=s.n()).done;){var l=i.value,u=document.createElement("option");u.textContent=l.displayValue,u.value=l.exportValue,this.data.combo&&(u.style.fontSize=a),this.data.fieldValue.includes(l.exportValue)&&u.setAttribute("selected",!0),o.appendChild(u)}}catch(e){s.e(e)}finally{s.f()}var c=function(e,t){var r=t?"value":"textContent",n=e.target.options;return e.target.multiple?Array.prototype.filter.call(n,(function(e){return e.selected})).map((function(e){return e[r]})):-1===n.selectedIndex?null:n[n.selectedIndex][r]},f=function(e){var t=e.target.options;return Array.prototype.map.call(t,(function(e){return{displayValue:e.textContent,exportValue:e.value}}))};return this.enableScripting&&this.hasJSActions?(o.addEventListener("updatefromsandbox",(function(n){var a={value:function(e){var n,a=e.detail.value,i=new Set(Array.isArray(a)?a:[a]),s=g(o.options);try{for(s.s();!(n=s.n()).done;){var l=n.value;l.selected=i.has(l.value)}}catch(e){s.e(e)}finally{s.f()}t.setValue(r,{value:c(e,!0)})},multipleSelection:function(e){o.multiple=!0},remove:function(e){var n=o.options,a=e.detail.remove;if(n[a].selected=!1,o.remove(a),n.length>0){var i=Array.prototype.findIndex.call(n,(function(e){return e.selected}));-1===i&&(n[0].selected=!0)}t.setValue(r,{value:c(e,!0),items:f(e)})},clear:function(e){for(;0!==o.length;)o.remove(0);t.setValue(r,{value:null,items:[]})},insert:function(e){var n=e.detail.insert,a=n.index,i=n.displayValue,s=n.exportValue,l=document.createElement("option");l.textContent=i,l.value=s,o.insertBefore(l,o.children[a]),t.setValue(r,{value:c(e,!0),items:f(e)})},items:function(e){for(var n=e.detail.items;0!==o.length;)o.remove(0);var a,i=g(n);try{for(i.s();!(a=i.n()).done;){var s=a.value,l=s.displayValue,u=s.exportValue,d=document.createElement("option");d.textContent=l,d.value=u,o.appendChild(d)}}catch(e){i.e(e)}finally{i.f()}o.options.length>0&&(o.options[0].selected=!0),t.setValue(r,{value:c(e,!0),items:f(e)})},indices:function(e){var n,a=new Set(e.detail.indices),o=g(e.target.options);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.selected=a.has(i.index)}}catch(e){o.e(e)}finally{o.f()}t.setValue(r,{value:c(e,!0)})},editable:function(e){e.target.disabled=!e.detail.editable}};e._dispatchEventFromSandbox(a,n)})),o.addEventListener("input",(function(n){var a,o=c(n,!0),i=c(n,!1);t.setValue(r,{value:o}),null===(a=e.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:e,detail:{id:r,name:"Keystroke",value:i,changeEx:o,willCommit:!0,commitKey:1,keyDown:!1}})})),this._setEventListeners(o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],(function(e){return e.target.checked}))):o.addEventListener("input",(function(e){t.setValue(r,{value:c(e)})})),this._setBackgroundColor(o),this.container.appendChild(o),this.container}}]),r}(F),N=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i})}return k(r,[{key:"render",value:function(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;var e='[data-annotation-id="'.concat(this.data.parentId,'"]'),t=this.layer.querySelectorAll(e);if(0===t.length)return this.container;var r=new q({container:this.container,trigger:Array.from(t),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),n=this.page,o=a.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),i=o[0]+this.data.parentRect[2]-this.data.parentRect[0],s=o[1];return this.container.style.transformOrigin="".concat(-i,"px ").concat(-s,"px"),this.container.style.left="".concat(i,"px"),this.container.style.top="".concat(s,"px"),this.container.appendChild(r.render()),this.container}}]),r}(R),q=function(){function e(t){S(this,e),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}return k(e,[{key:"render",value:function(){var e,t,r=document.createElement("div");r.className="popupWrapper",this.hideElement=this.hideWrapper?r:this.container,this.hideElement.hidden=!0;var n=document.createElement("div");n.className="popup";var i=this.color;if(i){var s=.7*(255-i[0])+i[0],u=.7*(255-i[1])+i[1],c=.7*(255-i[2])+i[2];n.style.backgroundColor=a.Util.makeHexColor(0|s,0|u,0|c)}var f=document.createElement("h1");f.dir=this.titleObj.dir,f.textContent=this.titleObj.str,n.appendChild(f);var d=o.PDFDateString.toDateObject(this.modificationDate);if(d){var h=document.createElement("span");h.className="popupDate",h.textContent="{{date}}, {{time}}",h.dataset.l10nId="annotation_date_string",h.dataset.l10nArgs=JSON.stringify({date:d.toLocaleDateString(),time:d.toLocaleTimeString()}),n.appendChild(h)}if(null===(e=this.richText)||void 0===e||!e.str||null!==(t=this.contentsObj)&&void 0!==t&&t.str&&this.contentsObj.str!==this.richText.str){var p=this._formatContents(this.contentsObj);n.appendChild(p)}else l.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:n}),n.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var v,y=g(this.trigger);try{for(y.s();!(v=y.n()).done;){var m=v.value;m.addEventListener("click",this._toggle.bind(this)),m.addEventListener("mouseover",this._show.bind(this,!1)),m.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(e){y.e(e)}finally{y.f()}return n.addEventListener("click",this._hide.bind(this,!0)),r.appendChild(n),r}},{key:"_formatContents",value:function(e){var t=e.str,r=e.dir,n=document.createElement("p");n.className="popupContent",n.dir=r;for(var a=t.split(/(?:\r\n?|\n)/),o=0,i=a.length;o<i;++o){var s=a[o];n.appendChild(document.createTextNode(s)),o<i-1&&n.appendChild(document.createElement("br"))}return n}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hidden||this.pinned||(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),e}(),B=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),W=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){this.container.className="lineAnnotation";var e=this.data,t=C(e.rect),r=t.width,n=t.height,a=this.svgFactory.create(r,n),o=this.svgFactory.createElement("svg:line");return o.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),o.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),o.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),o.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),o.setAttribute("stroke-width",e.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),a.appendChild(o),this.container.append(a),this._createPopup(o,e),this.container}}]),r}(R),U=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){this.container.className="squareAnnotation";var e=this.data,t=C(e.rect),r=t.width,n=t.height,a=this.svgFactory.create(r,n),o=e.borderStyle.width,i=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",o/2),i.setAttribute("y",o/2),i.setAttribute("width",r-o),i.setAttribute("height",n-o),i.setAttribute("stroke-width",o||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.appendChild(i),this.container.append(a),this._createPopup(i,e),this.container}}]),r}(R),z=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){this.container.className="circleAnnotation";var e=this.data,t=C(e.rect),r=t.width,n=t.height,a=this.svgFactory.create(r,n),o=e.borderStyle.width,i=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",r/2),i.setAttribute("cy",n/2),i.setAttribute("rx",r/2-o/2),i.setAttribute("ry",n/2-o/2),i.setAttribute("stroke-width",o||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.appendChild(i),this.container.append(a),this._createPopup(i,e),this.container}}]),r}(R),G=function(e){h(r,e);var t=v(r);function r(e){var n,a,o,i;S(this,r);var s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="polylineAnnotation",i.svgElementName="svg:polyline",i}return k(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=C(t.rect),n=r.width,a=r.height,o=this.svgFactory.create(n,a),i=[],s=g(t.vertices);try{for(s.s();!(e=s.n()).done;){var l=e.value,u=l.x-t.rect[0],c=t.rect[3]-l.y;i.push(u+","+c)}}catch(e){s.e(e)}finally{s.f()}i=i.join(" ");var f=this.svgFactory.createElement(this.svgElementName);return f.setAttribute("points",i),f.setAttribute("stroke-width",t.borderStyle.width||1),f.setAttribute("stroke","transparent"),f.setAttribute("fill","transparent"),o.appendChild(f),this.container.append(o),this._createPopup(f,t),this.container}}]),r}(R),H=function(e){h(r,e);var t=v(r);function r(e){var n;return S(this,r),(n=t.call(this,e)).containerClassName="polygonAnnotation",n.svgElementName="svg:polygon",n}return k(r)}(G),V=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),X=function(e){h(r,e);var t=v(r);function r(e){var n,a,o,i;S(this,r);var s=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return(i=t.call(this,e,{isRenderable:s,ignoreBorder:!0})).containerClassName="inkAnnotation",i.svgElementName="svg:polyline",i}return k(r,[{key:"render",value:function(){this.container.className=this.containerClassName;var e,t=this.data,r=C(t.rect),n=r.width,a=r.height,o=this.svgFactory.create(n,a),i=g(t.inkLists);try{for(i.s();!(e=i.n()).done;){var s,l=e.value,u=[],c=g(l);try{for(c.s();!(s=c.n()).done;){var f=s.value,d=f.x-t.rect[0],h=t.rect[3]-f.y;u.push("".concat(d,",").concat(h))}}catch(e){c.e(e)}finally{c.f()}u=u.join(" ");var p=this.svgFactory.createElement(this.svgElementName);p.setAttribute("points",u),p.setAttribute("stroke-width",t.borderStyle.width||1),p.setAttribute("stroke","transparent"),p.setAttribute("fill","transparent"),this._createPopup(p,t),o.appendChild(p)}}catch(e){i.e(e)}finally{i.f()}return this.container.append(o),this.container}}]),r}(R),Y=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),r}(R),K=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),r}(R),Q=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),r}(R),J=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0,createQuadrilaterals:!0})}return k(r,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),r}(R),$=function(e){h(r,e);var t=v(r);function r(e){var n,a,o;S(this,r);var i=!!(e.data.hasPopup||null!==(n=e.data.titleObj)&&void 0!==n&&n.str||null!==(a=e.data.contentsObj)&&void 0!==a&&a.str||null!==(o=e.data.richText)&&void 0!==o&&o.str);return t.call(this,e,{isRenderable:i,ignoreBorder:!0})}return k(r,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),r}(R),Z=function(e){h(r,e);var t=v(r);function r(e){var n,i;S(this,r);var s=(i=t.call(this,e,{isRenderable:!0})).data.file,l=s.filename,u=s.content;return i.filename=(0,o.getFilenameFromUrl)(l),i.content=u,null===(n=i.linkService.eventBus)||void 0===n||n.dispatch("fileattachmentannotation",{source:y(i),id:(0,a.stringToPDFString)(l),filename:l,content:u}),i}return k(r,[{key:"render",value:function(){var e,t;this.container.className="fileAttachmentAnnotation";var r=document.createElement("div");return r.style.height=this.container.style.height,r.style.width=this.container.style.width,r.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(null!==(e=this.data.titleObj)&&void 0!==e&&e.str||null!==(t=this.data.contentsObj)&&void 0!==t&&t.str||this.data.richText)&&this._createPopup(r,this.data),this.container.appendChild(r),this.container}},{key:"_download",value:function(){var e;null===(e=this.downloadManager)||void 0===e||e.openOrDownloadData(this.container,this.content,this.filename)}}]),r}(R),ee=function(){function e(){S(this,e)}return k(e,null,[{key:"render",value:function(t){var r,n=[],s=[],l=g(t.annotations);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c){var f=C(c.rect),d=f.width,h=f.height;d<=0||h<=0||(c.annotationType!==a.AnnotationType.POPUP?n.push(c):s.push(c))}}}catch(e){l.e(e)}finally{l.f()}s.length&&n.push.apply(n,s);for(var p=t.div,v=0,y=n;v<y.length;v++){var m=y[v],b=T.create({data:m,layer:p,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 i.AnnotationStorage,enableScripting:t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,mouseState:t.mouseState||{isDown:!1}});if(b.isRenderable){var _=b.render();if(m.hidden&&(_.style.visibility="hidden"),Array.isArray(_)){var w,S=g(_);try{for(S.s();!(w=S.n()).done;){var A=w.value;p.appendChild(A)}}catch(e){S.e(e)}finally{S.f()}}else b instanceof N?p.prepend(_):p.appendChild(_)}}u(this,e,te).call(this,p,t.annotationCanvasMap)}},{key:"update",value:function(t){var r,n,o,i=t.page,s=t.viewport,l=t.annotations,c=t.annotationCanvasMap,f=t.div,d=s.transform,h="matrix(".concat(d.join(","),")"),p=g(l);try{for(p.s();!(o=p.n()).done;){var v=o.value,y=f.querySelectorAll('[data-annotation-id="'.concat(v.id,'"]'));if(y){var m,b=g(y);try{for(b.s();!(m=b.n()).done;){var _=m.value;if(v.hasOwnCanvas){var w=a.Util.normalizeRect([v.rect[0],i.view[3]-v.rect[1]+i.view[1],v.rect[2],i.view[3]-v.rect[3]+i.view[1]]);if(!n){r=Math.abs(d[0]||d[1]);for(var S=d.slice(),A=0;A<4;A++)S[A]=Math.sign(S[A]);n="matrix(".concat(S.join(","),")")}var k=w[0]*r,x=w[1]*r;_.style.left="".concat(k,"px"),_.style.top="".concat(x,"px"),_.style.transformOrigin="".concat(-k,"px ").concat(-x,"px"),_.style.transform=n}else _.style.transform=h}}catch(e){b.e(e)}finally{b.f()}}}}catch(e){p.e(e)}finally{p.f()}u(this,e,te).call(this,f,c),f.hidden=!1}}]),e}();function te(e,t){if(t){var r,n=g(t);try{for(n.s();!(r=n.n()).done;){var a=b(r.value,2),o=a[0],i=a[1],s=e.querySelector('[data-annotation-id="'.concat(o,'"]'));if(s){var l=s.firstChild;"CANVAS"===l.nodeName?s.replaceChild(i,l):s.insertBefore(i,l)}}}catch(e){n.e(e)}finally{n.f()}t.clear()}}t.AnnotationLayer=ee},(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0;var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,i=[{key:"CMYK_G",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["G",1-Math.min(1,.3*n+.59*o+.11*a+i)]}},{key:"G_CMYK",value:function(e){return["CMYK",0,0,0,1-r(e,1)[0]]}},{key:"G_RGB",value:function(e){var t=r(e,1)[0];return["RGB",t,t,t]}},{key:"G_HTML",value:function(e){var t=o(r(e,1)[0]);return"#".concat(t).concat(t).concat(t)}},{key:"RGB_G",value:function(e){var t=r(e,3);return["G",.3*t[0]+.59*t[1]+.11*t[2]]}},{key:"RGB_HTML",value:function(e){var t=r(e,3),n=t[0],a=t[1],i=t[2],s=o(n),l=o(a),u=o(i);return"#".concat(s).concat(l).concat(u)}},{key:"T_HTML",value:function(){return"#00000000"}},{key:"CMYK_RGB",value:function(e){var t=r(e,4),n=t[0],a=t[1],o=t[2],i=t[3];return["RGB",1-Math.min(1,n+i),1-Math.min(1,o+i),1-Math.min(1,a+i)]}},{key:"CMYK_HTML",value:function(e){return this.RGB_HTML(this.CMYK_RGB(e))}},{key:"RGB_CMYK",value:function(e){var t=r(e,3),n=1-t[0],a=1-t[1],o=1-t[2];return["CMYK",n,a,o,Math.min(n,a,o)]}}],(n=null)&&a(t.prototype,n),i&&a(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ColorConverters=i},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var n=r(1),a=r(159);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw o}}}}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,s;return t=e,s=[{key:"setupStorage",value:function(e,t,r,n,a){var o=n.getValue(t,{value:null});switch(r.name){case"textarea":if(null!==o.value&&(e.textContent=o.value),"print"===a)break;e.addEventListener("input",(function(e){n.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(o.value===r.attributes.xfaOn?e.setAttribute("checked",!0):o.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===a)break;e.addEventListener("change",(function(e){n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==o.value&&e.setAttribute("value",o.value),"print"===a)break;e.addEventListener("input",(function(e){n.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==o.value){var s,l=i(r.children);try{for(l.s();!(s=l.n()).done;){var u=s.value;u.attributes.value===o.value&&(u.attributes.selected=!0)}}catch(e){l.e(e)}finally{l.f()}}e.addEventListener("input",(function(e){var r=e.target.options,a=-1===r.selectedIndex?"":r[r.selectedIndex].value;n.setValue(t,{value:a})}))}}},{key:"setAttributes",value:function(e){var t,r=e.html,a=e.element,i=e.storage,s=void 0===i?null:i,l=e.intent,u=e.linkService,c=a.attributes,f=r instanceof HTMLAnchorElement;"radio"===c.type&&(c.name="".concat(c.name,"-").concat(l));for(var d=0,h=Object.entries(c);d<h.length;d++){var p=o(h[d],2),v=p[0],y=p[1];if(null!=y&&"dataId"!==v)if("style"!==v)if("textContent"===v)r.textContent=y;else if("class"===v)y.length&&r.setAttribute(v,y.join(" "));else{if(f&&("href"===v||"newWindow"===v))continue;r.setAttribute(v,y)}else Object.assign(r.style,y)}f&&(u.addLinkAttributes||(0,n.warn)("XfaLayer.setAttribute - missing `addLinkAttributes`-method on the `linkService`-instance."),null===(t=u.addLinkAttributes)||void 0===t||t.call(u,r,c.href,c.newWindow)),s&&c.dataId&&this.setupStorage(r,c.dataId,a,s)}},{key:"render",value:function(e){var t=e.annotationStorage,r=e.linkService,n=e.xfaHtml,s=e.intent||"display",l=document.createElement(n.name);n.attributes&&this.setAttributes({html:l,element:n,intent:s,linkService:r});var u=[[n,-1,l]],c=e.div;if(c.appendChild(l),e.viewport){var f="matrix(".concat(e.viewport.transform.join(","),")");c.style.transform=f}"richText"!==s&&c.setAttribute("class","xfaLayer xfaFont");for(var d=[];u.length>0;){var h,p=o(u[u.length-1],3),v=p[0],y=p[1],m=p[2];if(y+1!==v.children.length){var g=v.children[++u[u.length-1][1]];if(null!==g){var b=g.name;if("#text"!==b){var _=void 0;if(_=null!=g&&null!==(h=g.attributes)&&void 0!==h&&h.xmlns?document.createElementNS(g.attributes.xmlns,b):document.createElement(b),m.appendChild(_),g.attributes&&this.setAttributes({html:_,element:g,storage:t,intent:s,linkService:r}),g.children&&g.children.length>0)u.push([g,-1,_]);else if(g.value){var w=document.createTextNode(g.value);a.XfaText.shouldBuildText(b)&&d.push(w),_.appendChild(w)}}else{var S=document.createTextNode(g.value);d.push(S),m.appendChild(S)}}}else u.pop()}var A,k=i(c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(k.s();!(A=k.n()).done;)A.value.setAttribute("readOnly",!0)}catch(e){k.e(e)}finally{k.f()}return{textDivs:d}}},{key:"update",value:function(e){var t="matrix(".concat(e.viewport.transform.join(","),")");e.div.style.transform=t,e.div.hidden=!1}}],(r=null)&&u(t.prototype,r),s&&u(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.XfaLayer=c},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=function(e){var t=new y({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t};var n=r(1);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=30,l=.8,u=new Map,c=/^\s+$/g;function f(e,t,r,a){var o=document.createElement("span"),i=e._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL};e._textDivs.push(o);var f=n.Util.transform(e._viewport.transform,t.transform),d=Math.atan2(f[1],f[0]),h=r[t.fontName];h.vertical&&(d+=Math.PI/2);var p,v,y=Math.hypot(f[2],f[3]),m=y*function(e,t){var r=u.get(e);if(r)return r;t.save(),t.font="".concat(s,"px ").concat(e);var n=t.measureText(""),a=n.fontBoundingBoxAscent,o=Math.abs(n.fontBoundingBoxDescent);if(a){t.restore();var i=a/(a+o);return u.set(e,i),i}t.strokeStyle="red",t.clearRect(0,0,s,s),t.strokeText("g",0,0);var c=t.getImageData(0,0,s,s).data;o=0;for(var f=c.length-1-3;f>=0;f-=4)if(c[f]>0){o=Math.ceil(f/4/s);break}t.clearRect(0,0,s,s),t.strokeText("A",0,s),a=0;for(var d=0,h=(c=t.getImageData(0,0,s,s).data).length;d<h;d+=4)if(c[d]>0){a=s-Math.floor(d/4/s);break}if(t.restore(),a){var p=a/(a+o);return u.set(e,p),p}return u.set(e,l),l}(h.fontFamily,a);0===d?(p=f[4],v=f[5]-m):(p=f[4]+m*Math.sin(d),v=f[5]-m*Math.cos(d)),o.style.left="".concat(p,"px"),o.style.top="".concat(v,"px"),o.style.fontSize="".concat(y,"px"),o.style.fontFamily=h.fontFamily,o.setAttribute("role","presentation"),o.textContent=t.str,o.dir=t.dir,e._fontInspectorEnabled&&(o.dataset.fontName=t.fontName),0!==d&&(i.angle=d*(180/Math.PI));var g=!1;if(t.str.length>1||e._enhanceTextSelection&&c.test(t.str))g=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var b=Math.abs(t.transform[0]),_=Math.abs(t.transform[3]);b!==_&&Math.max(b,_)/Math.min(b,_)>1.5&&(g=!0)}if(g&&(h.vertical?i.canvasWidth=t.height*e._viewport.scale:i.canvasWidth=t.width*e._viewport.scale),e._textDivProperties.set(o,i),e._textContentStream&&e._layoutText(o),e._enhanceTextSelection&&i.hasText){var w=1,S=0;0!==d&&(w=Math.cos(d),S=Math.sin(d));var A,k,x=(h.vertical?t.height:t.width)*e._viewport.scale,P=y;0!==d?(A=[w,S,-S,w,p,v],k=n.Util.getAxialAlignedBoundingBox([0,0,x,P],A)):k=[p,v,p+x,v+P],e._bounds.push({left:k[0],top:k[1],right:k[2],bottom:k[3],div:o,size:[x,P],m:A})}}function d(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>1e5)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var a=0;a<n;a++)e._layoutText(t[a]);e._renderingDone=!0,r.resolve()}}function h(e,t,r){for(var n=0,a=0;a<r;a++){var o=e[t++];o>0&&(n=n?Math.min(o,n):o)}return n}function p(e){for(var t=e._bounds,r=e._viewport,a=function(e,t,r){var n=r.map((function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}}));v(e,n);var a,i=new Array(r.length),s=o(n);try{for(s.s();!(a=s.n()).done;){var l=a.value,u=l.index;i[u]={left:l.x1New,top:0,right:l.x2New,bottom:0}}}catch(e){s.e(e)}finally{s.f()}r.map((function(t,r){var a=i[r],o=n[r];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0})),v(t,n);var c,f=o(n);try{for(f.s();!(c=f.n()).done;){var d=c.value,h=d.index;i[h].top=d.x1New,i[h].bottom=d.x2New}}catch(e){f.e(e)}finally{f.f()}return i}(r.width,r.height,t),i=0;i<a.length;i++){var s=t[i].div,l=e._textDivProperties.get(s);if(0!==l.angle){for(var u=a[i],c=t[i],f=c.m,d=f[0],p=f[1],y=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],m=new Float64Array(64),g=0,b=y.length;g<b;g++){var _=n.Util.applyTransform(y[g],f);m[g+0]=d&&(u.left-_[0])/d,m[g+4]=p&&(u.top-_[1])/p,m[g+8]=d&&(u.right-_[0])/d,m[g+12]=p&&(u.bottom-_[1])/p,m[g+16]=p&&(u.left-_[0])/-p,m[g+20]=d&&(u.top-_[1])/d,m[g+24]=p&&(u.right-_[0])/-p,m[g+28]=d&&(u.bottom-_[1])/d,m[g+32]=d&&(u.left-_[0])/-d,m[g+36]=p&&(u.top-_[1])/-p,m[g+40]=d&&(u.right-_[0])/-d,m[g+44]=p&&(u.bottom-_[1])/-p,m[g+48]=p&&(u.left-_[0])/p,m[g+52]=d&&(u.top-_[1])/-d,m[g+56]=p&&(u.right-_[0])/p,m[g+60]=d&&(u.bottom-_[1])/-d}var w=1+Math.min(Math.abs(d),Math.abs(p));l.paddingLeft=h(m,32,16)/w,l.paddingTop=h(m,48,16)/w,l.paddingRight=h(m,0,16)/w,l.paddingBottom=h(m,16,16)/w,e._textDivProperties.set(s,l)}else l.paddingLeft=t[i].left-a[i].left,l.paddingTop=t[i].top-a[i].top,l.paddingRight=a[i].right-t[i].right,l.paddingBottom=a[i].bottom-t[i].bottom,e._textDivProperties.set(s,l)}}function v(e,t){t.sort((function(e,t){return e.x1-t.x1||e.index-t.index}));var r,n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}],a=o(t);try{for(a.s();!(r=a.n()).done;){for(var i=r.value,s=0;s<n.length&&n[s].end<=i.y1;)s++;for(var l=n.length-1;l>=0&&n[l].start>=i.y2;)l--;var u=void 0,c=void 0,f=void 0,d=void 0,h=-1/0;for(f=s;f<=l;f++){c=(u=n[f]).boundary;var p=void 0;(p=c.x2>i.x1?c.index>i.index?c.x1New:i.x1:void 0===c.x2New?(c.x2+i.x1)/2:c.x2New)>h&&(h=p)}for(i.x1New=h,f=s;f<=l;f++)void 0===(c=(u=n[f]).boundary).x2New?c.x2>i.x1?c.index>i.index&&(c.x2New=c.x2):c.x2New=h:c.x2New>h&&(c.x2New=Math.max(h,c.x2));var v=[],y=null;for(f=s;f<=l;f++){var m=(c=(u=n[f]).boundary).x2>i.x2?c:i;y===m?v[v.length-1].end=u.end:(v.push({start:u.start,end:u.end,boundary:m}),y=m)}for(n[s].start<i.y1&&(v[0].start=i.y1,v.unshift({start:n[s].start,end:i.y1,boundary:n[s].boundary})),i.y2<n[l].end&&(v[v.length-1].end=i.y2,v.push({start:i.y2,end:n[l].end,boundary:n[l].boundary})),f=s;f<=l;f++)if(void 0===(c=(u=n[f]).boundary).x2New){var g=!1;for(d=s-1;!g&&d>=0&&n[d].start>=c.y1;d--)g=n[d].boundary===c;for(d=l+1;!g&&d<n.length&&n[d].end<=c.y2;d++)g=n[d].boundary===c;for(d=0;!g&&d<v.length;d++)g=v[d].boundary===c;g||(c.x2New=h)}Array.prototype.splice.apply(n,[s,l-s+1].concat(v))}}catch(e){a.e(e)}finally{a.f()}for(var b=0,_=n;b<_.length;b++){var w=_[b].boundary;void 0===w.x2New&&(w.x2New=Math.max(e,w.x2))}}var y=function(){function e(t){var r,a=this,o=t.textContent,i=t.textContentStream,s=t.container,l=t.viewport,u=t.textDivs,c=t.textContentItemsStr,f=t.enhanceTextSelection;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._textContent=o,this._textContentStream=i,this._container=s,this._document=s.ownerDocument,this._viewport=l,this._textDivs=u||[],this._textContentItemsStr=c||[],this._enhanceTextSelection=!!f,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,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally((function(){a._enhanceTextSelection||(a._textDivProperties=null),a._layoutTextCtx&&(a._layoutTextCtx.canvas.width=0,a._layoutTextCtx.canvas.height=0,a._layoutTextCtx=null)})).catch((function(){}))}var t,r,o;return t=e,r=[{key:"promise",get:function(){return this._capability.promise}},{key:"cancel",value:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")).catch((function(){})),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}},{key:"_processItems",value:function(e,t){for(var r=0,n=e.length;r<n;r++)if(void 0!==e[r].str)this._textContentItemsStr.push(e[r].str),f(this,e[r],t,this._layoutTextCtx);else if("beginMarkedContentProps"===e[r].type||"beginMarkedContent"===e[r].type){var a=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==e[r].id&&this._container.setAttribute("id","".concat(e[r].id)),a.appendChild(this._container)}else"endMarkedContent"===e[r].type&&(this._container=this._container.parentNode)}},{key:"_layoutText",value:function(e){var t=this._textDivProperties.get(e),r="";if(0!==t.canvasWidth&&t.hasText){var n=e.style,a=n.fontSize,o=n.fontFamily;a===this._layoutTextLastFontSize&&o===this._layoutTextLastFontFamily||(this._layoutTextCtx.font="".concat(a," ").concat(o),this._layoutTextLastFontSize=a,this._layoutTextLastFontFamily=o);var i=this._layoutTextCtx.measureText(e.textContent).width;if(i>0){var s=t.canvasWidth/i;this._enhanceTextSelection&&(t.scale=s),r="scaleX(".concat(s,")")}}if(0!==t.angle&&(r="rotate(".concat(t.angle,"deg) ").concat(r)),r.length>0&&(this._enhanceTextSelection&&(t.originalTransform=r),e.style.transform=r),t.hasText&&this._container.appendChild(e),t.hasEOL){var l=document.createElement("br");l.setAttribute("role","presentation"),this._container.appendChild(l)}}},{key:"_render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(0,n.createPromiseCapability)(),a=Object.create(null),o=this._document.createElement("canvas");if(o.height=o.width=s,o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var i=this._textContent.items,l=this._textContent.styles;this._processItems(i,l),r.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function t(){e._reader.read().then((function(n){var o=n.value;n.done?r.resolve():(Object.assign(a,o.styles),e._processItems(o.items,a),t())}),r.reject)}()}r.promise.then((function(){a=null,t?e._renderTimer=setTimeout((function(){d(e),e._renderTimer=null}),t):d(e)}),this._capability.reject)}},{key:"expandTextDivs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(p(this),this._bounds=null);for(var t=[],r=[],n=0,a=this._textDivs.length;n<a;n++){var o=this._textDivs[n],i=this._textDivProperties.get(o);i.hasText&&(e?(t.length=0,r.length=0,i.originalTransform&&t.push(i.originalTransform),i.paddingTop>0?(r.push("".concat(i.paddingTop,"px")),t.push("translateY(".concat(-i.paddingTop,"px)"))):r.push(0),i.paddingRight>0?r.push("".concat(i.paddingRight/i.scale,"px")):r.push(0),i.paddingBottom>0?r.push("".concat(i.paddingBottom,"px")):r.push(0),i.paddingLeft>0?(r.push("".concat(i.paddingLeft/i.scale,"px")),t.push("translateX(".concat(-i.paddingLeft/i.scale,"px)"))):r.push(0),o.style.padding=r.join(" "),t.length&&(o.style.transform=t.join(" "))):(o.style.padding=null,o.style.transform=i.originalTransform))}}}}],r&&a(t.prototype,r),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(1),a=r(147),o=r(3);function i(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=d((function e(){h(this,e),(0,n.unreachable)("Not implemented: SVGGraphics")}));t.SVGGraphics=p;var v=function(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)},y=function(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale(".concat(v(e[0])," ").concat(v(e[3]),")");if(e[0]===e[3]&&e[1]===-e[2]){var t=180*Math.acos(e[0])/Math.PI;return"rotate(".concat(v(t),")")}}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate(".concat(v(e[4])," ").concat(v(e[5]),")");return"matrix(".concat(v(e[0])," ").concat(v(e[1])," ").concat(v(e[2])," ").concat(v(e[3])," ").concat(v(e[4])," ")+"".concat(v(e[5]),")")},m={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},g=["butt","round","square"],b=["miter","round","bevel"],_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!r)return URL.createObjectURL(new Blob([e],{type:t}));for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(t,";base64,"),o=0,i=e.length;o<i;o+=3){var s=255&e[o],l=255&e[o+1],u=255&e[o+2];a+=n[s>>2]+n[(3&s)<<4|l>>4]+n[o+1<i?(15&l)<<2|u>>6:64]+n[o+2<i?63&u:64]}return a},w=function(){for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256),r=0;r<256;r++){for(var a=r,i=0;i<8;i++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;t[r]=a}function s(e,r,n,a){var o=a,i=r.length;n[o]=i>>24&255,n[o+1]=i>>16&255,n[o+2]=i>>8&255,n[o+3]=255&i,n[o+=4]=255&e.charCodeAt(0),n[o+1]=255&e.charCodeAt(1),n[o+2]=255&e.charCodeAt(2),n[o+3]=255&e.charCodeAt(3),o+=4,n.set(r,o);var s=function(e,r,n){for(var a=-1,o=r;o<n;o++){var i=255&(a^e[o]);a=a>>>8^t[i]}return-1^a}(n,a+4,o+=r.length);n[o]=s>>24&255,n[o+1]=s>>16&255,n[o+2]=s>>8&255,n[o+3]=255&s}function l(e){var t=e.length,r=65535,n=Math.ceil(t/r),a=new Uint8Array(2+t+5*n+4),o=0;a[o++]=120,a[o++]=156;for(var i=0;t>r;)a[o++]=0,a[o++]=255,a[o++]=255,a[o++]=0,a[o++]=0,a.set(e.subarray(i,i+r),o),o+=r,i+=r,t-=r;a[o++]=1,a[o++]=255&t,a[o++]=t>>8&255,a[o++]=255&~t,a[o++]=(65535&~t)>>8&255,a.set(e.subarray(i),o),o+=e.length-i;var s=function(e,t,r){for(var n=1,a=0,o=t;o<r;++o)a=(a+(n=(n+(255&e[o]))%65521))%65521;return a<<16|n}(e,0,e.length);return a[o++]=s>>24&255,a[o++]=s>>16&255,a[o++]=s>>8&255,a[o++]=255&s,a}function u(t,r,a,i){var u,c,f,d=t.width,h=t.height,p=t.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:c=0,u=1,f=d+7>>3;break;case n.ImageKind.RGB_24BPP:c=2,u=8,f=3*d;break;case n.ImageKind.RGBA_32BPP:c=6,u=8,f=4*d;break;default:throw new Error("invalid format")}for(var v=new Uint8Array((1+f)*h),y=0,m=0,g=0;g<h;++g)v[y++]=0,v.set(p.subarray(m,m+f),y),m+=f,y+=f;if(r===n.ImageKind.GRAYSCALE_1BPP&&i){y=0;for(var b=0;b<h;b++){y++;for(var w=0;w<f;w++)v[y++]^=255}}var S=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,h>>24&255,h>>16&255,h>>8&255,255&h,u,c,0,0,0]),A=function(e){if(!o.isNodeJS)return l(e);try{var t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);var r=__webpack_require__(324).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return l(e)}(v),k=e.length+36+S.length+A.length,x=new Uint8Array(k),P=0;return x.set(e,P),s("IHDR",S,x,P+=e.length),s("IDATA",A,x,P+=12+S.length),P+=12+A.length,s("IEND",new Uint8Array(0),x,P),_(x,"image/png",a)}return function(e,t,r){return u(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}(),S=function(){function e(){h(this,e),this.fontSizeScale=1,this.fontWeight=m.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=m.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=""}return d(e,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(e,t){this.x=e,this.y=t}}]),e}(),A=0,k=0,x=0;t.SVGGraphics=p=function(){function e(t,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var i in h(this,e),this.svgFactory=new a.DOMSVGFactory,this.current=new S,this.transformMatrix=n.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=!!o,this._operatorIdMapping=[],n.OPS)this._operatorIdMapping[n.OPS[i]]=i}return d(e,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(e){this.save(),this.executeOpTree(e),this.restore()}},{key:"loadDependencies",value:function(e){for(var t=this,r=e.fnArray,a=e.argsArray,o=0,i=r.length;o<i;o++)if(r[o]===n.OPS.dependency){var s,u=l(a[o]);try{var c=function(){var e=s.value,r=e.startsWith("g_")?t.commonObjs:t.objs,n=new Promise((function(t){r.get(e,t)}));t.current.dependencies.push(n)};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function(e,t,r,a,o,i){var s=[e,t,r,a,o,i];this.transformMatrix=n.Util.transform(this.transformMatrix,s),this.tgrp=null}},{key:"getSVG",value:function(e,t){var r=this;this.viewport=t;var a=this._initialize(t);return this.loadDependencies(e).then((function(){return r.transformMatrix=n.IDENTITY_MATRIX,r.executeOpTree(r.convertOpList(e)),a}))}},{key:"convertOpList",value:function(e){for(var t=this._operatorIdMapping,r=e.argsArray,n=e.fnArray,a=[],o=0,i=n.length;o<i;o++){var s=n[o];a.push({fnId:s,fn:t[s],args:r[o]})}return function(e){var t,r=[],n=[],a=l(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;"save"!==o.fn?"restore"===o.fn?r=n.pop():r.push(o):(r.push({fnId:92,fn:"group",items:[]}),n.push(r),r=r[r.length-1].items)}}catch(e){a.e(e)}finally{a.f()}return r}(a)}},{key:"executeOpTree",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,o=a.fn,i=a.fnId,s=a.args;switch(0|i){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(s);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(s[0],s[1]);break;case n.OPS.setFont:this.setFont(s);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(s[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(s[0],s[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(s[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(s[0]);break;case n.OPS.setHScale:this.setHScale(s[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.setTextRise:this.setTextRise(s[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(s[0]);break;case n.OPS.setLineWidth:this.setLineWidth(s[0]);break;case n.OPS.setLineJoin:this.setLineJoin(s[0]);break;case n.OPS.setLineCap:this.setLineCap(s[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(s[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(s[0],s[1],s[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(s);break;case n.OPS.setFillColorN:this.setFillColorN(s);break;case n.OPS.shadingFill:this.shadingFill(s[0]);break;case n.OPS.setDash:this.setDash(s[0],s[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(s[0]);break;case n.OPS.setFlatness:this.setFlatness(s[0]);break;case n.OPS.setGState:this.setGState(s[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(s[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(s[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(s[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(s[0],s[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(s[0],s[1],s[2],s[3],s[4],s[5]);break;case n.OPS.constructPath:this.constructPath(s[0],s[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,n.warn)("Unimplemented operator ".concat(o))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"setWordSpacing",value:function(e){this.current.wordSpacing=e}},{key:"setCharSpacing",value:function(e){this.current.charSpacing=e}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function(e,t,r,n,a,o){var i=this.current;i.textMatrix=i.lineMatrix=[e,t,r,n,a,o],i.textMatrixScale=Math.hypot(e,t),i.x=i.lineX=0,i.y=i.lineY=0,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size","".concat(v(i.fontSize),"px")),i.tspan.setAttributeNS(null,"y",v(-i.y)),i.txtElement=this.svgFactory.createElement("svg:text"),i.txtElement.appendChild(i.tspan)}},{key:"beginText",value:function(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=n.IDENTITY_MATRIX,e.lineMatrix=n.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}},{key:"moveText",value:function(e,t){var r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size","".concat(v(r.fontSize),"px")),r.tspan.setAttributeNS(null,"y",v(-r.y))}},{key:"showText",value:function(e){var t=this.current,r=t.font,a=t.fontSize;if(0!==a){var o,i=t.fontSizeScale,s=t.charSpacing,u=t.wordSpacing,c=t.fontDirection,f=t.textHScale*c,d=r.vertical,h=d?1:-1,p=r.defaultVMetrics,g=a*t.fontMatrix[0],b=0,_=l(e);try{for(_.s();!(o=_.n()).done;){var w=o.value;if(null!==w)if("number"!=typeof w){var S=(w.isSpace?u:0)+s,A=w.fontChar,k=void 0,x=void 0,P=w.width;if(d){var C=void 0,T=w.vmetric||p;C=-(C=w.vmetric?T[1]:.5*P)*g;var R=T[2]*g;P=T?-T[0]:P,k=C/i,x=(b+R)/i}else k=b/i,x=0;(w.isInFont||r.missingFile)&&(t.xcoords.push(t.x+k),d&&t.ycoords.push(-t.y+x),t.tspan.textContent+=A),b+=d?P*g-S*c:P*g+S*c}else b+=h*w*a/1e3;else b+=c*u}}catch(e){_.e(e)}finally{_.f()}t.tspan.setAttributeNS(null,"x",t.xcoords.map(v).join(" ")),d?t.tspan.setAttributeNS(null,"y",t.ycoords.map(v).join(" ")):t.tspan.setAttributeNS(null,"y",v(-t.y)),d?t.y-=b:t.x+=b*f,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size","".concat(v(t.fontSize),"px")),t.fontStyle!==m.fontStyle&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==m.fontWeight&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);var E=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;if(E===n.TextRenderingMode.FILL||E===n.TextRenderingMode.FILL_STROKE?(t.fillColor!==m.fillColor&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),E===n.TextRenderingMode.STROKE||E===n.TextRenderingMode.FILL_STROKE){var O=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,O)}var F=t.textMatrix;0!==t.textRise&&((F=F.slice())[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform","".concat(y(F)," scale(").concat(v(f),", -1)")),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.appendChild(t.tspan),t.txtgrp.appendChild(t.txtElement),this._ensureTransformGroup().appendChild(t.txtElement)}}},{key:"setLeadingMoveText",value:function(e,t){this.setLeading(-t),this.moveText(e,t)}},{key:"addFontStyle",value:function(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=_(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(e.loadedName,'";')+" src: url(".concat(t,"); }\n")}},{key:"setFont",value:function(e){var t=this.current,r=this.commonObjs.get(e[0]),a=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX;var o="normal";r.black?o="900":r.bold&&(o="bold");var i=r.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=r.loadedName,t.fontWeight=o,t.fontStyle=i,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",v(-t.y)),t.xcoords=[],t.ycoords=[]}},{key:"endText",value:function(){var e,t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(e=t.txtElement)&&void 0!==e&&e.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function(e){e>0&&(this.current.lineWidth=e)}},{key:"setLineCap",value:function(e){this.current.lineCap=g[e]}},{key:"setLineJoin",value:function(e){this.current.lineJoin=b[e]}},{key:"setMiterLimit",value:function(e){this.current.miterLimit=e}},{key:"setStrokeAlpha",value:function(e){this.current.strokeAlpha=e}},{key:"setStrokeRGBColor",value:function(e,t,r){this.current.strokeColor=n.Util.makeHexColor(e,t,r)}},{key:"setFillAlpha",value:function(e){this.current.fillAlpha=e}},{key:"setFillRGBColor",value:function(e,t,r){this.current.fillColor=n.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(e){this.current.strokeColor=this._makeColorN_Pattern(e)}},{key:"setFillColorN",value:function(e){this.current.fillColor=this._makeColorN_Pattern(e)}},{key:"shadingFill",value:function(e){var t=this.viewport.width,r=this.viewport.height,a=n.Util.inverseTransform(this.transformMatrix),o=n.Util.applyTransform([0,0],a),i=n.Util.applyTransform([0,r],a),s=n.Util.applyTransform([t,0],a),l=n.Util.applyTransform([t,r],a),u=Math.min(o[0],i[0],s[0],l[0]),c=Math.min(o[1],i[1],s[1],l[1]),f=Math.max(o[0],i[0],s[0],l[0]),d=Math.max(o[1],i[1],s[1],l[1]),h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x",u),h.setAttributeNS(null,"y",c),h.setAttributeNS(null,"width",f-u),h.setAttributeNS(null,"height",d-c),h.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&h.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(h)}},{key:"_makeColorN_Pattern",value:function(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}},{key:"_makeTilingPattern",value:function(e){var t=e[1],r=e[2],a=e[3]||n.IDENTITY_MATRIX,o=s(e[4],4),l=o[0],u=o[1],c=o[2],f=o[3],d=e[5],h=e[6],p=e[7],v="shading".concat(x++),y=s(n.Util.normalizeRect([].concat(i(n.Util.applyTransform([l,u],a)),i(n.Util.applyTransform([c,f],a)))),4),m=y[0],g=y[1],b=y[2],_=y[3],w=s(n.Util.singularValueDecompose2dScale(a),2),S=d*w[0],A=h*w[1],k=this.svgFactory.createElement("svg:pattern");k.setAttributeNS(null,"id",v),k.setAttributeNS(null,"patternUnits","userSpaceOnUse"),k.setAttributeNS(null,"width",S),k.setAttributeNS(null,"height",A),k.setAttributeNS(null,"x","".concat(m)),k.setAttributeNS(null,"y","".concat(g));var P=this.svg,C=this.transformMatrix,T=this.current.fillColor,R=this.current.strokeColor,E=this.svgFactory.create(b-m,_-g);if(this.svg=E,this.transformMatrix=a,2===p){var O=n.Util.makeHexColor.apply(n.Util,i(t));this.current.fillColor=O,this.current.strokeColor=O}return this.executeOpTree(this.convertOpList(r)),this.svg=P,this.transformMatrix=C,this.current.fillColor=T,this.current.strokeColor=R,k.appendChild(E.childNodes[0]),this.defs.appendChild(k),"url(#".concat(v,")")}},{key:"_makeShadingPattern",value:function(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":var t,r="shading".concat(x++),a=e[3];switch(e[1]){case"axial":var o=e[4],i=e[5];(t=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"x1",o[0]),t.setAttributeNS(null,"y1",o[1]),t.setAttributeNS(null,"x2",i[0]),t.setAttributeNS(null,"y2",i[1]);break;case"radial":var s=e[4],u=e[5],c=e[6],f=e[7];(t=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",r),t.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),t.setAttributeNS(null,"cx",u[0]),t.setAttributeNS(null,"cy",u[1]),t.setAttributeNS(null,"r",f),t.setAttributeNS(null,"fx",s[0]),t.setAttributeNS(null,"fy",s[1]),t.setAttributeNS(null,"fr",c);break;default:throw new Error("Unknown RadialAxial type: ".concat(e[1]))}var d,h=l(a);try{for(h.s();!(d=h.n()).done;){var p=d.value,v=this.svgFactory.createElement("svg:stop");v.setAttributeNS(null,"offset",p[0]),v.setAttributeNS(null,"stop-color",p[1]),t.appendChild(v)}}catch(e){h.e(e)}finally{h.f()}return this.defs.appendChild(t),"url(#".concat(r,")");case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(e[0]))}}},{key:"setDash",value:function(e,t){this.current.dashArray=e,this.current.dashPhase=t}},{key:"constructPath",value:function(e,t){var r,a=this.current,o=a.x,i=a.y,s=[],u=0,c=l(e);try{for(c.s();!(r=c.n()).done;)switch(0|r.value){case n.OPS.rectangle:o=t[u++],i=t[u++];var f=t[u++],d=t[u++],h=o+f,p=i+d;s.push("M",v(o),v(i),"L",v(h),v(i),"L",v(h),v(p),"L",v(o),v(p),"Z");break;case n.OPS.moveTo:o=t[u++],i=t[u++],s.push("M",v(o),v(i));break;case n.OPS.lineTo:o=t[u++],i=t[u++],s.push("L",v(o),v(i));break;case n.OPS.curveTo:o=t[u+4],i=t[u+5],s.push("C",v(t[u]),v(t[u+1]),v(t[u+2]),v(t[u+3]),v(o),v(i)),u+=6;break;case n.OPS.curveTo2:s.push("C",v(o),v(i),v(t[u]),v(t[u+1]),v(t[u+2]),v(t[u+3])),o=t[u+2],i=t[u+3],u+=4;break;case n.OPS.curveTo3:o=t[u+2],i=t[u+3],s.push("C",v(t[u]),v(t[u+1]),v(o),v(i),v(o),v(i)),u+=4;break;case n.OPS.closePath:s.push("Z")}}catch(e){c.e(e)}finally{c.f()}s=s.join(" "),a.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=a.path.getAttributeNS(null,"d")+s:(a.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(a.path)),a.path.setAttributeNS(null,"d",s),a.path.setAttributeNS(null,"fill","none"),a.element=a.path,a.setCurrentPoint(o,i)}},{key:"endPath",value:function(){var e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath".concat(A++),r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",y(this.transformMatrix));var n=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.appendChild(n),this.defs.appendChild(r),e.activeClipUrl){e.clipGroup=null;var a,o=l(this.extraStack);try{for(o.s();!(a=o.n()).done;)a.value.clipGroup=null}catch(e){o.e(e)}finally{o.f()}r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl="url(#".concat(t,")"),this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function(e){this.pendingClip=e}},{key:"closePath",value:function(){var e=this.current;if(e.path){var t="".concat(e.path.getAttributeNS(null,"d"),"Z");e.path.setAttributeNS(null,"d",t)}}},{key:"setLeading",value:function(e){this.current.leading=-e}},{key:"setTextRise",value:function(e){this.current.textRise=e}},{key:"setTextRenderingMode",value:function(e){this.current.textRenderingMode=e}},{key:"setHScale",value:function(e){this.current.textHScale=e/100}},{key:"setRenderingIntent",value:function(e){}},{key:"setFlatness",value:function(e){}},{key:"setGState",value:function(e){var t,r=l(e);try{for(r.s();!(t=r.n()).done;){var a=s(t.value,2),o=a[0],i=a[1];switch(o){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,n.warn)("Unimplemented graphic state operator ".concat(o))}}}catch(e){r.e(e)}finally{r.f()}}},{key:"fill",value:function(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=this.current,n=r.dashArray;1!==t&&n.length>0&&(n=n.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",v(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",v(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(v).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",v(t*r.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(e)}},{key:"paintImageXObject",value:function(e){var t=e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image with object ID ".concat(e," is not ready yet"))}},{key:"paintInlineImageXObject",value:function(e,t){var r=e.width,n=e.height,a=w(e,this.forceDataSchema,!!t),o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",v(r)),o.setAttributeNS(null,"height",v(n)),this.current.element=o,this.clip("nonzero");var i=this.svgFactory.createElement("svg:image");i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y",v(-n)),i.setAttributeNS(null,"width",v(r)+"px"),i.setAttributeNS(null,"height",v(n)+"px"),i.setAttributeNS(null,"transform","scale(".concat(v(1/r)," ").concat(v(-1/n),")")),t?t.appendChild(i):this._ensureTransformGroup().appendChild(i)}},{key:"paintImageMaskXObject",value:function(e){var t=this.current,r=e.width,n=e.height,a=t.fillColor;t.maskId="mask".concat(k++);var o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",t.maskId);var i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",v(r)),i.setAttributeNS(null,"height",v(n)),i.setAttributeNS(null,"fill",a),i.setAttributeNS(null,"mask","url(#".concat(t.maskId,")")),this.defs.appendChild(o),this._ensureTransformGroup().appendChild(i),this.paintInlineImageXObject(e,o)}},{key:"paintFormXObjectBegin",value:function(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){var r=t[2]-t[0],n=t[3]-t[1],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",v(r)),a.setAttributeNS(null,"height",v(n)),this.current.element=a,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(e){var t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.appendChild(r),this.defs=r;var n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",y(e.transform)),t.appendChild(n),this.svg=n,t}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",y(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),e}()},(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a,o=(a=r(145))&&a.__esModule?a:{default:a},i=r(1),s=r(166);function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=f(e);if(t){var o=f(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){d(o,n,a,i,s,"next",e)}function s(e){d(o,n,a,i,s,"throw",e)}i(void 0)}))}}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var b=__webpack_require__(767),_=__webpack_require__(251),w=__webpack_require__(677),S=__webpack_require__(543),A=/^file:\/\/\/[a-zA-Z]:\//,k=function(){function e(t){var r,n;y(this,e),this.source=t,this.url=(r=t.url,"file:"===(n=S.parse(r)).protocol||n.host?n:/^[a-z]:[/\\]/i.test(r)?S.parse("file:///".concat(r)):(n.host||(n.protocol="file:"),n)),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=[]}return g(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new E(this):new T(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=this.isFsUrl?new O(this,e,t):new R(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=p(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFNodeStream=k;var x=function(){function e(t){y(this,e),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,i.createPromiseCapability)(),this._headersCapability=(0,i.createPromiseCapability)()}var t;return g(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=h(o.default.mark((function e(){var t,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}(),P=function(){function e(t){y(this,e),this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,i.createPromiseCapability)();var r=t.source;this._isStreamingSupported=!r.disableStream}var t;return g(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=h(o.default.mark((function e(){var t,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:if(!this._done){e.next=4;break}return e.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){e.next=6;break}throw this._storedError;case 6:if(null!==(t=this._readableStream.read())){e.next=10;break}return this._readCapability=(0,i.createPromiseCapability)(),e.abrupt("return",this.read());case 10:return this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),r=new Uint8Array(t).buffer,e.abrupt("return",{value:r,done:!1});case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._storedError=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",(function(){t._readCapability.resolve()})),e.on("end",(function(){e.destroy(),t._done=!0,t._readCapability.resolve()})),e.on("error",(function(e){t._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}]),e}();function C(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}var T=function(e){l(r,e);var t=c(r);function r(e){var n;y(this,r);var a=function(t){if(404===t.statusCode){var r=new i.MissingPDFException('Missing PDF "'.concat(n._url,'".'));return n._storedError=r,void n._headersCapability.reject(r)}n._headersCapability.resolve(),n._setReadableStream(t);var a=function(e){return n._readableStream.headers[e.toLowerCase()]},o=(0,s.validateRangeRequestCapabilities)({getResponseHeader:a,isHttp:e.isHttp,rangeChunkSize:n._rangeChunkSize,disableRange:n._disableRange}),l=o.allowRangeRequests,u=o.suggestedLength;n._isRangeSupported=l,n._contentLength=u||n._contentLength,n._filename=(0,s.extractFilenameFromHeader)(a)};return(n=t.call(this,e))._request=null,"http:"===n._url.protocol?n._request=_.request(C(n._url,e.httpHeaders),a):n._request=w.request(C(n._url,e.httpHeaders),a),n._request.on("error",(function(e){n._storedError=e,n._headersCapability.reject(e)})),n._request.end(),n}return g(r)}(x),R=function(e){l(r,e);var t=c(r);function r(e,n,a){var o;for(var s in y(this,r),(o=t.call(this,e))._httpHeaders={},e.httpHeaders){var l=e.httpHeaders[s];void 0!==l&&(o._httpHeaders[s]=l)}o._httpHeaders.Range="bytes=".concat(n,"-").concat(a-1);var u=function(e){if(404!==e.statusCode)o._setReadableStream(e);else{var t=new i.MissingPDFException('Missing PDF "'.concat(o._url,'".'));o._storedError=t}};return o._request=null,"http:"===o._url.protocol?o._request=_.request(C(o._url,o._httpHeaders),u):o._request=w.request(C(o._url,o._httpHeaders),u),o._request.on("error",(function(e){o._storedError=e})),o._request.end(),o}return g(r)}(P),E=function(e){l(r,e);var t=c(r);function r(e){var n;y(this,r),n=t.call(this,e);var a=decodeURIComponent(n._url.path);return A.test(n._url.href)&&(a=a.replace(/^\//,"")),b.lstat(a,(function(e,t){if(e)return"ENOENT"===e.code&&(e=new i.MissingPDFException('Missing PDF "'.concat(a,'".'))),n._storedError=e,void n._headersCapability.reject(e);n._contentLength=t.size,n._setReadableStream(b.createReadStream(a)),n._headersCapability.resolve()})),n}return g(r)}(x),O=function(e){l(r,e);var t=c(r);function r(e,n,a){var o;y(this,r),o=t.call(this,e);var i=decodeURIComponent(o._url.path);return A.test(o._url.href)&&(i=i.replace(/^\//,"")),o._setReadableStream(b.createReadStream(i,{start:n,end:a-1})),o}return g(r)}(P)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response (".concat(e,') while retrieving PDF "').concat(t,'".'),e)},t.extractFilenameFromHeader=function(e){var t=e("Content-Disposition");if(t){var r=(0,a.getFilenameFromContentDispositionHeader)(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch(e){}if((0,o.isPdfFile)(r))return r}return null},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,a=e.rangeChunkSize,o=e.disableRange;(0,n.assert)(a>0,"Range chunk size must be larger than zero");var i={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(i.suggestedLength=s,s<=2*a||o||!r||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var n=r(1),a=r(167),o=r(147)},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){var t=!0,r=s("filename\\*","i").exec(e);if(r){var o=c(r=r[1]);return u(o=d(o=f(o=unescape(o))))}if(r=function(e){for(var t,r=[],n=s("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(t=n.exec(e));){var o=a(t,4),i=o[1],l=o[2],u=o[3];if((i=parseInt(i,10))in r){if(0===i)break}else r[i]=[l,u]}for(var d=[],h=0;h<r.length&&h in r;++h){var p=a(r[h],2),v=p[0],y=p[1];y=c(y),v&&(y=unescape(y),0===h&&(y=f(y))),d.push(y)}return d.join("")}(e))return u(d(r));if(r=s("filename","i").exec(e)){var i=c(r=r[1]);return u(i=d(i))}function s(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function l(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{var a=new TextDecoder(e,{fatal:!0}),o=(0,n.stringToBytes)(r);r=a.decode(o),t=!1}catch(e){}}return r}function u(e){return t&&/[\x80-\xff]/.test(e)&&(e=l("utf-8",e),t&&(e=l("iso-8859-1",e))),e}function c(e){if(e.startsWith('"')){for(var t=e.slice(1).split('\\"'),r=0;r<t.length;++r){var n=t[r].indexOf('"');-1!==n&&(t[r]=t[r].slice(0,n),t.length=r+1),t[r]=t[r].replace(/\\(.)/g,"$1")}e=t.join('"')}return e}function f(e){var t=e.indexOf("'");return-1===t?e:l(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function d(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,n){if("q"===r||"Q"===r)return l(t,n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{n=atob(n)}catch(e){}return l(t,n)}))}return""};var n=r(1);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1),i=r(166);function s(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var p=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),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(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return h(e,[{key:"requestRange",value:function(e,t,r){var n={begin:e,end:t};for(var a in r)n[a]=r[a];return this.request(n)}},{key:"requestFull",value:function(e){return this.request(e)}},{key:"request",value:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};for(var a in t.open("GET",this.url),t.withCredentials=this.withCredentials,this.httpHeaders){var o=this.httpHeaders[a];void 0!==o&&t.setRequestHeader(a,o)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range","bytes=".concat(e.begin,"-").concat(e.end-1)),n.expectedStatus=206):n.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r}},{key:"onProgress",value:function(e,t){var r,n=this.pendingRequests[e];n&&(null===(r=n.onProgress)||void 0===r||r.call(n,t))}},{key:"onStateChange",value:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp){var a;null===(a=r.onError)||void 0===a||a.call(r,n.status)}else{var i=n.status||200;if(200===i&&206===r.expectedStatus||i===r.expectedStatus){var s=function(e){var t=e.response;return"string"!=typeof t?t:(0,o.stringToBytes)(t).buffer}(n);if(206===i){var l=n.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);r.onDone({begin:parseInt(u[1],10),chunk:s})}else if(s)r.onDone({begin:0,chunk:s});else{var c;null===(c=r.onError)||void 0===c||c.call(r,n.status)}}else{var f;null===(f=r.onError)||void 0===f||f.call(r,n.status)}}}}},{key:"getRequestXhr",value:function(e){return this.pendingRequests[e].xhr}},{key:"isPendingRequest",value:function(e){return e in this.pendingRequests}},{key:"abortRequest",value:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}]),e}(),v=function(){function e(t){f(this,e),this._source=t,this._manager=new p(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_onRangeRequestReaderClosed",value:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new y(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new m(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){var t;null===(t=this._fullRequestReader)||void 0===t||t.cancel(e);var r,n=u(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(e)}catch(e){n.e(e)}finally{n.f()}}}]),e}();t.PDFNetworkStream=v;var y=function(){function e(t,r){f(this,e),this._manager=t;var n={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(n),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}var t;return h(e,[{key:"_onHeadersReceived",value:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=function(e){return t.getResponseHeader(e)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),a=n.allowRangeRequests,o=n.suggestedLength;a&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(e){this._storedError=(0,i.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(e){var t;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){e.next=5;break}return t=this._cachedChunks.shift(),e.abrupt("return",{value:t,done:!1});case 5:if(!this._done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0,this._headersReceivedCapability.reject(e);var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),e}(),m=function(){function e(t,r,n){f(this,e),this._manager=t;var a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(r,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}var t;return h(e,[{key:"_close",value:function(){var e;null===(e=this.onClosed)||void 0===e||e.call(this,this)}},{key:"_onDone",value:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;var r,n=u(this._requests);try{for(n.s();!(r=n.n()).done;)r.value.resolve({value:void 0,done:!0})}catch(e){n.e(e)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(e){this._storedError=(0,i.createResponseStatusError)(e,this._url);var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.reject(this._storedError)}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(e){var t;this.isStreamingSupported||null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:e.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._storedError){e.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){e.next=6;break}return t=this._queuedChunk,this._queuedChunk=null,e.abrupt("return",{value:t,done:!1});case 6:if(!this._done){e.next=8;break}return e.abrupt("return",{value:void 0,done:!0});case 8:return r=(0,o.createPromiseCapability)(),this._requests.push(r),e.abrupt("return",r.promise);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._done=!0;var t,r=u(this._requests);try{for(r.s();!(t=r.n()).done;)t.value.resolve({value:void 0,done:!0})}catch(e){r.e(e)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),e}()},(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var n,a=(n=r(145))&&n.__esModule?n:{default:n},o=r(1),i=r(166);function s(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){s(o,n,a,i,l,"next",e)}function l(e){s(o,n,a,i,l,"throw",e)}i(void 0)}))}}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,r){return{method:"GET",headers:e,signal:null==r?void 0:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function v(e){var t=new Headers;for(var r in e){var n=e[r];void 0!==n&&t.append(r,n)}return t}var y=function(){function e(t){f(this,e),this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return h(e,[{key:"_progressiveDataLength",get:function(){var e,t;return null!==(e=null===(t=this._fullRequestReader)||void 0===t?void 0:t._loaded)&&void 0!==e?e:0}},{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new m(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){if(t<=this._progressiveDataLength)return null;var r=new g(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);var t,r=u(this._rangeRequestReaders.slice(0));try{for(r.s();!(t=r.n()).done;)t.value.cancel(e)}catch(e){r.e(e)}finally{r.f()}}}]),e}();t.PDFFetchStream=y;var m=function(){function e(t){var r=this;f(this,e),this._stream=t,this._reader=null,this._loaded=0,this._filename=null;var n=t.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=(0,o.createPromiseCapability)(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._headers=v(this._stream.httpHeaders);var a=n.url;fetch(a,p(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,a);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=function(t){return e.headers.get(t)},n=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),s=n.allowRangeRequests,l=n.suggestedLength;r._isRangeSupported=s,r._contentLength=l||r._contentLength,r._filename=(0,i.extractFilenameFromHeader)(t),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new o.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}var t;return h(e,[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._headersCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}(),g=function(){function e(t,r,n){var a=this;f(this,e),this._stream=t,this._reader=null,this._loaded=0;var s=t.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,o.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=v(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(r,"-").concat(n-1));var l=s.url;fetch(l,p(this._headers,this._withCredentials,this._abortController)).then((function(e){if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);a._readCapability.resolve(),a._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}var t;return h(e,[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=l(a.default.mark((function e(){var t,r,n,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._readCapability.promise;case 2:return e.next=4,this._reader.read();case 4:if(t=e.sent,r=t.value,!(n=t.done)){e.next=9;break}return e.abrupt("return",{value:r,done:n});case 9:return this._loaded+=r.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),o=new Uint8Array(r).buffer,e.abrupt("return",{value:o,done:!1});case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e),this._abortController&&this._abortController.abort()}}]),e}()}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e](r,r.exports,__w_pdfjs_require__),r.loaded=!0,r.exports}__w_pdfjs_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __nested_webpack_exports__={};return(()=>{"use strict";var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return o.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return s.renderTextLayer}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(144),n=__w_pdfjs_require__(147),a=__w_pdfjs_require__(160),o=__w_pdfjs_require__(154),i=__w_pdfjs_require__(3),s=__w_pdfjs_require__(163),l=__w_pdfjs_require__(164),u=__w_pdfjs_require__(162);if(i.isNodeJS){var c=__w_pdfjs_require__(165).PDFNodeStream;(0,r.setPDFNetworkStreamFactory)((function(e){return new c(e)}))}else{var f=__w_pdfjs_require__(168).PDFNetworkStream,d=__w_pdfjs_require__(169).PDFFetchStream;(0,r.setPDFNetworkStreamFactory)((function(e){return(0,n.isValidFetchUrl)(e.url)?new d(e):new f(e)}))}})(),__nested_webpack_exports__})()},module.exports=factory()},320:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(243);function s(e){var t=new Map;return e.forEach((function(e){t.set(e,(t.get(e)||0)+1)})),t}t.default=function(e,t){var r,l,u=e.length<=t.length?e:t,c=e.length>t.length?e:t,f=s(u),d=s(c),h=function(e,t){var r=a([],n(d.keys()),!1).find((function(t){return i.Equal.ValEqual(t,e)}));if(!r||r&&d.get(r)!==t)return{value:!1}};try{for(var p=o(f.entries()),v=p.next();!v.done;v=p.next()){var y=n(v.value,2),m=h(y[0],y[1]);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{v&&!v.done&&(l=p.return)&&l.call(p)}finally{if(r)throw r.error}}return!0}},442:function(e,t){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var n="+",a="-",o="|",i=" ",s="";function l(e){var t,n,a=0;try{for(var o=r(e),i=o.next();!i.done;i=o.next()){var s=i.value;a+=s.charCodeAt(0)<128&&s.charCodeAt(0)>=0?1:2}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a}function u(e,t){void 0===t&&(t=!1);var r=e.length,o="";return e.forEach((function(e,i){o+=n+function(e){for(var t="",r=0;r<=e;r++)t+=a;return t}(e+1),o+=i===r-1?n+(t?s:"\n"):s})),o}function c(e){for(var t="",r=0;r<=e;r++)t+=i;return t}t.default=function(e,t){var n=e.length,a=function(e){var t,n,a=Object.keys(e[0]).map((function(e){return+e}));try{for(var o=r(e),i=o.next();!i.done;i=o.next())i.value.forEach((function(e,t){var r=l(e.toString());a[t]=Math.max(r,a[t])}))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return a}(e),f="";e.forEach((function(e,t){t<=1&&(f+=u(a)),f+=function(e,t){var r=e.length,n="";return e.forEach((function(e,a){var u=t[a],f="";isNaN(+u)?f+=i+(null!=u?u:"")+c(e-l((null!=u?u:"").toString())):f+=c(e-l(u.toString()))+u+i,n+=o+f,n+=a===r-1?o+"\n":s})),n}(a,e),t===n-1&&(f+=u(a,!0))})),console.log(f),t&&t(f)}},84:(e,t)=>{"use strict";function r(e,t){void 0===t&&(t={});var r,n,a=t.benchmark,o=t.textType,i=void 0===o?"lowercase":o,s={lowercase:["零","一","二","三","四","五","六","七","八","九"],uppercase:["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"]},l={lowercase:["","十","百","千"],uppercase:["","拾","佰","仟"]},u={lowercase:["","万","亿","兆"],uppercase:["","万","亿","兆"]},c="";if(a&&(e=+(e*=a).toFixed(4)),e>1e16)return"超出转换范围";var f=e.toString();if(r=f.split(".")[0],n=f.split(".")[1],r)for(var d=0,h=0;h<r.length;h++){var p=r.length-h-1,v=+r[h],y=Math.floor(p/4),m=p%(4*(0===y?1:y));0==+r[h]?d++:(d>0&&(c+=s[i][0],d=0),c+="".concat(s[i][v]+l[i][m]),p%4==0&&(c+=u[i][y]))}if(n){c+="点";for(h=0;h<n.length;h++){var g=+n[h];0==+n[h]?c+="".concat(s[i][0]):c+="".concat(s[i][g])}}return""===c&&(c+=s[i][0]),c}Object.defineProperty(t,"__esModule",{value:!0}),t.toChineseNum=void 0,t.toChineseNum=r;var n={toChineseNum:r};t.default=n},819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(243);t.default=function e(t){if("date"===(0,n.Typeof)(t))return new Date(t.toISOString());if("formdata"===(0,n.Typeof)(t)){var r=t,a=new FormData;return r.forEach((function(e,t){a.append(t,e)})),a}if("map"===(0,n.Typeof)(t)){r=t;var o=new Map;return r.forEach((function(e,t){o.set(t,e)})),o}if("set"===(0,n.Typeof)(t)){r=t;var i=new Set;return r.forEach((function(e){i.add(e)})),i}if(Array.isArray(t))return t.map((function(t){return"object"==typeof t?e(t):t}));if(t&&"object"===(0,n.Typeof)(t)){var s=t,l={};return Object.keys(s).forEach((function(t){var r=s[t];l[t]="object"==typeof r?e(r):r})),l}return t}},769:(e,t)=>{"use strict";function r(e,t){if(e.startsWith("http")){var r=document.createElement("a");r.href=e,r.download=decodeURI(t||""),document.body.appendChild(r),r.click(),document.body.removeChild(r)}else!function(e,t){fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){n(e,t)}))}(e,t)}function n(e,t){if("string"!=typeof e){var n=new Blob([e]),a=document.createElement("a"),o=window.URL.createObjectURL(n);a.href=o,a.download=decodeURI(t||""),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}else r(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjEqual=t.ValEqual=t.TypeEqual=void 0;var n=r(243);function a(e,t){return(0,n.Typeof)(e)===(0,n.Typeof)(t)}function o(e,t){return null===e&&void 0===t||void 0===e&&null===t||("object"==typeof e&&"object"==typeof t?i(e,t):"function"==typeof e&&"function"==typeof t?JSON.stringify(e)===JSON.stringify(t):e===t)}function i(e,t){var r=!1,a=(0,n.deepCopy)(e),i=(0,n.deepCopy)(t);if(null!==a&&null!==i){if(Array.isArray(a)&&Array.isArray(i))if(a.sort(),i.sort(),a.length!==i.length)r=!1;else{r=!0;for(var s=0;s<a.length&&(r=o(a[s],i[s]));s++);}else if("object"==typeof a&&"object"==typeof i)if(Object.keys(a).length!==Object.keys(i).length)r=!1;else for(var l in r=!0,a)if(!(r=o(a[l],i[l])))break}else null===a&&null===i&&(r=!0);return r}t.TypeEqual=a,t.ValEqual=o,t.ObjEqual=i;var s={ValEqual:o,TypeEqual:a,ObjEqual:i};t.default=s},285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r=0);var n=t.style,a=void 0===n?"normal":n,o=t.variant,i=void 0===o?"normal":o,s=t.weight,l=void 0===s?"normal":s,u=t.size,c=void 0===u?12:u,f=t.lineHeight,d=void 0===f?1:f,h=t.family,p=void 0===h?"微软雅黑":h,v=document.createElement("canvas").getContext("2d");v.font="".concat(a," ").concat(i," ").concat(l," ").concat(c,"px/").concat(d," ").concat(p);var y=+(+v.measureText(e).width.toFixed(2)+.01).toFixed(2);return y+=(e.length>0?e.length-1:0)*r}},676:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a={},o={};t.default=function(e){return r(this,void 0,void 0,(function(){var t;return n(this,(function(r){return o[e]?[2,o[e]]:a[e]?[2,a[e]]:(t=new Promise((function(t,r){var n=new Image;n.src=e,n.onload=function(){t(n),o[e]=n},n.onerror=function(){r()}})),a[e]=t,[2,t])}))}))}},928:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(783);o.GlobalWorkerOptions.workerSrc="https://cdn.bootcss.com/pdf.js/2.13.216/pdf.worker.js";var i=new Map;function s(e){var t=e.pdf,r=e.container,n=e.num,a=e.pixelRatio,o=void 0===a?2:a,i=e.scale,s=void 0===i?1:i;t.getPage(n).then((function(e){var t=document.createElement("div");t.setAttribute("id","".concat(r.id,"-page-").concat(n)),t.setAttribute("style","position: relative; "),r.appendChild(t);var a=document.createElement("canvas");t.appendChild(a);var i=a.getContext("2d"),l=window.devicePixelRatio*o,u=e.getViewport({scale:1*l});a.style.width="calc(100% * ".concat(s,")"),a.style.height="100%",a.width=u.width,a.height=u.height;var c={canvasContext:i,viewport:u};e.render(c)}))}var l={render:function(e){var t=e.pdfUrl,r=e.containerId,l=e.startPageNum,u=e.endPageNum,c=e.pixelRatio,f=e.scale;return n(this,void 0,void 0,(function(){var e,n,d,h,p;return a(this,(function(a){switch(a.label){case 0:return function(e){var t=document.getElementById(e),r=document.querySelectorAll('[id^="'.concat(e,'-page-"]'));null==r||r.forEach((function(e){null==t||t.removeChild(e)}))}(r),(e=i.get(t))?[3,2]:[4,(0,o.getDocument)({url:t,cMapUrl:"https://unpkg.com/browse/pdfjs-dist@2.13.216/cmaps/",cMapPacked:!0}).promise];case 1:e=a.sent(),i.set(t,e),a.label=2;case 2:if(!(n=document.getElementById(r)))return[2];for(d=null!=l?l:1,h=null!=u?u:e.numPages,p=d;p<=h;p++)s({pdf:e,container:n,num:p,pixelRatio:c,scale:f});return[2]}}))}))},getNumPages:function(e){return n(this,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return(t=i.get(e))?[3,2]:[4,(0,o.getDocument)({url:e,cMapUrl:"https://unpkg.com/browse/pdfjs-dist@2.13.216/cmaps/",cMapPacked:!0}).promise];case 1:t=r.sent(),i.set(e,t),r.label=2;case 2:return[2,t.numPages]}}))}))}};t.default=l},332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=Object.prototype.toString.call(e),n=new RegExp(" (.+?)]"),a=r.match(n)[1].toLowerCase();return t?"object"!=typeof e?typeof e===t:a===t:a}},243:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.array_is_includes=t.downloadFile=t.RenderPDF=t.loadImage=t.ConvertNumbers=t.get_string_width=t.Typeof=t.Equal=t.deepCopy=t.console_table=void 0;var a=n(r(442));t.console_table=a.default;var o=n(r(819));t.deepCopy=o.default;var i=n(r(962));t.Equal=i.default;var s=n(r(332));t.Typeof=s.default;var l=n(r(285));t.get_string_width=l.default;var u=n(r(84));t.ConvertNumbers=u.default;var c=n(r(676));t.loadImage=c.default;var f=n(r(928));t.RenderPDF=f.default;var d=n(r(769));t.downloadFile=d.default;var h=n(r(320));t.array_is_includes=h.default},800:function(e,t,r){!function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(e){return"Symbol(".concat(e,")")};function n(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e){return this instanceof o?(this.v=e,this):new o(e)}function i(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,a=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){a[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{u(a[e](t))}catch(e){d(i[0][3],e)}}function u(e){e.value instanceof o?Promise.resolve(e.value.v).then(c,f):d(i[0][2],e)}function c(e){l("next",e)}function f(e){l("throw",e)}function d(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function s(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:o(e[n](t)),done:!1}:a?a(t):t}:a}}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof a?a(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){o(n,a,(t=e[r](t)).done,t.value)}))}}function o(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}}function u(){}function c(e){return"object"==typeof e&&null!==e||"function"==typeof e}"function"==typeof SuppressedError&&SuppressedError;var f=u;function d(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}var h=Promise,p=Promise.prototype.then,v=Promise.reject.bind(h);function y(e){return new h(e)}function m(e){return y((function(t){return t(e)}))}function g(e){return v(e)}function b(e,t,r){return p.call(e,t,r)}function _(e,t,r){b(b(e,t,r),void 0,f)}function w(e,t){_(e,t)}function S(e,t){_(e,void 0,t)}function A(e,t,r){return b(e,t,r)}function k(e){b(e,void 0,f)}var x=function(e){if("function"==typeof queueMicrotask)x=queueMicrotask;else{var t=m(void 0);x=function(e){return b(t,e)}}return x(e)};function P(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function C(e,t,r){try{return m(P(e,t,r))}catch(e){return g(e)}}var T=16384,R=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(e){var t=this._back,r=t;t._elements.length===T-1&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size},e.prototype.shift=function(){var e=this._front,t=e,r=this._cursor,n=r+1,a=e._elements,o=a[r];return n===T&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),a[r]=void 0,o},e.prototype.forEach=function(e){for(var t=this._cursor,r=this._front,n=r._elements;!(t===n.length&&void 0===r._next||t===n.length&&(t=0,0===(n=(r=r._next)._elements).length));)e(n[t]),++t},e.prototype.peek=function(){var e=this._front,t=this._cursor;return e._elements[t]},e}(),E=t("[[AbortSteps]]"),O=t("[[ErrorSteps]]"),F=t("[[CancelSteps]]"),M=t("[[PullSteps]]"),j=t("[[ReleaseSteps]]");function I(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?q(e):"closed"===t._state?W(e):B(e,t._storedError)}function D(e,t){return oa(e._ownerReadableStream,t)}function L(e){var t=e._ownerReadableStream;"readable"===t._state?U(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):z(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[j](),t._reader=void 0,e._ownerReadableStream=void 0}function N(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function q(e){e._closedPromise=y((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function B(e,t){q(e),U(e,t)}function W(e){q(e),G(e)}function U(e,t){void 0!==e._closedPromise_reject&&(k(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function z(e,t){B(e,t)}function G(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var H=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},V=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function X(e){return"object"==typeof e||"function"==typeof e}function Y(e,t){if(void 0!==e&&!X(e))throw new TypeError("".concat(t," is not an object."))}function K(e,t){if("function"!=typeof e)throw new TypeError("".concat(t," is not a function."))}function Q(e){return"object"==typeof e&&null!==e||"function"==typeof e}function J(e,t){if(!Q(e))throw new TypeError("".concat(t," is not an object."))}function $(e,t,r){if(void 0===e)throw new TypeError("Parameter ".concat(t," is required in '").concat(r,"'."))}function Z(e,t,r){if(void 0===e)throw new TypeError("".concat(t," is required in '").concat(r,"'."))}function ee(e){return Number(e)}function te(e){return 0===e?0:e}function re(e){return te(V(e))}function ne(e,t){var r=0,n=Number.MAX_SAFE_INTEGER,a=Number(e);if(a=te(a),!H(a))throw new TypeError("".concat(t," is not a finite number"));if((a=re(a))<r||a>n)throw new TypeError("".concat(t," is outside the accepted range of ").concat(r," to ").concat(n,", inclusive"));return H(a)&&0!==a?a:0}function ae(e,t){if(!na(e))throw new TypeError("".concat(t," is not a ReadableStream."))}function oe(e){return new he(e)}function ie(e,t){e._reader._readRequests.push(t)}function se(e,t,r){var n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function le(e){return e._reader._readRequests.length}function ue(e){var t=e._reader;return void 0!==t&&!!pe(t)}var ce,fe,de,he=function(){function e(e){if($(e,1,"ReadableStreamDefaultReader"),ae(e,"First parameter"),aa(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");I(this,e),this._readRequests=new R}return Object.defineProperty(e.prototype,"closed",{get:function(){return pe(this)?this._closedPromise:g(ge("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),pe(this)?void 0===this._ownerReadableStream?g(N("cancel")):D(this,e):g(ge("cancel"))},e.prototype.read=function(){if(!pe(this))return g(ge("read"));if(void 0===this._ownerReadableStream)return g(N("read from"));var e,t,r=y((function(r,n){e=r,t=n}));return ve(this,{_chunkSteps:function(t){return e({value:t,done:!1})},_closeSteps:function(){return e({value:void 0,done:!0})},_errorSteps:function(e){return t(e)}}),r},e.prototype.releaseLock=function(){if(!pe(this))throw ge("releaseLock");void 0!==this._ownerReadableStream&&ye(this)},e}();function pe(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof he}function ve(e,t){var r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[M](t)}function ye(e){L(e),me(e,new TypeError("Reader was released"))}function me(e,t){var r=e._readRequests;e._readRequests=new R,r.forEach((function(e){e._errorSteps(t)}))}function ge(e){return new TypeError("ReadableStreamDefaultReader.prototype.".concat(e," can only be used on a ReadableStreamDefaultReader"))}function be(e){return e.slice()}function _e(e,t,r,n,a){new Uint8Array(e).set(new Uint8Array(r,n,a),t)}Object.defineProperties(he.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),d(he.prototype.cancel,"cancel"),d(he.prototype.read,"read"),d(he.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(he.prototype,t.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});var we=function(e){return(we="function"==typeof e.transfer?function(e){return e.transfer()}:"function"==typeof structuredClone?function(e){return structuredClone(e,{transfer:[e]})}:function(e){return e})(e)},Se=function(e){return(Se="boolean"==typeof e.detached?function(e){return e.detached}:function(e){return 0===e.byteLength})(e)};function Ae(e,t,r){if(e.slice)return e.slice(t,r);var n=r-t,a=new ArrayBuffer(n);return _e(a,0,e,t,n),a}function ke(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError("".concat(String(t)," is not a function"));return r}}function xe(e){var r,u=((r={})[t.iterator]=function(){return e.iterator},r),c=function(){return i(this,arguments,(function(){return n(this,(function(e){switch(e.label){case 0:return[5,a(s(l(u)))];case 1:case 2:return[4,o.apply(void 0,[e.sent()])];case 3:return[2,e.sent()]}}))}))}();return{iterator:c,nextMethod:c.next,done:!1}}var Pe,Ce=null!==(de=null!==(ce=t.asyncIterator)&&void 0!==ce?ce:null===(fe=t.for)||void 0===fe?void 0:fe.call(t,"Symbol.asyncIterator"))&&void 0!==de?de:"@@asyncIterator";function Te(e,r,n){if(void 0===r&&(r="sync"),void 0===n)if("async"===r){if(void 0===(n=ke(e,Ce)))return xe(Te(e,"sync",ke(e,t.iterator)))}else n=ke(e,t.iterator);if(void 0===n)throw new TypeError("The object is not iterable");var a=P(n,e,[]);if(!c(a))throw new TypeError("The iterator method must return an object");return{iterator:a,nextMethod:a.next,done:!1}}function Re(e){var t=P(e.nextMethod,e.iterator,[]);if(!c(t))throw new TypeError("The iterator.next() method must return an object");return t}function Ee(e){return Boolean(e.done)}function Oe(e){return e.value}var Fe=((Pe={})[Ce]=function(){return this},Pe);Object.defineProperty(Fe,Ce,{enumerable:!1});var Me=function(){function e(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}return e.prototype.next=function(){var e=this,t=function(){return e._nextSteps()};return this._ongoingPromise=this._ongoingPromise?A(this._ongoingPromise,t,t):t(),this._ongoingPromise},e.prototype.return=function(e){var t=this,r=function(){return t._returnSteps(e)};return this._ongoingPromise?A(this._ongoingPromise,r,r):r()},e.prototype._nextSteps=function(){var e=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var t,r,n=this._reader,a=y((function(e,n){t=e,r=n}));return ve(n,{_chunkSteps:function(r){e._ongoingPromise=void 0,x((function(){return t({value:r,done:!1})}))},_closeSteps:function(){e._ongoingPromise=void 0,e._isFinished=!0,L(n),t({value:void 0,done:!0})},_errorSteps:function(t){e._ongoingPromise=void 0,e._isFinished=!0,L(n),r(t)}}),a},e.prototype._returnSteps=function(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;var t=this._reader;if(!this._preventCancel){var r=D(t,e);return L(t),A(r,(function(){return{value:e,done:!0}}))}return L(t),m({value:e,done:!0})},e}(),je={next:function(){return De(this)?this._asyncIteratorImpl.next():g(Le("next"))},return:function(e){return De(this)?this._asyncIteratorImpl.return(e):g(Le("return"))}};function Ie(e,t){var r=oe(e),n=new Me(r,t),a=Object.create(je);return a._asyncIteratorImpl=n,a}function De(e){if(!c(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof Me}catch(e){return!1}}function Le(e){return new TypeError("ReadableStreamAsyncIterator.".concat(e," can only be used on a ReadableSteamAsyncIterator"))}Object.setPrototypeOf(je,Fe);var Ne=Number.isNaN||function(e){return e!=e};function qe(e){return!("number"!=typeof e||Ne(e)||e<0)}function Be(e){var t=Ae(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function We(e){var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function Ue(e,t,r){if(!qe(r)||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function ze(e){return e._queue.peek().value}function Ge(e){e._queue=new R,e._queueTotalSize=0}function He(e){return e===DataView}function Ve(e){return He(e.constructor)}function Xe(e){return He(e)?1:e.BYTES_PER_ELEMENT}var Ye=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Je(this))throw Rt("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(e){if(!Je(this))throw Rt("respond");if($(e,1,"respond"),e=ne(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(Se(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");kt(this._associatedReadableByteStreamController,e)},e.prototype.respondWithNewView=function(e){if(!Je(this))throw Rt("respondWithNewView");if($(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(Se(e.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");xt(this._associatedReadableByteStreamController,e)},e}();Object.defineProperties(Ye.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),d(Ye.prototype.respond,"respond"),d(Ye.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ye.prototype,t.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ke=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!Qe(this))throw Et("byobRequest");return St(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Qe(this))throw Et("desiredSize");return At(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!Qe(this))throw Et("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in ".concat(e," state) is not in the readable state and cannot be closed"));gt(this)},e.prototype.enqueue=function(e){if(!Qe(this))throw Et("enqueue");if($(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in ".concat(t," state) is not in the readable state and cannot be enqueued to"));bt(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Qe(this))throw Et("error");_t(this,e)},e.prototype[F]=function(e){Ze(this),Ge(this);var t=this._cancelAlgorithm(e);return mt(this),t},e.prototype[M]=function(e){var t=this._controlledReadableByteStream;if(this._queueTotalSize>0)wt(this,e);else{var r=this._autoAllocateChunkSize;if(void 0!==r){var n=void 0;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}var a={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}ie(t,e),$e(this)}},e.prototype[j]=function(){if(this._pendingPullIntos.length>0){var e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new R,this._pendingPullIntos.push(e)}},e}();function Qe(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Ke}function Je(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof Ye}function $e(e){yt(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,_(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,$e(e)),null}),(function(t){return _t(e,t),null}))))}function Ze(e){lt(e),e._pendingPullIntos=new R}function et(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=tt(t);"default"===t.readerType?se(e,n,r):Dt(e,n,r)}function tt(e){var t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function rt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function nt(e,t,r,n){var a;try{a=Ae(t,r,r+n)}catch(t){throw _t(e,t),t}rt(e,a,0,n)}function at(e,t){t.bytesFilled>0&&nt(e,t.buffer,t.byteOffset,t.bytesFilled),vt(e)}function ot(e,t){var r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+r,a=r,o=!1,i=n-n%t.elementSize;i>=t.minimumFill&&(a=i-t.bytesFilled,o=!0);for(var s=e._queue;a>0;){var l=s.peek(),u=Math.min(a,l.byteLength),c=t.byteOffset+t.bytesFilled;_e(t.buffer,c,l.buffer,l.byteOffset,u),l.byteLength===u?s.shift():(l.byteOffset+=u,l.byteLength-=u),e._queueTotalSize-=u,it(e,u,t),a-=u}return o}function it(e,t,r){r.bytesFilled+=t}function st(e){0===e._queueTotalSize&&e._closeRequested?(mt(e),ia(e._controlledReadableByteStream)):$e(e)}function lt(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function ut(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos.peek();ot(e,t)&&(vt(e),et(e._controlledReadableByteStream,t))}}function ct(e){for(var t=e._controlledReadableByteStream._reader;t._readRequests.length>0;){if(0===e._queueTotalSize)return;wt(e,t._readRequests.shift())}}function ft(e,t,r,n){var a,o=e._controlledReadableByteStream,i=t.constructor,s=Xe(i),l=t.byteOffset,u=t.byteLength,c=r*s;try{a=we(t.buffer)}catch(h){return void n._errorSteps(h)}var f={buffer:a,bufferByteLength:a.byteLength,byteOffset:l,byteLength:u,bytesFilled:0,minimumFill:c,elementSize:s,viewConstructor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(f),void It(o,n);if("closed"!==o._state){if(e._queueTotalSize>0){if(ot(e,f)){var d=tt(f);return st(e),void n._chunkSteps(d)}if(e._closeRequested){var h=new TypeError("Insufficient bytes to fill elements in the given buffer");return _t(e,h),void n._errorSteps(h)}}e._pendingPullIntos.push(f),It(o,n),$e(e)}else{var p=new i(f.buffer,f.byteOffset,0);n._closeSteps(p)}}function dt(e,t){"none"===t.readerType&&vt(e);var r=e._controlledReadableByteStream;if(Nt(r))for(;Lt(r)>0;)et(r,vt(e))}function ht(e,t,r){if(it(e,t,r),"none"===r.readerType)return at(e,r),void ut(e);if(!(r.bytesFilled<r.minimumFill)){vt(e);var n=r.bytesFilled%r.elementSize;if(n>0){var a=r.byteOffset+r.bytesFilled;nt(e,r.buffer,a-n,n)}r.bytesFilled-=n,et(e._controlledReadableByteStream,r),ut(e)}}function pt(e,t){var r=e._pendingPullIntos.peek();lt(e),"closed"===e._controlledReadableByteStream._state?dt(e,r):ht(e,t,r),$e(e)}function vt(e){return e._pendingPullIntos.shift()}function yt(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!e._closeRequested&&!!e._started&&(!!(ue(t)&&le(t)>0)||!!(Nt(t)&&Lt(t)>0)||At(e)>0)}function mt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function gt(e){var t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){var r=e._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!=0){var n=new TypeError("Insufficient bytes to fill elements in the given buffer");throw _t(e,n),n}}mt(e),ia(t)}}function bt(e,t){var r=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===r._state){var n=t.buffer,a=t.byteOffset,o=t.byteLength;if(Se(n))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");var i=we(n);if(e._pendingPullIntos.length>0){var s=e._pendingPullIntos.peek();if(Se(s.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");lt(e),s.buffer=we(s.buffer),"none"===s.readerType&&at(e,s)}ue(r)?(ct(e),0===le(r)?rt(e,i,a,o):(e._pendingPullIntos.length>0&&vt(e),se(r,new Uint8Array(i,a,o),!1))):Nt(r)?(rt(e,i,a,o),ut(e)):rt(e,i,a,o),$e(e)}}function _t(e,t){var r=e._controlledReadableByteStream;"readable"===r._state&&(Ze(e),Ge(e),mt(e),sa(r,t))}function wt(e,t){var r=e._queue.shift();e._queueTotalSize-=r.byteLength,st(e);var n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function St(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){var t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(Ye.prototype);Tt(n,e,r),e._byobRequest=n}return e._byobRequest}function At(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function kt(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=we(r.buffer),pt(e,t)}function xt(e,t){var r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var n=t.byteLength;r.buffer=we(t.buffer),pt(e,n)}function Pt(e,t,r,n,a,o,i){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,Ge(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,t._autoAllocateChunkSize=i,t._pendingPullIntos=new R,e._readableStreamController=t,_(m(r()),(function(){return t._started=!0,$e(t),null}),(function(e){return _t(t,e),null}))}function Ct(e,t,r){var n,a,o,i=Object.create(Ke.prototype);n=void 0!==t.start?function(){return t.start(i)}:function(){},a=void 0!==t.pull?function(){return t.pull(i)}:function(){return m(void 0)},o=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)};var s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");Pt(e,i,n,a,o,r,s)}function Tt(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Rt(e){return new TypeError("ReadableStreamBYOBRequest.prototype.".concat(e," can only be used on a ReadableStreamBYOBRequest"))}function Et(e){return new TypeError("ReadableByteStreamController.prototype.".concat(e," can only be used on a ReadableByteStreamController"))}function Ot(e,t){Y(e,t);var r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:Ft(r,"".concat(t," has member 'mode' that"))}}function Ft(e,t){if("byob"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamReaderMode"));return e}function Mt(e,t){var r;return Y(e,t),{min:ne(null!==(r=null==e?void 0:e.min)&&void 0!==r?r:1,"".concat(t," has member 'min' that"))}}function jt(e){return new qt(e)}function It(e,t){e._reader._readIntoRequests.push(t)}function Dt(e,t,r){var n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}function Lt(e){return e._reader._readIntoRequests.length}function Nt(e){var t=e._reader;return void 0!==t&&!!Bt(t)}Object.defineProperties(Ke.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),d(Ke.prototype.close,"close"),d(Ke.prototype.enqueue,"enqueue"),d(Ke.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ke.prototype,t.toStringTag,{value:"ReadableByteStreamController",configurable:!0});var qt=function(){function e(e){if($(e,1,"ReadableStreamBYOBReader"),ae(e,"First parameter"),aa(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Qe(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");I(this,e),this._readIntoRequests=new R}return Object.defineProperty(e.prototype,"closed",{get:function(){return Bt(this)?this._closedPromise:g(Gt("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),Bt(this)?void 0===this._ownerReadableStream?g(N("cancel")):D(this,e):g(Gt("cancel"))},e.prototype.read=function(e,t){if(void 0===t&&(t={}),!Bt(this))return g(Gt("read"));if(!ArrayBuffer.isView(e))return g(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return g(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return g(new TypeError("view's buffer must have non-zero byteLength"));if(Se(e.buffer))return g(new TypeError("view's buffer has been detached"));var r;try{r=Mt(t,"options")}catch(e){return g(e)}var n,a,o=r.min;if(0===o)return g(new TypeError("options.min must be greater than 0"));if(Ve(e)){if(o>e.byteLength)return g(new RangeError("options.min must be less than or equal to view's byteLength"))}else if(o>e.length)return g(new RangeError("options.min must be less than or equal to view's length"));if(void 0===this._ownerReadableStream)return g(N("read from"));var i=y((function(e,t){n=e,a=t}));return Wt(this,e,o,{_chunkSteps:function(e){return n({value:e,done:!1})},_closeSteps:function(e){return n({value:e,done:!0})},_errorSteps:function(e){return a(e)}}),i},e.prototype.releaseLock=function(){if(!Bt(this))throw Gt("releaseLock");void 0!==this._ownerReadableStream&&Ut(this)},e}();function Bt(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof qt}function Wt(e,t,r,n){var a=e._ownerReadableStream;a._disturbed=!0,"errored"===a._state?n._errorSteps(a._storedError):ft(a._readableStreamController,t,r,n)}function Ut(e){L(e),zt(e,new TypeError("Reader was released"))}function zt(e,t){var r=e._readIntoRequests;e._readIntoRequests=new R,r.forEach((function(e){e._errorSteps(t)}))}function Gt(e){return new TypeError("ReadableStreamBYOBReader.prototype.".concat(e," can only be used on a ReadableStreamBYOBReader"))}function Ht(e,t){var r=e.highWaterMark;if(void 0===r)return t;if(Ne(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Vt(e){var t=e.size;return t||function(){return 1}}function Xt(e,t){Y(e,t);var r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:ee(r),size:void 0===n?void 0:Yt(n,"".concat(t," has member 'size' that"))}}function Yt(e,t){return K(e,t),function(t){return ee(e(t))}}function Kt(e,t){Y(e,t);var r=null==e?void 0:e.abort,n=null==e?void 0:e.close,a=null==e?void 0:e.start,o=null==e?void 0:e.type,i=null==e?void 0:e.write;return{abort:void 0===r?void 0:Qt(r,e,"".concat(t," has member 'abort' that")),close:void 0===n?void 0:Jt(n,e,"".concat(t," has member 'close' that")),start:void 0===a?void 0:$t(a,e,"".concat(t," has member 'start' that")),write:void 0===i?void 0:Zt(i,e,"".concat(t," has member 'write' that")),type:o}}function Qt(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function Jt(e,t,r){return K(e,r),function(){return C(e,t,[])}}function $t(e,t,r){return K(e,r),function(r){return P(e,t,[r])}}function Zt(e,t,r){return K(e,r),function(r,n){return C(e,t,[r,n])}}function er(e,t){if(!lr(e))throw new TypeError("".concat(t," is not a WritableStream."))}function tr(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}Object.defineProperties(qt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),d(qt.prototype.cancel,"cancel"),d(qt.prototype.read,"read"),d(qt.prototype.releaseLock,"releaseLock"),"symbol"==typeof t.toStringTag&&Object.defineProperty(qt.prototype,t.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});var rr="function"==typeof AbortController;function nr(){if(rr)return new AbortController}var ar=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:J(e,"First parameter");var r=Xt(t,"Second parameter"),n=Kt(e,"First parameter");if(sr(this),void 0!==n.type)throw new RangeError("Invalid type is specified");var a=Vt(r);Br(this,n,Ht(r,1),a)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!lr(this))throw $r("locked");return ur(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),lr(this)?ur(this)?g(new TypeError("Cannot abort a stream that already has a writer")):cr(this,e):g($r("abort"))},e.prototype.close=function(){return lr(this)?ur(this)?g(new TypeError("Cannot close a stream that already has a writer")):_r(this)?g(new TypeError("Cannot close an already-closing stream")):fr(this):g($r("close"))},e.prototype.getWriter=function(){if(!lr(this))throw $r("getWriter");return or(this)},e}();function or(e){return new Pr(e)}function ir(e,t,r,n,a,o){void 0===a&&(a=1),void 0===o&&(o=function(){return 1});var i=Object.create(ar.prototype);return sr(i),qr(i,Object.create(Lr.prototype),e,t,r,n,a,o),i}function sr(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new R,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function lr(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof ar}function ur(e){return void 0!==e._writer}function cr(e,t){var r;if("closed"===e._state||"errored"===e._state)return m(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);var n=e._state;if("closed"===n||"errored"===n)return m(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;var a=!1;"erroring"===n&&(a=!0,t=void 0);var o=y((function(r,n){e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:a}}));return e._pendingAbortRequest._promise=o,a||pr(e,t),o}function fr(e){var t=e._state;if("closed"===t||"errored"===t)return g(new TypeError("The stream (in ".concat(t," state) is not in the writable state and cannot be closed")));var r=y((function(t,r){var n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;return void 0!==n&&e._backpressure&&"writable"===t&&vn(n),Ur(e._writableStreamController),r}function dr(e){return y((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}function hr(e,t){"writable"!==e._state?vr(e):pr(e,t)}function pr(e,t){var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&Fr(n,t),!wr(e)&&r._started&&vr(e)}function vr(e){e._state="errored",e._writableStreamController[O]();var t=e._storedError;if(e._writeRequests.forEach((function(e){e._reject(t)})),e._writeRequests=new R,void 0!==e._pendingAbortRequest){var r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void kr(e);_(e._writableStreamController[E](r._reason),(function(){return r._resolve(),kr(e),null}),(function(t){return r._reject(t),kr(e),null}))}else kr(e)}function yr(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function mr(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,hr(e,t)}function gr(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&ln(t)}function br(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),hr(e,t)}function _r(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function wr(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function Sr(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Ar(e){e._inFlightWriteRequest=e._writeRequests.shift()}function kr(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&on(t,e._storedError)}function xr(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(t?hn(r):vn(r)),e._backpressure=t}Object.defineProperties(ar.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),d(ar.prototype.abort,"abort"),d(ar.prototype.close,"close"),d(ar.prototype.getWriter,"getWriter"),"symbol"==typeof t.toStringTag&&Object.defineProperty(ar.prototype,t.toStringTag,{value:"WritableStream",configurable:!0});var Pr=function(){function e(e){if($(e,1,"WritableStreamDefaultWriter"),er(e,"First parameter"),ur(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;var t=e._state;if("writable"===t)!_r(e)&&e._backpressure?un(this):fn(this),rn(this);else if("erroring"===t)cn(this,e._storedError),rn(this);else if("closed"===t)fn(this),an(this);else{var r=e._storedError;cn(this,r),nn(this,r)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return Cr(this)?this._closedPromise:g(en("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Cr(this))throw en("desiredSize");if(void 0===this._ownerWritableStream)throw tn("desiredSize");return Mr(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return Cr(this)?this._readyPromise:g(en("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){return void 0===e&&(e=void 0),Cr(this)?void 0===this._ownerWritableStream?g(tn("abort")):Tr(this,e):g(en("abort"))},e.prototype.close=function(){if(!Cr(this))return g(en("close"));var e=this._ownerWritableStream;return void 0===e?g(tn("close")):_r(e)?g(new TypeError("Cannot close an already-closing stream")):Rr(this)},e.prototype.releaseLock=function(){if(!Cr(this))throw en("releaseLock");void 0!==this._ownerWritableStream&&jr(this)},e.prototype.write=function(e){return void 0===e&&(e=void 0),Cr(this)?void 0===this._ownerWritableStream?g(tn("write to")):Ir(this,e):g(en("write"))},e}();function Cr(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof Pr}function Tr(e,t){return cr(e._ownerWritableStream,t)}function Rr(e){return fr(e._ownerWritableStream)}function Er(e){var t=e._ownerWritableStream,r=t._state;return _r(t)||"closed"===r?m(void 0):"errored"===r?g(t._storedError):Rr(e)}function Or(e,t){"pending"===e._closedPromiseState?on(e,t):sn(e,t)}function Fr(e,t){"pending"===e._readyPromiseState?dn(e,t):pn(e,t)}function Mr(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Gr(t._writableStreamController)}function jr(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Fr(e,r),Or(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function Ir(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,a=zr(n,t);if(r!==e._ownerWritableStream)return g(tn("write to"));var o=r._state;if("errored"===o)return g(r._storedError);if(_r(r)||"closed"===o)return g(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return g(r._storedError);var i=dr(r);return Hr(n,t,a),i}Object.defineProperties(Pr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),d(Pr.prototype.abort,"abort"),d(Pr.prototype.close,"close"),d(Pr.prototype.releaseLock,"releaseLock"),d(Pr.prototype.write,"write"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Pr.prototype,t.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});var Dr={},Lr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Nr(this))throw Zr("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Nr(this))throw Zr("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Nr(this))throw Zr("error");"writable"===this._controlledWritableStream._state&&Jr(this,e)},e.prototype[E]=function(e){var t=this._abortAlgorithm(e);return Wr(this),t},e.prototype[O]=function(){Ge(this)},e}();function Nr(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Lr}function qr(e,t,r,n,a,o,i,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,Ge(t),t._abortReason=void 0,t._abortController=nr(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=i,t._writeAlgorithm=n,t._closeAlgorithm=a,t._abortAlgorithm=o;var l=Qr(t);xr(e,l),_(m(r()),(function(){return t._started=!0,Vr(t),null}),(function(r){return t._started=!0,hr(e,r),null}))}function Br(e,t,r,n){var a,o,i,s,l=Object.create(Lr.prototype);a=void 0!==t.start?function(){return t.start(l)}:function(){},o=void 0!==t.write?function(e){return t.write(e,l)}:function(){return m(void 0)},i=void 0!==t.close?function(){return t.close()}:function(){return m(void 0)},s=void 0!==t.abort?function(e){return t.abort(e)}:function(){return m(void 0)},qr(e,l,a,o,i,s,r,n)}function Wr(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ur(e){Ue(e,Dr,0),Vr(e)}function zr(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Xr(e,t),1}}function Gr(e){return e._strategyHWM-e._queueTotalSize}function Hr(e,t,r){try{Ue(e,t,r)}catch(t){return void Xr(e,t)}var n=e._controlledWritableStream;_r(n)||"writable"!==n._state||xr(n,Qr(e)),Vr(e)}function Vr(e){var t=e._controlledWritableStream;if(e._started&&void 0===t._inFlightWriteRequest)if("erroring"!==t._state){if(0!==e._queue.length){var r=ze(e);r===Dr?Yr(e):Kr(e,r)}}else vr(t)}function Xr(e,t){"writable"===e._controlledWritableStream._state&&Jr(e,t)}function Yr(e){var t=e._controlledWritableStream;Sr(t),We(e);var r=e._closeAlgorithm();Wr(e),_(r,(function(){return gr(t),null}),(function(e){return br(t,e),null}))}function Kr(e,t){var r=e._controlledWritableStream;Ar(r),_(e._writeAlgorithm(t),(function(){yr(r);var t=r._state;if(We(e),!_r(r)&&"writable"===t){var n=Qr(e);xr(r,n)}return Vr(e),null}),(function(t){return"writable"===r._state&&Wr(e),mr(r,t),null}))}function Qr(e){return Gr(e)<=0}function Jr(e,t){var r=e._controlledWritableStream;Wr(e),pr(r,t)}function $r(e){return new TypeError("WritableStream.prototype.".concat(e," can only be used on a WritableStream"))}function Zr(e){return new TypeError("WritableStreamDefaultController.prototype.".concat(e," can only be used on a WritableStreamDefaultController"))}function en(e){return new TypeError("WritableStreamDefaultWriter.prototype.".concat(e," can only be used on a WritableStreamDefaultWriter"))}function tn(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function rn(e){e._closedPromise=y((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function nn(e,t){rn(e),on(e,t)}function an(e){rn(e),ln(e)}function on(e,t){void 0!==e._closedPromise_reject&&(k(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function sn(e,t){nn(e,t)}function ln(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function un(e){e._readyPromise=y((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function cn(e,t){un(e),dn(e,t)}function fn(e){un(e),vn(e)}function dn(e,t){void 0!==e._readyPromise_reject&&(k(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function hn(e){un(e)}function pn(e,t){cn(e,t)}function vn(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}function yn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==r.g?r.g:void 0}Object.defineProperties(Lr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Lr.prototype,t.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});var mn=yn();function gn(e){if("function"!=typeof e&&"object"!=typeof e)return!1;if("DOMException"!==e.name)return!1;try{return new e,!0}catch(e){return!1}}function bn(){var e=null==mn?void 0:mn.DOMException;return gn(e)?e:void 0}function _n(){var e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return d(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var wn=bn()||_n();function Sn(e,t,r,n,a,o){var i=oe(e),s=or(t);e._disturbed=!0;var l=!1,c=m(void 0);return y((function(f,d){var h;if(void 0!==o){if(h=function(){var r=void 0!==o.reason?o.reason:new wn("Aborted","AbortError"),i=[];n||i.push((function(){return"writable"===t._state?cr(t,r):m(void 0)})),a||i.push((function(){return"readable"===e._state?oa(e,r):m(void 0)})),C((function(){return Promise.all(i.map((function(e){return e()})))}),!0,r)},o.aborted)return void h();o.addEventListener("abort",h)}function p(){return y((function(e,t){function r(n){n?e():b(v(),r,t)}r(!1)}))}function v(){return l?m(!0):b(s._readyPromise,(function(){return y((function(e,t){ve(i,{_chunkSteps:function(t){c=b(Ir(s,t),void 0,u),e(!1)},_closeSteps:function(){return e(!0)},_errorSteps:t})}))}))}if(x(e,i._closedPromise,(function(e){return n?T(!0,e):C((function(){return cr(t,e)}),!0,e),null})),x(t,s._closedPromise,(function(t){return a?T(!0,t):C((function(){return oa(e,t)}),!0,t),null})),P(e,i._closedPromise,(function(){return r?T():C((function(){return Er(s)})),null})),_r(t)||"closed"===t._state){var g=new TypeError("the destination writable stream closed before all data could be piped to it");a?T(!0,g):C((function(){return oa(e,g)}),!0,g)}function A(){var e=c;return b(c,(function(){return e!==c?A():void 0}))}function x(e,t,r){"errored"===e._state?r(e._storedError):S(t,r)}function P(e,t,r){"closed"===e._state?r():w(t,r)}function C(e,r,n){function a(){return _(e(),(function(){return R(r,n)}),(function(e){return R(!0,e)})),null}l||(l=!0,"writable"!==t._state||_r(t)?a():w(A(),a))}function T(e,r){l||(l=!0,"writable"!==t._state||_r(t)?R(e,r):w(A(),(function(){return R(e,r)})))}function R(e,t){return jr(s),L(i),void 0!==o&&o.removeEventListener("abort",h),e?d(t):f(void 0),null}k(p())}))}var An=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!kn(this))throw Dn("desiredSize");return On(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!kn(this))throw Dn("close");if(!Mn(this))throw new TypeError("The stream is not in a state that permits close");Tn(this)},e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!kn(this))throw Dn("enqueue");if(!Mn(this))throw new TypeError("The stream is not in a state that permits enqueue");return Rn(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!kn(this))throw Dn("error");En(this,e)},e.prototype[F]=function(e){Ge(this);var t=this._cancelAlgorithm(e);return Cn(this),t},e.prototype[M]=function(e){var t=this._controlledReadableStream;if(this._queue.length>0){var r=We(this);this._closeRequested&&0===this._queue.length?(Cn(this),ia(t)):xn(this),e._chunkSteps(r)}else ie(t,e),xn(this)},e.prototype[j]=function(){},e}();function kn(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof An}function xn(e){Pn(e)&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,_(e._pullAlgorithm(),(function(){return e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,xn(e)),null}),(function(t){return En(e,t),null}))))}function Pn(e){var t=e._controlledReadableStream;return!!Mn(e)&&!!e._started&&(!!(aa(t)&&le(t)>0)||On(e)>0)}function Cn(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Tn(e){if(Mn(e)){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Cn(e),ia(t))}}function Rn(e,t){if(Mn(e)){var r=e._controlledReadableStream;if(aa(r)&&le(r)>0)se(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw En(e,t),t}try{Ue(e,t,n)}catch(t){throw En(e,t),t}}xn(e)}}function En(e,t){var r=e._controlledReadableStream;"readable"===r._state&&(Ge(e),Cn(e),sa(r,t))}function On(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Fn(e){return!Pn(e)}function Mn(e){var t=e._controlledReadableStream._state;return!e._closeRequested&&"readable"===t}function jn(e,t,r,n,a,o,i){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Ge(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=i,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=a,e._readableStreamController=t,_(m(r()),(function(){return t._started=!0,xn(t),null}),(function(e){return En(t,e),null}))}function In(e,t,r,n){var a,o,i,s=Object.create(An.prototype);a=void 0!==t.start?function(){return t.start(s)}:function(){},o=void 0!==t.pull?function(){return t.pull(s)}:function(){return m(void 0)},i=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)},jn(e,s,a,o,i,r,n)}function Dn(e){return new TypeError("ReadableStreamDefaultController.prototype.".concat(e," can only be used on a ReadableStreamDefaultController"))}function Ln(e,t){return Qe(e._readableStreamController)?qn(e):Nn(e)}function Nn(e,t){var r,n,a,o,i,s=oe(e),l=!1,u=!1,c=!1,f=!1,d=y((function(e){i=e}));function h(){return l?(u=!0,m(void 0)):(l=!0,ve(s,{_chunkSteps:function(e){x((function(){u=!1;var t=e,r=e;c||Rn(a._readableStreamController,t),f||Rn(o._readableStreamController,r),l=!1,u&&h()}))},_closeSteps:function(){l=!1,c||Tn(a._readableStreamController),f||Tn(o._readableStreamController),c&&f||i(void 0)},_errorSteps:function(){l=!1}}),m(void 0))}function p(t){if(c=!0,r=t,f){var a=be([r,n]),o=oa(e,a);i(o)}return d}function v(t){if(f=!0,n=t,c){var a=be([r,n]),o=oa(e,a);i(o)}return d}function g(){}return a=ea(g,h,p),o=ea(g,h,v),S(s._closedPromise,(function(e){return En(a._readableStreamController,e),En(o._readableStreamController,e),c&&f||i(void 0),null})),[a,o]}function qn(e){var t,r,n,a,o,i=oe(e),s=!1,l=!1,u=!1,c=!1,f=!1,d=y((function(e){o=e}));function h(e){S(e._closedPromise,(function(t){return e!==i||(_t(n._readableStreamController,t),_t(a._readableStreamController,t),c&&f||o(void 0)),null}))}function p(){Bt(i)&&(L(i),h(i=oe(e))),ve(i,{_chunkSteps:function(t){x((function(){l=!1,u=!1;var r=t,i=t;if(!c&&!f)try{i=Be(t)}catch(t){return _t(n._readableStreamController,t),_t(a._readableStreamController,t),void o(oa(e,t))}c||bt(n._readableStreamController,r),f||bt(a._readableStreamController,i),s=!1,l?g():u&&b()}))},_closeSteps:function(){s=!1,c||gt(n._readableStreamController),f||gt(a._readableStreamController),n._readableStreamController._pendingPullIntos.length>0&&kt(n._readableStreamController,0),a._readableStreamController._pendingPullIntos.length>0&&kt(a._readableStreamController,0),c&&f||o(void 0)},_errorSteps:function(){s=!1}})}function v(t,r){pe(i)&&(L(i),h(i=jt(e)));var d=r?a:n,p=r?n:a;Wt(i,t,1,{_chunkSteps:function(t){x((function(){l=!1,u=!1;var n=r?f:c;if(r?c:f)n||xt(d._readableStreamController,t);else{var a=void 0;try{a=Be(t)}catch(t){return _t(d._readableStreamController,t),_t(p._readableStreamController,t),void o(oa(e,t))}n||xt(d._readableStreamController,t),bt(p._readableStreamController,a)}s=!1,l?g():u&&b()}))},_closeSteps:function(e){s=!1;var t=r?f:c,n=r?c:f;t||gt(d._readableStreamController),n||gt(p._readableStreamController),void 0!==e&&(t||xt(d._readableStreamController,e),!n&&p._readableStreamController._pendingPullIntos.length>0&&kt(p._readableStreamController,0)),t&&n||o(void 0)},_errorSteps:function(){s=!1}})}function g(){if(s)return l=!0,m(void 0);s=!0;var e=St(n._readableStreamController);return null===e?p():v(e._view,!1),m(void 0)}function b(){if(s)return u=!0,m(void 0);s=!0;var e=St(a._readableStreamController);return null===e?p():v(e._view,!0),m(void 0)}function _(n){if(c=!0,t=n,f){var a=be([t,r]),i=oa(e,a);o(i)}return d}function w(n){if(f=!0,r=n,c){var a=be([t,r]),i=oa(e,a);o(i)}return d}function A(){}return n=ta(A,g,_),a=ta(A,b,w),h(i),[n,a]}function Bn(e){return c(e)&&void 0!==e.getReader}function Wn(e){return Bn(e)?zn(e.getReader()):Un(e)}function Un(e){var t,r=Te(e,"async");function n(){var e;try{e=Re(r)}catch(e){return g(e)}return A(m(e),(function(e){if(!c(e))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(Ee(e))Tn(t._readableStreamController);else{var r=Oe(e);Rn(t._readableStreamController,r)}}))}function a(e){var t,n,a=r.iterator;try{t=ke(a,"return")}catch(e){return g(e)}if(void 0===t)return m(void 0);try{n=P(t,a,[e])}catch(e){return g(e)}return A(m(n),(function(e){if(!c(e))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}))}return t=ea(u,n,a,0)}function zn(e){var t;function r(){var r;try{r=e.read()}catch(e){return g(e)}return A(r,(function(e){if(!c(e))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(e.done)Tn(t._readableStreamController);else{var r=e.value;Rn(t._readableStreamController,r)}}))}function n(t){try{return m(e.cancel(t))}catch(e){return g(e)}}return t=ea(u,r,n,0)}function Gn(e,t){Y(e,t);var r=e,n=null==r?void 0:r.autoAllocateChunkSize,a=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,i=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:ne(n,"".concat(t," has member 'autoAllocateChunkSize' that")),cancel:void 0===a?void 0:Hn(a,r,"".concat(t," has member 'cancel' that")),pull:void 0===o?void 0:Vn(o,r,"".concat(t," has member 'pull' that")),start:void 0===i?void 0:Xn(i,r,"".concat(t," has member 'start' that")),type:void 0===s?void 0:Yn(s,"".concat(t," has member 'type' that"))}}function Hn(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function Vn(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function Xn(e,t,r){return K(e,r),function(r){return P(e,t,[r])}}function Yn(e,t){if("bytes"!==(e="".concat(e)))throw new TypeError("".concat(t," '").concat(e,"' is not a valid enumeration value for ReadableStreamType"));return e}function Kn(e,t){Y(e,t);var r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}function Qn(e,t){Y(e,t);var r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,a=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&Jn(o,"".concat(t," has member 'signal' that")),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(a),signal:o}}function Jn(e,t){if(!tr(e))throw new TypeError("".concat(t," is not an AbortSignal."))}function $n(e,t){Y(e,t);var r=null==e?void 0:e.readable;Z(r,"readable","ReadableWritablePair"),ae(r,"".concat(t," has member 'readable' that"));var n=null==e?void 0:e.writable;return Z(n,"writable","ReadableWritablePair"),er(n,"".concat(t," has member 'writable' that")),{readable:r,writable:n}}Object.defineProperties(An.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),d(An.prototype.close,"close"),d(An.prototype.enqueue,"enqueue"),d(An.prototype.error,"error"),"symbol"==typeof t.toStringTag&&Object.defineProperty(An.prototype,t.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});var Zn=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),void 0===e?e=null:J(e,"First parameter");var r=Xt(t,"Second parameter"),n=Gn(e,"First parameter");if(ra(this),"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");Ct(this,n,Ht(r,0))}else{var a=Vt(r);In(this,n,Ht(r,1),a)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!na(this))throw la("locked");return aa(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(e){return void 0===e&&(e=void 0),na(this)?aa(this)?g(new TypeError("Cannot cancel a stream that already has a reader")):oa(this,e):g(la("cancel"))},e.prototype.getReader=function(e){if(void 0===e&&(e=void 0),!na(this))throw la("getReader");return void 0===Ot(e,"First parameter").mode?oe(this):jt(this)},e.prototype.pipeThrough=function(e,t){if(void 0===t&&(t={}),!na(this))throw la("pipeThrough");$(e,1,"pipeThrough");var r=$n(e,"First parameter"),n=Qn(t,"Second parameter");if(aa(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ur(r.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return k(Sn(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable},e.prototype.pipeTo=function(e,t){if(void 0===t&&(t={}),!na(this))return g(la("pipeTo"));if(void 0===e)return g("Parameter 1 is required in 'pipeTo'.");if(!lr(e))return g(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var r;try{r=Qn(t,"Second parameter")}catch(e){return g(e)}return aa(this)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):ur(e)?g(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Sn(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)},e.prototype.tee=function(){if(!na(this))throw la("tee");return be(Ln(this))},e.prototype.values=function(e){if(void 0===e&&(e=void 0),!na(this))throw la("values");return Ie(this,Kn(e,"First parameter").preventCancel)},e.prototype[Ce]=function(e){return this.values(e)},e.from=function(e){return Wn(e)},e}();function ea(e,t,r,n,a){void 0===n&&(n=1),void 0===a&&(a=function(){return 1});var o=Object.create(Zn.prototype);return ra(o),jn(o,Object.create(An.prototype),e,t,r,n,a),o}function ta(e,t,r){var n=Object.create(Zn.prototype);return ra(n),Pt(n,Object.create(Ke.prototype),e,t,r,0,void 0),n}function ra(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function na(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof Zn}function aa(e){return void 0!==e._reader}function oa(e,t){if(e._disturbed=!0,"closed"===e._state)return m(void 0);if("errored"===e._state)return g(e._storedError);ia(e);var r=e._reader;if(void 0!==r&&Bt(r)){var n=r._readIntoRequests;r._readIntoRequests=new R,n.forEach((function(e){e._closeSteps(void 0)}))}return A(e._readableStreamController[F](t),u)}function ia(e){e._state="closed";var t=e._reader;if(void 0!==t&&(G(t),pe(t))){var r=t._readRequests;t._readRequests=new R,r.forEach((function(e){e._closeSteps()}))}}function sa(e,t){e._state="errored",e._storedError=t;var r=e._reader;void 0!==r&&(U(r,t),pe(r)?me(r,t):zt(r,t))}function la(e){return new TypeError("ReadableStream.prototype.".concat(e," can only be used on a ReadableStream"))}function ua(e,t){Y(e,t);var r=null==e?void 0:e.highWaterMark;return Z(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:ee(r)}}Object.defineProperties(Zn,{from:{enumerable:!0}}),Object.defineProperties(Zn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),d(Zn.from,"from"),d(Zn.prototype.cancel,"cancel"),d(Zn.prototype.getReader,"getReader"),d(Zn.prototype.pipeThrough,"pipeThrough"),d(Zn.prototype.pipeTo,"pipeTo"),d(Zn.prototype.tee,"tee"),d(Zn.prototype.values,"values"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Zn.prototype,t.toStringTag,{value:"ReadableStream",configurable:!0}),Object.defineProperty(Zn.prototype,Ce,{value:Zn.prototype.values,writable:!0,configurable:!0});var ca=function(e){return e.byteLength};d(ca,"size");var fa=function(){function e(e){$(e,1,"ByteLengthQueuingStrategy"),e=ua(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ha(this))throw da("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ha(this))throw da("size");return ca},enumerable:!1,configurable:!0}),e}();function da(e){return new TypeError("ByteLengthQueuingStrategy.prototype.".concat(e," can only be used on a ByteLengthQueuingStrategy"))}function ha(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof fa}Object.defineProperties(fa.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(fa.prototype,t.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});var pa=function(){return 1};d(pa,"size");var va=function(){function e(e){$(e,1,"CountQueuingStrategy"),e=ua(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!ma(this))throw ya("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!ma(this))throw ya("size");return pa},enumerable:!1,configurable:!0}),e}();function ya(e){return new TypeError("CountQueuingStrategy.prototype.".concat(e," can only be used on a CountQueuingStrategy"))}function ma(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof va}function ga(e,t){Y(e,t);var r=null==e?void 0:e.cancel,n=null==e?void 0:e.flush,a=null==e?void 0:e.readableType,o=null==e?void 0:e.start,i=null==e?void 0:e.transform,s=null==e?void 0:e.writableType;return{cancel:void 0===r?void 0:Sa(r,e,"".concat(t," has member 'cancel' that")),flush:void 0===n?void 0:ba(n,e,"".concat(t," has member 'flush' that")),readableType:a,start:void 0===o?void 0:_a(o,e,"".concat(t," has member 'start' that")),transform:void 0===i?void 0:wa(i,e,"".concat(t," has member 'transform' that")),writableType:s}}function ba(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}function _a(e,t,r){return K(e,r),function(r){return P(e,t,[r])}}function wa(e,t,r){return K(e,r),function(r,n){return C(e,t,[r,n])}}function Sa(e,t,r){return K(e,r),function(r){return C(e,t,[r])}}Object.defineProperties(va.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(va.prototype,t.toStringTag,{value:"CountQueuingStrategy",configurable:!0});var Aa=function(){function e(e,t,r){void 0===e&&(e={}),void 0===t&&(t={}),void 0===r&&(r={}),void 0===e&&(e=null);var n=Xt(t,"Second parameter"),a=Xt(r,"Third parameter"),o=ga(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");var i,s=Ht(a,0),l=Vt(a),u=Ht(n,1),c=Vt(n);ka(this,y((function(e){i=e})),u,c,s,l),Ma(this,o),void 0!==o.start?i(o.start(this._transformStreamController)):i(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!xa(this))throw Xa("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!xa(this))throw Xa("writable");return this._writable},enumerable:!1,configurable:!0}),e}();function ka(e,t,r,n,a,o){function i(){return t}function s(t){return qa(e,t)}function l(t){return Ba(e,t)}function u(){return Wa(e)}function c(){return Ua(e)}function f(t){return za(e,t)}e._writable=ir(i,s,u,l,r,n),e._readable=ea(i,c,f,a,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Ra(e,!0),e._transformStreamController=void 0}function xa(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof Aa}function Pa(e,t){En(e._readable._readableStreamController,t),Ca(e,t)}function Ca(e,t){ja(e._transformStreamController),Xr(e._writable._writableStreamController,t),Ta(e)}function Ta(e){e._backpressure&&Ra(e,!1)}function Ra(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=y((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Aa.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof t.toStringTag&&Object.defineProperty(Aa.prototype,t.toStringTag,{value:"TransformStream",configurable:!0});var Ea=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Oa(this))throw Ga("desiredSize");return On(this._controlledTransformStream._readable._readableStreamController)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){if(void 0===e&&(e=void 0),!Oa(this))throw Ga("enqueue");Ia(this,e)},e.prototype.error=function(e){if(void 0===e&&(e=void 0),!Oa(this))throw Ga("error");Da(this,e)},e.prototype.terminate=function(){if(!Oa(this))throw Ga("terminate");Na(this)},e}();function Oa(e){return!!c(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof Ea}function Fa(e,t,r,n,a){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n,t._cancelAlgorithm=a,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Ma(e,t){var r,n,a,o=Object.create(Ea.prototype);r=void 0!==t.transform?function(e){return t.transform(e,o)}:function(e){try{return Ia(o,e),m(void 0)}catch(e){return g(e)}},n=void 0!==t.flush?function(){return t.flush(o)}:function(){return m(void 0)},a=void 0!==t.cancel?function(e){return t.cancel(e)}:function(){return m(void 0)},Fa(e,o,r,n,a)}function ja(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ia(e,t){var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!Mn(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{Rn(n,t)}catch(e){throw Ca(r,e),r._readable._storedError}Fn(n)!==r._backpressure&&Ra(r,!0)}function Da(e,t){Pa(e._controlledTransformStream,t)}function La(e,t){return A(e._transformAlgorithm(t),void 0,(function(t){throw Pa(e._controlledTransformStream,t),t}))}function Na(e){var t=e._controlledTransformStream;Tn(t._readable._readableStreamController),Ca(t,new TypeError("TransformStream terminated"))}function qa(e,t){var r=e._transformStreamController;return e._backpressure?A(e._backpressureChangePromise,(function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return La(r,t)})):La(r,t)}function Ba(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._readable;r._finishPromise=y((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var a=r._cancelAlgorithm(t);return ja(r),_(a,(function(){return"errored"===n._state?Va(r,n._storedError):(En(n._readableStreamController,t),Ha(r)),null}),(function(e){return En(n._readableStreamController,e),Va(r,e),null})),r._finishPromise}function Wa(e){var t=e._transformStreamController;if(void 0!==t._finishPromise)return t._finishPromise;var r=e._readable;t._finishPromise=y((function(e,r){t._finishPromise_resolve=e,t._finishPromise_reject=r}));var n=t._flushAlgorithm();return ja(t),_(n,(function(){return"errored"===r._state?Va(t,r._storedError):(Tn(r._readableStreamController),Ha(t)),null}),(function(e){return En(r._readableStreamController,e),Va(t,e),null})),t._finishPromise}function Ua(e){return Ra(e,!1),e._backpressureChangePromise}function za(e,t){var r=e._transformStreamController;if(void 0!==r._finishPromise)return r._finishPromise;var n=e._writable;r._finishPromise=y((function(e,t){r._finishPromise_resolve=e,r._finishPromise_reject=t}));var a=r._cancelAlgorithm(t);return ja(r),_(a,(function(){return"errored"===n._state?Va(r,n._storedError):(Xr(n._writableStreamController,t),Ta(e),Ha(r)),null}),(function(t){return Xr(n._writableStreamController,t),Ta(e),Va(r,t),null})),r._finishPromise}function Ga(e){return new TypeError("TransformStreamDefaultController.prototype.".concat(e," can only be used on a TransformStreamDefaultController"))}function Ha(e){void 0!==e._finishPromise_resolve&&(e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Va(e,t){void 0!==e._finishPromise_reject&&(k(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0)}function Xa(e){return new TypeError("TransformStream.prototype.".concat(e," can only be used on a TransformStream"))}Object.defineProperties(Ea.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),d(Ea.prototype.enqueue,"enqueue"),d(Ea.prototype.error,"error"),d(Ea.prototype.terminate,"terminate"),"symbol"==typeof t.toStringTag&&Object.defineProperty(Ea.prototype,t.toStringTag,{value:"TransformStreamDefaultController",configurable:!0}),e.ByteLengthQueuingStrategy=fa,e.CountQueuingStrategy=va,e.ReadableByteStreamController=Ke,e.ReadableStream=Zn,e.ReadableStreamBYOBReader=qt,e.ReadableStreamBYOBRequest=Ye,e.ReadableStreamDefaultController=An,e.ReadableStreamDefaultReader=he,e.TransformStream=Aa,e.TransformStreamDefaultController=Ea,e.WritableStream=ar,e.WritableStreamDefaultController=Lr,e.WritableStreamDefaultWriter=Pr}(t)},601:()=>{},767:()=>{},251:()=>{},677:()=>{},543:()=>{},324:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var __webpack_exports__=__webpack_require__(243);return __webpack_exports__})()));
|