UNPKG

unserver-unify

Version:

1 lines 607 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=t():e["pdfjs-dist/build/pdf.worker"]=e.pdfjsDistBuildPdfWorker=t()}(this,function(){return function(e){function t(r){if(a[r])return a[r].exports;var i=a[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var a={};return t.m=e,t.c=a,t.i=function(e){return e},t.d=function(e,a,r){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=37)}([function(e,t,a){"use strict";(function(e){function r(e){I>=x.warnings&&console.log("Warning: "+e)}function i(e){throw I>=x.errors&&(console.log("Error: "+e),console.log(n())),new Error(e)}function n(){try{throw new Error}catch(e){return e.stack?e.stack.split("\n").slice(2).join("\n"):""}}function s(e,t){e||i(t)}function o(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function c(e){s("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,a=new Uint8Array(t),r=0;r<t;++r)a[r]=255&e.charCodeAt(r);return a}function l(e){return void 0!==e.length?e.length:(s(void 0!==e.byteLength),e.byteLength)}function h(e){return"number"==typeof e&&(0|e)===e}function u(){var e={};return e.promise=new Promise(function(t,a){e.resolve=t,e.reject=a}),e}function f(e,t,a){this.sourceName=e,this.targetName=t,this.comObj=a,this.callbackIndex=1,this.postMessageTransfers=!0;var r=this.callbacksCapabilities=Object.create(null),n=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===this.sourceName)if(t.isReply){var s=t.callbackId;if(t.callbackId in r){var o=r[s];delete r[s],"error"in t?o.reject(t.error):o.resolve(t.data)}else i("Cannot resolve callback "+s)}else if(t.action in n){var c=n[t.action];if(t.callbackId){var l=this.sourceName,h=t.sourceName;Promise.resolve().then(function(){return c[0].call(c[1],t.data)}).then(function(e){a.postMessage({sourceName:l,targetName:h,isReply:!0,callbackId:t.callbackId,data:e})},function(e){e instanceof Error&&(e+=""),a.postMessage({sourceName:l,targetName:h,isReply:!0,callbackId:t.callbackId,error:e})})}else c[0].call(c[1],t.data)}else i("Unknown action from worker: "+t.action)}.bind(this),a.addEventListener("message",this._onComObjOnMessage)}a(36);var d="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:void 0,g=[.001,0,0,.001,0,0],p={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},m={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},b={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},v={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},y={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},k={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},w={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},C={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10},x={errors:0,warnings:1,infos:5},S={NONE:0,BINARY:1,STREAM:2},A={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},I=x.warnings,B={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},R={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},T=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}(),O=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}(),P=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),M=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),E=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}(),L=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="NotImplementedException",e.constructor=e,e}(),D=function(){function e(e,t){this.begin=e,this.end=t,this.message="Missing data ["+e+", "+t+")"}return e.prototype=new Error,e.prototype.name="MissingDataException",e.constructor=e,e}(),F=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="XRefParseException",e.constructor=e,e}(),q=/\x00/g,U=function(){function e(e,t){this.buffer=e,this.byteLength=e.length,this.length=void 0===t?this.byteLength>>2:t,a(this.length)}function t(e){return{get:function(){var t=this.buffer,a=e<<2;return(t[a]|t[a+1]<<8|t[a+2]<<16|t[a+3]<<24)>>>0},set:function(t){var a=this.buffer,r=e<<2;a[r]=255&t,a[r+1]=t>>8&255,a[r+2]=t>>16&255,a[r+3]=t>>>24&255}}}function a(a){for(;r<a;)Object.defineProperty(e.prototype,r,t(r)),r++}e.prototype=Object.create(null);var r=0;return e}();t.Uint32ArrayView=U;var N=[1,0,0,1,0,0],j=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];e.makeCssRgb=function(e,a,r){return t[1]=e,t[3]=a,t[5]=r,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){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]},e.applyInverseTransform=function(e,t){var a=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])/a,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/a]},e.getAxialAlignedBoundingBox=function(t,a){var r=e.applyTransform(t,a),i=e.applyTransform(t.slice(2,4),a),n=e.applyTransform([t[0],t[3]],a),s=e.applyTransform([t[2],t[1]],a);return[Math.min(r[0],i[0],n[0],s[0]),Math.min(r[1],i[1],n[1],s[1]),Math.max(r[0],i[0],n[0],s[0]),Math.max(r[1],i[1],n[1],s[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]],a=e[0]*t[0]+e[1]*t[2],r=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],s=(a+n)/2,o=Math.sqrt((a+n)*(a+n)-4*(a*n-i*r))/2,c=s+o||1,l=s-o||1;return[Math.sqrt(c),Math.sqrt(l)]},e.normalizeRect=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},e.intersect=function(t,a){function r(e,t){return e-t}var i=[t[0],t[2],a[0],a[2]].sort(r),n=[t[1],t[3],a[1],a[3]].sort(r),s=[];return t=e.normalizeRect(t),a=e.normalizeRect(a),(i[0]===t[0]&&i[1]===a[0]||i[0]===a[0]&&i[1]===t[0])&&(s[0]=i[1],s[2]=i[2],(n[0]===t[1]&&n[1]===a[1]||n[0]===a[1]&&n[1]===t[1])&&(s[1]=n[1],s[3]=n[2],s))},e.sign=function(e){return e<0?-1:1};var a=["","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"];return e.toRoman=function(e,t){s(h(e)&&e>0,"The number should be a positive integer.");for(var r,i=[];e>=1e3;)e-=1e3,i.push("M");r=e/100|0,e%=100,i.push(a[r]),r=e/10|0,e%=10,i.push(a[10+r]),i.push(a[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 a in t)e[a]=t[a]},e.getInheritableProperty=function(e,t,a){for(;e&&!e.has(t);)e=e.get("Parent");return e?a?e.getArray(t):e.get(t):null},e.inherit=function(e,t,a){e.prototype=Object.create(t.prototype),e.prototype.constructor=e;for(var r in a)e.prototype[r]=a[r]},e.loadScript=function(e,t){var a=document.createElement("script"),r=!1;a.setAttribute("src",e),t&&(a.onload=function(){r||t(),r=!0}),document.getElementsByTagName("head")[0].appendChild(a)},e}(),_=function(){function e(e,t,a,r,i,n){this.viewBox=e,this.scale=t,this.rotation=a,this.offsetX=r,this.offsetY=i;var s,o,c,l,h=(e[2]+e[0])/2,u=(e[3]+e[1])/2;switch(a%=360,a=a<0?a+360:a){case 180:s=-1,o=0,c=0,l=1;break;case 90:s=0,o=1,c=1,l=0;break;case 270:s=0,o=-1,c=-1,l=0;break;default:s=1,o=0,c=0,l=-1}n&&(c=-c,l=-l);var f,d,g,p;0===s?(f=Math.abs(u-e[1])*t+r,d=Math.abs(h-e[0])*t+i,g=Math.abs(e[3]-e[1])*t,p=Math.abs(e[2]-e[0])*t):(f=Math.abs(h-e[0])*t+r,d=Math.abs(u-e[1])*t+i,g=Math.abs(e[2]-e[0])*t,p=Math.abs(e[3]-e[1])*t),this.transform=[s*t,o*t,c*t,l*t,f-s*t*h-c*t*u,d-o*t*h-l*t*u],this.width=g,this.height=p,this.fontScale=t}return e.prototype={clone:function(t){var a="scale"in(t=t||{})?t.scale:this.scale,r="rotation"in t?t.rotation:this.rotation;return new e(this.viewBox.slice(),a,r,this.offsetX,this.offsetY,t.dontFlip)},convertToViewportPoint:function(e,t){return j.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=j.applyTransform([e[0],e[1]],this.transform),a=j.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],a[0],a[1]]},convertToPdfPoint:function(e,t){return j.applyInverseTransform([e,t],this.transform)}},e}(),z=[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],H=function(){function e(e,t,a){for(;e.length<a;)e+=t;return e}function t(){this.started=Object.create(null),this.times=[],this.enabled=!0}return t.prototype={time:function(e){this.enabled&&(e in this.started&&r("Timer is already running for "+e),this.started[e]=Date.now())},timeEnd:function(e){this.enabled&&(e in this.started||r("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,a,r=this.times,i="",n=0;for(t=0,a=r.length;t<a;++t){var s=r[t].name;s.length>n&&(n=s.length)}for(t=0,a=r.length;t<a;++t){var o=r[t],c=o.end-o.start;i+=e(o.name," ",n)+" "+c+"ms\n"}return i}},t}(),G=function(e,t){if("undefined"!=typeof Blob)return new Blob([e],{type:t});r('The "Blob" constructor is not supported.')},X=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,a,r){if(!r&&"undefined"!=typeof URL&&URL.createObjectURL){var i=G(t,a);return URL.createObjectURL(i)}for(var n="data:"+a+";base64,",s=0,o=t.length;s<o;s+=3){var c=255&t[s],l=255&t[s+1],h=255&t[s+2],u=c>>2,f=(3&c)<<4|l>>4,d=s+1<o?(15&l)<<2|h>>6:64,g=s+2<o?63&h:64;n+=e[u]+e[f]+e[d]+e[g]}return n}}();f.prototype={on:function(e,t,a){var r=this.actionHandler;r[e]&&i('There is already an actionName called "'+e+'"'),r[e]=[t,a]},send:function(e,t,a){var r={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(r,a)},sendWithPromise:function(e,t,a){var r=this.callbackIndex++,i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:r},n=u();this.callbacksCapabilities[r]=n;try{this.postMessage(i,a)}catch(e){n.reject(e)}return n.promise},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},t.FONT_IDENTITY_MATRIX=g,t.IDENTITY_MATRIX=N,t.OPS=A,t.VERBOSITY_LEVELS=x,t.UNSUPPORTED_FEATURES=B,t.AnnotationBorderStyleType=k,t.AnnotationFieldFlag=y,t.AnnotationFlag=v,t.AnnotationType=b,t.FontType=C,t.ImageKind=m,t.CMapCompressionType=S,t.InvalidPDFException=P,t.MessageHandler=f,t.MissingDataException=D,t.MissingPDFException=M,t.NotImplementedException=L,t.PageViewport=_,t.PasswordException=T,t.PasswordResponses=R,t.StatTimer=H,t.StreamType=w,t.TextRenderingMode=p,t.UnexpectedResponseException=E,t.UnknownErrorException=O,t.Util=j,t.XRefParseException=F,t.arrayByteLength=l,t.arraysToBytes=function(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,a,r,i=0,n=e.length;for(t=0;t<n;t++)i+=r=l(a=e[t]);var s=0,o=new Uint8Array(i);for(t=0;t<n;t++)(a=e[t])instanceof Uint8Array||(a="string"==typeof a?c(a):new Uint8Array(a)),r=a.byteLength,o.set(a,s),s+=r;return o},t.assert=s,t.bytesToString=function(e){s(null!==e&&"object"==typeof e&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var a=[],r=0;r<t;r+=8192){var i=Math.min(r+8192,t),n=e.subarray(r,i);a.push(String.fromCharCode.apply(null,n))}return a.join("")},t.createBlob=G,t.createPromiseCapability=u,t.createObjectURL=X,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.error=i,t.getLookupTableFactory=function(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}},t.getVerbosityLevel=function(){return I},t.globalScope=d,t.info=function(e){I>=x.infos&&console.log("Info: "+e)},t.isArray=function(e){return e instanceof Array},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isInt=h,t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSpace=function(e){return 32===e||9===e||13===e||10===e},t.isNodeJS=function(){return"undefined"==typeof __pdfjsdev_webpack__&&"object"==typeof process&&process+""=="[object process]"},t.isSameOrigin=function(e,t){try{var a=new URL(e);if(!a.origin||"null"===a.origin)return!1}catch(e){return!1}var r=new URL(t,a);return a.origin===r.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var a=t?new URL(e,t):new URL(e);if(o(a))return a}catch(e){}return null},t.isLittleEndian=function(){var e=new Uint8Array(2);return e[0]=1,1===new Uint16Array(e.buffer)[0]},t.isEvalSupported=function(){try{return new Function(""),!0}catch(e){return!1}},t.loadJpegStream=function(e,t,a){var i=new Image;i.onload=function(){a.resolve(e,i)},i.onerror=function(){a.resolve(e,null),r("Error during JPEG image loading")},i.src=t},t.log2=function(e){for(var t=1,a=0;e>t;)t<<=1,a++;return a},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.removeNullCharacters=function(e){return"string"!=typeof e?(r("The argument for removeNullCharacters must be a string."),e):e.replace(q,"")},t.setVerbosityLevel=function(e){I=e},t.shadow=function(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!1}),a},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,a=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<a;t+=2)r.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));else for(t=0;t<a;++t){var i=z[e.charCodeAt(t)];r.push(i?String.fromCharCode(i):e.charAt(t))}return r.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=r}).call(t,a(9))},function(e,t,a){"use strict";function r(e,t){return e instanceof c&&(void 0===t||e.name===t)}function i(e,t){return e instanceof h&&(void 0===t||r(e.get("Type"),t))}function n(e){return e instanceof u}var s=a(0).isArray,o={},c=function(){function e(e){this.name=e}e.prototype={};var t=Object.create(null);return e.get=function(a){var r=t[a];return r||(t[a]=new e(a))},e}(),l=function(){function e(e){this.cmd=e}e.prototype={};var t=Object.create(null);return e.get=function(a){var r=t[a];return r||(t[a]=new e(a))},e}(),h=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};return e.prototype={assignXref:function(e){this.xref=e},get:function(e,t,a){var r,i=this.xref,n=this.suppressEncryption;return void 0!==(r=this.map[e])||e in this.map||void 0===t?i?i.fetchIfRef(r,n):r:void 0!==(r=this.map[t])||t in this.map||void 0===a?i?i.fetchIfRef(r,n):r:(r=this.map[a]||null,i?i.fetchIfRef(r,n):r)},getAsync:function(e,t,a){var r,i=this.xref,n=this.suppressEncryption;return void 0!==(r=this.map[e])||e in this.map||void 0===t?i?i.fetchIfRefAsync(r,n):Promise.resolve(r):void 0!==(r=this.map[t])||t in this.map||void 0===a?i?i.fetchIfRefAsync(r,n):Promise.resolve(r):(r=this.map[a]||null,i?i.fetchIfRefAsync(r,n):Promise.resolve(r))},getArray:function(e,t,a){var r=this.get(e,t,a),i=this.xref,o=this.suppressEncryption;if(!s(r)||!i)return r;for(var c=0,l=(r=r.slice()).length;c<l;c++)n(r[c])&&(r[c]=i.fetch(r[c],o));return r},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,a){for(var r=new e(t),n=0,s=a.length;n<s;n++){var o=a[n];if(i(o))for(var c in o.map)r.map[c]||(r.map[c]=o.map[c])}return r},e}(),u=function(){function e(e,t){this.num=e,this.gen=t}return e.prototype={toString:function(){var e=this.num+"R";return 0!==this.gen&&(e+=this.gen),e}},e}(),f=function(){function e(){this.dict=Object.create(null)}return 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()]}},e}(),d=function(){function e(){this.dict=Object.create(null)}return 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 a in this.dict)e.call(t,this.dict[a])},clear:function(){this.dict=Object.create(null)}},e}();t.EOF=o,t.Cmd=l,t.Dict=h,t.Name=c,t.Ref=u,t.RefSet=f,t.RefSetCache=d,t.isEOF=function(e){return e===o},t.isCmd=function(e,t){return e instanceof l&&(void 0===t||e.cmd===t)},t.isDict=i,t.isName=r,t.isRef=n,t.isRefsEqual=function(e,t){return e.num===t.num&&e.gen===t.gen},t.isStream=function(e){return"object"==typeof e&&null!==e&&void 0!==e.getBytes}},function(e,t,a){"use strict";var r=a(0),i=a(1),n=a(28),s=a(29),o=a(15),c=r.Util,l=r.error,h=r.info,u=r.isInt,f=r.isArray,d=r.createObjectURL,g=r.shadow,p=r.isSpace,m=i.Dict,b=i.isDict,v=i.isStream,y=n.Jbig2Image,k=s.JpegImage,w=o.JpxImage,C=function(){function e(e,t,a,r){this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.start=t||0,this.pos=this.start,this.end=t+a||this.bytes.length,this.dict=r}return 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-1===e||-1===t?-1:(e<<8)+t},getInt32:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},getBytes:function(e){var t=this.bytes,a=this.pos,r=this.end;if(!e)return t.subarray(a,r);var i=a+e;return i>r&&(i=r),this.pos=i,t.subarray(a,i)},peekByte:function(){var e=this.getByte();return this.pos--,e},peekBytes:function(e){var t=this.getBytes(e);return this.pos-=t.length,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,a,r){return new e(this.bytes.buffer,t,a,r)}},e}(),x=function(){function e(e){for(var t=e.length,a=new Uint8Array(t),r=0;r<t;++r)a[r]=e.charCodeAt(r);C.call(this,a)}return e.prototype=C.prototype,e}(),S=function(){function e(e){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=t,this.minBufferLength=512,e)for(;this.minBufferLength<e;)this.minBufferLength*=2}var t=new Uint8Array(0);return 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 a=this.minBufferLength;a<e;)a*=2;var r=new Uint8Array(a);return r.set(t),this.buffer=r},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-1===e||-1===t?-1:(e<<8)+t},getInt32:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()},getBytes:function(e){var t,a=this.pos;if(e){for(this.ensureBuffer(a+e),t=a+e;!this.eof&&this.bufferLength<t;)this.readBlock();var r=this.bufferLength;t>r&&(t=r)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}return this.pos=t,this.buffer.subarray(a,t)},peekByte:function(){var e=this.getByte();return this.pos--,e},peekBytes:function(e){var t=this.getBytes(e);return this.pos-=t.length,t},makeSubStream:function(e,t,a){for(var r=e+t;this.bufferLength<=r&&!this.eof;)this.readBlock();return new C(this.buffer,e,t,a)},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():[]}},e}(),A=function(){function e(e){this.streams=e,S.call(this,null)}return e.prototype=Object.create(S.prototype),e.prototype.readBlock=function(){var e=this.streams;if(0!==e.length){var t=e.shift().getBytes(),a=this.bufferLength,r=a+t.length;this.ensureBuffer(r).set(t,a),this.bufferLength=r}else this.eof=!0},e.prototype.getBaseStreams=function(){for(var e=[],t=0,a=this.streams.length;t<a;t++){var r=this.streams[t];r.getBaseStreams&&c.appendToArray(e,r.getBaseStreams())}return e},e}(),I=function(){function e(e,t){this.str=e,this.dict=e.dict;var a=e.getByte(),r=e.getByte();-1!==a&&-1!==r||l("Invalid header in flate stream: "+a+", "+r),8!=(15&a)&&l("Unknown compression method in flate stream: "+a+", "+r),((a<<8)+r)%31!=0&&l("Bad FCHECK in flate stream: "+a+", "+r),32&r&&l("FDICT bit set in flate stream: "+a+", "+r),this.codeSize=0,this.codeBuf=0,S.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]),a=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]),r=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]),i=[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],n=[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];return e.prototype=Object.create(S.prototype),e.prototype.getBits=function(e){for(var t,a=this.str,r=this.codeSize,i=this.codeBuf;r<e;)-1===(t=a.getByte())&&l("Bad encoding in flate stream"),i|=t<<r,r+=8;return t=i&(1<<e)-1,this.codeBuf=i>>e,this.codeSize=r-=e,t},e.prototype.getCode=function(e){for(var t,a=this.str,r=e[0],i=e[1],n=this.codeSize,s=this.codeBuf;n<i&&-1!==(t=a.getByte());)s|=t<<n,n+=8;var o=r[s&(1<<i)-1],c=o>>16,h=65535&o;return(c<1||n<c)&&l("Bad encoding in flate stream"),this.codeBuf=s>>c,this.codeSize=n-c,h},e.prototype.generateHuffmanTable=function(e){var t,a=e.length,r=0;for(t=0;t<a;++t)e[t]>r&&(r=e[t]);for(var i=1<<r,n=new Int32Array(i),s=1,o=0,c=2;s<=r;++s,o<<=1,c<<=1)for(var l=0;l<a;++l)if(e[l]===s){var h=0,u=o;for(t=0;t<s;++t)h=h<<1|1&u,u>>=1;for(t=h;t<i;t+=c)n[t]=s<<16|l;++o}return[n,r]},e.prototype.readBlock=function(){var e,s,o=this.str,c=this.getBits(3);if(1&c&&(this.eof=!0),0!==(c>>=1)){var h,u;if(1===c)h=i,u=n;else if(2===c){var f,d=this.getBits(5)+257,g=this.getBits(5)+1,p=this.getBits(4)+4,m=new Uint8Array(t.length);for(f=0;f<p;++f)m[t[f]]=this.getBits(3);var b=this.generateHuffmanTable(m);s=0,f=0;for(var v,y,k,w=d+g,C=new Uint8Array(w);f<w;){var x=this.getCode(b);if(16===x)v=2,y=3,k=s;else if(17===x)v=3,y=3,k=s=0;else{if(18!==x){C[f++]=s=x;continue}v=7,y=11,k=s=0}for(var S=this.getBits(v)+y;S-- >0;)C[f++]=k}h=this.generateHuffmanTable(C.subarray(0,d)),u=this.generateHuffmanTable(C.subarray(d,w))}else l("Unknown block type in flate stream");for(var A=(e=this.buffer)?e.length:0,I=this.bufferLength;;){var B=this.getCode(h);if(B<256)I+1>=A&&(A=(e=this.ensureBuffer(I+1)).length),e[I++]=B;else{if(256===B)return void(this.bufferLength=I);var R=(B=a[B-=257])>>16;R>0&&(R=this.getBits(R)),s=(65535&B)+R,B=this.getCode(u),(R=(B=r[B])>>16)>0&&(R=this.getBits(R));var T=(65535&B)+R;I+s>=A&&(A=(e=this.ensureBuffer(I+s)).length);for(var O=0;O<s;++O,++I)e[I]=e[I-T]}}}else{var P;-1===(P=o.getByte())&&l("Bad block header in flate stream");var M=P;-1===(P=o.getByte())&&l("Bad block header in flate stream"),M|=P<<8,-1===(P=o.getByte())&&l("Bad block header in flate stream");var E=P;-1===(P=o.getByte())&&l("Bad block header in flate stream"),(E|=P<<8)===(65535&~M)||0===M&&0===E||l("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var L=this.bufferLength;e=this.ensureBuffer(L+M);var D=L+M;if(this.bufferLength=D,0===M)-1===o.peekByte()&&(this.eof=!0);else for(var F=L;F<D;++F){if(-1===(P=o.getByte())){this.eof=!0;break}e[F]=P}}},e}(),B=function(){function e(e,t,a){if(!b(a))return e;var r=this.predictor=a.get("Predictor")||1;if(r<=1)return e;2!==r&&(r<10||r>15)&&l("Unsupported predictor: "+r),this.readBlock=2===r?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;var i=this.colors=a.get("Colors")||1,n=this.bits=a.get("BitsPerComponent")||8,s=this.columns=a.get("Columns")||1;return this.pixBytes=i*n+7>>3,this.rowBytes=s*i*n+7>>3,S.call(this,t),this}return e.prototype=Object.create(S.prototype),e.prototype.readBlockTiff=function(){var e=this.rowBytes,t=this.bufferLength,a=this.ensureBuffer(t+e),r=this.bits,i=this.colors,n=this.str.getBytes(e);if(this.eof=!n.length,!this.eof){var s,o=0,c=0,l=0,h=0,u=t;if(1===r&&1===i)for(s=0;s<e;++s){var f=n[s]^o;f^=f>>1,f^=f>>2,o=(1&(f^=f>>4))<<7,a[u++]=f}else if(8===r){for(s=0;s<i;++s)a[u++]=n[s];for(;s<e;++s)a[u]=a[u-i]+n[s],u++}else{var d=new Uint8Array(i+1),g=(1<<r)-1,p=0,m=t,b=this.columns;for(s=0;s<b;++s)for(var v=0;v<i;++v)l<r&&(o=o<<8|255&n[p++],l+=8),d[v]=d[v]+(o>>l-r)&g,l-=r,c=c<<r|d[v],(h+=r)>=8&&(a[m++]=c>>h-8&255,h-=8);h>0&&(a[m++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}},e.prototype.readBlockPng=function(){var e=this.rowBytes,t=this.pixBytes,a=this.str.getByte(),r=this.str.getBytes(e);if(this.eof=!r.length,!this.eof){var i=this.bufferLength,n=this.ensureBuffer(i+e),s=n.subarray(i-e,i);0===s.length&&(s=new Uint8Array(e));var o,c,h,u=i;switch(a){case 0:for(o=0;o<e;++o)n[u++]=r[o];break;case 1:for(o=0;o<t;++o)n[u++]=r[o];for(;o<e;++o)n[u]=n[u-t]+r[o]&255,u++;break;case 2:for(o=0;o<e;++o)n[u++]=s[o]+r[o]&255;break;case 3:for(o=0;o<t;++o)n[u++]=(s[o]>>1)+r[o];for(;o<e;++o)n[u]=(s[o]+n[u-t]>>1)+r[o]&255,u++;break;case 4:for(o=0;o<t;++o)c=s[o],h=r[o],n[u++]=c+h;for(;o<e;++o){c=s[o];var f=s[o-t],d=n[u-t],g=d+c-f,p=g-d;p<0&&(p=-p);var m=g-c;m<0&&(m=-m);var b=g-f;b<0&&(b=-b),h=r[o],n[u++]=p<=m&&p<=b?d+h:m<=b?c+h:f+h}break;default:l("Unsupported predictor: "+a)}this.bufferLength+=e}},e}(),R=function(){function e(e,t,a,r){for(var i;-1!==(i=e.getByte());)if(255===i){e.skip(-1);break}this.stream=e,this.maybeLength=t,this.dict=a,this.params=r,S.call(this,t)}return e.prototype=Object.create(S.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){if(!this.bufferLength){var t=new k,a=this.dict.getArray("Decode","D");if(this.forceRGB&&f(a)){for(var r=this.dict.get("BitsPerComponent")||8,i=a.length,n=new Int32Array(i),s=!1,o=(1<<r)-1,c=0;c<i;c+=2)n[c]=256*(a[c+1]-a[c])|0,n[c+1]=a[c]*o|0,256===n[c]&&0===n[c+1]||(s=!0);s&&(t.decodeTransform=n)}if(b(this.params)){var l=this.params.get("ColorTransform");u(l)&&(t.colorTransform=l)}t.parse(this.bytes);var h=t.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=h,this.bufferLength=h.length,this.eof=!0}},e.prototype.getBytes=function(e){return this.ensureBuffer(),this.buffer},e.prototype.getIR=function(e){return d(this.bytes,"image/jpeg",e)},e}(),T=function(){function e(e,t,a,r){this.stream=e,this.maybeLength=t,this.dict=a,this.params=r,S.call(this,t)}return e.prototype=Object.create(S.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){if(!this.bufferLength){var t=new w;t.parse(this.bytes);var a=t.width,r=t.height,i=t.componentsCount,n=t.tiles.length;if(1===n)this.buffer=t.tiles[0].items;else{for(var s=new Uint8Array(a*r*i),o=0;o<n;o++)for(var c=t.tiles[o],l=c.width,h=c.height,u=c.left,f=c.top,d=c.items,g=0,p=(a*f+u)*i,m=a*i,b=l*i,v=0;v<h;v++){var y=d.subarray(g,g+b);s.set(y,p),g+=b,p+=m}this.buffer=s}this.bufferLength=this.buffer.length,this.eof=!0}},e}(),O=function(){function e(e,t,a,r){this.stream=e,this.maybeLength=t,this.dict=a,this.params=r,S.call(this,t)}return e.prototype=Object.create(S.prototype),Object.defineProperty(e.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),e.prototype.ensureBuffer=function(e){if(!this.bufferLength){var t=new y,a=[];if(b(this.params)){var r=this.params.get("JBIG2Globals");if(v(r)){var i=r.getBytes();a.push({data:i,start:0,end:i.length})}}a.push({data:this.bytes,start:0,end:this.bytes.length});for(var n=t.parseChunks(a),s=n.length,o=0;o<s;o++)n[o]^=255;this.buffer=n,this.bufferLength=s,this.eof=!0}},e}(),P=function(){function e(e,t,a){this.str=e,this.dict=e.dict,this.decrypt=a,this.nextChunk=null,this.initialized=!1,S.call(this,t)}return e.prototype=Object.create(S.prototype),e.prototype.readBlock=function(){var e;if(this.initialized?e=this.nextChunk:(e=this.str.getBytes(512),this.initialized=!0),e&&0!==e.length){this.nextChunk=this.str.getBytes(512);var t=this.nextChunk&&this.nextChunk.length>0;e=(0,this.decrypt)(e,!t);var a,r=this.bufferLength,i=e.length,n=this.ensureBuffer(r+i);for(a=0;a<i;a++)n[r++]=e[a];this.bufferLength=r}else this.eof=!0},e}(),M=function(){function e(e,t){this.str=e,this.dict=e.dict,this.input=new Uint8Array(5),t&&(t*=.8),S.call(this,t)}return e.prototype=Object.create(S.prototype),e.prototype.readBlock=function(){for(var e=this.str,t=e.getByte();p(t);)t=e.getByte();if(-1!==t&&126!==t){var a,r,i=this.bufferLength;if(122===t){for(a=this.ensureBuffer(i+4),r=0;r<4;++r)a[i+r]=0;this.bufferLength+=4}else{var n=this.input;for(n[0]=t,r=1;r<5;++r){for(t=e.getByte();p(t);)t=e.getByte();if(n[r]=t,-1===t||126===t)break}if(a=this.ensureBuffer(i+r-1),this.bufferLength+=r-1,r<5){for(;r<5;++r)n[r]=117;this.eof=!0}var s=0;for(r=0;r<5;++r)s=85*s+(n[r]-33);for(r=3;r>=0;--r)a[i+r]=255&s,s>>=8}}else this.eof=!0},e}(),E=function(){function e(e,t){this.str=e,this.dict=e.dict,this.firstDigit=-1,t&&(t*=.5),S.call(this,t)}return e.prototype=Object.create(S.prototype),e.prototype.readBlock=function(){var e=this.str.getBytes(8e3);if(e.length){for(var t=e.length+1>>1,a=this.ensureBuffer(this.bufferLength+t),r=this.bufferLength,i=this.firstDigit,n=0,s=e.length;n<s;n++){var o,c=e[n];if(c>=48&&c<=57)o=15&c;else{if(!(c>=65&&c<=70||c>=97&&c<=102)){if(62===c){this.eof=!0;break}continue}o=9+(15&c)}i<0?i=o:(a[r++]=i<<4|o,i=-1)}i>=0&&this.eof&&(a[r++]=i<<4,i=-1),this.firstDigit=i,this.bufferLength=r}else this.eof=!0},e}(),L=function(){function e(e,t){this.str=e,this.dict=e.dict,S.call(this,t)}return e.prototype=Object.create(S.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,a=this.bufferLength,r=e[0];if(r<128){if(t=this.ensureBuffer(a+r+1),t[a++]=e[1],r>0){var i=this.str.getBytes(r);t.set(i,a),a+=r}}else{r=257-r;var n=e[1];t=this.ensureBuffer(a+r+1);for(var s=0;s<r;s++)t[a++]=n}this.bufferLength=a}},e}(),D=function(){function e(e,t,a){this.str=e,this.dict=e.dict,a=a||m.empty,this.encoding=a.get("K")||0,this.eoline=a.get("EndOfLine")||!1,this.byteAlign=a.get("EncodedByteAlign")||!1,this.columns=a.get("Columns")||1728,this.rows=a.get("Rows")||0;var r=a.get("EndOfBlock");null!==r&&void 0!==r||(r=!0),this.eoblock=r,this.black=a.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;for(var i;0===(i=this.lookBits(12));)this.eatBits(1);1===i&&this.eatBits(12),this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),S.call(this,t)}var t=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],a=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],i=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],n=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],s=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];return e.prototype=Object.create(S.prototype),e.prototype.readBlock=function(){for(;!this.eof;){var e=this.lookChar();this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}},e.prototype.addPixels=function(e,t){var a=this.codingLine,r=this.codingPos;e>a[r]&&(e>this.columns&&(h("row is wrong length"),this.err=!0,e=this.columns),1&r^t&&++r,a[r]=e),this.codingPos=r},e.prototype.addPixelsNeg=function(e,t){var a=this.codingLine,r=this.codingPos;if(e>a[r])e>this.columns&&(h("row is wrong length"),this.err=!0,e=this.columns),1&r^t&&++r,a[r]=e;else if(e<a[r]){for(e<0&&(h("invalid code"),this.err=!0,e=0);r>0&&e<a[r-1];)--r;a[r]=e}this.codingPos=r},e.prototype.lookChar=function(){var e,t,a,r,i=this.refLine,n=this.codingLine,s=this.columns;if(0===this.outputBits){if(this.eof)return null;this.err=!1;var o,c,l;if(this.nextLine2D){for(r=0;n[r]<s;++r)i[r]=n[r];for(i[r++]=s,i[r]=s,n[0]=0,this.codingPos=0,e=0,t=0;n[this.codingPos]<s;)switch(o=this.getTwoDimCode()){case 0:this.addPixels(i[e+1],t),i[e+1]<s&&(e+=2);break;case 1:if(o=c=0,t){do{o+=l=this.getBlackCode()}while(l>=64);do{c+=l=this.getWhiteCode()}while(l>=64)}else{do{o+=l=this.getWhiteCode()}while(l>=64);do{c+=l=this.getBlackCode()}while(l>=64)}for(this.addPixels(n[this.codingPos]+o,t),n[this.codingPos]<s&&this.addPixels(n[this.codingPos]+c,1^t);i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 7:if(this.addPixels(i[e]+3,t),t^=1,n[this.codingPos]<s)for(++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 5:if(this.addPixels(i[e]+2,t),t^=1,n[this.codingPos]<s)for(++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 3:if(this.addPixels(i[e]+1,t),t^=1,n[this.codingPos]<s)for(++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 2:if(this.addPixels(i[e],t),t^=1,n[this.codingPos]<s)for(++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 8:if(this.addPixelsNeg(i[e]-3,t),t^=1,n[this.codingPos]<s)for(e>0?--e:++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 6:if(this.addPixelsNeg(i[e]-2,t),t^=1,n[this.codingPos]<s)for(e>0?--e:++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case 4:if(this.addPixelsNeg(i[e]-1,t),t^=1,n[this.codingPos]<s)for(e>0?--e:++e;i[e]<=n[this.codingPos]&&i[e]<s;)e+=2;break;case-1:this.addPixels(s,0),this.eof=!0;break;default:h("bad 2d code"),this.addPixels(s,0),this.err=!0}}else for(n[0]=0,this.codingPos=0,t=0;n[this.codingPos]<s;){if(o=0,t)do{o+=l=this.getBlackCode()}while(l>=64);else do{o+=l=this.getWhiteCode()}while(l>=64);this.addPixels(n[this.codingPos]+o,t),t^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(o=this.lookBits(12),this.eoline)for(;-1!==o&&1!==o;)this.eatBits(1),o=this.lookBits(12);else for(;0===o;)this.eatBits(1),o=this.lookBits(12);1===o?(this.eatBits(12),u=!0):-1===o&&(this.eof=!0)}else this.eof=!0;if(!this.eof&&this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),this.eoblock&&u&&this.byteAlign){if(1===(o=this.lookBits(12))){if(this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1)),this.encoding>=0)for(r=0;r<4;++r)1!==(o=this.lookBits(12))&&h("bad rtc code: "+o),this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(-1===(o=this.lookBits(13)))return this.eof=!0,null;if(o>>1==1)break;this.eatBits(1)}this.eatBits(12),this.encoding>0&&(this.eatBits(1),this.nextLine2D=!(1&o))}n[0]>0?this.outputBits=n[this.codingPos=0]:this.outputBits=n[this.codingPos=1],this.row++}var f;if(this.outputBits>=8)f=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&n[this.codingPos]<s&&(this.codingPos++,this.outputBits=n[this.codingPos]-n[this.codingPos-1]);else{a=8,f=0;do{this.outputBits>a?(f<<=a,1&this.codingPos||(f|=255>>8-a),this.outputBits-=a,a=0):(f<<=this.outputBits,1&this.codingPos||(f|=255>>8-this.outputBits),a-=this.outputBits,this.outputBits