UNPKG

pdfviewer

Version:
2 lines 730 kB
!function(e){function t(a){if(r[a])return r[a].exports;var i=r[a]={exports:{},id:a,loaded:!1};e[a].call(i.exports,i,i.exports,t);i.loaded=!0;return i.exports}var r={};t.m=e;t.c=r;t.p="";return t(0)}({0:function(e,t,r){("undefined"!=typeof window?window:{}).pdfjsDistBuildPdfWorker=r(131)},79:function(e,t){function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(u===setTimeout)return setTimeout(e,0);if((u===r||!u)&&setTimeout){u=setTimeout;return setTimeout(e,0)}try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function n(e){if(h===clearTimeout)return clearTimeout(e);if((h===a||!h)&&clearTimeout){h=clearTimeout;return clearTimeout(e)}try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function o(){if(m&&d){m=!1;d.length?g=d.concat(g):p=-1;g.length&&s()}}function s(){if(!m){var e=i(o);m=!0;for(var t=g.length;t;){d=g;g=[];for(;++p<t;)d&&d[p].run();p=-1;t=g.length}d=null;m=!1;n(e)}}function c(e,t){this.fun=e;this.array=t}function l(){}var u,h,f=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:r}catch(e){u=r}try{h="function"==typeof clearTimeout?clearTimeout:a}catch(e){h=a}}();var d,g=[],m=!1,p=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];g.push(new c(e,t));1!==g.length||m||i(s)};c.prototype.run=function(){this.fun.apply(null,this.array)};f.title="browser";f.browser=!0;f.env={};f.argv=[];f.version="";f.versions={};f.on=l;f.addListener=l;f.once=l;f.off=l;f.removeListener=l;f.removeAllListeners=l;f.emit=l;f.prependListener=l;f.prependOnceListener=l;f.listeners=function(e){return[]};f.binding=function(e){throw new Error("process.binding is not supported")};f.cwd=function(){return"/"};f.chdir=function(e){throw new Error("process.chdir is not supported")};f.umask=function(){return 0}},131:function(e,t,r){(function(t,r){!function(t,r){e.exports=r()}(this,function(){return function(e){function t(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};e[a].call(i.exports,i,i.exports,t);i.l=!0;return i.exports}var r={};t.m=e;t.c=r;t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})};t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};t.d(r,"a",r);return r};t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.p="";return t(t.s=72)}([function(e,r,a){"use strict";function i(e){se=e}function n(){return se}function o(e){se>=ie.infos&&console.log("Info: "+e)}function s(e){se>=ie.warnings&&console.log("Warning: "+e)}function c(e){console.log("Deprecated API usage: "+e)}function l(e){throw new Error(e)}function u(e,t){e||l(t)}function h(e,t){try{var r=new URL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}var a=new URL(t,r);return r.origin===a.origin}function f(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function d(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(f(r))return r}catch(e){}return null}function g(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1});return r}function m(e){var t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}}function p(e){if("string"!=typeof e){s("The argument for removeNullCharacters must be a string.");return e}return e.replace(we,"")}function b(e){u(null!==e&&"object"===("undefined"==typeof e?"undefined":X(e))&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);for(var a=[],i=0;i<t;i+=r){var n=Math.min(i+r,t),o=e.subarray(i,n);a.push(String.fromCharCode.apply(null,o))}return a.join("")}function v(e){u("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),a=0;a<t;++a)r[a]=255&e.charCodeAt(a);return r}function y(e){if(void 0!==e.length)return e.length;u(void 0!==e.byteLength);return e.byteLength}function w(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,r,a,i=0,n=e.length;for(t=0;t<n;t++){r=e[t];a=y(r);i+=a}var o=0,s=new Uint8Array(i);for(t=0;t<n;t++){r=e[t];r instanceof Uint8Array||(r="string"==typeof r?v(r):new Uint8Array(r));a=r.byteLength;s.set(r,o);o+=a}return s}function k(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function S(e){for(var t=1,r=0;e>t;){t<<=1;r++}return r}function C(e,t){return e[t]<<24>>24}function x(e,t){return e[t]<<8|e[t+1]}function A(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function P(){var e=new Uint8Array(4);e[0]=1;var t=new Uint32Array(e.buffer,0,1);return 1===t[0]}function _(){try{new Function("");return!0}catch(e){return!1}}function I(e){var t,r=e.length,a=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)a.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));else for(t=0;t<r;++t){var i=xe[e.charCodeAt(t)];a.push(i?String.fromCharCode(i):e.charAt(t))}return a.join("")}function O(e){return decodeURIComponent(escape(e))}function E(e){return unescape(encodeURIComponent(e))}function T(e){for(var t in e)return!1;return!0}function F(e){return"boolean"==typeof e}function R(e){return"number"==typeof e}function B(e){return"string"==typeof e}function M(e){return"object"===("undefined"==typeof e?"undefined":X(e))&&null!==e&&void 0!==e.byteLength}function D(e){return 32===e||9===e||13===e||10===e}function L(){return"object"===("undefined"==typeof t?"undefined":X(t))&&t+""=="[object process]"}function N(){var e={};e.promise=new Promise(function(t,r){e.resolve=t;e.reject=r});return e}function j(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e?new Promise(function(a,i){a(e.apply(r,t))}):Promise.resolve(void 0)}function U(e){if("object"!==("undefined"==typeof e?"undefined":X(e)))return e;switch(e.name){case"AbortException":return new ye(e.message);case"MissingPDFException":return new de(e.message);case"UnexpectedResponseException":return new ge(e.message,e.status);default:return new he(e.message,e.details)}}function q(e){return!(e instanceof Error)||e instanceof ye||e instanceof de||e instanceof ge||e instanceof he?e:new he(e.message,e.toString())}function z(e,t,r){t?e.resolve():e.reject(r)}function H(e){return Promise.resolve(e).catch(function(){})}function G(e,t,r){var a=this;this.sourceName=e;this.targetName=t;this.comObj=r;this.callbackId=1;this.streamId=1;this.postMessageTransfers=!0;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);var i=this.callbacksCapabilities=Object.create(null),n=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.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback "+o);var s=i[o];delete i[o];"error"in t?s.reject(U(t.error)):s.resolve(t.data)}else{if(!(t.action in n))throw new Error("Unknown action from worker: "+t.action);var c=n[t.action];if(t.callbackId){var l=a.sourceName,u=t.sourceName;Promise.resolve().then(function(){return c[0].call(c[1],t.data)}).then(function(e){r.postMessage({sourceName:l,targetName:u,isReply:!0,callbackId:t.callbackId,data:e})},function(e){r.postMessage({sourceName:l,targetName:u,isReply:!0,callbackId:t.callbackId,error:q(e)})})}else t.streamId?a._createStreamSink(t):c[0].call(c[1],t.data)}};r.addEventListener("message",this._onComObjOnMessage)}function W(e,t,r){var a=new Image;a.onload=function(){r.resolve(e,a)};a.onerror=function(){r.resolve(e,null);s("Error during JPEG image loading")};a.src=t}Object.defineProperty(r,"__esModule",{value:!0});r.unreachable=r.warn=r.utf8StringToString=r.stringToUTF8String=r.stringToPDFString=r.stringToBytes=r.string32=r.shadow=r.setVerbosityLevel=r.ReadableStream=r.removeNullCharacters=r.readUint32=r.readUint16=r.readInt8=r.log2=r.loadJpegStream=r.isEvalSupported=r.isLittleEndian=r.createValidAbsoluteUrl=r.isSameOrigin=r.isNodeJS=r.isSpace=r.isString=r.isNum=r.isEmptyObj=r.isBool=r.isArrayBuffer=r.info=r.getVerbosityLevel=r.getLookupTableFactory=r.deprecated=r.createObjectURL=r.createPromiseCapability=r.createBlob=r.bytesToString=r.assert=r.arraysToBytes=r.arrayByteLength=r.FormatError=r.XRefParseException=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.StatTimer=r.PasswordResponses=r.PasswordException=r.PageViewport=r.NotImplementedException=r.NativeImageDecoding=r.MissingPDFException=r.MissingDataException=r.MessageHandler=r.InvalidPDFException=r.AbortException=r.CMapCompressionType=r.ImageKind=r.FontType=r.AnnotationType=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.UNSUPPORTED_FEATURES=r.VERBOSITY_LEVELS=r.OPS=r.IDENTITY_MATRIX=r.FONT_IDENTITY_MATRIX=void 0;var X="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};a(74);var V=a(107),Y=[.001,0,0,.001,0,0],K={NONE:"none",DECODE:"decode",DISPLAY:"display"},J={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},Z={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Q={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},$={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},ee={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},te={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},re={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},ae={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10},ie={errors:0,warnings:1,infos:5},ne={NONE:0,BINARY:1,STREAM:2},oe={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},se=ie.warnings,ce={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},le={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},ue=function(){function e(e,t){this.name="PasswordException";this.message=e;this.code=t}e.prototype=new Error;e.constructor=e;return e}(),he=function(){function e(e,t){this.name="UnknownErrorException";this.message=e;this.details=t}e.prototype=new Error;e.constructor=e;return e}(),fe=function(){function e(e){this.name="InvalidPDFException";this.message=e}e.prototype=new Error;e.constructor=e;return e}(),de=function(){function e(e){this.name="MissingPDFException";this.message=e}e.prototype=new Error;e.constructor=e;return e}(),ge=function(){function e(e,t){this.name="UnexpectedResponseException";this.message=e;this.status=t}e.prototype=new Error;e.constructor=e;return e}(),me=function(){function e(e){this.message=e}e.prototype=new Error;e.prototype.name="NotImplementedException";e.constructor=e;return e}(),pe=function(){function e(e,t){this.begin=e;this.end=t;this.message="Missing data ["+e+", "+t+")"}e.prototype=new Error;e.prototype.name="MissingDataException";e.constructor=e;return e}(),be=function(){function e(e){this.message=e}e.prototype=new Error;e.prototype.name="XRefParseException";e.constructor=e;return e}(),ve=function(){function e(e){this.message=e}e.prototype=new Error;e.prototype.name="FormatError";e.constructor=e;return e}(),ye=function(){function e(e){this.name="AbortException";this.message=e}e.prototype=new Error;e.constructor=e;return e}(),we=/\x00/g,ke=[1,0,0,1,0,0],Se=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];e.makeCssRgb=function(e,r,a){t[1]=e;t[3]=r;t[5]=a;return t.join("")};e.transform=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]]};e.applyTransform=function(e,t){var r=e[0]*t[0]+e[1]*t[2]+t[4],a=e[0]*t[1]+e[1]*t[3]+t[5];return[r,a]};e.applyInverseTransform=function(e,t){var r=t[0]*t[3]-t[1]*t[2],a=(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,i=(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r;return[a,i]};e.getAxialAlignedBoundingBox=function(t,r){var a=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),n=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(a[0],i[0],n[0],o[0]),Math.min(a[1],i[1],n[1],o[1]),Math.max(a[0],i[0],n[0],o[0]),Math.max(a[1],i[1],n[1],o[1])]};e.inverseTransform=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]};e.apply3dTransform=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]]};e.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],a=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],n=e[2]*t[1]+e[3]*t[3],o=(r+n)/2,s=Math.sqrt((r+n)*(r+n)-4*(r*n-i*a))/2,c=o+s||1,l=o-s||1;return[Math.sqrt(c),Math.sqrt(l)]};e.normalizeRect=function(e){var t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t};e.intersect=function(t,r){function a(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(a),n=[t[1],t[3],r[1],r[3]].sort(a),o=[];t=e.normalizeRect(t);r=e.normalizeRect(r);if(!(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0]))return!1;o[0]=i[1];o[2]=i[2];if(!(n[0]===t[1]&&n[1]===r[1]||n[0]===r[1]&&n[1]===t[1]))return!1;o[1]=n[1];o[3]=n[2];return o};var r=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];e.toRoman=function(e,t){u(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var a,i=[];e>=1e3;){e-=1e3;i.push("M")}a=e/100|0;e%=100;i.push(r[a]);a=e/10|0;e%=10;i.push(r[10+a]);i.push(r[20+e]);var n=i.join("");return t?n.toLowerCase():n};e.appendToArray=function(e,t){Array.prototype.push.apply(e,t)};e.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)};e.extendObj=function(e,t){for(var r in t)e[r]=t[r]};e.getInheritableProperty=function(e,t,r){for(;e&&!e.has(t);)e=e.get("Parent");return e?r?e.getArray(t):e.get(t):null};e.inherit=function(e,t,r){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;for(var a in r)e.prototype[a]=r[a]};e.loadScript=function(e,t){var r=document.createElement("script"),a=!1;r.setAttribute("src",e);t&&(r.onload=function(){a||t();a=!0});document.getElementsByTagName("head")[0].appendChild(r)};return e}(),Ce=function(){function e(e,t,r,a,i,n){this.viewBox=e;this.scale=t;this.rotation=r;this.offsetX=a;this.offsetY=i;var o,s,c,l,u=(e[2]+e[0])/2,h=(e[3]+e[1])/2;r%=360;r=r<0?r+360:r;switch(r){case 180:o=-1;s=0;c=0;l=1;break;case 90:o=0;s=1;c=1;l=0;break;case 270:o=0;s=-1;c=-1;l=0;break;default:o=1;s=0;c=0;l=-1}if(n){c=-c;l=-l}var f,d,g,m;if(0===o){f=Math.abs(h-e[1])*t+a;d=Math.abs(u-e[0])*t+i;g=Math.abs(e[3]-e[1])*t;m=Math.abs(e[2]-e[0])*t}else{f=Math.abs(u-e[0])*t+a;d=Math.abs(h-e[1])*t+i;g=Math.abs(e[2]-e[0])*t;m=Math.abs(e[3]-e[1])*t}this.transform=[o*t,s*t,c*t,l*t,f-o*t*u-c*t*h,d-s*t*u-l*t*h];this.width=g;this.height=m;this.fontScale=t}e.prototype={clone:function(t){t=t||{};var r="scale"in t?t.scale:this.scale,a="rotation"in t?t.rotation:this.rotation;return new e(this.viewBox.slice(),r,a,this.offsetX,this.offsetY,t.dontFlip)},convertToViewportPoint:function(e,t){return Se.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=Se.applyTransform([e[0],e[1]],this.transform),r=Se.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]},convertToPdfPoint:function(e,t){return Se.applyInverseTransform([e,t],this.transform)}};return e}(),xe=[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],Ae=function(){function e(e,t,r){for(;e.length<r;)e+=t;return e}function t(){this.started=Object.create(null);this.times=[];this.enabled=!0}t.prototype={time:function(e){if(this.enabled){e in this.started&&s("Timer is already running for "+e);this.started[e]=Date.now()}},timeEnd:function(e){if(this.enabled){e in this.started||s("Timer has not been started for "+e);this.times.push({name:e,start:this.started[e],end:Date.now()});delete this.started[e]}},toString:function(){var t,r,a=this.times,i="",n=0;for(t=0,r=a.length;t<r;++t){var o=a[t].name;o.length>n&&(n=o.length)}for(t=0,r=a.length;t<r;++t){var s=a[t],c=s.end-s.start;i+=e(s.name," ",n)+" "+c+"ms\n"}return i}};return t}(),Pe=function(e,t){if("undefined"!=typeof Blob)return new Blob([e],{type:t});throw new Error('The "Blob" constructor is not supported.')},_e=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,r){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!a&&URL.createObjectURL){var i=Pe(t,r);return URL.createObjectURL(i)}for(var n="data:"+r+";base64,",o=0,s=t.length;o<s;o+=3){var c=255&t[o],l=255&t[o+1],u=255&t[o+2],h=c>>2,f=(3&c)<<4|l>>4,d=o+1<s?(15&l)<<2|u>>6:64,g=o+2<s?63&u:64;n+=e[h]+e[f]+e[d]+e[g]}return n}}();G.prototype={on:function(e,t,r){var a=this.actionHandler;if(a[e])throw new Error('There is already an actionName called "'+e+'"');a[e]=[t,r]},send:function(e,t,r){var a={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(a,r)},sendWithPromise:function(e,t,r){var a=this.callbackId++,i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:a},n=N();this.callbacksCapabilities[a]=n;try{this.postMessage(i,r)}catch(e){n.reject(e)}return n.promise},sendWithStream:function(e,t,r,a){var i=this,n=this.streamId++,o=this.sourceName,s=this.targetName;return new V.ReadableStream({start:function(r){var a=N();i.streamControllers[n]={controller:r,startCall:a,isClosed:!1};i.postMessage({sourceName:o,targetName:s,action:e,streamId:n,data:t,desiredSize:r.desiredSize});return a.promise},pull:function(e){var t=N();i.streamControllers[n].pullCall=t;i.postMessage({sourceName:o,targetName:s,stream:"pull",streamId:n,desiredSize:e.desiredSize});return t.promise},cancel:function(e){var t=N();i.streamControllers[n].cancelCall=t;i.streamControllers[n].isClosed=!0;i.postMessage({sourceName:o,targetName:s,stream:"cancel",reason:e,streamId:n});return t.promise}},r)},_createStreamSink:function(e){var t=this,r=this,a=this.actionHandler[e.action],i=e.streamId,n=e.desiredSize,o=this.sourceName,s=e.sourceName,c=N(),l=function(e){var r=e.stream,a=e.chunk,n=e.transfers,c=e.success,l=e.reason;t.postMessage({sourceName:o,targetName:s,stream:r,streamId:i,chunk:a,success:c,reason:l},n)},u={enqueue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments[2];if(!this.isCancelled){var a=this.desiredSize;this.desiredSize-=t;if(a>0&&this.desiredSize<=0){this.sinkCapability=N();this.ready=this.sinkCapability.promise}l({stream:"enqueue",chunk:e,transfers:r})}},close:function(){if(!this.isCancelled){this.isCancelled=!0;l({stream:"close"});delete r.streamSinks[i]}},error:function(e){if(!this.isCancelled){this.isCancelled=!0;l({stream:"error",reason:e})}},sinkCapability:c,onPull:null,onCancel:null,isCancelled:!1,desiredSize:n,ready:null};u.sinkCapability.resolve();u.ready=u.sinkCapability.promise;this.streamSinks[i]=u;j(a[0],[e.data,u],a[1]).then(function(){l({stream:"start_complete",success:!0})},function(e){l({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,r=this.sourceName,a=e.sourceName,i=e.streamId,n=function(e){var n=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:r,targetName:a,stream:n,success:o,streamId:i,reason:s})},o=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&H(e.promise)})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":z(this.streamControllers[e.streamId].startCall,e.success,U(e.reason));break;case"pull_complete":z(this.streamControllers[e.streamId].pullCall,e.success,U(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){n({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve();this.streamSinks[e.streamId].desiredSize=e.desiredSize;j(this.streamSinks[e.streamId].onPull).then(function(){n({stream:"pull_complete",success:!0})},function(e){n({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":u(this.streamControllers[e.streamId],"enqueue should have stream controller");this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":u(this.streamControllers[e.streamId],"close should have stream controller");if(this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0;this.streamControllers[e.streamId].controller.close();o();break;case"error":u(this.streamControllers[e.streamId],"error should have stream controller");this.streamControllers[e.streamId].controller.error(U(e.reason));o();break;case"cancel_complete":z(this.streamControllers[e.streamId].cancelCall,e.success,U(e.reason));o();break;case"cancel":if(!this.streamSinks[e.streamId])break;j(this.streamSinks[e.streamId].onCancel,[U(e.reason)]).then(function(){n({stream:"cancel_complete",success:!0})},function(e){n({stream:"cancel_complete",success:!1,reason:e})});this.streamSinks[e.streamId].sinkCapability.reject(U(e.reason));this.streamSinks[e.streamId].isCancelled=!0;delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}};r.FONT_IDENTITY_MATRIX=Y;r.IDENTITY_MATRIX=ke;r.OPS=oe;r.VERBOSITY_LEVELS=ie;r.UNSUPPORTED_FEATURES=ce;r.AnnotationBorderStyleType=te;r.AnnotationFieldFlag=ee;r.AnnotationFlag=$;r.AnnotationType=Q;r.FontType=ae;r.ImageKind=Z;r.CMapCompressionType=ne;r.AbortException=ye;r.InvalidPDFException=fe;r.MessageHandler=G;r.MissingDataException=pe;r.MissingPDFException=de;r.NativeImageDecoding=K;r.NotImplementedException=me;r.PageViewport=Ce;r.PasswordException=ue;r.PasswordResponses=le;r.StatTimer=Ae;r.StreamType=re;r.TextRenderingMode=J;r.UnexpectedResponseException=ge;r.UnknownErrorException=he;r.Util=Se;r.XRefParseException=be;r.FormatError=ve;r.arrayByteLength=y;r.arraysToBytes=w;r.assert=u;r.bytesToString=b;r.createBlob=Pe;r.createPromiseCapability=N;r.createObjectURL=_e;r.deprecated=c;r.getLookupTableFactory=m;r.getVerbosityLevel=n;r.info=o;r.isArrayBuffer=M;r.isBool=F;r.isEmptyObj=T;r.isNum=R;r.isString=B;r.isSpace=D;r.isNodeJS=L;r.isSameOrigin=h;r.createValidAbsoluteUrl=d;r.isLittleEndian=P;r.isEvalSupported=_;r.loadJpegStream=W;r.log2=S;r.readInt8=C;r.readUint16=x;r.readUint32=A;r.removeNullCharacters=p;r.ReadableStream=V.ReadableStream;r.setVerbosityLevel=i;r.shadow=g;r.string32=k;r.stringToBytes=v;r.stringToPDFString=I;r.stringToUTF8String=O;r.utf8StringToString=E;r.warn=s;r.unreachable=l},function(e,t,r){"use strict";var a=r(51)("wks"),i=r(14),n=r(3).Symbol,o="function"==typeof n,s=e.exports=function(e){return a[e]||(a[e]=o&&n[e]||(o?n:i)("Symbol."+e))};s.store=a},function(e,t,r){"use strict";function a(e){return e===h}function i(e,t){return e instanceof f&&(void 0===t||e.name===t)}function n(e,t){return e instanceof d&&(void 0===t||e.cmd===t)}function o(e,t){return e instanceof g&&(void 0===t||i(e.get("Type"),t))}function s(e){return e instanceof m}function c(e,t){return e.num===t.num&&e.gen===t.gen}function l(e){return"object"===("undefined"==typeof e?"undefined":u(e))&&null!==e&&void 0!==e.getBytes}Object.defineProperty(t,"__esModule",{value:!0});var u="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},h={},f=function(){function e(e){this.name=e}e.prototype={};var t=Object.create(null);e.get=function(r){var a=t[r];return a?a:t[r]=new e(r)};return e}(),d=function(){function e(e){this.cmd=e}e.prototype={};var t=Object.create(null);e.get=function(r){var a=t[r];return a?a:t[r]=new e(r)};return e}(),g=function(){function e(e){this._map=Object.create(null);this.xref=e;this.objId=null;this.suppressEncryption=!1;this.__nonSerializable__=t}var t=function(){return t};e.prototype={assignXref:function(e){this.xref=e},get:function(e,t,r){var a,i=this.xref,n=this.suppressEncryption;if("undefined"!=typeof(a=this._map[e])||e in this._map||"undefined"==typeof t)return i?i.fetchIfRef(a,n):a;if("undefined"!=typeof(a=this._map[t])||t in this._map||"undefined"==typeof r)return i?i.fetchIfRef(a,n):a;a=this._map[r]||null;return i?i.fetchIfRef(a,n):a},getAsync:function(e,t,r){var a,i=this.xref,n=this.suppressEncryption;if("undefined"!=typeof(a=this._map[e])||e in this._map||"undefined"==typeof t)return i?i.fetchIfRefAsync(a,n):Promise.resolve(a);if("undefined"!=typeof(a=this._map[t])||t in this._map||"undefined"==typeof r)return i?i.fetchIfRefAsync(a,n):Promise.resolve(a);a=this._map[r]||null;return i?i.fetchIfRefAsync(a,n):Promise.resolve(a)},getArray:function(e,t,r){var a=this.get(e,t,r),i=this.xref,n=this.suppressEncryption;if(!Array.isArray(a)||!i)return a;a=a.slice();for(var o=0,c=a.length;o<c;o++)s(a[o])&&(a[o]=i.fetch(a[o],n));return a},getRaw:function(e){return this._map[e]},getKeys:function(){return Object.keys(this._map)},set:function(e,t){this._map[e]=t},has:function(e){return e in this._map},forEach:function(e){for(var t in this._map)e(t,this.get(t))}};e.empty=new e(null);e.merge=function(t,r){for(var a=new e(t),i=0,n=r.length;i<n;i++){var s=r[i];if(o(s))for(var c in s._map)void 0===a._map[c]&&(a._map[c]=s._map[c])}return a};return e}(),m=function(){function e(e,t){this.num=e;this.gen=t}e.prototype={toString:function(){var e=this.num+"R";0!==this.gen&&(e+=this.gen);return e}};return e}(),p=function(){function e(){this.dict=Object.create(null)}e.prototype={has:function(e){return e.toString()in this.dict},put:function(e){this.dict[e.toString()]=!0},remove:function(e){delete this.dict[e.toString()]}};return e}(),b=function(){function e(){this.dict=Object.create(null)}e.prototype={get:function(e){return this.dict[e.toString()]},has:function(e){return e.toString()in this.dict},put:function(e,t){this.dict[e.toString()]=t},putAlias:function(e,t){this.dict[e.toString()]=this.get(t)},forEach:function(e,t){for(var r in this.dict)e.call(t,this.dict[r])},clear:function(){this.dict=Object.create(null)}};return e}();t.EOF=h;t.Cmd=d;t.Dict=g;t.Name=f;t.Ref=m;t.RefSet=p;t.RefSetCache=b;t.isEOF=a;t.isCmd=n;t.isDict=o;t.isName=i;t.isRef=s;t.isRefsEqual=c;t.isStream=l},function(e,t,r){"use strict";var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},function(e,t,r){"use strict";var a="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};e.exports=function(e){return"object"===("undefined"==typeof e?"undefined":a(e))?null!==e:"function"==typeof e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LZWStream=t.StringStream=t.StreamsSequenceStream=t.Stream=t.RunLengthStream=t.PredictorStream=t.NullStream=t.JpxStream=t.JpegStream=t.Jbig2Stream=t.FlateStream=t.DecodeStream=t.DecryptStream=t.CCITTFaxStream=t.AsciiHexStream=t.Ascii85Stream=void 0;var a=r(0),i=r(2),n=r(111),o=r(112),s=r(65),c=function(){function e(e,t,r,a){this.bytes=e instanceof Uint8Array?e:new Uint8Array(e);this.start=t||0;this.pos=this.start;this.end=t+r||this.bytes.length;this.dict=a}e.prototype={get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var e=this.getByte(),t=this.getByte();return e===-1||t===-1?-1:(e<<8)+t},getInt32:function(){var e=this.getByte(),t=this.getByte(),r=this.getByte(),a=this.getByte();return(e<<24)+(t<<16)+(r<<8)+a},getBytes:function(e){var t=this.bytes,r=this.pos,a=this.end;if(!e)return t.subarray(r,a);var i=r+e;i>a&&(i=a);this.pos=i;return t.subarray(r,i)},peekByte:function(){var e=this.getByte();this.pos--;return e},peekBytes:function(e){var t=this.getBytes(e);this.pos-=t.length;return t},skip:function(e){e||(e=1);this.pos+=e},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(t,r,a){return new e(this.bytes.buffer,t,r,a)}};return e}(),l=function(){function e(e){for(var t=e.length,r=new Uint8Array(t),a=0;a<t;++a)r[a]=e.charCodeAt(a);c.call(this,r)}e.prototype=c.prototype;return e}(),u=function(){function e(e){this.pos=0;this.bufferLength=0;this.eof=!1;this.buffer=t;this.minBufferLength=512;if(e)for(;this.minBufferLength<e;)this.minBufferLength*=2}var t=new Uint8Array(0);e.prototype={get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength},ensureBuffer:function(e){var t=this.buffer;if(e<=t.byteLength)return t;for(var r=this.minBufferLength;r<e;)r*=2;var a=new Uint8Array(r);a.set(t);return this.buffer=a},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]},getUint16:function(){var e=this.getByte(),t=this.getByte();return e===-1||t===-1?-1:(e<<8)+t; },getInt32:function(){var e=this.getByte(),t=this.getByte(),r=this.getByte(),a=this.getByte();return(e<<24)+(t<<16)+(r<<8)+a},getBytes:function(e){var t,r=this.pos;if(e){this.ensureBuffer(r+e);t=r+e;for(;!this.eof&&this.bufferLength<t;)this.readBlock();var a=this.bufferLength;t>a&&(t=a)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}this.pos=t;return this.buffer.subarray(r,t)},peekByte:function(){var e=this.getByte();this.pos--;return e},peekBytes:function(e){var t=this.getBytes(e);this.pos-=t.length;return t},makeSubStream:function(e,t,r){for(var a=e+t;this.bufferLength<=a&&!this.eof;)this.readBlock();return new c(this.buffer,e,t,r)},skip:function(e){e||(e=1);this.pos+=e},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}};return e}(),h=function(){function e(e){this.streams=e;u.call(this,null)}e.prototype=Object.create(u.prototype);e.prototype.readBlock=function(){var e=this.streams;if(0!==e.length){var t=e.shift(),r=t.getBytes(),a=this.bufferLength,i=a+r.length,n=this.ensureBuffer(i);n.set(r,a);this.bufferLength=i}else this.eof=!0};e.prototype.getBaseStreams=function(){for(var e=[],t=0,r=this.streams.length;t<r;t++){var i=this.streams[t];i.getBaseStreams&&a.Util.appendToArray(e,i.getBaseStreams())}return e};return e}(),f=function(){function e(e,t){this.str=e;this.dict=e.dict;var r=e.getByte(),i=e.getByte();if(r===-1||i===-1)throw new a.FormatError("Invalid header in flate stream: "+r+", "+i);if(8!==(15&r))throw new a.FormatError("Unknown compression method in flate stream: "+r+", "+i);if(((r<<8)+i)%31!==0)throw new a.FormatError("Bad FCHECK in flate stream: "+r+", "+i);if(32&i)throw new a.FormatError("FDICT bit set in flate stream: "+r+", "+i);this.codeSize=0;this.codeBuf=0;u.call(this,t)}var t=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),i=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),n=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],o=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];e.prototype=Object.create(u.prototype);e.prototype.getBits=function(e){for(var t,r=this.str,i=this.codeSize,n=this.codeBuf;i<e;){if((t=r.getByte())===-1)throw new a.FormatError("Bad encoding in flate stream");n|=t<<i;i+=8}t=n&(1<<e)-1;this.codeBuf=n>>e;this.codeSize=i-=e;return t};e.prototype.getCode=function(e){for(var t,r=this.str,i=e[0],n=e[1],o=this.codeSize,s=this.codeBuf;o<n&&(t=r.getByte())!==-1;){s|=t<<o;o+=8}var c=i[s&(1<<n)-1],l=c>>16,u=65535&c;if(l<1||o<l)throw new a.FormatError("Bad encoding in flate stream");this.codeBuf=s>>l;this.codeSize=o-l;return u};e.prototype.generateHuffmanTable=function(e){var t,r=e.length,a=0;for(t=0;t<r;++t)e[t]>a&&(a=e[t]);for(var i=1<<a,n=new Int32Array(i),o=1,s=0,c=2;o<=a;++o,s<<=1,c<<=1)for(var l=0;l<r;++l)if(e[l]===o){var u=0,h=s;for(t=0;t<o;++t){u=u<<1|1&h;h>>=1}for(t=u;t<i;t+=c)n[t]=o<<16|l;++s}return[n,a]};e.prototype.readBlock=function(){var e,s,c=this.str,l=this.getBits(3);1&l&&(this.eof=!0);l>>=1;if(0!==l){var u,h;if(1===l){u=n;h=o}else{if(2!==l)throw new a.FormatError("Unknown block type in flate stream");var f,d=this.getBits(5)+257,g=this.getBits(5)+1,m=this.getBits(4)+4,p=new Uint8Array(t.length);for(f=0;f<m;++f)p[t[f]]=this.getBits(3);var b=this.generateHuffmanTable(p);s=0;f=0;for(var v,y,w,k=d+g,S=new Uint8Array(k);f<k;){var C=this.getCode(b);if(16===C){v=2;y=3;w=s}else if(17===C){v=3;y=3;w=s=0}else{if(18!==C){S[f++]=s=C;continue}v=7;y=11;w=s=0}for(var x=this.getBits(v)+y;x-- >0;)S[f++]=w}u=this.generateHuffmanTable(S.subarray(0,d));h=this.generateHuffmanTable(S.subarray(d,k))}e=this.buffer;for(var A=e?e.length:0,P=this.bufferLength;;){var _=this.getCode(u);if(_<256){if(P+1>=A){e=this.ensureBuffer(P+1);A=e.length}e[P++]=_}else{if(256===_){this.bufferLength=P;return}_-=257;_=r[_];var I=_>>16;I>0&&(I=this.getBits(I));s=(65535&_)+I;_=this.getCode(h);_=i[_];I=_>>16;I>0&&(I=this.getBits(I));var O=(65535&_)+I;if(P+s>=A){e=this.ensureBuffer(P+s);A=e.length}for(var E=0;E<s;++E,++P)e[P]=e[P-O]}}}else{var T;if((T=c.getByte())===-1)throw new a.FormatError("Bad block header in flate stream");var F=T;if((T=c.getByte())===-1)throw new a.FormatError("Bad block header in flate stream");F|=T<<8;if((T=c.getByte())===-1)throw new a.FormatError("Bad block header in flate stream");var R=T;if((T=c.getByte())===-1)throw new a.FormatError("Bad block header in flate stream");R|=T<<8;if(R!==(65535&~F)&&(0!==F||0!==R))throw new a.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;var B=this.bufferLength;e=this.ensureBuffer(B+F);var M=B+F;this.bufferLength=M;if(0===F)c.peekByte()===-1&&(this.eof=!0);else for(var D=B;D<M;++D){if((T=c.getByte())===-1){this.eof=!0;break}e[D]=T}}};return e}(),d=function(){function e(e,t,r){if(!(0,i.isDict)(r))return e;var n=this.predictor=r.get("Predictor")||1;if(n<=1)return e;if(2!==n&&(n<10||n>15))throw new a.FormatError("Unsupported predictor: "+n);2===n?this.readBlock=this.readBlockTiff:this.readBlock=this.readBlockPng;this.str=e;this.dict=e.dict;var o=this.colors=r.get("Colors")||1,s=this.bits=r.get("BitsPerComponent")||8,c=this.columns=r.get("Columns")||1;this.pixBytes=o*s+7>>3;this.rowBytes=c*o*s+7>>3;u.call(this,t);return this}e.prototype=Object.create(u.prototype);e.prototype.readBlockTiff=function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),a=this.bits,i=this.colors,n=this.str.getBytes(e);this.eof=!n.length;if(!this.eof){var o,s=0,c=0,l=0,u=0,h=t;if(1===a&&1===i)for(o=0;o<e;++o){var f=n[o]^s;f^=f>>1;f^=f>>2;f^=f>>4;s=(1&f)<<7;r[h++]=f}else if(8===a){for(o=0;o<i;++o)r[h++]=n[o];for(;o<e;++o){r[h]=r[h-i]+n[o];h++}}else if(16===a){var d=2*i;for(o=0;o<d;++o)r[h++]=n[o];for(;o<e;o+=2){var g=((255&n[o])<<8)+(255&n[o+1])+((255&r[h-d])<<8)+(255&r[h-d+1]);r[h++]=g>>8&255;r[h++]=255&g}}else{var m=new Uint8Array(i+1),p=(1<<a)-1,b=0,v=t,y=this.columns;for(o=0;o<y;++o)for(var w=0;w<i;++w){if(l<a){s=s<<8|255&n[b++];l+=8}m[w]=m[w]+(s>>l-a)&p;l-=a;c=c<<a|m[w];u+=a;if(u>=8){r[v++]=c>>u-8&255;u-=8}}u>0&&(r[v++]=(c<<8-u)+(s&(1<<8-u)-1))}this.bufferLength+=e}};e.prototype.readBlockPng=function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),i=this.str.getBytes(e);this.eof=!i.length;if(!this.eof){var n=this.bufferLength,o=this.ensureBuffer(n+e),s=o.subarray(n-e,n);0===s.length&&(s=new Uint8Array(e));var c,l,u,h=n;switch(r){case 0:for(c=0;c<e;++c)o[h++]=i[c];break;case 1:for(c=0;c<t;++c)o[h++]=i[c];for(;c<e;++c){o[h]=o[h-t]+i[c]&255;h++}break;case 2:for(c=0;c<e;++c)o[h++]=s[c]+i[c]&255;break;case 3:for(c=0;c<t;++c)o[h++]=(s[c]>>1)+i[c];for(;c<e;++c){o[h]=(s[c]+o[h-t]>>1)+i[c]&255;h++}break;case 4:for(c=0;c<t;++c){l=s[c];u=i[c];o[h++]=l+u}for(;c<e;++c){l=s[c];var f=s[c-t],d=o[h-t],g=d+l-f,m=g-d;m<0&&(m=-m);var p=g-l;p<0&&(p=-p);var b=g-f;b<0&&(b=-b);u=i[c];m<=p&&m<=b?o[h++]=d+u:p<=b?o[h++]=l+u:o[h++]=f+u}break;default:throw new a.FormatError("Unsupported predictor: "+r)}this.bufferLength+=e}};return e}(),g=function(){function e(e,t,r,a){for(var i;(i=e.getByte())!==-1;)if(255===i){e.skip(-1);break}this.stream=e;this.maybeLength=t;this.dict=r;this.params=a;u.call(this,t)}e.prototype=Object.create(u.prototype);Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0});e.prototype.ensureBuffer=function(e){if(!this.bufferLength){var t=new o.JpegImage,r=this.dict.getArray("Decode","D");if(this.forceRGB&&Array.isArray(r)){for(var a=this.dict.get("BitsPerComponent")||8,n=r.length,s=new Int32Array(n),c=!1,l=(1<<a)-1,u=0;u<n;u+=2){s[u]=256*(r[u+1]-r[u])|0;s[u+1]=r[u]*l|0;256===s[u]&&0===s[u+1]||(c=!0)}c&&(t.decodeTransform=s)}if((0,i.isDict)(this.params)){var h=this.params.get("ColorTransform");Number.isInteger(h)&&(t.colorTransform=h)}t.parse(this.bytes);var f=t.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=f;this.bufferLength=f.length;this.eof=!0}};e.prototype.getBytes=function(e){this.ensureBuffer();return this.buffer};e.prototype.getIR=function(e){return(0,a.createObjectURL)(this.bytes,"image/jpeg",e)};return e}(),m=function(){function e(e,t,r,a){this.stream=e;this.maybeLength=t;this.dict=r;this.params=a;u.call(this,t)}e.prototype=Object.create(u.prototype);Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0});e.prototype.ensureBuffer=function(e){if(!this.bufferLength){var t=new s.JpxImage;t.parse(this.bytes);var r=t.width,a=t.height,i=t.componentsCount,n=t.tiles.length;if(1===n)this.buffer=t.tiles[0].items;else{for(var o=new Uint8ClampedArray(r*a*i),c=0;c<n;c++)for(var l=t.tiles[c],u=l.width,h=l.height,f=l.left,d=l.top,g=l.items,m=0,p=(r*d+f)*i,b=r*i,v=u*i,y=0;y<h;y++){var w=g.subarray(m,m+v);o.set(w,p);m+=v;p+=b}this.buffer=o}this.bufferLength=this.buffer.length;this.eof=!0}};return e}(),p=function(){function e(e,t,r,a){this.stream=e;this.maybeLength=t;this.dict=r;this.params=a;u.call(this,t)}e.prototype=Object.create(u.prototype);Object.defineProperty(e.prototype,"bytes",{get:function(){return(0,a.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0});e.prototype.ensureBuffer=function(e){if(!this.bufferLength){var t=new n.Jbig2Image,r=[];if((0,i.isDict)(this.params)){var a=this.params.get("JBIG2Globals");if((0,i.isStream)(a)){var o=a.getBytes();r.push({data:o,start:0,end:o.length})}}r.push({data:this.bytes,start:0,end:this.bytes.length});for(var s=t.parseChunks(r),c=s.length,l=0;l<c;l++)s[l]^=255;this.buffer=s;this.bufferLength=c;this.eof=!0}};return e}(),b=function(){function e(e,t,r){this.str=e;this.dict=e.dict;this.decrypt=r;this.nextChunk=null;this.initialized=!1;u.call(this,t)}var t=512;e.prototype=Object.create(u.prototype);e.prototype.readBlock=function(){var e;if(this.initialized)e=this.nextChunk;else{e=this.str.getBytes(t);this.initialized=!0}if(e&&0!==e.length){this.nextChunk=this.str.getBytes(t);var r=this.nextChunk&&this.nextChunk.length>0,a=this.decrypt;e=a(e,!r);var i,n=this.bufferLength,o=e.length,s=this.ensureBuffer(n+o);for(i=0;i<o;i++)s[n++]=e[i];this.bufferLength=n}else this.eof=!0};return e}(),v=function(){function e(e,t){this.str=e;this.dict=e.dict;this.input=new Uint8Array(5);t&&(t*=.8);u.call(this,t)}e.prototype=Object.create(u.prototype);e.prototype.readBlock=function(){for(var e=126,t=122,r=-1,i=this.str,n=i.getByte();(0,a.isSpace)(n);)n=i.getByte();if(n!==r&&n!==e){var o,s,c=this.bufferLength;if(n===t){o=this.ensureBuffer(c+4);for(s=0;s<4;++s)o[c+s]=0;this.bufferLength+=4}else{var l=this.input;l[0]=n;for(s=1;s<5;++s){n=i.getByte();for(;(0,a.isSpace)(n);)n=i.getByte();l[s]=n;if(n===r||n===e)break}o=this.ensureBuffer(c+s-1);this.bufferLength+=s-1;if(s<5){for(;s<5;++s)l[s]=117;this.eof=!0}var u=0;for(s=0;s<5;++s)u=85*u+(l[s]-33);for(s=3;s>=0;--s){o[c+s]=255&u;u>>=8}}}else this.eof=!0};return e}(),y=function(){function e(e,t){this.str=e;this.dict=e.dict;this.firstDigit=-1;t&&(t*=.5);u.call(this,t)}e.prototype=Object.create(u.prototype);e.prototype.readBlock=function(){var e=8e3,t=this.str.getBytes(e);if(t.length){for(var r=t.length+1>>1,a=this.ensureBuffer(this.bufferLength+r),i=this.bufferLength,n=this.firstDigit,o=0,s=t.length;o<s;o++){var c,l=t[o];if(l>=48&&l<=57)c=15&l;else{if(!(l>=65&&l<=70||l>=97&&l<=102)){if(62===l){this.eof=!0;break}continue}c=(15&l)+9}if(n<0)n=c;else{a[i++]=n<<4|c;n=-1}}if(n>=0&&this.eof){a[i++]=n<<4;n=-1}this.firstDigit=n;this.bufferLength=i}else this.eof=!0};return e}(),w=function(){function e(e,t){this.str=e;this.dict=e.dict;u.call(this,t)}e.prototype=Object.create(u.prototype);e.prototype.readBlock=function(){var e=this.str.getBytes(2);if(!e||e.length<2||128===e[0])this.eof=!0;else{var t,r=this.bufferLength,a=e[0];if(a<128){t=this.ensureBuffer(r+a+1);t[r++]=e[1];if(a>0){var i=this.str.getBytes(a);t.set(i,r);r+=a}}else{a=257-a;var n=e[1];t=this.ensureBuffer(r+a+1);for(var o=0;o<a;o++)t[r++]=n}this.bufferLength=r}};return e}(),k=function(){function e(e,t,r){this.str=e;this.dict=e.dict;(0,i.isDict)(r)||(r=i.Dict.empty);this.encoding=r.get("K")||0;this.eoline=r.get("EndOfLine")||!1;this.byteAlign=r.get("EncodedByteAlign")||!1;this.columns=r.get("Columns")||1728;this.rows=r.get("Rows")||0;var a=r.get("EndOfBlock");null!==a&&void 0!==a||(a=!0);this.eoblock=a;this.black=r.get("BlackIs1")||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;for(var n;0===(n=this.lookBits(12));)this.eatBits(1);1===n&&this.eatBits(12);if(this.encoding>0){this.nextLine2D=!this.lookBits(1);this.eatBits(1)}u.call(this,t)}var t=-2,r=-1,n=0,o=1,s=2,c=3,l=4,h=5,f=6,d=7,g=8,m=[[-1,-1],[-1,-1],[7,g],[7,d],[6,f],[6,f],[6,h],[6,h],[4,n],[4,n],[4,n],[4,n],[4,n],[4,n],[4,n],[4,n],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,l],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[3,c],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s],[1,s]],p=[[-1,-1],[12,t],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],b=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,