!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(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.i=function(e){return e};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=35)}([function(e,t,r){"use strict";function a(e){ce=e}function i(){return ce}function n(e){ce>=ne.infos&&console.log("Info: "+e)}function o(e){ce>=ne.warnings&&console.log("Warning: "+e)}function s(e){console.log("Deprecated API usage: "+e)}function c(e){throw new Error(e)}function l(e,t){e||c(t)}function u(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 h(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function f(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(h(r))return r}catch(e){}return null}function d(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1});return r}function g(e){var t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}}function m(e){if("string"!=typeof e){o("The argument for removeNullCharacters must be a string.");return e}return e.replace(we,"")}function p(e){l(null!==e&&"object"===(void 0===e?"undefined":X(e))&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],a=0;a>24&255,e>>16&255,e>>8&255,255&e)}function k(e){for(var t=1,r=0;e>t;){t<<=1;r++}return r}function S(e,t){return e[t]<<24>>24}function C(e,t){return e[t]<<8|e[t+1]}function x(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function A(){var e=new Uint8Array(4);e[0]=1;return 1===new Uint32Array(e.buffer,0,1)[0]}function P(){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;t2&&void 0!==arguments[2]?arguments[2]:null;return e?new Promise(function(a,i){a(e.apply(r,t))}):Promise.resolve(void 0)}function j(e){if("object"!==(void 0===e?"undefined":X(e)))return e;switch(e.name){case"MissingPDFException":return new ge(e.message);case"UnexpectedResponseException":return new me(e.message,e.status);default:return new fe(e.message,e.details)}}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(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){e instanceof Error&&(e+="");r.postMessage({sourceName:l,targetName:u,isReply:!0,callbackId:t.callbackId,error: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);o("Error during JPEG image loading")};a.src=t}Object.defineProperty(t,"__esModule",{value:!0});t.unreachable=t.warn=t.utf8StringToString=t.stringToUTF8String=t.stringToPDFString=t.stringToBytes=t.string32=t.shadow=t.setVerbosityLevel=t.ReadableStream=t.removeNullCharacters=t.readUint32=t.readUint16=t.readInt8=t.log2=t.loadJpegStream=t.isEvalSupported=t.isLittleEndian=t.createValidAbsoluteUrl=t.isSameOrigin=t.isNodeJS=t.isSpace=t.isString=t.isNum=t.isInt=t.isEmptyObj=t.isBool=t.isArrayBuffer=t.isArray=t.info=t.globalScope=t.getVerbosityLevel=t.getLookupTableFactory=t.deprecated=t.createObjectURL=t.createPromiseCapability=t.createBlob=t.bytesToString=t.assert=t.arraysToBytes=t.arrayByteLength=t.FormatError=t.XRefParseException=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.StatTimer=t.PasswordResponses=t.PasswordException=t.PageViewport=t.NotImplementedException=t.NativeImageDecoding=t.MissingPDFException=t.MissingDataException=t.MessageHandler=t.InvalidPDFException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VERBOSITY_LEVELS=t.OPS=t.IDENTITY_MATRIX=t.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};r(36);var V=r(37),Y="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:void 0,K=[.001,0,0,.001,0,0],J={NONE:"none",DECODE:"decode",DISPLAY:"display"},Z={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},Q={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},$={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},ee={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},te={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},re={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},ae={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},ie={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10},ne={errors:0,warnings:1,infos:5},oe={NONE:0,BINARY:1,STREAM:2},se={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},ce=ne.warnings,le={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},ue={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},he=function(){function e(e,t){this.name="PasswordException";this.message=e;this.code=t}e.prototype=new Error;e.constructor=e;return e}(),fe=function(){function e(e,t){this.name="UnknownErrorException";this.message=e;this.details=t}e.prototype=new Error;e.constructor=e;return e}(),de=function(){function e(e){this.name="InvalidPDFException";this.message=e}e.prototype=new Error;e.constructor=e;return e}(),ge=function(){function e(e){this.name="MissingPDFException";this.message=e}e.prototype=new Error;e.constructor=e;return e}(),me=function(){function e(e,t){this.name="UnexpectedResponseException";this.message=e;this.status=t}e.prototype=new Error;e.constructor=e;return e}(),pe=function(){function e(e){this.message=e}e.prototype=new Error;e.prototype.name="NotImplementedException";e.constructor=e;return e}(),be=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}(),ve=function(){function e(e){this.message=e}e.prototype=new Error;e.prototype.name="XRefParseException";e.constructor=e;return e}(),ye=function(){function e(e){this.message=e}e.prototype=new Error;e.prototype.name="FormatError";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){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 r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]};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};e.sign=function(e){return e<0?-1:1};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){l(R(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.lengthn&&(n=o.length)}for(t=0,r=a.length;t2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var a=Pe(t,r);return URL.createObjectURL(a)}for(var i="data:"+r+";base64,",n=0,o=t.length;n>2]+e[(3&s)<<4|c>>4]+e[n+1>6:64]+e[n+21&&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=U();this.ready=this.sinkCapability.promise}l({stream:"enqueue",chunk:e,transfers:r})}},close:function(){if(!this.isCancelled){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;q(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,j(e.reason));break;case"pull_complete":z(this.streamControllers[e.streamId].pullCall,e.success,j(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;q(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":l(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":l(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":l(this.streamControllers[e.streamId],"error should have stream controller");this.streamControllers[e.streamId].controller.error(j(e.reason));o();break;case"cancel_complete":z(this.streamControllers[e.streamId].cancelCall,e.success,j(e.reason));o();break;case"cancel":if(!this.streamSinks[e.streamId])break;q(this.streamSinks[e.streamId].onCancel,[j(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(j(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)}};t.FONT_IDENTITY_MATRIX=K;t.IDENTITY_MATRIX=ke;t.OPS=se;t.VERBOSITY_LEVELS=ne;t.UNSUPPORTED_FEATURES=le;t.AnnotationBorderStyleType=re;t.AnnotationFieldFlag=te;t.AnnotationFlag=ee;t.AnnotationType=$;t.FontType=ie;t.ImageKind=Q;t.CMapCompressionType=oe;t.InvalidPDFException=de;t.MessageHandler=G;t.MissingDataException=be;t.MissingPDFException=ge;t.NativeImageDecoding=J;t.NotImplementedException=pe;t.PageViewport=Ce;t.PasswordException=he;t.PasswordResponses=ue;t.StatTimer=Ae;t.StreamType=ae;t.TextRenderingMode=Z;t.UnexpectedResponseException=me;t.UnknownErrorException=fe;t.Util=Se;t.XRefParseException=ve;t.FormatError=ye;t.arrayByteLength=v;t.arraysToBytes=y;t.assert=l;t.bytesToString=p;t.createBlob=Pe;t.createPromiseCapability=U;t.createObjectURL=Ie;t.deprecated=s;t.getLookupTableFactory=g;t.getVerbosityLevel=i;t.globalScope=Y;t.info=n;t.isArray=M;t.isArrayBuffer=D;t.isBool=E;t.isEmptyObj=T;t.isInt=R;t.isNum=F;t.isString=B;t.isSpace=L;t.isNodeJS=N;t.isSameOrigin=u;t.createValidAbsoluteUrl=f;t.isLittleEndian=A;t.isEvalSupported=P;t.loadJpegStream=W;t.log2=k;t.readInt8=S;t.readUint16=C;t.readUint32=x;t.removeNullCharacters=m;t.ReadableStream=V.ReadableStream;t.setVerbosityLevel=a;t.shadow=d;t.string32=w;t.stringToBytes=b;t.stringToPDFString=I;t.stringToUTF8String=_;t.utf8StringToString=O;t.warn=o;t.unreachable=c},function(e,t,r){"use strict";function a(e){return e===f}function i(e,t){return e instanceof d&&(void 0===t||e.name===t)}function n(e,t){return e instanceof g&&(void 0===t||e.cmd===t)}function o(e,t){return e instanceof m&&(void 0===t||i(e.get("Type"),t))}function s(e){return e instanceof p}function c(e,t){return e.num===t.num&&e.gen===t.gen}function l(e){return"object"===(void 0===e?"undefined":u(e))&&null!==e&&void 0!==e.getBytes}Object.defineProperty(t,"__esModule",{value:!0});t.isStream=t.isRefsEqual=t.isRef=t.isName=t.isDict=t.isCmd=t.isEOF=t.RefSetCache=t.RefSet=t.Ref=t.Name=t.Dict=t.Cmd=t.EOF=void 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=r(0),f={},d=function(){function e(e){this.name=e}e.prototype={};var t=Object.create(null);e.get=function(r){var a=t[r];return a||(t[r]=new e(r))};return e}(),g=function(){function e(e){this.cmd=e}e.prototype={};var t=Object.create(null);e.get=function(r){var a=t[r];return a||(t[r]=new e(r))};return e}(),m=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(void 0!==(a=this._map[e])||e in this._map||void 0===t)return i?i.fetchIfRef(a,n):a;if(void 0!==(a=this._map[t])||t in this._map||void 0===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(void 0!==(a=this._map[e])||e in this._map||void 0===t)return i?i.fetchIfRefAsync(a,n):Promise.resolve(a);if(void 0!==(a=this._map[t])||t in this._map||void 0===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(!(0,h.isArray)(a)||!i)return a;a=a.slice();for(var o=0,c=a.length;o=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,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;aa&&(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;this.ensureBuffer(i).set(r,a);this.bufferLength=i}else this.eof=!0};e.prototype.getBaseStreams=function(){for(var e=[],t=0,r=this.streams.length;t>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>16,u=65535&c;if(l<1||o>l;this.codeSize=o-l;return u};e.prototype.generateHuffmanTable=function(e){var t,r=e.length,a=0;for(t=0;ta&&(a=e[t]);for(var i=1<>=1}for(t=u;t>=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;f0;)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 I=this.getCode(u);if(I<256){if(P+1>=A){e=this.ensureBuffer(P+1);A=e.length}e[P++]=I}else{if(256===I){this.bufferLength=P;return}I-=257;I=r[I];var _=I>>16;_>0&&(_=this.getBits(_));s=(65535&I)+_;I=this.getCode(h);I=i[I];_=I>>16;_>0&&(_=this.getBits(_));var O=(65535&I)+_;if(P+s>=A){e=this.ensureBuffer(P+s);A=e.length}for(var T=0;T15))throw new a.FormatError("Unsupported predictor: "+n);this.readBlock=2===n?this.readBlockTiff: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>1;f^=f>>2;f^=f>>4;s=(1&f)<<7;r[h++]=f}else if(8===a){for(o=0;o>l-a)&g;l-=a;c=c<=8){r[p++]=c>>u-8&255;u-=8}}u>0&&(r[p++]=(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>1)+i[c];for(;c>1)+i[c]&255;h++}break;case 4:for(c=0;c0;e=(0,this.decrypt)(e,!t);var r,a=this.bufferLength,i=e.length,n=this.ensureBuffer(a+i);for(r=0;r=0;--i){r[n+i]=255&s;s>>=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=this.str.getBytes(8e3);if(e.length){for(var t=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+t),a=this.bufferLength,i=this.firstDigit,n=0,o=e.length;n=48&&c<=57)s=15&c;else{if(!(c>=65&&c<=70||c>=97&&c<=102)){if(62===c){this.eof=!0;break}continue}s=9+(15&c)}if(i<0)i=s;else{r[a++]=i<<4|s;i=-1}}if(i>=0&&this.eof){r[a++]=i<<4;i=-1}this.firstDigit=i;this.bufferLength=a}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;o0){this.nextLine2D=!this.lookBits(1);this.eatBits(1)}u.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]],r=[[-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]],n=[[-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]],o=[[-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]],s=[[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]],c=[[-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]];e.prototype=Object.create(u.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 r=this.codingLine,i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,a.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}this.codingPos=i};e.prototype.addPixelsNeg=function(e,t){var r=this.codingLine,i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,a.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}else if(e0&&e=64);do{l+=u=this.getWhiteCode()}while(u>=64)}else{do{c+=u=this.getWhiteCode()}while(u>=64);do{l+=u=this.getBlackCode()}while(u>=64)}this.addPixels(o[this.codingPos]+c,t);o[this.codingPos]0?--e:++e;for(;n[e]<=o[this.codingPos]&&n[e]0?--e:++e;for(;n[e]<=o[this.codingPos]&&n[e]0?--e:++e;for(;n[e]<=o[this.codingPos]&&n[e]=64);else do{c+=u=this.getWhiteCode()}while(u>=64);this.addPixels(o[this.codingPos]+c,t);t^=1}}var h=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){c=this.lookBits(12);if(this.eoline)for(;-1!==c&&1!==c;){this.eatBits(1);c=this.lookBits(12)}else for(;0===c;){this.eatBits(1);c=this.lookBits(12)}if(1===c){this.eatBits(12);h=!0}else-1===c&&(this.eof=!0)}else this.eof=!0;if(!this.eof&&this.encoding>0){this.nextLine2D=!this.lookBits(1);this.eatBits(1)}if(this.eoblock&&h&&this.byteAlign){c=this.lookBits(12);if(1===c){this.eatBits(12);if(this.encoding>0){this.lookBits(1);this.eatBits(1)}if(this.encoding>=0)for(i=0;i<4;++i){c=this.lookBits(12);1!==c&&(0,a.info)("bad rtc code: "+c);this.eatBits(12);if(this.encoding>0){this.lookBits(1);this.eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){c=this.lookBits(13);if(-1===c){this.eof=!0;return null}if(c>>1==1)break;this.eatBits(1)}this.eatBits(12);if(this.encoding>0){this.eatBits(1);this.nextLine2D=!(1&c)}}o[0]>0?this.outputBits=o[this.codingPos=0]:this.outputBits=o[this.codingPos=1];this.row++}var f;if(this.outputBits>=8){f=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&o[this.codingPos]r){f<<=r;1&this.codingPos||(f|=255>>8-r);this.outputBits-=r;r=0}else{f<<=this.outputBits;1&this.codingPos||(f|=255>>8-this.outputBits);r-=this.outputBits;this.outputBits=0;if(o[this.codingPos]0){f<<=r;r=0}}}while(r)}this.black&&(f^=255);return f};e.prototype.findTableCode=function(e,t,r,a){for(var i=a||0,n=e;n<=t;++n){var o=this.lookBits(n);if(-1===o)return[!0,1,!1];n=i){var s=r[o-i];if(s[0]===n){this.eatBits(n);return[!0,s[1],!0]}}}return[!1,0,!1]};e.prototype.getTwoDimCode=function(){var e,r=0;if(this.eoblock){r=this.lookBits(7);e=t[r];if(e&&e[0]>0){this.eatBits(e[0]);return e[1]}}else{var i=this.findTableCode(1,7,t);if(i[0]&&i[2])return i[1]}(0,a.info)("Bad two dim code");return-1};e.prototype.getWhiteCode=function(){var e,t=0;if(this.eoblock){t=this.lookBits(12);if(-1===t)return 1;e=t>>5==0?r[t]:n[t>>3];if(e[0]>0){this.eatBits(e[0]);return e[1]}}else{var i=this.findTableCode(1,9,n);if(i[0])return i[1];i=this.findTableCode(11,12,r);if(i[0])return i[1]}(0,a.info)("bad white code");this.eatBits(1);return 1};e.prototype.getBlackCode=function(){var e,t;if(this.eoblock){e=this.lookBits(13);if(-1===e)return 1;t=e>>7==0?o[e]:e>>9==0&&e>>7!=0?s[(e>>1)-64]:c[e>>7];if(t[0]>0){this.eatBits(t[0]);return t[1]}}else{var r=this.findTableCode(2,6,c);if(r[0])return r[1];r=this.findTableCode(7,12,s,64);if(r[0])return r[1];r=this.findTableCode(10,13,o);if(r[0])return r[1]}(0,a.info)("bad black code");this.eatBits(1);return 1};e.prototype.lookBits=function(e){for(var t;this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e};e.prototype.eatBits=function(e){(this.inputBits-=e)<0&&(this.inputBits=0)};return e}(),S=function(){function e(e,t,r){this.str=e;this.dict=e.dict;this.cachedData=0;this.bitsCached=0;for(var a={earlyChange:r,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(4096),dictionaryLengths:new Uint16Array(4096),dictionaryPrevCodes:new Uint16Array(4096),currentSequence:new Uint8Array(4096),currentSequenceLength:0},i=0;i<256;++i){a.dictionaryValues[i]=i;a.dictionaryLengths[i]=1}this.lzwState=a;u.call(this,t)}e.prototype=Object.create(u.prototype);e.prototype.readBits=function(e){for(var t=this.bitsCached,r=this.cachedData;t>>t&(1<0;if(b<256){f[0]=b;d=1}else{if(!(b>=258)){if(256===b){u=9;o=258;d=0;continue}this.eof=!0;delete this.lzwState;break}if(b=0;t--){f[t]=s[r];r=l[r]}}else f[d++]=f[0]}if(v){l[o]=h;c[o]=c[h]+1;s[o]=f[0];o++;u=o+n&o+n-1?u:0|Math.min(Math.log(o+n)/.6931471805599453+1,12)}h=b;g+=d;if(ag&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){var p,b=s<=8?new Uint8Array(g):new Uint16Array(g);for(u=0;u255?255:i;r[a]=r[a+1]=r[a+2]=i},getRgbBuffer:function(e,t,r,a,i,n,o){for(var s=255/((1<255?255:i;r[a+1]=n<0?0:n>255?255:n;r[a+2]=o<0?0:o>255?255:o},getRgbBuffer:function(e,t,r,a,i,n,o){if(8!==n||0!==o)for(var s=255/((1<255?255:l<0?0:l;a[i+1]=u>255?255:u<0?0:u;a[i+2]=h>255?255:h<0?0:h}function t(){this.name="DeviceCMYK";this.numComps=4;this.defaultColor=new Float32Array(this.numComps);this.defaultColor[3]=1}t.prototype={getRgb:o.prototype.getRgb,getRgbItem:function(t,r,a,i){e(t,r,1,a,i)},getRgbBuffer:function(t,r,a,i,n,o,s){for(var c=1/((1<8?Math.pow((e+16)/116,3):e*w}function l(e,t,r){if(0!==e[0]||0!==e[1]||0!==e[2]){var a=c(0),i=a,n=c(e[0]),o=a,s=c(e[1]),l=a,u=c(e[2]),h=(1-i)/(1-n),f=1-h,d=(1-o)/(1-s),g=1-d,m=(1-l)/(1-u),p=1-m;r[0]=t[0]*h+f;r[1]=t[1]*d+g;r[2]=t[2]*m+p}else{r[0]=t[0];r[1]=t[1];r[2]=t[2]}}function u(e,a,i){if(1!==e[0]||1!==e[2]){var n=i;t(d,a,n);var o=b;r(e,n,o);t(g,o,i)}else{i[0]=a[0];i[1]=a[1];i[2]=a[2]}}function h(e,r,a){var n=a;t(d,r,n);var o=b;i(e,n,o);t(g,o,a)}function f(e,r,a,i,o,c){var f=s(0,1,r[a]*c),d=s(0,1,r[a+1]*c),g=s(0,1,r[a+2]*c),b=Math.pow(f,e.GR),w=Math.pow(d,e.GG),k=Math.pow(g,e.GB),S=e.MXA*b+e.MXB*w+e.MXC*k,C=e.MYA*b+e.MYB*w+e.MYC*k,x=e.MZA*b+e.MZB*w+e.MZC*k,A=v;A[0]=S;A[1]=C;A[2]=x;var P=y;u(e.whitePoint,A,P);var I=v;l(e.blackPoint,P,I);var _=y;h(p,I,_);var O=v;t(m,_,O);var T=n(O[0]),E=n(O[1]),R=n(O[2]);i[o]=Math.round(255*T);i[o+1]=Math.round(255*E);i[o+2]=Math.round(255*R)}var d=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),g=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),m=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),p=new Float32Array([1,1,1]),b=new Float32Array(3),v=new Float32Array(3),y=new Float32Array(3),w=Math.pow(24/116,3)/8;e.prototype={getRgb:o.prototype.getRgb,getRgbItem:function(e,t,r,a){f(this,e,t,r,a,1)},getRgbBuffer:function(e,t,r,a,i,n,o){for(var s=1/((1<this.amax||this.bmin>this.bmax){(0,a.info)("Invalid Range, falling back to defaults");this.amin=-100;this.amax=100;this.bmin=-100;this.bmax=100}}function t(e){var t;t=e>=6/29?e*e*e:108/841*(e-4/29);return t}function r(e,t,r,a){return r+e*(a-r)/t}function i(e,a,i,n,o,s){var c=a[i],l=a[i+1],u=a[i+2];if(!1!==n){c=r(c,n,0,100);l=r(l,n,e.amin,e.amax);u=r(u,n,e.bmin,e.bmax)}l=l>e.amax?e.amax:le.bmax?e.bmax:u=1?255:255*Math.sqrt(h)|0;o[s+1]=f<=0?0:f>=1?255:255*Math.sqrt(f)|0;o[s+2]=d<=0?0:d>=1?255:255*Math.sqrt(d)|0}e.prototype={getRgb:o.prototype.getRgb,getRgbItem:function(e,t,r,a){i(this,e,t,!1,r,a)},getRgbBuffer:function(e,t,r,a,n,o,s){for(var c=(1<>")&&!(0,n.isEOF)(this.buf1);)if((0,n.isName)(this.buf1)){var o=this.buf1.name;this.shift();if((0,n.isEOF)(this.buf1))break;a.set(o,this.getObj(e))}else{(0,i.info)("Malformed dictionary: key must be a name object");this.shift()}if((0,n.isEOF)(this.buf1)){if(!this.recoveryMode)throw new i.FormatError("End of file inside dictionary");return a}if((0,n.isCmd)(this.buf2,"stream"))return this.allowStreams?this.makeStream(a,e):a;this.shift();return a;default:return t}if((0,i.isInt)(t)){var s=t;if((0,i.isInt)(this.buf1)&&(0,n.isCmd)(this.buf2,"R")){var c=new n.Ref(s,this.buf1);this.shift();this.shift();return c}return s}if((0,i.isString)(t)){var l=t;e&&(l=e.decryptString(l));return l}return t},findDefaultInlineStreamEnd:function(e){for(var t,r,a,n,o=e.pos,s=0;-1!==(t=e.getByte());)if(0===s)s=69===t?1:0;else if(1===s)s=73===t?2:0;else{(0,i.assert)(2===s);if(32===t||10===t||13===t){a=5;n=e.peekBytes(a);for(r=0;r127)){s=0;break}}if(2===s)break}else s=0}return e.pos-4-o},findDCTDecodeInlineStreamEnd:function(e){for(var t,r,a,n=e.pos,o=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:o=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:r=e.getUint16();r>2?e.skip(r-2):e.skip(-2)}if(o)break}a=e.pos-n;if(-1===t){(0, i.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-a);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return a},findASCII85DecodeInlineStreamEnd:function(e){for(var t,r,a=e.pos;-1!==(t=e.getByte());)if(126===t&&62===e.peekByte()){e.skip();break}r=e.pos-a;if(-1===t){(0,i.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-r);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return r},findASCIIHexDecodeInlineStreamEnd:function(e){for(var t,r,a=e.pos;-1!==(t=e.getByte())&&62!==t;);r=e.pos-a;if(-1===t){(0,i.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-r);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return r},inlineStreamSkipEI:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break},makeInlineImage:function(e){for(var t=this.lexer,r=t.stream,a=new n.Dict(this.xref);!(0,n.isCmd)(this.buf1,"ID")&&!(0,n.isEOF)(this.buf1);){if(!(0,n.isName)(this.buf1))throw new i.FormatError("Dictionary key must be a name object");var o=this.buf1.name;this.shift();if((0,n.isEOF)(this.buf1))break;a.set(o,this.getObj(e))}var s,c=a.get("Filter","F");if((0,n.isName)(c))s=c.name;else if((0,i.isArray)(c)){var l=this.xref.fetchIfRef(c[0]);(0,n.isName)(l)&&(s=l.name)}var u,h,f,d=r.pos;u="DCTDecode"===s||"DCT"===s?this.findDCTDecodeInlineStreamEnd(r):"ASCII85Decode"===s||"A85"===s?this.findASCII85DecodeInlineStreamEnd(r):"ASCIIHexDecode"===s||"AHx"===s?this.findASCIIHexDecodeInlineStreamEnd(r):this.findDefaultInlineStreamEnd(r);var g,m=r.makeSubStream(d,u,a);if(u<1e3){var p=m.getBytes();m.reset();var b=1,v=0;for(h=0,f=p.length;h=9){f=!0;break}c++}if(f){h+=c;a.pos+=c;break}h+=g;a.pos+=g}if(!f)throw new i.FormatError("Missing endstream");s=h;r.nextChar();this.shift();this.shift()}this.shift();a=a.makeSubStream(o,s,e);t&&(a=t.createStream(a,s));a=this.filter(a,e,s);a.dict=e;return a},filter:function(e,t,r){var a=t.get("Filter","F"),o=t.get("DecodeParms","DP");if((0,n.isName)(a)){(0,i.isArray)(o)&&(o=this.xref.fetchIfRef(o[0]));return this.makeFilter(e,a.name,r,o)}var s=r;if((0,i.isArray)(a))for(var c=a,l=o,u=0,h=c.length;u=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var r=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];e.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},peekChar:function(){return this.stream.peekByte()},getNumber:function(){var e=this.currentChar,t=!1,r=0,a=1;if(45===e){a=-1;e=this.nextChar();45===e&&(e=this.nextChar())}else 43===e&&(e=this.nextChar());if(46===e){r=10;e=this.nextChar()}if(10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(e<48||e>57)throw new i.FormatError("Invalid number: "+String.fromCharCode(e)+" (charCode "+e+")");for(var n=e-48,o=0,s=1;(e=this.nextChar())>=0;)if(48<=e&&e<=57){var c=e-48;if(t)o=10*o+c;else{0!==r&&(r*=10);n=10*n+c}}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,i.warn)("Badly formatted number");else{if(69!==e&&101!==e)break;e=this.peekChar();if(43===e||45===e){s=45===e?-1:1;this.nextChar()}else if(e<48||e>57)break;t=!0}0!==r&&(n/=r);t&&(n*=Math.pow(10,s*o));return a*n},getString:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var a=this.nextChar();;){var n=!1;switch(0|a){case-1:(0,i.warn)("Unterminated string");t=!0;break;case 40:++e;r.push("(");break;case 41:if(0==--e){this.nextChar();t=!0}else r.push(")");break;case 92:a=this.nextChar();switch(a){case-1:(0,i.warn)("Unterminated string");t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(a));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var o=15&a;a=this.nextChar();n=!0;if(a>=48&&a<=55){o=(o<<3)+(15&a);a=this.nextChar();if(a>=48&&a<=55){n=!1;o=(o<<3)+(15&a)}}r.push(String.fromCharCode(o));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(a))}break;default:r.push(String.fromCharCode(a))}if(t)break;n||(a=this.nextChar())}return r.join("")},getName:function(){var e,a,o=this.strBuf;o.length=0;for(;(e=this.nextChar())>=0&&!r[e];)if(35===e){e=this.nextChar();if(r[e]){(0,i.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.");o.push("#");break}var s=t(e);if(-1!==s){a=e;e=this.nextChar();var c=t(e);if(-1===c){(0,i.warn)("Lexer_getName: Illegal digit ("+String.fromCharCode(e)+") in hexadecimal number.");o.push("#",String.fromCharCode(a));if(r[e])break;o.push(String.fromCharCode(e));continue}o.push(String.fromCharCode(s<<4|c))}else o.push("#",String.fromCharCode(e))}else o.push(String.fromCharCode(e));o.length>127&&(0,i.warn)("name token is longer than allowed by the spec: "+o.length);return n.Name.get(o.join(""))},getHexString:function(){var e=this.strBuf;e.length=0;for(var a,n,o=this.currentChar,s=!0;;){if(o<0){(0,i.warn)("Unterminated hex string");break}if(62===o){this.nextChar();break}if(1!==r[o]){if(s){a=t(o);if(-1===a){(0,i.warn)('Ignoring invalid character "'+o+'" in hex string');o=this.nextChar();continue}}else{n=t(o);if(-1===n){(0,i.warn)('Ignoring invalid character "'+o+'" in hex string');o=this.nextChar();continue}e.push(String.fromCharCode(a<<4|n))}s=!s;o=this.nextChar()}else o=this.nextChar()}return e.join("")},getObj:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return n.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==r[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:this.nextChar();return n.Cmd.get("[");case 93:this.nextChar();return n.Cmd.get("]");case 60:t=this.nextChar();if(60===t){this.nextChar();return n.Cmd.get("<<")}return this.getHexString();case 62:t=this.nextChar();if(62===t){this.nextChar();return n.Cmd.get(">>")}return n.Cmd.get(">");case 123:this.nextChar();return n.Cmd.get("{");case 125:this.nextChar();return n.Cmd.get("}");case 41:this.nextChar();throw new i.FormatError("Illegal character: "+t)}for(var a=String.fromCharCode(t),o=this.knownCommands,s=o&&void 0!==o[a];(t=this.nextChar())>=0&&!r[t];){var c=a+String.fromCharCode(t);if(s&&void 0===o[c])break;if(128===a.length)throw new i.FormatError("Command token too long: "+a.length);a=c;s=o&&void 0!==o[a]}return"true"===a||"false"!==a&&("null"===a?null:n.Cmd.get(a))},skipToNextLine:function(){for(var e=this.currentChar;e>=0;){if(13===e){e=this.nextChar();10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}};return e}(),c={create:function(e){function t(e,t){var r=f.get(e);if((0,i.isInt)(r)&&(t?r>=0:r>0))return r;throw new Error('The "'+e+'" parameter in the linearization dictionary is invalid.')}var r,a,c=new o(new s(e),!1,null),l=c.getObj(),u=c.getObj(),h=c.getObj(),f=c.getObj();if(!((0,i.isInt)(l)&&(0,i.isInt)(u)&&(0,n.isCmd)(h,"obj")&&(0,n.isDict)(f)&&(0,i.isNum)(r=f.get("Linearized"))&&r>0))return null;if((a=t("L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:a,hints:function(){var e,t,r=f.get("H");if((0,i.isArray)(r)&&(2===(e=r.length)||4===e)){for(var a=0;a0))throw new Error("Hint ("+a+") in the linearization dictionary is invalid.");return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(),objectNumberFirst:t("O"),endFirst:t("E"),numPages:t("N"),mainXRefEntriesOffset:t("T"),pageFirst:f.has("P")?t("P",!0):0}}};t.Lexer=s;t.Linearization=c;t.Parser=o},function(e,t,r){"use strict";function a(e){var t;if("object"!==(void 0===e?"undefined":i(e)))return!1;if((0,o.isDict)(e))t=e;else{if(!(0,o.isStream)(e))return!1;t=e.dict}return t.has("FunctionType")}Object.defineProperty(t,"__esModule",{value:!0});t.PostScriptCompiler=t.PostScriptEvaluator=t.PDFFunction=t.isPDFFunction=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=r(0),o=r(1),s=r(33),c=function(){return{getSampleArray:function(e,t,r,a){var i,n,o=1;for(i=0,n=e.length;i>c)*u;l&=(1<r?e=r:e0&&(f=r[u-1]);var d=t[1];u>1,s=t.length>>1,c=new u(a),l=Object.create(null),f=8192,d=new Float32Array(s);return function(e,t,a,i){var n,u,h="",g=d;for(n=0;ny&&(u=y)}p[n]=u}if(f>0){f--;l[h]=p}a.set(p,i)}else a.set(m,i)}}}}(),l=function(){function e(e){this.stack=e?Array.prototype.slice.call(e,0):[]}e.prototype={push:function(e){if(this.stack.length>=100)throw new Error("PostScript function stack overflow.");this.stack.push(e)},pop:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()},copy:function(e){if(this.stack.length+e>=100)throw new Error("PostScript function stack overflow.");for(var t=this.stack,r=t.length-e,a=e-1;a>=0;a--,r++)t.push(t[r])},index:function(e){this.push(this.stack[this.stack.length-e-1])},roll:function(e,t){var r,a,i,n=this.stack,o=n.length-e,s=n.length-1,c=o+(t-Math.floor(t/e)*e);for(r=o,a=s;r0?i.push(r<>a);break;case"ceiling":r=i.pop();i.push(Math.ceil(r));break;case"copy":r=i.pop();i.copy(r);break;case"cos":r=i.pop();i.push(Math.cos(r));break;case"cvi":r=0|i.pop();i.push(r);break;case"cvr":break;case"div":a=i.pop();r=i.pop();i.push(r/a);break;case"dup":i.copy(1);break;case"eq":a=i.pop();r=i.pop();i.push(r===a);break;case"exch":i.roll(2,1);break;case"exp":a=i.pop();r=i.pop();i.push(Math.pow(r,a));break;case"false":i.push(!1);break;case"floor":r=i.pop();i.push(Math.floor(r));break;case"ge":a=i.pop();r=i.pop();i.push(r>=a);break;case"gt":a=i.pop();r=i.pop();i.push(r>a);break;case"idiv":a=i.pop();r=i.pop();i.push(r/a|0);break;case"index":r=i.pop();i.index(r);break;case"le":a=i.pop();r=i.pop();i.push(r<=a);break;case"ln":r=i.pop();i.push(Math.log(r));break;case"log":r=i.pop();i.push(Math.log(r)/Math.LN10);break;case"lt":a=i.pop();r=i.pop();i.push(r=t?new r(t):e.max<=t?e:new i(e,t)}function f(){}e.prototype.visit=function(e){throw new Error("abstract method")};t.prototype=Object.create(e.prototype);t.prototype.visit=function(e){e.visitArgument(this)};r.prototype=Object.create(e.prototype);r.prototype.visit=function(e){e.visitLiteral(this)};a.prototype=Object.create(e.prototype);a.prototype.visit=function(e){e.visitBinaryOperation(this)};i.prototype=Object.create(e.prototype);i.prototype.visit=function(e){e.visitMin(this)};n.prototype=Object.create(e.prototype);n.prototype.visit=function(e){e.visitVariable(this)};o.prototype=Object.create(e.prototype);o.prototype.visit=function(e){e.visitVariableDefinition(this)};s.prototype={visitArgument:function(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")},visitVariable:function(e){this.parts.push("v",e.index)},visitLiteral:function(e){this.parts.push(e.number)},visitBinaryOperation:function(e){this.parts.push("(");e.arg1.visit(this);this.parts.push(" ",e.op," ");e.arg2.visit(this);this.parts.push(")")},visitVariableDefinition:function(e){this.parts.push("var ");e.variable.visit(this);this.parts.push(" = ");e.arg.visit(this);this.parts.push(";")},visitMin:function(e){this.parts.push("Math.min(");e.arg.visit(this);this.parts.push(", ",e.max,")")},toString:function(){return this.parts.join("")}};f.prototype={compile:function(e,a,i){var f,d,g,m,p,b,v,y,w,k,S=[],C=[],x=a.length>>1,A=i.length>>1,P=0;for(f=0;fe.min){o.unshift("Math.max(",a,", ");o.push(")")}if(n>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}var t=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];e.prototype={byteIn:function(){var e=this.data,t=this.bp;if(255===e[t]){if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this.clow+=e[t]<<9;this.ct=7;this.bp=t}}else{t++;this.clow+=t65535){this.chigh+=this.clow>>16;this.clow&=65535}},readBit:function(e,r){var a,i=e[r]>>1,n=1&e[r],o=t[i],s=o.qe,c=this.a-s;if(this.chigh>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&c));this.a=c;e[r]=i<<1|n;return a}};return e}();t.ArithmeticDecoder=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CFFCompiler=t.CFFPrivateDict=t.CFFTopDict=t.CFFCharset=t.CFFIndex=t.CFFStrings=t.CFFHeader=t.CFF=t.CFFParser=t.CFFStandardStrings=void 0;var a=r(0),i=r(21),n=r(4),o=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],s=function(){function e(e,t,r){this.bytes=e.getBytes();this.properties=t;this.seacAnalysisEnabled=!!r}var t=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],r=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn:function(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn:function(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];e.prototype={parse:function(){var e=this.properties,t=new c;this.cff=t;var r=this.parseHeader(),a=this.parseIndex(r.endPos),i=this.parseIndex(a.endPos),n=this.parseIndex(i.endPos),o=this.parseIndex(n.endPos),s=this.parseDict(i.obj.get(0)),l=this.createDict(d,s,t.strings);t.header=r.obj;t.names=this.parseNameIndex(a.obj);t.strings=this.parseStringIndex(n.obj);t.topDict=l;t.globalSubrIndex=o.obj;this.parsePrivateDict(t.topDict);t.isCIDFont=l.hasName("ROS");var u=l.getByName("CharStrings"),h=this.parseIndex(u).obj,f=l.getByName("FontMatrix");f&&(e.fontMatrix=f);var g=l.getByName("FontBBox");if(g){e.ascent=Math.max(g[3],g[1]);e.descent=Math.min(g[1],g[3]);e.ascentScaled=!0}var m,p;if(t.isCIDFont){for(var b=this.parseIndex(l.getByName("FDArray")).obj,v=0,y=b.count;v=t)throw new a.FormatError("Invalid CFF header");if(0!==r){(0,a.info)("cff data is shifted");e=e.subarray(r);this.bytes=e}var i=e[0],n=e[1],o=e[2],s=e[3];return{obj:new l(i,n,o,s),endPos:o}},parseDict:function(e){function t(){for(var t="",a=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],i=e.length;r>4,s=15&n;if(15===o)break;t+=a[o];if(15===s)break;t+=a[s]}return parseFloat(t)}var r=0,i=[],n=[];r=0;for(var o=e.length;r>16;return i}if(29===i){i=e[r++];i=i<<8|e[r++];i=i<<8|e[r++];i=i<<8|e[r++];return i}if(i>=32&&i<=246)return i-139;if(i>=247&&i<=250)return 256*(i-247)+e[r++]+108;if(i>=251&&i<=254)return-256*(i-251)-e[r++]-108;(0,a.warn)('CFFParser_parseDict: "'+i+'" is a reserved command.');return NaN}())}return n},parseIndex:function(e){var t,r,a=new h,i=this.bytes,n=i[e++]<<8|i[e++],o=[],s=e;if(0!==n){var c=i[e++],l=e+(n+1)*c-1;for(t=0,r=n+1;t126||91===l||93===l||40===l||41===l||123===l||125===l||60===l||62===l||47===l||37===l||35===l?95:l:s[c]=l}t.push((0,a.bytesToString)(s))}return t},parseStringIndex:function(e){for(var t=new u,r=0,i=e.count;r10)return!1;for(var s=e.stackSize,c=e.stack,l=i.length,u=0;u>16;u+=2;s++}else if(14===h){if(s>=4){s-=4;if(this.seacAnalysisEnabled){e.seac=c.slice(s,s+4);return!1}}f=t[h]}else if(h>=32&&h<=246){c[s]=h-139;s++}else if(h>=247&&h<=254){c[s]=h<251?(h-247<<8)+i[u]+108:-(h-251<<8)-i[u]-108;u++;s++}else if(255===h){c[s]=(i[u]<<24|i[u+1]<<16|i[u+2]<<8|i[u+3])/65536;u+=4;s++}else if(19===h||20===h){e.hints+=s>>1;u+=e.hints+7>>3;s%=2;f=t[h]}else{if(10===h||29===h){var g;g=10===h?n:o;if(!g){f=t[h];(0,a.warn)("Missing subrsIndex for "+f.id);return!1}var m=32768;g.count<1240?m=107:g.count<33900&&(m=1131);var p=c[--s]+m;if(p<0||p>=g.count||isNaN(p)){f=t[h];(0,a.warn)("Out of bounds subrIndex for "+f.id);return!1}e.stackSize=s;e.callDepth++;var b=this.parseCharString(e,g.get(p),n,o);if(!b)return!1;e.callDepth--;s=e.stackSize;continue}if(11===h){e.stackSize=s;return!0}f=t[h]}if(f){f.stem&&(e.hints+=s>>1);if("min"in f&&!e.undefStack&&s=2&&f.stem?s%=2:s>1&&(0,a.warn)("Found too many parameters for stack-clearing command");s>0&&c[s-1]>=0&&(e.width=c[s-1])}if("stackDelta"in f){"stackFn"in f&&f.stackFn(c,s);s+=f.stackDelta}else if(f.stackClearing)s=0;else if(f.resetStack){s=0;e.undefStack=!1}else if(f.undefStack){s=0;e.undefStack=!0;e.firstStackClearing=!1}}}e.stackSize=s;return!0},parseCharStrings:function(e,t,r,i,n){for(var o=[],s=[],c=e.count,l=0;l=n.length){(0,a.warn)("Invalid fd index for glyph index.");f=!1}f&&(d=n[g].privateDict.subrsIndex)}else t&&(d=t);f&&(f=this.parseCharString(h,u,d,r));null!==h.width&&(s[l]=h.width);null!==h.seac&&(o[l]=h.seac);f||e.set(l,new Uint8Array([14]))}return{charStrings:e,seacs:o,widths:s}},emptyPrivateDictionary:function(e){var t=this.createDict(g,[],e.strings);e.setByKey(18,[0,0]);e.privateDict=t},parsePrivateDict:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if((0,a.isArray)(t)&&2===t.length){var r=t[0],i=t[1];if(0===r||i>=this.bytes.length)this.emptyPrivateDictionary(e);else{var n=i+r,o=this.bytes.subarray(i,n),s=this.parseDict(o),c=this.createDict(g,s,e.strings);e.privateDict=c;if(c.getByName("Subrs")){var l=c.getByName("Subrs"),u=i+l;if(0===l||u>=this.bytes.length)this.emptyPrivateDictionary(e);else{var h=this.parseIndex(u);c.subrsIndex=h.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)},parseCharsets:function(e,t,r,n){if(0===e)return new p(!0,m.ISO_ADOBE,i.ISOAdobeCharset);if(1===e)return new p(!0,m.EXPERT,i.ExpertCharset);if(2===e)return new p(!0,m.EXPERT_SUBSET,i.ExpertSubsetCharset);var o,s,c,l=this.bytes,u=e,h=l[e++],f=[".notdef"];t-=1;switch(h){case 0:for(c=0;c=0&&e<=390?o[e]:e-391<=this.strings.length?this.strings[e-391]:o[0]},add:function(e){this.strings.push(e)},get count(){return this.strings.length}};return e}(),h=function(){function e(){this.objects=[];this.length=0}e.prototype={add:function(e){this.length+=e.length;this.objects.push(e)},set:function(e,t){this.length+=t.length-this.objects[e].length;this.objects[e]=t},get:function(e){return this.objects[e]},get count(){return this.objects.length}};return e}(),f=function(){function e(e,t){this.keyToNameMap=e.keyToNameMap;this.nameToKeyMap=e.nameToKeyMap;this.defaults=e.defaults;this.types=e.types;this.opcodes=e.opcodes;this.order=e.order;this.strings=t;this.values=Object.create(null)}e.prototype={setByKey:function(e,t){if(!(e in this.keyToNameMap))return!1;var r=t.length;if(0===r)return!0;for(var i=0;i=this.fdSelect.length?-1:this.fdSelect[e]}};return e}(),y=function(){function e(){this.offsets=Object.create(null)}e.prototype={isTracking:function(e){return e in this.offsets},track:function(e,t){if(e in this.offsets)throw new a.FormatError("Already tracking location of "+e);this.offsets[e]=t},offset:function(e){for(var t in this.offsets)this.offsets[t]+=e},setEntryLocation:function(e,t,r){if(!(e in this.offsets))throw new a.FormatError("Not tracking location of "+e);for(var i=r.data,n=this.offsets[e],o=0,s=t.length;o>24&255;i[u]=d>>16&255;i[h]=d>>8&255;i[f]=255&d}}};return e}(),w=function(){function e(e){this.cff=e}e.prototype={compile:function(){var e=this.cff,t={data:[],length:0,add:function(e){this.data=this.data.concat(e);this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var i=this.compileNameIndex(e.names);t.add(i);if(e.isCIDFont&&e.topDict.hasName("FontMatrix")){var n=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(var o=0,s=e.fdArray.length;o=-107&&e<=107)t=[e+139];else if(e>=108&&e<=1131){e-=108;t=[247+(e>>8),255&e]}else if(e>=-1131&&e<=-108){e=-e-108;t=[251+(e>>8),255&e]}else t=e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e];return t},compileHeader:function(e){return[e.major,e.minor,e.hdrSize,e.offSize]},compileNameIndex:function(e){for(var t=new h,r=0,i=e.length;r>8&255,255&a],o=1;for(i=0;i>8&255,255&c):3===s?n.push(c>>16&255,c>>8&255,255&c):n.push(c>>>24&255,c>>16&255,c>>8&255,255&c);r[i]&&(c+=r[i].length)}for(i=0;i=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(a=r;a=t||t<=this.progressiveDataLength))for(var r=this.chunkSize,i=Math.floor(e/r),n=Math.floor((t-1)/r)+1,o=i;o=this.end)return-1;this.ensureByte(e);return 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,r=this.pos,a=this.end;if(!e){this.ensureRange(r,a);return t.subarray(r,a)}var i=r+e;i>a&&(i=a);this.ensureRange(r,i);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},getByteRange:function(e,t){this.ensureRange(e,t);return this.bytes.subarray(e,t)},skip:function(e){e||(e=1);this.pos+=e},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(e,t,r){function a(){}this.ensureRange(e,e+t);a.prototype=Object.create(this);a.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,a=[],i=t;i=0&&a+1!==n){t.push({beginChunk:r,endChunk:a+1});r=n}i+1===e.length&&t.push({beginChunk:r,endChunk:n+1});a=n}return t},onProgress:function(e){var t=this.stream.numChunksLoaded*this.chunkSize+e.loaded;this.msgHandler.send("DocProgress",{loaded:t,total:this.length})},onReceiveData:function(e){var t=e.chunk,r=void 0===e.begin,i=r?this.progressiveDataLength:e.begin,n=i+t.byteLength,o=Math.floor(i/this.chunkSize),s=n>5&255;d[n++]=i>>13&255;d[n++]=i>>21&255;d[n++]=i>>>29&255;d[n++]=0;d[n++]=0;d[n++]=0;var g=new Int32Array(16);for(n=0;n>>32-C)|0;b=k}c=c+b|0;l=l+v|0;u=u+y|0;h=h+w|0}return new Uint8Array([255&c,c>>8&255,c>>16&255,c>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255,255&u,u>>8&255,u>>16&255,u>>>24&255,255&h,h>>8&255,h>>16&255,h>>>24&255])}var t=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),r=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return e}(),c=function(){function e(e,t){this.high=0|e;this.low=0|t}e.prototype={and:function(e){this.high&=e.high;this.low&=e.low},xor:function(e){this.high^=e.high;this.low^=e.low},or:function(e){this.high|=e.high;this.low|=e.low},shiftRight:function(e){if(e>=32){this.low=this.high>>>e-32|0;this.high=0}else{this.low=this.low>>>e|this.high<<32-e;this.high=this.high>>>e|0}},shiftLeft:function(e){if(e>=32){this.high=this.low<>>32-e;this.low=this.low<>>e|r<<32-e;this.high=r>>>e|t<<32-e},not:function(){this.high=~this.high;this.low=~this.low},add:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1);this.low=0|t;this.high=0|r},copyTo:function(e,t){e[t]=this.high>>>24&255;e[t+1]=this.high>>16&255;e[t+2]=this.high>>8&255;e[t+3]=255&this.high;e[t+4]=this.low>>>24&255;e[t+5]=this.low>>16&255;e[t+6]=this.low>>8&255;e[t+7]=255&this.low},assign:function(e){this.high=e.high;this.low=e.low}};return e}(),l=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function a(t){return e(t,2)^e(t,13)^e(t,22)}function i(t){return e(t,6)^e(t,11)^e(t,25)}function n(t){return e(t,7)^e(t,18)^t>>>3}function o(t){return e(t,17)^e(t,19)^t>>>10}function s(e,s,l){var u,h,f,d=1779033703,g=3144134277,m=1013904242,p=2773480762,b=1359893119,v=2600822924,y=528734635,w=1541459225,k=64*Math.ceil((l+9)/64),S=new Uint8Array(k);for(u=0;u>>29&255;S[u++]=l>>21&255;S[u++]=l>>13&255;S[u++]=l>>5&255;S[u++]=l<<3&255;var C=new Uint32Array(64);for(u=0;u>24&255,d>>16&255,d>>8&255,255&d,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,p>>24&255,p>>16&255,p>>8&255,255&p,b>>24&255,b>>16&255,b>>8&255,255&b,v>>24&255,v>>16&255,v>>8&255,255&v,y>>24&255,y>>16&255,y>>8&255,255&y,w>>24&255,w>>16&255,w>>8&255,255&w])}var c=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return s}(),u=function(){function e(e,t,r,a,i){e.assign(t);e.and(r);i.assign(t);i.not();i.and(a);e.xor(i)}function t(e,t,r,a,i){e.assign(t);e.and(r);i.assign(t);i.and(a);e.xor(i);i.assign(r);i.and(a);e.xor(i)}function r(e,t,r){e.assign(t);e.rotateRight(28);r.assign(t);r.rotateRight(34);e.xor(r);r.assign(t);r.rotateRight(39);e.xor(r)}function a(e,t,r){e.assign(t);e.rotateRight(14);r.assign(t);r.rotateRight(18);e.xor(r);r.assign(t);r.rotateRight(41);e.xor(r)}function i(e,t,r){e.assign(t);e.rotateRight(1);r.assign(t);r.rotateRight(8);e.xor(r);r.assign(t);r.shiftRight(7);e.xor(r)}function n(e,t,r){e.assign(t);e.rotateRight(19);r.assign(t);r.rotateRight(61);e.xor(r);r.assign(t);r.shiftRight(6);e.xor(r)}function o(o,l,u,h){h=!!h;var f,d,g,m,p,b,v,y;if(h){f=new c(3418070365,3238371032);d=new c(1654270250,914150663);g=new c(2438529370,812702999);m=new c(355462360,4144912697);p=new c(1731405415,4290775857);b=new c(2394180231,1750603025);v=new c(3675008525,1694076839);y=new c(1203062813,3204075428)}else{f=new c(1779033703,4089235720);d=new c(3144134277,2227873595);g=new c(1013904242,4271175723);m=new c(2773480762,1595750129);p=new c(1359893119,2917565137);b=new c(2600822924,725511199);v=new c(528734635,4215389547);y=new c(1541459225,327033209)}var w,k,S,C=128*Math.ceil((u+17)/128),x=new Uint8Array(C);for(w=0;w>>29&255;x[w++]=u>>21&255;x[w++]=u>>13&255;x[w++]=u>>5&255;x[w++]=u<<3&255;var A=new Array(80);for(w=0;w<80;w++)A[w]=new c(0,0);var P,I=new c(0,0),_=new c(0,0),O=new c(0,0),T=new c(0,0),E=new c(0,0),R=new c(0,0),F=new c(0,0),B=new c(0,0),M=new c(0,0),D=new c(0,0),L=new c(0,0),N=new c(0,0);for(w=0;w=1;--a){o=r[13];r[13]=r[9];r[9]=r[5];r[5]=r[1];r[1]=o;o=r[14];c=r[10];r[14]=r[6];r[10]=r[2];r[6]=o;r[2]=c;o=r[15];c=r[11];l=r[7];r[15]=r[3];r[11]=o;r[7]=c;r[3]=l;for(i=0;i<16;++i)r[i]=s[r[i]];for(i=0,n=16*a;i<16;++i,++n)r[i]^=t[n];for(i=0;i<16;i+=4){var h=u[r[i]],f=u[r[i+1]],d=u[r[i+2]],g=u[r[i+3]];o=h^f>>>8^f<<24^d>>>16^d<<16^g>>>24^g<<8;r[i]=o>>>24&255;r[i+1]=o>>16&255;r[i+2]=o>>8&255;r[i+3]=255&o}}o=r[13];r[13]=r[9];r[9]=r[5];r[5]=r[1];r[1]=o;o=r[14];c=r[10];r[14]=r[6];r[10]=r[2];r[6]=o;r[2]=c;o=r[15];c=r[11];l=r[7];r[15]=r[3];r[11]=o;r[7]=c;r[3]=l;for(i=0;i<16;++i){r[i]=s[r[i]];r[i]^=t[i]}return r}function r(e,t){var r,a,i,n,s=new Uint8Array(16);s.set(e);for(u=0;u<16;++u)s[u]^=t[u];for(l=1;l<10;l++){for(u=0;u<16;++u)s[u]=o[s[u]];i=s[1];s[1]=s[5];s[5]=s[9];s[9]=s[13];s[13]=i;i=s[2];a=s[6];s[2]=s[10];s[6]=s[14];s[10]=i;s[14]=a;i=s[3];a=s[7];r=s[11];s[3]=s[15];s[7]=i;s[11]=a;s[15]=r;for(var u=0;u<16;u+=4){var h=s[u+0],f=s[u+1],d=s[u+2],g=s[u+3];r=h^f^d^g;s[u+0]^=r^c[h^f];s[u+1]^=r^c[f^d];s[u+2]^=r^c[d^g];s[u+3]^=r^c[g^h]}for(u=0,n=16*l;u<16;++u,++n)s[u]^=t[n]}for(u=0;u<16;++u)s[u]=o[s[u]];i=s[1];s[1]=s[5];s[5]=s[9];s[9]=s[13];s[13]=i;i=s[2];a=s[6];s[2]=s[10];s[6]=s[14];s[10]=i;s[14]=a;i=s[3];a=s[7];r=s[11];s[3]=s[15];s[7]=i;s[11]=a;s[15]=r;for(u=0,n=160;u<16;++u,++n)s[u]^=t[n];return s}function a(t){this.key=e(t);this.buffer=new Uint8Array(16);this.bufferPosition=0}function i(e,r){var a,i,n,o=e.length,s=this.buffer,c=this.bufferPosition,l=[],u=this.iv;for(a=0;a=n;--a)if(d[a]!==g){g=0;break}f-=g;l[l.length-1]=d.subarray(0,16-g)}}var m=new Uint8Array(f);for(a=0,i=0,n=l.length;a=256&&(r=255&(27^r))}for(var u=0;u<4;++u){t[a]=o^=t[a-32];a++;t[a]=s^=t[a-32];a++;t[a]=c^=t[a-32];a++;t[a]=l^=t[a-32];a++}}return t}function t(e,t){var r=new Uint8Array(16);r.set(e);var a,i,n,s,c,u;for(i=0,n=224;i<16;++i,++n)r[i]^=t[n];for(a=13;a>=1;--a){s=r[13];r[13]=r[9];r[9]=r[5];r[5]=r[1];r[1]=s;s=r[14];c=r[10];r[14]=r[6];r[10]=r[2];r[6]=s;r[2]=c;s=r[15];c=r[11];u=r[7];r[15]=r[3];r[11]=s;r[7]=c;r[3]=u;for(i=0;i<16;++i)r[i]=o[r[i]];for(i=0,n=16*a;i<16;++i,++n)r[i]^=t[n];for(i=0;i<16;i+=4){var h=l[r[i]],f=l[r[i+1]],d=l[r[i+2]],g=l[r[i+3]];s=h^f>>>8^f<<24^d>>>16^d<<16^g>>>24^g<<8;r[i]=s>>>24&255;r[i+1]=s>>16&255;r[i+2]=s>>8&255;r[i+3]=255&s}}s=r[13];r[13]=r[9];r[9]=r[5];r[5]=r[1];r[1]=s;s=r[14];c=r[10];r[14]=r[6];r[10]=r[2];r[6]=s;r[2]=c;s=r[15];c=r[11];u=r[7];r[15]=r[3];r[11]=s;r[7]=c;r[3]=u;for(i=0;i<16;++i){r[i]=o[r[i]];r[i]^=t[i]}return r}function r(e,t){var r,a,i,o,l=new Uint8Array(16);l.set(e);for(u=0;u<16;++u)l[u]^=t[u];for(c=1;c<14;c++){for(u=0;u<16;++u)l[u]=n[l[u]];i=l[1];l[1]=l[5];l[5]=l[9];l[9]=l[13];l[13]=i;i=l[2];a=l[6];l[2]=l[10];l[6]=l[14];l[10]=i;l[14]=a;i=l[3];a=l[7];r=l[11];l[3]=l[15];l[7]=i;l[11]=a;l[15]=r;for(var u=0;u<16;u+=4){var h=l[u+0],f=l[u+1],d=l[u+2],g=l[u+3];r=h^f^d^g;l[u+0]^=r^s[h^f];l[u+1]^=r^s[f^d];l[u+2]^=r^s[d^g];l[u+3]^=r^s[g^h]}for(u=0,o=16*c;u<16;++u,++o)l[u]^=t[o]}for(u=0;u<16;++u)l[u]=n[l[u]];i=l[1];l[1]=l[5];l[5]=l[9];l[9]=l[13];l[13]=i;i=l[2];a=l[6];l[2]=l[10];l[6]=l[14];l[10]=i;l[14]=a;i=l[3];a=l[7];r=l[11];l[3]=l[15];l[7]=i;l[11]=a;l[15]=r;for(u=0,o=224;u<16;++u,++o)l[u]^=t[o];return l}function a(t){this.key=e(t);this.buffer=new Uint8Array(16);this.bufferPosition=0}function i(e,r){var a,i,n,o=e.length,s=this.buffer,c=this.bufferPosition,l=[],u=this.iv;for(a=0;a=n;--a)if(d[a]!==g){g=0;break}f-=g;l[l.length-1]=d.subarray(0,16-g)}}var m=new Uint8Array(f);for(a=0,i=0,n=l.length;ao-32;){var s=t.length+i.length+a.length,c=new Uint8Array(64*s),f=e(t,i);f=e(f,a);for(var g=0,m=0;g<64;g++,m+=s)c.set(f,m);n=new d(i.subarray(0,16)).encrypt(c,i.subarray(16,32));for(var p=0,b=0;b<16;b++){p*=1;p%=3;p+=(n[b]>>>0)%3;p%=3}0===p?i=l(n,0,n.length):1===p?i=h(n,0,n.length):2===p&&(i=u(n,0,n.length));o++}return i.subarray(0,32)}function r(){}function a(e,t){if(e.length!==t.length)return!1;for(var r=0;r>8&255;g[m++]=i>>16&255;g[m++]=i>>>24&255;for(h=0,f=e.length;h=4&&!l){g[m++]=255;g[m++]=255;g[m++]=255;g[m++]=255}var p=s(g,0,m),b=c>>3;if(n>=3)for(h=0;h<50;++h)p=s(p,0,b);var v,y,w=p.subarray(0,b);if(n>=3){for(m=0;m<32;++m)g[m]=u[m];for(h=0,f=e.length;h>3;if(r>=3)for(i=0;i<50;++i)h=s(h,0,h.length);var d,g;if(r>=3){g=t;var m,p=new Uint8Array(f);for(i=19;i>=0;i--){for(m=0;m=4){var C=n.get("CF");(0,i.isDict)(C)&&(C.suppressEncryption=!0);this.cf=C;this.stmf=n.get("StmF")||h;this.strf=n.get("StrF")||h;this.eff=n.get("EFF")||this.stmf}}function c(e,t,r,a){var i,n,o=new Uint8Array(r.length+9);for(i=0,n=r.length;i>8&255;o[i++]=e>>16&255;o[i++]=255&t;o[i++]=t>>8&255;if(a){o[i++]=115;o[i++]=65;o[i++]=108;o[i++]=84}return s(o,0,i).subarray(0,Math.min(r.length+5,16))}function l(e,t,r,n,s){if(!(0,i.isName)(t))throw new a.FormatError("Invalid crypt filter name.");var l,u=e.get(t.name);null!==u&&void 0!==u&&(l=u.get("CFM"));if(!l||"None"===l.name)return function(){return new f};if("V2"===l.name)return function(){return new o(c(r,n,s,!1))};if("AESV2"===l.name)return function(){return new d(c(r,n,s,!0))};if("AESV3"===l.name)return function(){return new g(s)};throw new a.FormatError("Unknown crypto method")}var u=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),h=i.Name.get("Identity");n.prototype={createCipherTransform:function(e,t){if(4===this.algorithm||5===this.algorithm)return new b(l(this.cf,this.stmf,e,t,this.encryptionKey),l(this.cf,this.strf,e,t,this.encryptionKey));var r=c(e,t,this.encryptionKey,!1),a=function(){return new o(r)};return new b(a,a)}};return n}();t.AES128Cipher=d;t.AES256Cipher=g;t.ARCFourCipher=o;t.CipherTransformFactory=v;t.PDF17=m;t.PDF20=p;t.calculateMD5=s;t.calculateSHA256=l;t.calculateSHA384=h;t.calculateSHA512=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.PartialEvaluator=t.OperatorList=void 0;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},i=r(0),n=r(22),o=r(2),s=r(1),c=r(25),l=r(4),u=r(16),h=r(15),f=r(31),d=r(6),g=r(5),m=r(20),p=r(3),b=r(7),v=r(29),y=r(30),w=r(26),k=function(){function e(e,t,r,a){this.xref=e;this.resources=t;this.handler=r;this.forceDataSchema=a}function t(e){var t=this,r=e.pdfManager,a=e.xref,n=e.handler,o=e.pageIndex,s=e.idFactory,c=e.fontCache,l=e.builtInCMapCache,u=e.options,h=void 0===u?null:u;this.pdfManager=r;this.xref=a;this.handler=n;this.pageIndex=o;this.idFactory=s;this.fontCache=c;this.builtInCMapCache=l;this.options=h||k;this.fetchBuiltInCMap=function(e){var r=t.builtInCMapCache[e];return r?Promise.resolve(r):t.handler.sendWithPromise("FetchBuiltInCMap",{name:e}).then(function(r){r.compressionType!==i.CMapCompressionType.NONE&&(t.builtInCMapCache[e]=r);return r})}}function r(){this.reset()}function g(e){if(!(0,s.isName)(e))return"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}(0,i.warn)("Unsupported blend mode: "+e.name);return"source-over"}var k={forceDataSchema:!1,maxImageSize:-1,disableFontFace:!1,nativeImageDecoderSupport:i.NativeImageDecoding.DECODE,ignoreErrors:!1};e.prototype={canDecode:function(t){return t instanceof o.JpegStream&&e.isDecodable(t,this.xref,this.resources)},decode:function(e){var t=e.dict,r=t.get("ColorSpace","CS");r=p.ColorSpace.parse(r,this.xref,this.resources);var a=r.numComps;return this.handler.sendWithPromise("JpegDecode",[e.getIR(this.forceDataSchema),a]).then(function(t){var r=t.data;return new o.Stream(r,0,r.length,e.dict)})}};e.isSupported=function(e,t,r){var a=e.dict;if(a.has("DecodeParms")||a.has("DP"))return!1;var i=p.ColorSpace.parse(a.get("ColorSpace","CS"),t,r);return("DeviceGray"===i.name||"DeviceRGB"===i.name)&&i.isDefaultDecode(a.getArray("Decode","D"))};e.isDecodable=function(e,t,r){var a=e.dict;if(a.has("DecodeParms")||a.has("DP"))return!1;var i=p.ColorSpace.parse(a.get("ColorSpace","CS"),t,r);return(1===i.numComps||3===i.numComps)&&i.isDefaultDecode(a.getArray("Decode","D"))};r.prototype={check:function(){if(++this.checked<100)return!1;this.checked=0;return this.endTime<=Date.now()},reset:function(){this.endTime=Date.now()+20;this.checked=0}};var _=Promise.resolve();t.prototype={clone:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=Object.create(this);t.options=e;return t},hasBlendModes:function(e){if(!(0,s.isDict)(e))return!1;var t=Object.create(null);e.objId&&(t[e.objId]=!0);for(var r=[e],a=this.xref;r.length;){var i,n,o,c=r.shift(),l=c.get("ExtGState");if((0,s.isDict)(l)){var u=l.getKeys();for(n=0,o=u.length;nd)(0,i.warn)("Image exceeded maximum allowed size and was removed.");else{var g,m,p=u.get("ImageMask","IM")||!1;if(p){var b=u.get("Width","W"),v=u.get("Height","H"),y=b+7>>3,k=r.getBytes(y*v),S=u.getArray("Decode","D"),C=!!S&&S[0]>0;g=w.PDFImage.createMask(k,b,v,r instanceof o.DecodeStream,C);g.cached=!0;m=[g];n.addOp(i.OPS.paintImageMaskXObject,m);s&&(c[s]={fn:i.OPS.paintImageMaskXObject,args:m})}else{var x=u.get("SMask","SM")||!1,A=u.get("Mask")||!1;if(!a||x||A||r instanceof o.JpegStream||!(h+f<200)){var P=this.options.nativeImageDecoderSupport,I="img_"+this.idFactory.createObjId();n.addDependency(I);m=[I,h,f];if(P!==i.NativeImageDecoding.NONE&&!x&&!A&&r instanceof o.JpegStream&&e.isSupported(r,this.xref,t)){n.addOp(i.OPS.paintJpegXObject,m);this.handler.send("obj",[I,this.pageIndex,"JpegStream",r.getIR(this.options.forceDataSchema)]);s&&(c[s]={fn:i.OPS.paintJpegXObject,args:m})}else{var _=null;P===i.NativeImageDecoding.DECODE&&(r instanceof o.JpegStream||A instanceof o.JpegStream||x instanceof o.JpegStream)&&(_=new e(this.xref,t,this.handler,this.options.forceDataSchema));w.PDFImage.buildImage(this.handler,this.xref,t,r,a,_).then(function(e){var t=e.createImageData(!1);l.handler.send("obj",[I,l.pageIndex,"Image",t],[t.data.buffer])}).catch(function(e){(0,i.warn)("Unable to decode image: "+e);l.handler.send("obj",[I,l.pageIndex,"Image",null])});n.addOp(i.OPS.paintImageXObject,m);s&&(c[s]={fn:i.OPS.paintImageXObject,args:m})}}else{g=new w.PDFImage(this.xref,t,r,a,null,null).createImageData(!0);n.addOp(i.OPS.paintInlineImageXObject,[g])}}}}else(0,i.warn)("Image dimensions are missing, or not numbers.")},handleSMask:function(e,t,r,a,i){var n=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},s=e.get("TR");if((0,d.isPDFFunction)(s)){for(var c=d.PDFFunction.parse(this.xref,s),l=new Uint8Array(256),u=new Float32Array(1),h=0;h<256;h++){u[0]=h/255;c(u,0,u,0);l[h]=255*u[0]|0}o.transferMap=l}return this.buildFormXObject(t,n,o,r,a,i.state.clone())},handleTilingType:function(e,t,r,a,n,o,c){var l=this,u=new C,h=[n.get("Resources"),r],d=s.Dict.merge(this.xref,h);return this.getOperatorList({stream:a,task:c,resources:d,operatorList:u}).then(function(){return(0,f.getTilingPatternIR)({fnArray:u.fnArray,argsArray:u.argsArray},n,t)}).then(function(t){o.addDependencies(u.dependencies);o.addOp(e,t)},function(e){if(!l.options.ignoreErrors)throw e;l.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.unknown});(0,i.warn)('handleTilingType - ignoring pattern: "'+e+'".')})},handleSetFont:function(e,t,r,a,n,o){var s,l=this;if(t){t=t.slice();s=t[0].name}return this.loadFont(s,r,e).then(function(t){return t.font.isType3Font?t.loadType3Data(l,e,a,n).then(function(){return t}).catch(function(e){l.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.font});return new S("g_font_error",new c.ErrorFont("Type3 font load error: "+e),t.font)}):t}).then(function(e){o.font=e.font;e.send(l.handler);return e.loadedName})},handleText:function(e,t){var r=this,a=t.font,n=a.charsToGlyphs(e),o=!!(t.textRenderingMode&i.TextRenderingMode.ADD_TO_PATH_FLAG);if(a.data&&(o||this.options.disableFontFace))for(var s=function(e){if(!a.renderer.hasBuiltPath(e)){var t=a.renderer.getPathJs(e);r.handler.send("commonobj",[a.loadedName+"_path_"+e,"FontPath",t])}},c=0,l=n.length;c0&&r.addOp(i.OPS.setGState,[c])})},loadFont:function(e,t,r){function a(){return Promise.resolve(new S("g_font_error",new c.ErrorFont("Font "+e+" is not available"),t))}var n,o=this,l=this.xref;if(t){if(!(0,s.isRef)(t))throw new Error('The "font" object should be a reference.');n=t}else{var u=r.get("Font");if(!u){(0,i.warn)("fontRes not available");return a()}n=u.getRaw(e)}if(!n){(0,i.warn)("fontRef not available");return a()}if(this.fontCache.has(n))return this.fontCache.get(n);t=l.fetchIfRef(n);if(!(0,s.isDict)(t))return a();if(t.translated)return t.translated;var h,f=(0,i.createPromiseCapability)(),d=this.preEvaluateFont(t),g=d.descriptor,m=(0,s.isRef)(n);m&&(h=n.toString());if((0,s.isDict)(g)){g.fontAliases||(g.fontAliases=Object.create(null));var p=g.fontAliases,b=d.hash;if(p[b]){var v=p[b].aliasRef;if(m&&v&&this.fontCache.has(v)){this.fontCache.putAlias(n,v);return this.fontCache.get(n)}}else p[b]={fontID:c.Font.getFontID()};m&&(p[b].aliasRef=n);h=p[b].fontID}if(m)this.fontCache.put(n,f.promise);else{h||(h=this.idFactory.createObjId());this.fontCache.put("id_"+h,f.promise)}(0,i.assert)(h,'The "fontID" must be defined.');t.loadedName="g_"+this.pdfManager.docId+"_f"+h;t.translated=f.promise;var y;try{y=this.translateFont(d)}catch(e){y=Promise.reject(e)}y.then(function(e){if(void 0!==e.fontType){ l.stats.fontTypes[e.fontType]=!0}f.resolve(new S(t.loadedName,e,t))}).catch(function(e){o.handler.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.font});try{var r=d.descriptor,a=r&&r.get("FontFile3"),n=a&&a.get("Subtype"),s=(0,c.getFontType)(d.type,n&&n.name);l.stats.fontTypes[s]=!0}catch(e){}f.resolve(new S(t.loadedName,new c.ErrorFont(e instanceof Error?e.message:e),t))});return f.promise},buildPath:function(e,t,r){var a=e.length-1;r||(r=[]);if(a<0||e.fnArray[a]!==i.OPS.constructPath)e.addOp(i.OPS.constructPath,[[t],r]);else{var n=e.argsArray[a];n[0].push(t);Array.prototype.push.apply(n[1],r)}},handleColorN:function(e,t,r,a,i,n,o){var c,l=r[r.length-1];if((0,s.isName)(l)&&(c=i.get(l.name))){var u=(0,s.isStream)(c)?c.dict:c,h=u.get("PatternType");if(1===h){var d=a.base?a.base.getRgb(r,0):null;return this.handleTilingType(t,d,n,c,u,e,o)}if(2===h){var g=u.get("Shading"),m=u.getArray("Matrix");c=f.Pattern.parseShading(g,m,this.xref,n,this.handler);e.addOp(t,c.getIR());return Promise.resolve()}return Promise.reject(new Error("Unknown PatternType: "+h))}e.addOp(t,r);return Promise.resolve()},getOperatorList:function(e){function t(e){for(var t=0,r=w.savedStatesDepth;t0){r*=R.fontMatrix[3];t[3]*=r}}var a=i.Util.transform(R.ctm,i.Util.transform(R.textMatrix,t));M.transform=a;if(e.vertical){M.width=Math.sqrt(a[0]*a[0]+a[1]*a[1]);M.height=0;M.vertical=!0}else{M.width=0;M.height=Math.sqrt(a[2]*a[2]+a[3]*a[3]);M.vertical=!1}var n=R.textLineMatrix[0],o=R.textLineMatrix[1],s=Math.sqrt(n*n+o*o);n=R.ctm[0];o=R.ctm[1];var c=Math.sqrt(n*n+o*o);M.textAdvanceScale=c*s;M.lastAdvanceWidth=0;M.lastAdvanceHeight=0;var l=e.spaceWidth/1e3*R.fontSize;if(l){M.spaceWidth=l;M.fakeSpaceMin=l*D;M.fakeMultiSpaceMin=l*L;M.fakeMultiSpaceMax=l*N;M.textRunBreakAllowed=!e.isMonospace}else{M.spaceWidth=0;M.fakeSpaceMin=1/0;M.fakeMultiSpaceMin=1/0;M.fakeMultiSpaceMax=0;M.textRunBreakAllowed=!1}M.initialized=!0;return M}function n(e){for(var t,r=0,a=e.length;r=32&&t<=127;)r++;return r0&&h(m,a.str)}var p=0,b=0;if(r.vertical){b=l*R.fontMatrix[0]*R.fontSize+g;n+=b}else{p=(l*R.fontMatrix[0]*R.fontSize+g)*R.textHScale;i+=p}R.translateTextMatrix(p,b);a.str.push(f)}if(r.vertical){a.lastAdvanceHeight=n;a.height+=Math.abs(n)}else{a.lastAdvanceWidth=i;a.width+=i}return a}function h(e,t){if(!(e0;)t.push(" ")}function f(){if(M.initialized){M.width*=M.textAdvanceScale;M.height*=M.textAdvanceScale;B.items.push(o(M));M.initialized=!1;M.str.length=0}}function d(){var e=B.items.length;if(e>0){O.enqueue(B,e);B.items=[];B.styles=Object.create(null)}}var g=this,p=e.stream,b=e.task,v=e.resources,y=e.stateManager,w=void 0===y?null:y,k=e.normalizeWhitespace,S=void 0!==k&&k,C=e.combineTextItems,P=void 0!==C&&C,O=e.sink,T=e.seenStyles,E=void 0===T?Object.create(null):T;v=v||s.Dict.empty;w=w||new x(new A);var R,F=/\s/g,B={items:[],styles:Object.create(null)},M={initialized:!1,str:[],width:0,height:0,vertical:!1,lastAdvanceWidth:0,lastAdvanceHeight:0,textAdvanceScale:0,spaceWidth:0,fakeSpaceMin:1/0,fakeMultiSpaceMin:1/0,fakeMultiSpaceMax:-0,textRunBreakAllowed:!1,transform:null,fontName:null},D=.3,L=1.5,N=4,U=this,q=this.xref,j=null,z=Object.create(null),H=new I(p,q,w),G=new r;return new Promise(function e(r,n){var o=function(t){d();Promise.all([t,O.ready]).then(function(){try{e(r,n)}catch(e){n(e)}},n)};b.ensureNotTerminated();G.reset();for(var u,g={},m=[];!(u=G.check());){m.length=0;g.args=m;if(!H.read(g))break;R=w.state;var p=g.fn;m=g.args;var y,k,C,A,I,T,F,D,L,N,q,W,X,V,Y,K,J,Z,Q,$,ee=function(){switch(0|p){case i.OPS.setFont:C=m[0].name;A=m[1];if(R.font&&C===R.fontName&&A===R.fontSize)break;f();R.fontName=C;R.fontSize=A;o(c(C,null));return{v:void 0};case i.OPS.setTextRise:f();R.textRise=m[0];break;case i.OPS.setHScale:f();R.textHScale=m[0]/100;break;case i.OPS.setLeading:f();R.leading=m[0];break;case i.OPS.moveText:I=!!R.font&&0===(R.font.vertical?m[0]:m[1]);y=m[0]-m[1];if(P&&I&&M.initialized&&y>0&&y<=M.fakeMultiSpaceMax){R.translateTextLineMatrix(m[0],m[1]);M.width+=m[0]-M.lastAdvanceWidth;M.height+=m[1]-M.lastAdvanceHeight;k=m[0]-M.lastAdvanceWidth-(m[1]-M.lastAdvanceHeight);h(k,M.str);break}f();R.translateTextLineMatrix(m[0],m[1]);R.textMatrix=R.textLineMatrix.slice();break;case i.OPS.setLeadingMoveText:f();R.leading=-m[1];R.translateTextLineMatrix(m[0],m[1]);R.textMatrix=R.textLineMatrix.slice();break;case i.OPS.nextLine:f();R.carriageReturn();break;case i.OPS.setTextMatrix:y=R.calcTextLineMatrixAdvance(m[0],m[1],m[2],m[3],m[4],m[5]);if(P&&null!==y&&M.initialized&&y.value>0&&y.value<=M.fakeMultiSpaceMax){R.translateTextLineMatrix(y.width,y.height);M.width+=y.width-M.lastAdvanceWidth;M.height+=y.height-M.lastAdvanceHeight;k=y.width-M.lastAdvanceWidth-(y.height-M.lastAdvanceHeight);h(k,M.str);break}f();R.setTextMatrix(m[0],m[1],m[2],m[3],m[4],m[5]);R.setTextLineMatrix(m[0],m[1],m[2],m[3],m[4],m[5]);break;case i.OPS.setCharSpacing:R.charSpacing=m[0];break;case i.OPS.setWordSpacing:R.wordSpacing=m[0];break;case i.OPS.beginText:f();R.textMatrix=i.IDENTITY_MATRIX.slice();R.textLineMatrix=i.IDENTITY_MATRIX.slice();break;case i.OPS.showSpacedText:T=m[0];for(D=0,L=T.length;DM.fakeMultiSpaceMax;N||(M.height+=F)}else{y=-y;F=y*R.textHScale;R.translateTextMatrix(F,0);N=M.textRunBreakAllowed&&y>M.fakeMultiSpaceMax;N||(M.width+=F)}N?f():y>0&&h(y,M.str)}break;case i.OPS.showText:l(m[0]);break;case i.OPS.nextLineShowText:f();R.carriageReturn();l(m[0]);break;case i.OPS.nextLineSetSpacingShowText:f();R.wordSpacing=m[0];R.charSpacing=m[1];R.carriageReturn();l(m[2]);break;case i.OPS.paintXObject:f();if(m[0].code)break;j||(j=v.get("XObject")||s.Dict.empty);q=m[0].name;if(q in z)break;W=j.get(q);if(!W)break;if(!(0,s.isStream)(W))throw new i.FormatError("XObject should be a stream");X=W.dict.get("Subtype");if(!(0,s.isName)(X))throw new i.FormatError("XObject should have a Name subtype");if("Form"!==X.name){z[q]=!0;break}V=w.state.clone();Y=new x(V);K=W.dict.getArray("Matrix");(0,i.isArray)(K)&&6===K.length&&Y.transform(K);d();var e={enqueueInvoked:!1,enqueue:function(e,t){this.enqueueInvoked=!0;O.enqueue(e,t)},get desiredSize(){return O.desiredSize},get ready(){return O.ready}};o(U.getTextContent({stream:W,task:b,resources:W.dict.get("Resources")||v,stateManager:Y,normalizeWhitespace:S,combineTextItems:P,sink:e,seenStyles:E}).then(function(){e.enqueueInvoked||(z[q]=!0)}));return{v:void 0};case i.OPS.setGState:f();J=m[0];Z=v.get("ExtGState");if(!(0,s.isDict)(Z)||!(0,s.isName)(J))break;Q=Z.get(J.name);if(!(0,s.isDict)(Q))break;$=Q.get("Font");if($){R.fontName=null;R.fontSize=$[1];o(c(null,$[0]));return{v:void 0}}}}();if("object"===(void 0===ee?"undefined":a(ee)))return ee.v;if(B.items.length>=O.desiredSize){u=!0;break}}if(u)o(_);else{f();d();r()}}).catch(function(e){if(!g.options.ignoreErrors)throw e;(0,i.warn)("getTextContent - ignoring errors during task: "+b.name);f();d()})},extractDataStructures:function(e,t,r){var a=this,n=this.xref,o=e.get("ToUnicode")||t.get("ToUnicode"),u=o?this.readToUnicode(o):Promise.resolve(void 0);if(r.composite){var h=e.get("CIDSystemInfo");(0,s.isDict)(h)&&(r.cidSystemInfo={registry:h.get("Registry"),ordering:h.get("Ordering"),supplement:h.get("Supplement")});var f=e.get("CIDToGIDMap");(0,s.isStream)(f)&&(r.cidToGidMap=this.readCidToGidMap(f))}var d,g=[],m=null;if(e.has("Encoding")){d=e.get("Encoding");if((0,s.isDict)(d)){m=d.get("BaseEncoding");m=(0,s.isName)(m)?m.name:null;if(d.has("Differences"))for(var p=d.get("Differences"),b=0,v=0,y=p.length;v0;r.dict=e;return u.then(function(e){r.toUnicode=e;return a.buildToUnicode(r)}).then(function(e){r.toUnicode=e;return r})},buildToUnicode:function(e){e.hasIncludedToUnicodeMap=!!e.toUnicode&&e.toUnicode.length>0;if(e.hasIncludedToUnicodeMap)return Promise.resolve(e.toUnicode);var t,r,a;if(!e.composite){t=[];var o=e.defaultEncoding.slice(),h=e.baseEncodingName,f=e.differences;for(r in f){a=f[r];".notdef"!==a&&(o[r]=a)}var d=(0,b.getGlyphsUnicode)();for(r in o){a=o[r];if(""!==a)if(void 0!==d[a])t[r]=String.fromCharCode(d[a]);else{var g=0;switch(a[0]){case"G":3===a.length&&(g=parseInt(a.substr(1),16));break;case"g":5===a.length&&(g=parseInt(a.substr(1),16));break;case"C":case"c":a.length>=3&&(g=+a.substr(1));break;default:var m=(0,u.getUnicodeForGlyph)(a,d);-1!==m&&(g=m)}if(g){if(h&&g===+r){var p=(0,l.getEncoding)(h);if(p&&(a=p[r])){t[r]=String.fromCharCode(d[a]);continue}}t[r]=String.fromCharCode(g)}}}return Promise.resolve(new c.ToUnicodeMap(t))}if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof n.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){var v=e.cidSystemInfo.registry,y=e.cidSystemInfo.ordering,w=s.Name.get(v+"-"+y+"-UCS2");return n.CMapFactory.create({encoding:w,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(r){var a=e.cMap;t=[];a.forEach(function(e,a){if(a>65535)throw new i.FormatError("Max size of CID is 65,535");var n=r.lookup(a);n&&(t[e]=String.fromCharCode((n.charCodeAt(0)<<8)+n.charCodeAt(1)))});return new c.ToUnicodeMap(t)})}return Promise.resolve(new c.IdentityToUnicodeMap(e.firstChar,e.lastChar))},readToUnicode:function(e){var t=e;return(0,s.isName)(t)?n.CMapFactory.create({encoding:t,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(e){return e instanceof n.IdentityCMap?new c.IdentityToUnicodeMap(0,65535):new c.ToUnicodeMap(e.getMap())}):(0,s.isStream)(t)?n.CMapFactory.create({encoding:t,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(e){if(e instanceof n.IdentityCMap)return new c.IdentityToUnicodeMap(0,65535);var t=new Array(e.length);e.forEach(function(e,r){for(var a=[],i=0;i>1]=n}}return r},extractWidths:function(e,t,r){var a,n,o,l,u,h,f,d,g=this.xref,m=[],p=0,b=[];if(r.composite){p=e.get("DW")||1e3;d=e.get("W");if(d)for(n=0,o=d.length;n=1e3?this.flush():this.fnArray.length>=995&&(e===i.OPS.restore||e===i.OPS.endText)&&this.flush())},addDependency:function(e){if(!(e in this.dependencies)){this.dependencies[e]=!0;this.addOp(i.OPS.dependency,[e])}},addDependencies:function(e){for(var t in e)this.addDependency(t)},addOpList:function(e){i.Util.extendObj(this.dependencies,e.dependencies);for(var t=0,r=e.length;tc&&(0,i.info)("Command "+o+": expected [0,"+c+"] args, but received "+l+" args.");else{if(l!==c){for(var u=this.nonProcessedArgs;l>c;){u.push(t.shift());l--}for(;l33)throw new i.FormatError("Too many arguments")}}},preprocessCommand:function(e,t){switch(0|e){case i.OPS.save:this.stateManager.save();break;case i.OPS.restore:this.stateManager.restore();break;case i.OPS.transform:this.stateManager.transform(t)}}};return e}(),_=function(){function e(e,t,r){for(var a=e,i=0,n=t.length-1;i1e3){f=Math.max(f,m);p+=g+2;m=0;g=0}d.push({transform:b,x:m,y:p,w:v.width,h:v.height});m+=v.width+2;g=Math.max(g,v.height)}var y=Math.max(f,m)+1,w=p+g+1,k=new Uint8Array(y*w*4),S=y<<2;for(h=0;h=0;){C[P-4]=C[P];C[P-3]=C[P+1];C[P-2]=C[P+2];C[P-1]=C[P+3];C[P+x]=C[P+x-4];C[P+x+1]=C[P+x-3];C[P+x+2]=C[P+x-2];C[P+x+3]=C[P+x-1];P-=S}}t.splice(n,4*u,i.OPS.paintInlineImageXObjectGroup);r.splice(n,4*u,[{width:y,height:w,kind:i.ImageKind.RGBA_32BPP,data:k},d]);return n+1});e(a,[i.OPS.save,i.OPS.transform,i.OPS.paintImageMaskXObject,i.OPS.restore],function(e){for(var r=e.fnArray,a=e.argsArray,n=e.iCurr,o=n-3,s=n-2,c=n-1,l=o+4,u=r.length;l+3=4&&t[n-4]===t[o]&&t[n-3]===t[s]&&t[n-2]===t[c]&&t[n-1]===t[l]&&r[n-4][0]===u&&r[n-4][1]===h){g++;m-=5}for(var p=m+4,b=1;b0?Math.min(a.xcb,i.PPx-1):Math.min(a.xcb,i.PPx);i.ycb_=r>0?Math.min(a.ycb,i.PPy-1):Math.min(a.ycb,i.PPy);return i}function s(e,t,r){var a=1<t.trx0?Math.ceil(t.trx1/a)-Math.floor(t.trx0/a):0,l=t.try1>t.try0?Math.ceil(t.try1/i)-Math.floor(t.try0/i):0,u=c*l;t.precinctParameters={precinctWidth:a,precinctHeight:i,numprecinctswide:c,numprecinctshigh:l,numprecincts:u,precinctWidthInSubband:o,precinctHeightInSubband:s}}function c(e,t,r){var a,i,n,o,s=r.xcb_,c=r.ycb_,l=1<>s,f=t.tby0>>c,d=t.tbx1+l-1>>s,g=t.tby1+u-1>>c,m=t.resolution.precinctParameters,p=[],b=[];for(i=f;iw.cbxMax&&(w.cbxMax=a);iw.cbyMax&&(w.cbyMax=i)}else b[o]=w={cbxMin:a,cbyMin:i,cbxMax:a,cbyMax:i};n.precinct=w}}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-h+1,numcodeblockhigh:g-f+1};t.codeblocks=p;t.precincts=b}function l(e,t,r){for(var a=[],i=e.subbands,n=0,o=i.length;ne.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[h],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[u],r=t.precinctParameters.numprecincts;de.codingStyleParameters.decompositionLevelsCount)){var o=e.resolutions[r],s=o.precinctParameters.numprecincts;if(!(i>=s)){for(;t=0;--p){var b=c.resolutions[p],v=m*b.precinctParameters.precinctWidth,y=m*b.precinctParameters.precinctHeight;h=Math.min(h,v);f=Math.min(f,y);d=Math.max(d,b.precinctParameters.numprecinctswide);g=Math.max(g,b.precinctParameters.numprecinctshigh);u[p]={width:v,height:y};m<<=1}r=Math.min(r,h);a=Math.min(a,f);i=Math.max(i,d);n=Math.max(n,g);o[s]={resolutions:u,minWidth:h,minHeight:f,maxNumWide:d,maxNumHigh:g}}return{components:o,minWidth:r,minHeight:a,maxNumWide:i,maxNumHigh:n}}function b(e){for(var t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],i=t.Csiz,l=0;l>>h&(1<0;){var q=k.shift();y=q.codeblock;void 0===y.data&&(y.data=[]);y.data.push({data:t,start:r+u,end:r+u+q.dataLength,codingpasses:q.codingpasses});u+=q.dataLength}}}return u}function y(e,t,r,a,n,o,s,c){for(var l=a.tbx0,u=a.tby0,h=a.tbx1-a.tbx0,f=a.codeblocks,d="H"===a.type.charAt(0)?1:0,g="H"===a.type.charAt(1)?t:0,m=0,p=f.length;m=o?B:B*(1<0?1-p:0)}var I=b.subbands[S],T=C[I.type];y(k,v,w,I,f?1:Math.pow(2,h+T-P)*(1+A/2048),l+P-1,f,u)}g.push({width:v,height:w,items:k})}var E=d.calculate(g,a.tcx0,a.tcy0);return{left:a.tcx0,top:a.tcy0,width:E.width,height:E.height,items:E.items}}function k(e){for(var t=e.SIZ,r=e.components,a=t.Csiz,i=[],n=0,o=e.tiles.length;n>2);k=S+y;C=S+v;I[O++]=k<=0?0:k>=f?255:k>>u;I[O++]=S<=0?0:S>=f?255:S>>u;I[O++]=C<=0?0:C>=f?255:C>>u}else for(m=0;m=f?255:k>>u;I[O++]=S<=0?0:S>=f?255:S>>u;I[O++]=C<=0?0:C>=f?255:C>>u}if(T)for(m=0,O=3;m=g?255:x+h>>u}}else for(s=0;s=f?255:A+h>>u;O+=a}}i.push(_)}return i}function S(e,t){for(var r=e.SIZ,a=r.Csiz,i=e.tiles[t],n=0;n>24&255,s>>16&255,s>>8&255,255&s);(0,a.warn)("Unsupported header type "+s+" ("+f+")")}l&&(t+=c)}else this.parseCodestream(e,0,e.length)},parseImageProperties:function(e){for(var t=e.getByte();t>=0;){var r=t;t=e.getByte();if(65361===(r<<8|t)){e.skip(4);var a=e.getInt32()>>>0,i=e.getInt32()>>>0,o=e.getInt32()>>>0,s=e.getInt32()>>>0;e.skip(16);var c=e.getUint16();this.width=a-o;this.height=i-s;this.componentsCount=c;this.bitsPerComponent=8;return}}throw new n("No size marker found in JPX stream")},parseCodestream:function(e,i,o){var s={},c=!1;try{for(var l=i;l+1>5;d=[];for(;h>3;_.mu=0}else{_.epsilon=e[h]>>3;_.mu=(7&e[h])<<8|e[h+1];h+=2}d.push(_)}I.SPqcds=d;if(s.mainHeader)s.QCD=I;else{s.currentTile.QCD=I;s.currentTile.QCC=[]}break;case 65373:y=(0,a.readUint16)(e,l);var O={};h=l+2;var T;if(s.SIZ.Csiz<257)T=e[h++];else{T=(0,a.readUint16)(e,h);h+=2}f=e[h++];switch(31&f){case 0:g=8;m=!0;break;case 1:g=16;m=!1;break;case 2:g=16;m=!0;break;default:throw new Error("Invalid SQcd value "+f)}O.noQuantization=8===g;O.scalarExpounded=m;O.guardBits=f>>5;d=[];for(;h>3;_.mu=0}else{_.epsilon=e[h]>>3;_.mu=(7&e[h])<<8|e[h+1];h+=2}d.push(_)}O.SPqcds=d;s.mainHeader?s.QCC[T]=O:s.currentTile.QCC[T]=O;break;case 65362:y=(0,a.readUint16)(e,l);var E={};h=l+2;var R=e[h++];E.entropyCoderWithCustomPrecincts=!!(1&R);E.sopMarkerUsed=!!(2&R);E.ephMarkerUsed=!!(4&R);E.progressionOrder=e[h++];E.layersCount=(0,a.readUint16)(e,h);h+=2;E.multipleComponentTransform=e[h++];E.decompositionLevelsCount=e[h++];E.xcb=2+(15&e[h++]);E.ycb=2+(15&e[h++]);var F=e[h++];E.selectiveArithmeticCodingBypass=!!(1&F);E.resetContextProbabilities=!!(2&F);E.terminationOnEachCodingPass=!!(4&F);E.verticalyStripe=!!(8&F);E.predictableTermination=!!(16&F);E.segmentationSymbolUsed=!!(32&F);E.reversibleTransformation=e[h++];if(E.entropyCoderWithCustomPrecincts){for(var B=[];h>4})}E.precinctsSizes=B}var D=[];E.selectiveArithmeticCodingBypass&&D.push("selectiveArithmeticCodingBypass");E.resetContextProbabilities&&D.push("resetContextProbabilities");E.terminationOnEachCodingPass&&D.push("terminationOnEachCodingPass");E.verticalyStripe&&D.push("verticalyStripe");E.predictableTermination&&D.push("predictableTermination");if(D.length>0){c=!0;throw new Error("Unsupported COD options ("+D.join(", ")+")")}if(s.mainHeader)s.COD=E;else{s.currentTile.COD=E;s.currentTile.COC=[]}break;case 65424:y=(0,a.readUint16)(e,l);p={};p.index=(0,a.readUint16)(e,l+2);p.length=(0,a.readUint32)(e,l+4);p.dataEnd=p.length+l-2;p.partIndex=e[l+8];p.partsCount=e[l+9];s.mainHeader=!1;if(0===p.partIndex){p.COD=s.COD;p.COC=s.COC.slice(0);p.QCD=s.QCD;p.QCC=s.QCC.slice(0)}s.currentTile=p;break;case 65427:p=s.currentTile;if(0===p.partIndex){S(s,p.index);b(s)}y=p.dataEnd-l;v(s,e,l,y);break;case 65365:case 65367:case 65368:case 65380:y=(0,a.readUint16)(e,l);break;case 65363:throw new Error("Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("Unknown codestream code: "+u.toString(16))}l+=y}}catch(e){if(c||this.failOnCorruptedImage)throw new n(e.message);(0,a.warn)("JPX: Trying to recover from: "+e.message)}this.tiles=k(s);this.width=s.SIZ.Xsiz-s.SIZ.XOsiz;this.height=s.SIZ.Ysiz-s.SIZ.YOsiz;this.componentsCount=s.SIZ.Csiz}};var x=function(){function e(e,t){var r=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var i=0;i>=1;t>>=1;a++}a--;r=this.levels[a];r.items[r.index]=i;this.currentLevel=a;delete this.value},incrementValue:function(){var e=this.levels[this.currentLevel];e.items[e.index]++},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];e--;if(e<0){this.value=r;return!1}this.currentLevel=e;t=this.levels[e];t.items[t.index]=r;return!0}};return e}(),A=function(){function e(e,t,r){var i=(0,a.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;nr){this.currentLevel=a;this.propagateValues();return!1}e>>=1;t>>=1;a++}this.currentLevel=a-1;return!0},incrementValue:function(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1;this.propagateValues()},propagateValues:function(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];--e>=0;){t=this.levels[e];t.items[t.index]=r}},nextLevel:function(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];t.items[t.index]=255;e--;if(e<0)return!1;this.currentLevel=e;t=this.levels[e];t.items[t.index]=r;return!0}};return e}(),P=function(){function e(e,i,n,o,s){this.width=e;this.height=i;this.contextLabelTable="HH"===n?a:"HL"===n?r:t;var c=e*i;this.neighborsSignificance=new Uint8Array(c);this.coefficentsSign=new Uint8Array(c);this.coefficentsMagnitude=s>14?new Uint32Array(c):s>6?new Uint16Array(c):new Uint8Array(c);this.processingFlags=new Uint8Array(c);var l=new Uint8Array(c);if(0!==o)for(var u=0;u0,c=t+10){a=r-n;s&&(i[a-1]+=16);c&&(i[a+1]+=16);i[a]+=4}if(e+1=r)break;o[f]&=-2;if(!a[f]&&n[f]){var m=c[n[f]],p=e.readBit(s,m);if(p){var b=this.decodeSignBit(g,h,f);i[f]=b;a[f]=1;this.setNeighborsSignificance(g,h,f);o[f]|=2}l[f]++;o[f]|=1}}},decodeSignBit:function(e,t,r){var a,i,n,o,s,c,l=this.width,u=this.height,h=this.coefficentsMagnitude,f=this.coefficentsSign;o=t>0&&0!==h[r-1];if(t+10&&0!==h[r-l];if(e+1=0){s=9+a;c=this.decoder.readBit(this.contexts,s)}else{s=9-a;c=1^this.decoder.readBit(this.contexts,s)}return c},runMagnitudeRefinementPass:function(){for(var e,t=this.decoder,r=this.width,a=this.height,i=this.coefficentsMagnitude,n=this.neighborsSignificance,o=this.contexts,s=this.bitsDecoded,c=this.processingFlags,l=r*a,u=4*r,h=0;h>1;t|=0;var i,n,o,s,c=-1.586134342059924,l=-.052980118572961,u=.882911075530934,h=.443506852043971,f=1.230174104914001;i=t-3;for(n=a+4;n--;i+=2)e[i]*=.8128930661159609;i=t-2;o=h*e[i-1];for(n=a+3;n--;i+=2){s=h*e[i+1];e[i]=f*e[i]-o-s;if(!n--)break;i+=2;o=h*e[i+1];e[i]=f*e[i]-o-s}i=t-1;o=u*e[i-1];for(n=a+2;n--;i+=2){s=u*e[i+1];e[i]-=o+s;if(!n--)break;i+=2;o=u*e[i+1];e[i]-=o+s}i=t;o=l*e[i-1];for(n=a+1;n--;i+=2){s=l*e[i+1];e[i]-=o+s;if(!n--)break;i+=2;o=l*e[i+1];e[i]-=o+s}if(0!==a){i=t+1;o=c*e[i-1];for(n=a;n--;i+=2){s=c*e[i+1];e[i]-=o+s;if(!n--)break;i+=2;o=c*e[i+1];e[i]-=o+s}}};return e}(),O=function(){function e(){I.call(this)}e.prototype=Object.create(I.prototype);e.prototype.filter=function(e,t,r){var a=r>>1;t|=0;var i,n;for(i=t,n=a+1;n--;i+=2)e[i]-=e[i-1]+e[i+1]+2>>2;for(i=t+1,n=a;n--;i+=2)e[i]+=e[i-1]+e[i+1]>>1};return e}();return e}();t.JpxImage=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FileSpec=t.XRef=t.ObjectLoader=t.Catalog=void 0;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},i=function(){function e(e,t){var r=[],a=!0,i=!1,n=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){r.push(o.value);if(t&&r.length===t)break}}catch(e){i=!0;n=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw n}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=r(0),o=r(1),s=r(5),c=r(10),l=r(11),u=r(3),h=function(){function e(e,t,r){this.pdfManager=e;this.xref=t;this.catDict=t.getCatalogObj();if(!(0,o.isDict)(this.catDict))throw new n.FormatError("catalog object is not a dictionary");this.fontCache=new o.RefSetCache;this.builtInCMapCache=Object.create(null);this.pageKidsCountCache=new o.RefSetCache;this.pageFactory=r;this.pagePromises=[]}e.prototype={get metadata(){var e=this.catDict.getRaw("Metadata");if(!(0,o.isRef)(e))return(0,n.shadow)(this,"metadata",null);var t,r=!!this.xref.encrypt&&this.xref.encrypt.encryptMetadata,a=this.xref.fetch(e,!r);if(a&&(0,o.isDict)(a.dict)){var i=a.dict.get("Type"),s=a.dict.get("Subtype");if((0, o.isName)(i,"Metadata")&&(0,o.isName)(s,"XML"))try{t=(0,n.stringToUTF8String)((0,n.bytesToString)(a.getBytes()))}catch(e){if(e instanceof n.MissingDataException)throw e;(0,n.info)("Skipping invalid metadata.")}}return(0,n.shadow)(this,"metadata",t)},get toplevelPagesDict(){var e=this.catDict.get("Pages");if(!(0,o.isDict)(e))throw new n.FormatError("invalid top-level pages dictionary");return(0,n.shadow)(this,"toplevelPagesDict",e)},get documentOutline(){var e=null;try{e=this.readDocumentOutline()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,n.warn)("Unable to read document outline")}return(0,n.shadow)(this,"documentOutline",e)},readDocumentOutline:function(){var t=this.catDict.get("Outlines");if(!(0,o.isDict)(t))return null;t=t.getRaw("First");if(!(0,o.isRef)(t))return null;var r={items:[]},a=[{obj:t,parent:r}],i=new o.RefSet;i.put(t);for(var s=this.xref,c=new Uint8Array(3);a.length>0;){var l=a.shift(),h=s.fetchIfRef(l.obj);if(null!==h){if(!h.has("Title"))throw new n.FormatError("Invalid outline item");var f={url:null,dest:null};e.parseDestDictionary({destDict:h,resultObj:f,docBaseUrl:this.pdfManager.docBaseUrl});var d=h.get("Title"),g=h.get("F")||0,m=h.getArray("C"),p=c;!(0,n.isArray)(m)||3!==m.length||0===m[0]&&0===m[1]&&0===m[2]||(p=u.ColorSpace.singletons.rgb.getRgb(m,0));var b={dest:f.dest,url:f.url,unsafeUrl:f.unsafeUrl,newWindow:f.newWindow,title:(0,n.stringToPDFString)(d),color:p,count:h.get("Count"),bold:!!(2&g),italic:!!(1&g),items:[]};l.parent.items.push(b);t=h.getRaw("First");if((0,o.isRef)(t)&&!i.has(t)){a.push({obj:t,parent:b});i.put(t)}t=h.getRaw("Next");if((0,o.isRef)(t)&&!i.has(t)){a.push({obj:t,parent:l.parent});i.put(t)}}}return r.items.length>0?r.items:null},get numPages(){var e=this.toplevelPagesDict.get("Count");if(!(0,n.isInt)(e))throw new n.FormatError("page count in top level pages object is not an integer");return(0,n.shadow)(this,"numPages",e)},get destinations(){function e(e){return(0,o.isDict)(e)?e.get("D"):e}var t,r,a=this.xref,i={},s=this.catDict.get("Names");s&&s.has("Dests")?t=s.getRaw("Dests"):this.catDict.has("Dests")&&(r=this.catDict.get("Dests"));if(r){s=r;s.forEach(function(t,r){r&&(i[t]=e(r))})}if(t){var c=new g(t,a),l=c.getAll();for(var u in l)i[u]=e(l[u])}return(0,n.shadow)(this,"destinations",i)},getDestination:function(e){function t(e){return(0,o.isDict)(e)?e.get("D"):e}var r,a,i=this.xref,n=null,s=this.catDict.get("Names");s&&s.has("Dests")?r=s.getRaw("Dests"):this.catDict.has("Dests")&&(a=this.catDict.get("Dests"));if(a){var c=a.get(e);c&&(n=t(c))}if(r){n=t(new g(r,i).get(e))}return n},get pageLabels(){var e=null;try{e=this.readPageLabels()}catch(e){if(e instanceof n.MissingDataException)throw e;(0,n.warn)("Unable to read page labels.")}return(0,n.shadow)(this,"pageLabels",e)},readPageLabels:function(){var e=this.catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,a="",i=new m(e,this.xref),s=i.getAll(),c="",l=1,u=0,h=this.numPages;u=1))throw new n.FormatError("Invalid start in PageLabel dictionary.");l=b||1}switch(r){case"D":c=l;break;case"R":case"r":c=n.Util.toRoman(l,"r"===r);break;case"A":case"a":for(var v="a"===r?97:65,y=l-1,w=String.fromCharCode(v+y%26),k=[],S=0,C=y/26|0;S<=C;S++)k.push(w);c=k.join("");break;default:if(r)throw new n.FormatError('Invalid style "'+r+'" in PageLabel dictionary.')}t[u]=a+c;c="";l++}return t},get pageMode(){var e=this.catDict.get("PageMode"),t="UseNone";if((0,o.isName)(e))switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return(0,n.shadow)(this,"pageMode",t)},get attachments(){var e,t=this.xref,r=null,a=this.catDict.get("Names");a&&(e=a.getRaw("EmbeddedFiles"));if(e){var i=new g(e,t),o=i.getAll();for(var s in o){var c=new p(o[s],t);r||(r=Object.create(null));r[(0,n.stringToPDFString)(s)]=c.serializable}}return(0,n.shadow)(this,"attachments",r)},get javaScript(){function e(e){var t=e.get("S");if((0,o.isName)(t,"JavaScript")){var r=e.get("JS");if((0,o.isStream)(r))r=(0,n.bytesToString)(r.getBytes());else if(!(0,n.isString)(r))return;a.push((0,n.stringToPDFString)(r))}}var t=this.xref,r=this.catDict.get("Names"),a=[];if(r&&r.has("JavaScript")){var i=new g(r.getRaw("JavaScript"),t),s=i.getAll();for(var c in s){var l=s[c];(0,o.isDict)(l)&&e(l)}}var u=this.catDict.get("OpenAction");if((0,o.isDict)(u,"Action")){var h=u.get("S");if((0,o.isName)(h,"Named")){var f=u.get("N");(0,o.isName)(f,"Print")&&a.push("print({});")}else e(u)}return(0,n.shadow)(this,"javaScript",a)},cleanup:function(){var e=this;this.pageKidsCountCache.clear();var t=[];this.fontCache.forEach(function(e){t.push(e)});return Promise.all(t).then(function(t){for(var r=0,a=t.length;r0&&s+r=0;d--)i.push(f[d])}}a.reject(new Error("Page index "+e+" not found."))}var r,a=(0,n.createPromiseCapability)(),i=[this.catDict.getRaw("Pages")],s=0,c=this.xref,l=this.pageKidsCountCache;t();return a.promise},getPageIndex:function(e){function t(t){var r,i=0;return a.fetchAsync(t).then(function(a){if((0,o.isRefsEqual)(t,e)&&!(0,o.isDict)(a,"Page")&&(!(0,o.isDict)(a)||a.has("Type")||!a.has("Contents")))throw new n.FormatError("The reference does not point to a /Page Dict.");if(!a)return null;if(!(0,o.isDict)(a))throw new n.FormatError("node must be a Dict.");r=a.getRaw("Parent");return a.getAsync("Parent")}).then(function(e){if(!e)return null;if(!(0,o.isDict)(e))throw new n.FormatError("parent must be a Dict.");return e.getAsync("Kids")}).then(function(e){if(!e)return null;for(var s=[],c=!1,l=0;l0;){var u=l[0],h=l[1];if(!(0,n.isInt)(u)||!(0,n.isInt)(h))throw new n.FormatError("Invalid XRef range fields: "+u+", "+h);if(!(0,n.isInt)(o)||!(0,n.isInt)(s)||!(0,n.isInt)(c))throw new n.FormatError("Invalid XRef entry fields length: "+u+", "+h);for(t=a.entryNum;t=a)break;t++;n++}return n}var t=10,r=13,a=60,i=/^(\d+)\s+(\d+)\s+obj\b/,c=new Uint8Array([116,114,97,105,108,101,114]),l=new Uint8Array([115,116,97,114,116,120,114,101,102]),u=new Uint8Array([101,110,100,111,98,106]),h=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var f=this.stream;f.pos=0;for(var d=f.getBytes(),g=f.start,m=d.length,p=[],b=[];g=e.length);){n+=String.fromCharCode(o);o=e[i]}return n}(d,g);if(0!==w.indexOf("xref")||4!==w.length&&!/\s/.test(w[4]))if(y=i.exec(w)){void 0===this.entries[y[1]]&&(this.entries[y[1]]={offset:g-f.start,gen:0|y[2],uncompressed:!0});var k=e(d,g,u)+7,S=d.subarray(g,g+k),C=e(S,0,h);if(C=m)break;v=d[g]}while(v!==t&&v!==r);else++g}var x,A;for(x=0,A=b.length;x0;){var i,s,c=t.fetchIfRef(a.shift());if((0,o.isDict)(c))if(c.has("Kids")){var l=c.get("Kids");for(i=0,s=l.length;i10){(0,n.warn)('Search depth limit reached for "'+this._type+'" tree.');return null}var c=o.get("Kids");if(!(0,n.isArray)(c))return null;t=0;r=c.length-1;for(;t<=r;){a=t+r>>1;var l=i.fetchIfRef(c[a]),u=l.get("Limits");if(ei.fetchIfRef(u[1]))){o=i.fetchIfRef(c[a]);break}t=a+1}}if(t>r)return null}var h=o.get(this._type);if((0,n.isArray)(h)){t=0;r=h.length-2;for(;t<=r;){a=t+r&-2;var f=i.fetchIfRef(h[a]);if(ef))return i.fetchIfRef(h[a+1]);t=a+2}}}return null}};return e}(),g=function(){function e(e,t){this.root=e;this.xref=t;this._type="Names"}n.Util.inherit(e,d,{});return e}(),m=function(){function e(e,t){this.root=e;this.xref=t;this._type="Nums"}n.Util.inherit(e,d,{});return e}(),p=function(){function e(e,t){if(e&&(0,o.isDict)(e)){this.xref=t;this.root=e;e.has("FS")&&(this.fs=e.get("FS"));this.description=e.has("Desc")?(0,n.stringToPDFString)(e.get("Desc")):"";e.has("RF")&&(0,n.warn)("Related file specifications are not supported");this.contentAvailable=!0;if(!e.has("EF")){this.contentAvailable=!1;(0,n.warn)("Non-embedded file specifications are not supported")}}}function t(e){return e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null}e.prototype={get filename(){if(!this._filename&&this.root){var e=t(this.root)||"unnamed";this._filename=(0,n.stringToPDFString)(e).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename},get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=t(this.root.get("EF")));var e=null;if(this.contentRef){var r=this.xref,a=r.fetchIfRef(this.contentRef);a&&(0,o.isStream)(a)?e=a.getBytes():(0,n.warn)("Embedded file specification points to non-existing/invalid content")}else(0,n.warn)("Embedded file specification does not have a content");return e},get serializable(){return{filename:this.filename,content:this.content}}};return e}(),b=function(){function e(e){return(0,o.isRef)(e)||(0,o.isDict)(e)||(0,n.isArray)(e)||(0,o.isStream)(e)}function t(t,r){if((0,o.isDict)(t)||(0,o.isStream)(t))for(var a=(0,o.isDict)(t)?t:t.dict,i=a.getKeys(),s=0,c=i.length;s=65520&&e<=65535?0:e>=62976&&e<=63743?l()[e]||e:e}function i(e,t){var r=t[e];if(void 0!==r)return r;if(!e)return-1;if("u"===e[0]){var a,i=e.length;if(7===i&&"n"===e[1]&&"i"===e[2])a=e.substr(3);else{if(!(i>=5&&i<=7))return-1;a=e.substr(1)}if(a===a.toUpperCase()){r=parseInt(a,16);if(r>=0)return r}}return-1}function n(e){for(var t=0,r=u.length;t=a.begin&&e=t.begin&&e=t.begin&&e=0;a--)r+=e[a];return r}var c=r(0).getLookupTableFactory,l=c(function(e){e[63721]=169;e[63193]=169;e[63720]=174;e[63194]=174;e[63722]=8482;e[63195]=8482;e[63729]=9127;e[63730]=9128;e[63731]=9129;e[63740]=9131;e[63741]=9132;e[63742]=9133;e[63726]=9121;e[63727]=9122;e[63728]=9123;e[63737]=9124;e[63738]=9125;e[63739]=9126;e[63723]=9115;e[63724]=9116;e[63725]=9117;e[63734]=9118;e[63735]=9119;e[63736]=9120}),u=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],h=c(function(e){e["¨"]=" ̈";e["¯"]=" ̄";e["´"]=" ́";e["µ"]="μ";e["¸"]=" ̧";e["IJ"]="IJ";e["ij"]="ij";e["Ŀ"]="L·";e["ŀ"]="l·";e["ʼn"]="ʼn";e["ſ"]="s";e["DŽ"]="DŽ";e["Dž"]="Dž";e["dž"]="dž";e["LJ"]="LJ";e["Lj"]="Lj";e["lj"]="lj";e["NJ"]="NJ";e["Nj"]="Nj";e["nj"]="nj";e["DZ"]="DZ";e["Dz"]="Dz";e["dz"]="dz";e["˘"]=" ̆";e["˙"]=" ̇";e["˚"]=" ̊";e["˛"]=" ̨";e["˜"]=" ̃";e["˝"]=" ̋";e["ͺ"]=" ͅ";e["΄"]=" ́";e["ϐ"]="β";e["ϑ"]="θ";e["ϒ"]="Υ";e["ϕ"]="φ";e["ϖ"]="π";e["ϰ"]="κ";e["ϱ"]="ρ";e["ϲ"]="ς";e["ϴ"]="Θ";e["ϵ"]="ε";e["Ϲ"]="Σ";e["և"]="եւ";e["ٵ"]="اٴ";e["ٶ"]="وٴ";e["ٷ"]="ۇٴ";e["ٸ"]="يٴ";e["ำ"]="ํา";e["ຳ"]="ໍາ";e["ໜ"]="ຫນ";e["ໝ"]="ຫມ";e["ཷ"]="ྲཱྀ";e["ཹ"]="ླཱྀ";e["ẚ"]="aʾ";e["᾽"]=" ̓";e["᾿"]=" ̓";e["῀"]=" ͂";e["῾"]=" ̔";e[" "]=" ";e[" "]=" ";e[" "]=" ";e[" "]=" ";e[" "]=" ";e[" "]=" ";e[" "]=" ";e[" "]=" ";e["‗"]=" ̳";e["․"]=".";e["‥"]="..";e["…"]="...";e["″"]="′′";e["‴"]="′′′";e["‶"]="‵‵";e["‷"]="‵‵‵";e["‼"]="!!";e["‾"]=" ̅";e["⁇"]="??";e["⁈"]="?!";e["⁉"]="!?";e["⁗"]="′′′′";e[" "]=" ";e["₨"]="Rs";e["℀"]="a/c";e["℁"]="a/s";e["℃"]="°C";e["℅"]="c/o";e["℆"]="c/u";e["ℇ"]="Ɛ";e["℉"]="°F";e["№"]="No";e["℡"]="TEL";e["ℵ"]="א";e["ℶ"]="ב";e["ℷ"]="ג";e["ℸ"]="ד";e["℻"]="FAX";e["Ⅰ"]="I";e["Ⅱ"]="II";e["Ⅲ"]="III";e["Ⅳ"]="IV";e["Ⅴ"]="V";e["Ⅵ"]="VI";e["Ⅶ"]="VII";e["Ⅷ"]="VIII";e["Ⅸ"]="IX";e["Ⅹ"]="X";e["Ⅺ"]="XI";e["Ⅻ"]="XII";e["Ⅼ"]="L";e["Ⅽ"]="C";e["Ⅾ"]="D";e["Ⅿ"]="M";e["ⅰ"]="i";e["ⅱ"]="ii";e["ⅲ"]="iii";e["ⅳ"]="iv";e["ⅴ"]="v";e["ⅵ"]="vi";e["ⅶ"]="vii";e["ⅷ"]="viii";e["ⅸ"]="ix";e["ⅹ"]="x";e["ⅺ"]="xi";e["ⅻ"]="xii";e["ⅼ"]="l";e["ⅽ"]="c";e["ⅾ"]="d";e["ⅿ"]="m";e["∬"]="∫∫";e["∭"]="∫∫∫";e["∯"]="∮∮";e["∰"]="∮∮∮";e["⑴"]="(1)";e["⑵"]="(2)";e["⑶"]="(3)";e["⑷"]="(4)";e["⑸"]="(5)";e["⑹"]="(6)";e["⑺"]="(7)";e["⑻"]="(8)";e["⑼"]="(9)";e["⑽"]="(10)";e["⑾"]="(11)";e["⑿"]="(12)";e["⒀"]="(13)";e["⒁"]="(14)";e["⒂"]="(15)";e["⒃"]="(16)";e["⒄"]="(17)";e["⒅"]="(18)";e["⒆"]="(19)";e["⒇"]="(20)";e["⒈"]="1.";e["⒉"]="2.";e["⒊"]="3.";e["⒋"]="4.";e["⒌"]="5.";e["⒍"]="6.";e["⒎"]="7.";e["⒏"]="8.";e["⒐"]="9.";e["⒑"]="10.";e["⒒"]="11.";e["⒓"]="12.";e["⒔"]="13.";e["⒕"]="14.";e["⒖"]="15.";e["⒗"]="16.";e["⒘"]="17.";e["⒙"]="18.";e["⒚"]="19.";e["⒛"]="20.";e["⒜"]="(a)";e["⒝"]="(b)";e["⒞"]="(c)";e["⒟"]="(d)";e["⒠"]="(e)";e["⒡"]="(f)";e["⒢"]="(g)";e["⒣"]="(h)";e["⒤"]="(i)";e["⒥"]="(j)";e["⒦"]="(k)";e["⒧"]="(l)";e["⒨"]="(m)";e["⒩"]="(n)";e["⒪"]="(o)";e["⒫"]="(p)";e["⒬"]="(q)";e["⒭"]="(r)";e["⒮"]="(s)";e["⒯"]="(t)";e["⒰"]="(u)";e["⒱"]="(v)";e["⒲"]="(w)";e["⒳"]="(x)";e["⒴"]="(y)";e["⒵"]="(z)";e["⨌"]="∫∫∫∫";e["⩴"]="::=";e["⩵"]="==";e["⩶"]="===";e["⺟"]="母";e["⻳"]="龟";e["⼀"]="一";e["⼁"]="丨";e["⼂"]="丶";e["⼃"]="丿";e["⼄"]="乙";e["⼅"]="亅";e["⼆"]="二";e["⼇"]="亠";e["⼈"]="人";e["⼉"]="儿";e["⼊"]="入";e["⼋"]="八";e["⼌"]="冂";e["⼍"]="冖";e["⼎"]="冫";e["⼏"]="几";e["⼐"]="凵";e["⼑"]="刀";e["⼒"]="力";e["⼓"]="勹";e["⼔"]="匕";e["⼕"]="匚";e["⼖"]="匸";e["⼗"]="十";e["⼘"]="卜";e["⼙"]="卩";e["⼚"]="厂";e["⼛"]="厶";e["⼜"]="又";e["⼝"]="口";e["⼞"]="囗";e["⼟"]="土";e["⼠"]="士";e["⼡"]="夂";e["⼢"]="夊";e["⼣"]="夕";e["⼤"]="大";e["⼥"]="女";e["⼦"]="子";e["⼧"]="宀";e["⼨"]="寸";e["⼩"]="小";e["⼪"]="尢";e["⼫"]="尸";e["⼬"]="屮";e["⼭"]="山";e["⼮"]="巛";e["⼯"]="工";e["⼰"]="己";e["⼱"]="巾";e["⼲"]="干";e["⼳"]="幺";e["⼴"]="广";e["⼵"]="廴";e["⼶"]="廾";e["⼷"]="弋";e["⼸"]="弓";e["⼹"]="彐";e["⼺"]="彡";e["⼻"]="彳";e["⼼"]="心";e["⼽"]="戈";e["⼾"]="戶";e["⼿"]="手";e["⽀"]="支";e["⽁"]="攴";e["⽂"]="文";e["⽃"]="斗";e["⽄"]="斤";e["⽅"]="方";e["⽆"]="无";e["⽇"]="日";e["⽈"]="曰";e["⽉"]="月";e["⽊"]="木";e["⽋"]="欠";e["⽌"]="止";e["⽍"]="歹";e["⽎"]="殳";e["⽏"]="毋";e["⽐"]="比";e["⽑"]="毛";e["⽒"]="氏";e["⽓"]="气";e["⽔"]="水";e["⽕"]="火";e["⽖"]="爪";e["⽗"]="父";e["⽘"]="爻";e["⽙"]="爿";e["⽚"]="片";e["⽛"]="牙";e["⽜"]="牛";e["⽝"]="犬";e["⽞"]="玄";e["⽟"]="玉";e["⽠"]="瓜";e["⽡"]="瓦";e["⽢"]="甘";e["⽣"]="生";e["⽤"]="用";e["⽥"]="田";e["⽦"]="疋";e["⽧"]="疒";e["⽨"]="癶";e["⽩"]="白";e["⽪"]="皮";e["⽫"]="皿";e["⽬"]="目";e["⽭"]="矛";e["⽮"]="矢";e["⽯"]="石";e["⽰"]="示";e["⽱"]="禸";e["⽲"]="禾";e["⽳"]="穴";e["⽴"]="立";e["⽵"]="竹";e["⽶"]="米";e["⽷"]="糸";e["⽸"]="缶";e["⽹"]="网";e["⽺"]="羊";e["⽻"]="羽";e["⽼"]="老";e["⽽"]="而";e["⽾"]="耒";e["⽿"]="耳";e["⾀"]="聿";e["⾁"]="肉";e["⾂"]="臣";e["⾃"]="自";e["⾄"]="至";e["⾅"]="臼";e["⾆"]="舌";e["⾇"]="舛";e["⾈"]="舟";e["⾉"]="艮";e["⾊"]="色";e["⾋"]="艸";e["⾌"]="虍";e["⾍"]="虫";e["⾎"]="血";e["⾏"]="行";e["⾐"]="衣";e["⾑"]="襾";e["⾒"]="見";e["⾓"]="角";e["⾔"]="言";e["⾕"]="谷";e["⾖"]="豆";e["⾗"]="豕";e["⾘"]="豸";e["⾙"]="貝";e["⾚"]="赤";e["⾛"]="走";e["⾜"]="足";e["⾝"]="身";e["⾞"]="車";e["⾟"]="辛";e["⾠"]="辰";e["⾡"]="辵";e["⾢"]="邑";e["⾣"]="酉";e["⾤"]="釆";e["⾥"]="里";e["⾦"]="金";e["⾧"]="長";e["⾨"]="門";e["⾩"]="阜";e["⾪"]="隶";e["⾫"]="隹";e["⾬"]="雨";e["⾭"]="靑";e["⾮"]="非";e["⾯"]="面";e["⾰"]="革";e["⾱"]="韋";e["⾲"]="韭";e["⾳"]="音";e["⾴"]="頁";e["⾵"]="風";e["⾶"]="飛";e["⾷"]="食";e["⾸"]="首";e["⾹"]="香";e["⾺"]="馬";e["⾻"]="骨";e["⾼"]="高";e["⾽"]="髟";e["⾾"]="鬥";e["⾿"]="鬯";e["⿀"]="鬲";e["⿁"]="鬼";e["⿂"]="魚";e["⿃"]="鳥";e["⿄"]="鹵";e["⿅"]="鹿";e["⿆"]="麥";e["⿇"]="麻";e["⿈"]="黃";e["⿉"]="黍";e["⿊"]="黑";e["⿋"]="黹";e["⿌"]="黽";e["⿍"]="鼎";e["⿎"]="鼓";e["⿏"]="鼠";e["⿐"]="鼻";e["⿑"]="齊";e["⿒"]="齒";e["⿓"]="龍";e["⿔"]="龜";e["⿕"]="龠";e["〶"]="〒";e["〸"]="十";e["〹"]="卄";e["〺"]="卅";e["゛"]=" ゙";e["゜"]=" ゚";e["ㄱ"]="ᄀ";e["ㄲ"]="ᄁ";e["ㄳ"]="ᆪ";e["ㄴ"]="ᄂ";e["ㄵ"]="ᆬ";e["ㄶ"]="ᆭ";e["ㄷ"]="ᄃ";e["ㄸ"]="ᄄ";e["ㄹ"]="ᄅ";e["ㄺ"]="ᆰ";e["ㄻ"]="ᆱ";e["ㄼ"]="ᆲ";e["ㄽ"]="ᆳ";e["ㄾ"]="ᆴ";e["ㄿ"]="ᆵ";e["ㅀ"]="ᄚ";e["ㅁ"]="ᄆ";e["ㅂ"]="ᄇ";e["ㅃ"]="ᄈ";e["ㅄ"]="ᄡ";e["ㅅ"]="ᄉ";e["ㅆ"]="ᄊ";e["ㅇ"]="ᄋ";e["ㅈ"]="ᄌ";e["ㅉ"]="ᄍ";e["ㅊ"]="ᄎ";e["ㅋ"]="ᄏ";e["ㅌ"]="ᄐ";e["ㅍ"]="ᄑ";e["ㅎ"]="ᄒ";e["ㅏ"]="ᅡ";e["ㅐ"]="ᅢ";e["ㅑ"]="ᅣ";e["ㅒ"]="ᅤ";e["ㅓ"]="ᅥ";e["ㅔ"]="ᅦ";e["ㅕ"]="ᅧ";e["ㅖ"]="ᅨ";e["ㅗ"]="ᅩ";e["ㅘ"]="ᅪ";e["ㅙ"]="ᅫ";e["ㅚ"]="ᅬ";e["ㅛ"]="ᅭ";e["ㅜ"]="ᅮ";e["ㅝ"]="ᅯ";e["ㅞ"]="ᅰ";e["ㅟ"]="ᅱ";e["ㅠ"]="ᅲ";e["ㅡ"]="ᅳ";e["ㅢ"]="ᅴ";e["ㅣ"]="ᅵ";e["ㅤ"]="ᅠ";e["ㅥ"]="ᄔ";e["ㅦ"]="ᄕ";e["ㅧ"]="ᇇ";e["ㅨ"]="ᇈ";e["ㅩ"]="ᇌ";e["ㅪ"]="ᇎ";e["ㅫ"]="ᇓ";e["ㅬ"]="ᇗ";e["ㅭ"]="ᇙ";e["ㅮ"]="ᄜ";e["ㅯ"]="ᇝ";e["ㅰ"]="ᇟ";e["ㅱ"]="ᄝ";e["ㅲ"]="ᄞ";e["ㅳ"]="ᄠ";e["ㅴ"]="ᄢ";e["ㅵ"]="ᄣ";e["ㅶ"]="ᄧ";e["ㅷ"]="ᄩ";e["ㅸ"]="ᄫ";e["ㅹ"]="ᄬ";e["ㅺ"]="ᄭ";e["ㅻ"]="ᄮ";e["ㅼ"]="ᄯ";e["ㅽ"]="ᄲ";e["ㅾ"]="ᄶ";e["ㅿ"]="ᅀ";e["ㆀ"]="ᅇ";e["ㆁ"]="ᅌ";e["ㆂ"]="ᇱ";e["ㆃ"]="ᇲ";e["ㆄ"]="ᅗ";e["ㆅ"]="ᅘ";e["ㆆ"]="ᅙ";e["ㆇ"]="ᆄ";e["ㆈ"]="ᆅ";e["ㆉ"]="ᆈ";e["ㆊ"]="ᆑ";e["ㆋ"]="ᆒ";e["ㆌ"]="ᆔ";e["ㆍ"]="ᆞ";e["ㆎ"]="ᆡ";e["㈀"]="(ᄀ)";e["㈁"]="(ᄂ)";e["㈂"]="(ᄃ)";e["㈃"]="(ᄅ)";e["㈄"]="(ᄆ)";e["㈅"]="(ᄇ)";e["㈆"]="(ᄉ)";e["㈇"]="(ᄋ)";e["㈈"]="(ᄌ)";e["㈉"]="(ᄎ)";e["㈊"]="(ᄏ)";e["㈋"]="(ᄐ)";e["㈌"]="(ᄑ)";e["㈍"]="(ᄒ)";e["㈎"]="(가)";e["㈏"]="(나)";e["㈐"]="(다)";e["㈑"]="(라)";e["㈒"]="(마)";e["㈓"]="(바)";e["㈔"]="(사)";e["㈕"]="(아)";e["㈖"]="(자)";e["㈗"]="(차)";e["㈘"]="(카)";e["㈙"]="(타)";e["㈚"]="(파)";e["㈛"]="(하)";e["㈜"]="(주)";e["㈝"]="(오전)";e["㈞"]="(오후)";e["㈠"]="(一)";e["㈡"]="(二)";e["㈢"]="(三)";e["㈣"]="(四)";e["㈤"]="(五)";e["㈥"]="(六)";e["㈦"]="(七)";e["㈧"]="(八)";e["㈨"]="(九)";e["㈩"]="(十)";e["㈪"]="(月)";e["㈫"]="(火)";e["㈬"]="(水)";e["㈭"]="(木)";e["㈮"]="(金)";e["㈯"]="(土)";e["㈰"]="(日)";e["㈱"]="(株)";e["㈲"]="(有)";e["㈳"]="(社)";e["㈴"]="(名)";e["㈵"]="(特)";e["㈶"]="(財)";e["㈷"]="(祝)";e["㈸"]="(労)";e["㈹"]="(代)";e["㈺"]="(呼)";e["㈻"]="(学)";e["㈼"]="(監)";e["㈽"]="(企)";e["㈾"]="(資)";e["㈿"]="(協)";e["㉀"]="(祭)";e["㉁"]="(休)";e["㉂"]="(自)";e["㉃"]="(至)";e["㋀"]="1月";e["㋁"]="2月";e["㋂"]="3月";e["㋃"]="4月";e["㋄"]="5月";e["㋅"]="6月";e["㋆"]="7月";e["㋇"]="8月";e["㋈"]="9月";e["㋉"]="10月";e["㋊"]="11月";e["㋋"]="12月";e["㍘"]="0点";e["㍙"]="1点";e["㍚"]="2点";e["㍛"]="3点";e["㍜"]="4点";e["㍝"]="5点";e["㍞"]="6点";e["㍟"]="7点";e["㍠"]="8点";e["㍡"]="9点";e["㍢"]="10点";e["㍣"]="11点";e["㍤"]="12点";e["㍥"]="13点";e["㍦"]="14点";e["㍧"]="15点";e["㍨"]="16点";e["㍩"]="17点";e["㍪"]="18点";e["㍫"]="19点";e["㍬"]="20点";e["㍭"]="21点";e["㍮"]="22点";e["㍯"]="23点";e["㍰"]="24点";e["㏠"]="1日";e["㏡"]="2日";e["㏢"]="3日";e["㏣"]="4日";e["㏤"]="5日";e["㏥"]="6日";e["㏦"]="7日";e["㏧"]="8日";e["㏨"]="9日";e["㏩"]="10日";e["㏪"]="11日";e["㏫"]="12日";e["㏬"]="13日";e["㏭"]="14日";e["㏮"]="15日";e["㏯"]="16日";e["㏰"]="17日";e["㏱"]="18日";e["㏲"]="19日";e["㏳"]="20日";e["㏴"]="21日";e["㏵"]="22日";e["㏶"]="23日";e["㏷"]="24日";e["㏸"]="25日";e["㏹"]="26日";e["㏺"]="27日";e["㏻"]="28日";e["㏼"]="29日";e["㏽"]="30日";e["㏾"]="31日";e["ff"]="ff";e["fi"]="fi";e["fl"]="fl";e["ffi"]="ffi";e["ffl"]="ffl";e["ſt"]="ſt";e["st"]="st";e["ﬓ"]="մն";e["ﬔ"]="մե";e["ﬕ"]="մի";e["ﬖ"]="վն";e["ﬗ"]="մխ";e["ﭏ"]="אל";e["ﭐ"]="ٱ";e["ﭑ"]="ٱ";e["ﭒ"]="ٻ";e["ﭓ"]="ٻ";e["ﭔ"]="ٻ";e["ﭕ"]="ٻ";e["ﭖ"]="پ";e["ﭗ"]="پ";e["ﭘ"]="پ";e["ﭙ"]="پ";e["ﭚ"]="ڀ";e["ﭛ"]="ڀ";e["ﭜ"]="ڀ";e["ﭝ"]="ڀ";e["ﭞ"]="ٺ";e["ﭟ"]="ٺ";e["ﭠ"]="ٺ";e["ﭡ"]="ٺ";e["ﭢ"]="ٿ";e["ﭣ"]="ٿ";e["ﭤ"]="ٿ";e["ﭥ"]="ٿ";e["ﭦ"]="ٹ";e["ﭧ"]="ٹ";e["ﭨ"]="ٹ";e["ﭩ"]="ٹ";e["ﭪ"]="ڤ";e["ﭫ"]="ڤ";e["ﭬ"]="ڤ";e["ﭭ"]="ڤ";e["ﭮ"]="ڦ";e["ﭯ"]="ڦ";e["ﭰ"]="ڦ";e["ﭱ"]="ڦ";e["ﭲ"]="ڄ";e["ﭳ"]="ڄ";e["ﭴ"]="ڄ";e["ﭵ"]="ڄ";e["ﭶ"]="ڃ";e["ﭷ"]="ڃ";e["ﭸ"]="ڃ";e["ﭹ"]="ڃ";e["ﭺ"]="چ";e["ﭻ"]="چ";e["ﭼ"]="چ";e["ﭽ"]="چ";e["ﭾ"]="ڇ";e["ﭿ"]="ڇ";e["ﮀ"]="ڇ";e["ﮁ"]="ڇ";e["ﮂ"]="ڍ";e["ﮃ"]="ڍ";e["ﮄ"]="ڌ";e["ﮅ"]="ڌ";e["ﮆ"]="ڎ";e["ﮇ"]="ڎ";e["ﮈ"]="ڈ";e["ﮉ"]="ڈ";e["ﮊ"]="ژ";e["ﮋ"]="ژ";e["ﮌ"]="ڑ";e["ﮍ"]="ڑ";e["ﮎ"]="ک";e["ﮏ"]="ک";e["ﮐ"]="ک";e["ﮑ"]="ک";e["ﮒ"]="گ";e["ﮓ"]="گ";e["ﮔ"]="گ";e["ﮕ"]="گ";e["ﮖ"]="ڳ";e["ﮗ"]="ڳ";e["ﮘ"]="ڳ";e["ﮙ"]="ڳ";e["ﮚ"]="ڱ";e["ﮛ"]="ڱ";e["ﮜ"]="ڱ";e["ﮝ"]="ڱ";e["ﮞ"]="ں";e["ﮟ"]="ں";e["ﮠ"]="ڻ";e["ﮡ"]="ڻ";e["ﮢ"]="ڻ";e["ﮣ"]="ڻ";e["ﮤ"]="ۀ";e["ﮥ"]="ۀ";e["ﮦ"]="ہ";e["ﮧ"]="ہ";e["ﮨ"]="ہ";e["ﮩ"]="ہ";e["ﮪ"]="ھ";e["ﮫ"]="ھ";e["ﮬ"]="ھ";e["ﮭ"]="ھ";e["ﮮ"]="ے";e["ﮯ"]="ے";e["ﮰ"]="ۓ";e["ﮱ"]="ۓ";e["ﯓ"]="ڭ";e["ﯔ"]="ڭ";e["ﯕ"]="ڭ";e["ﯖ"]="ڭ";e["ﯗ"]="ۇ";e["ﯘ"]="ۇ";e["ﯙ"]="ۆ";e["ﯚ"]="ۆ";e["ﯛ"]="ۈ";e["ﯜ"]="ۈ";e["ﯝ"]="ٷ";e["ﯞ"]="ۋ";e["ﯟ"]="ۋ";e["ﯠ"]="ۅ";e["ﯡ"]="ۅ";e["ﯢ"]="ۉ";e["ﯣ"]="ۉ";e["ﯤ"]="ې";e["ﯥ"]="ې";e["ﯦ"]="ې";e["ﯧ"]="ې";e["ﯨ"]="ى";e["ﯩ"]="ى";e["ﯪ"]="ئا";e["ﯫ"]="ئا";e["ﯬ"]="ئە";e["ﯭ"]="ئە";e["ﯮ"]="ئو";e["ﯯ"]="ئو";e["ﯰ"]="ئۇ";e["ﯱ"]="ئۇ";e["ﯲ"]="ئۆ";e["ﯳ"]="ئۆ";e["ﯴ"]="ئۈ";e["ﯵ"]="ئۈ";e["ﯶ"]="ئې";e["ﯷ"]="ئې";e["ﯸ"]="ئې";e["ﯹ"]="ئى";e["ﯺ"]="ئى";e["ﯻ"]="ئى";e["ﯼ"]="ی";e["ﯽ"]="ی";e["ﯾ"]="ی";e["ﯿ"]="ی";e["ﰀ"]="ئج";e["ﰁ"]="ئح";e["ﰂ"]="ئم";e["ﰃ"]="ئى";e["ﰄ"]="ئي";e["ﰅ"]="بج";e["ﰆ"]="بح";e["ﰇ"]="بخ";e["ﰈ"]="بم";e["ﰉ"]="بى";e["ﰊ"]="بي";e["ﰋ"]="تج";e["ﰌ"]="تح";e["ﰍ"]="تخ";e["ﰎ"]="تم";e["ﰏ"]="تى";e["ﰐ"]="تي";e["ﰑ"]="ثج";e["ﰒ"]="ثم";e["ﰓ"]="ثى";e["ﰔ"]="ثي";e["ﰕ"]="جح";e["ﰖ"]="جم";e["ﰗ"]="حج";e["ﰘ"]="حم";e["ﰙ"]="خج";e["ﰚ"]="خح";e["ﰛ"]="خم";e["ﰜ"]="سج";e["ﰝ"]="سح";e["ﰞ"]="سخ";e["ﰟ"]="سم";e["ﰠ"]="صح";e["ﰡ"]="صم";e["ﰢ"]="ضج";e["ﰣ"]="ضح";e["ﰤ"]="ضخ";e["ﰥ"]="ضم";e["ﰦ"]="طح";e["ﰧ"]="طم";e["ﰨ"]="ظم";e["ﰩ"]="عج";e["ﰪ"]="عم";e["ﰫ"]="غج";e["ﰬ"]="غم";e["ﰭ"]="فج";e["ﰮ"]="فح";e["ﰯ"]="فخ";e["ﰰ"]="فم";e["ﰱ"]="فى";e["ﰲ"]="في";e["ﰳ"]="قح";e["ﰴ"]="قم";e["ﰵ"]="قى";e["ﰶ"]="قي";e["ﰷ"]="كا";e["ﰸ"]="كج";e["ﰹ"]="كح";e["ﰺ"]="كخ";e["ﰻ"]="كل";e["ﰼ"]="كم";e["ﰽ"]="كى";e["ﰾ"]="كي";e["ﰿ"]="لج";e["ﱀ"]="لح";e["ﱁ"]="لخ";e["ﱂ"]="لم";e["ﱃ"]="لى";e["ﱄ"]="لي";e["ﱅ"]="مج";e["ﱆ"]="مح";e["ﱇ"]="مخ";e["ﱈ"]="مم";e["ﱉ"]="مى";e["ﱊ"]="مي";e["ﱋ"]="نج";e["ﱌ"]="نح";e["ﱍ"]="نخ";e["ﱎ"]="نم";e["ﱏ"]="نى";e["ﱐ"]="ني";e["ﱑ"]="هج";e["ﱒ"]="هم";e["ﱓ"]="هى";e["ﱔ"]="هي";e["ﱕ"]="يج";e["ﱖ"]="يح";e["ﱗ"]="يخ";e["ﱘ"]="يم";e["ﱙ"]="يى";e["ﱚ"]="يي";e["ﱛ"]="ذٰ";e["ﱜ"]="رٰ";e["ﱝ"]="ىٰ";e["ﱞ"]=" ٌّ";e["ﱟ"]=" ٍّ";e["ﱠ"]=" َّ";e["ﱡ"]=" ُّ";e["ﱢ"]=" ِّ";e["ﱣ"]=" ّٰ";e["ﱤ"]="ئر";e["ﱥ"]="ئز";e["ﱦ"]="ئم";e["ﱧ"]="ئن";e["ﱨ"]="ئى";e["ﱩ"]="ئي";e["ﱪ"]="بر";e["ﱫ"]="بز";e["ﱬ"]="بم";e["ﱭ"]="بن";e["ﱮ"]="بى";e["ﱯ"]="بي";e["ﱰ"]="تر";e["ﱱ"]="تز";e["ﱲ"]="تم";e["ﱳ"]="تن";e["ﱴ"]="تى";e["ﱵ"]="تي";e["ﱶ"]="ثر";e["ﱷ"]="ثز";e["ﱸ"]="ثم";e["ﱹ"]="ثن";e["ﱺ"]="ثى";e["ﱻ"]="ثي";e["ﱼ"]="فى";e["ﱽ"]="في";e["ﱾ"]="قى";e["ﱿ"]="قي";e["ﲀ"]="كا";e["ﲁ"]="كل";e["ﲂ"]="كم";e["ﲃ"]="كى";e["ﲄ"]="كي";e["ﲅ"]="لم";e["ﲆ"]="لى";e["ﲇ"]="لي";e["ﲈ"]="ما";e["ﲉ"]="مم";e["ﲊ"]="نر";e["ﲋ"]="نز";e["ﲌ"]="نم";e["ﲍ"]="نن";e["ﲎ"]="نى";e["ﲏ"]="ني";e["ﲐ"]="ىٰ";e["ﲑ"]="ير";e["ﲒ"]="يز";e["ﲓ"]="يم";e["ﲔ"]="ين";e["ﲕ"]="يى";e["ﲖ"]="يي";e["ﲗ"]="ئج";e["ﲘ"]="ئح";e["ﲙ"]="ئخ";e["ﲚ"]="ئم";e["ﲛ"]="ئه";e["ﲜ"]="بج";e["ﲝ"]="بح";e["ﲞ"]="بخ";e["ﲟ"]="بم";e["ﲠ"]="به";e["ﲡ"]="تج";e["ﲢ"]="تح";e["ﲣ"]="تخ";e["ﲤ"]="تم";e["ﲥ"]="ته";e["ﲦ"]="ثم";e["ﲧ"]="جح";e["ﲨ"]="جم";e["ﲩ"]="حج";e["ﲪ"]="حم";e["ﲫ"]="خج";e["ﲬ"]="خم";e["ﲭ"]="سج";e["ﲮ"]="سح";e["ﲯ"]="سخ";e["ﲰ"]="سم";e["ﲱ"]="صح";e["ﲲ"]="صخ";e["ﲳ"]="صم";e["ﲴ"]="ضج";e["ﲵ"]="ضح";e["ﲶ"]="ضخ";e["ﲷ"]="ضم";e["ﲸ"]="طح";e["ﲹ"]="ظم";e["ﲺ"]="عج";e["ﲻ"]="عم";e["ﲼ"]="غج";e["ﲽ"]="غم";e["ﲾ"]="فج";e["ﲿ"]="فح";e["ﳀ"]="فخ";e["ﳁ"]="فم";e["ﳂ"]="قح";e["ﳃ"]="قم";e["ﳄ"]="كج";e["ﳅ"]="كح";e["ﳆ"]="كخ";e["ﳇ"]="كل";e["ﳈ"]="كم";e["ﳉ"]="لج";e["ﳊ"]="لح";e["ﳋ"]="لخ";e["ﳌ"]="لم";e["ﳍ"]="له";e["ﳎ"]="مج";e["ﳏ"]="مح";e["ﳐ"]="مخ";e["ﳑ"]="مم";e["ﳒ"]="نج";e["ﳓ"]="نح";e["ﳔ"]="نخ";e["ﳕ"]="نم";e["ﳖ"]="نه";e["ﳗ"]="هج";e["ﳘ"]="هم";e["ﳙ"]="هٰ";e["ﳚ"]="يج";e["ﳛ"]="يح";e["ﳜ"]="يخ";e["ﳝ"]="يم";e["ﳞ"]="يه";e["ﳟ"]="ئم";e["ﳠ"]="ئه";e["ﳡ"]="بم";e["ﳢ"]="به";e["ﳣ"]="تم";e["ﳤ"]="ته";e["ﳥ"]="ثم";e["ﳦ"]="ثه";e["ﳧ"]="سم";e["ﳨ"]="سه";e["ﳩ"]="شم";e["ﳪ"]="شه";e["ﳫ"]="كل";e["ﳬ"]="كم";e["ﳭ"]="لم";e["ﳮ"]="نم";e["ﳯ"]="نه";e["ﳰ"]="يم";e["ﳱ"]="يه";e["ﳲ"]="ـَّ";e["ﳳ"]="ـُّ";e["ﳴ"]="ـِّ";e["ﳵ"]="طى";e["ﳶ"]="طي";e["ﳷ"]="عى";e["ﳸ"]="عي";e["ﳹ"]="غى";e["ﳺ"]="غي";e["ﳻ"]="سى";e["ﳼ"]="سي";e["ﳽ"]="شى";e["ﳾ"]="شي";e["ﳿ"]="حى";e["ﴀ"]="حي";e["ﴁ"]="جى";e["ﴂ"]="جي";e["ﴃ"]="خى";e["ﴄ"]="خي";e["ﴅ"]="صى";e["ﴆ"]="صي";e["ﴇ"]="ضى";e["ﴈ"]="ضي";e["ﴉ"]="شج";e["ﴊ"]="شح";e["ﴋ"]="شخ";e["ﴌ"]="شم";e["ﴍ"]="شر";e["ﴎ"]="سر";e["ﴏ"]="صر";e["ﴐ"]="ضر";e["ﴑ"]="طى";e["ﴒ"]="طي";e["ﴓ"]="عى";e["ﴔ"]="عي";e["ﴕ"]="غى";e["ﴖ"]="غي";e["ﴗ"]="سى";e["ﴘ"]="سي";e["ﴙ"]="شى";e["ﴚ"]="شي";e["ﴛ"]="حى";e["ﴜ"]="حي";e["ﴝ"]="جى";e["ﴞ"]="جي";e["ﴟ"]="خى";e["ﴠ"]="خي";e["ﴡ"]="صى";e["ﴢ"]="صي";e["ﴣ"]="ضى";e["ﴤ"]="ضي";e["ﴥ"]="شج";e["ﴦ"]="شح";e["ﴧ"]="شخ";e["ﴨ"]="شم";e["ﴩ"]="شر";e["ﴪ"]="سر";e["ﴫ"]="صر";e["ﴬ"]="ضر";e["ﴭ"]="شج";e["ﴮ"]="شح";e["ﴯ"]="شخ";e["ﴰ"]="شم";e["ﴱ"]="سه";e["ﴲ"]="شه";e["ﴳ"]="طم";e["ﴴ"]="سج";e["ﴵ"]="سح";e["ﴶ"]="سخ";e["ﴷ"]="شج";e["ﴸ"]="شح";e["ﴹ"]="شخ";e["ﴺ"]="طم";e["ﴻ"]="ظم";e["ﴼ"]="اً";e["ﴽ"]="اً";e["ﵐ"]="تجم";e["ﵑ"]="تحج";e["ﵒ"]="تحج";e["ﵓ"]="تحم";e["ﵔ"]="تخم";e["ﵕ"]="تمج";e["ﵖ"]="تمح";e["ﵗ"]="تمخ";e["ﵘ"]="جمح";e["ﵙ"]="جمح";e["ﵚ"]="حمي";e["ﵛ"]="حمى";e["ﵜ"]="سحج";e["ﵝ"]="سجح";e["ﵞ"]="سجى";e["ﵟ"]="سمح";e["ﵠ"]="سمح";e["ﵡ"]="سمج";e["ﵢ"]="سمم";e["ﵣ"]="سمم";e["ﵤ"]="صحح";e["ﵥ"]="صحح";e["ﵦ"]="صمم";e["ﵧ"]="شحم";e["ﵨ"]="شحم";e["ﵩ"]="شجي";e["ﵪ"]="شمخ";e["ﵫ"]="شمخ";e["ﵬ"]="شمم";e["ﵭ"]="شمم";e["ﵮ"]="ضحى";e["ﵯ"]="ضخم";e["ﵰ"]="ضخم";e["ﵱ"]="طمح";e["ﵲ"]="طمح";e["ﵳ"]="طمم";e["ﵴ"]="طمي";e["ﵵ"]="عجم";e["ﵶ"]="عمم";e["ﵷ"]="عمم";e["ﵸ"]="عمى";e["ﵹ"]="غمم";e["ﵺ"]="غمي";e["ﵻ"]="غمى";e["ﵼ"]="فخم";e["ﵽ"]="فخم";e["ﵾ"]="قمح";e["ﵿ"]="قمم";e["ﶀ"]="لحم";e["ﶁ"]="لحي";e["ﶂ"]="لحى";e["ﶃ"]="لجج";e["ﶄ"]="لجج";e["ﶅ"]="لخم";e["ﶆ"]="لخم";e["ﶇ"]="لمح";e["ﶈ"]="لمح";e["ﶉ"]="محج";e["ﶊ"]="محم";e["ﶋ"]="محي";e["ﶌ"]="مجح";e["ﶍ"]="مجم";e["ﶎ"]="مخج";e["ﶏ"]="مخم";e["ﶒ"]="مجخ";e["ﶓ"]="همج";e["ﶔ"]="همم";e["ﶕ"]="نحم";e["ﶖ"]="نحى";e["ﶗ"]="نجم";e["ﶘ"]="نجم";e["ﶙ"]="نجى";e["ﶚ"]="نمي";e["ﶛ"]="نمى";e["ﶜ"]="يمم";e["ﶝ"]="يمم";e["ﶞ"]="بخي";e["ﶟ"]="تجي";e["ﶠ"]="تجى";e["ﶡ"]="تخي";e["ﶢ"]="تخى";e["ﶣ"]="تمي";e["ﶤ"]="تمى";e["ﶥ"]="جمي";e["ﶦ"]="جحى";e["ﶧ"]="جمى";e["ﶨ"]="سخى";e["ﶩ"]="صحي";e["ﶪ"]="شحي";e["ﶫ"]="ضحي";e["ﶬ"]="لجي";e["ﶭ"]="لمي";e["ﶮ"]="يحي";e["ﶯ"]="يجي";e["ﶰ"]="يمي";e["ﶱ"]="ممي";e["ﶲ"]="قمي";e["ﶳ"]="نحي";e["ﶴ"]="قمح";e["ﶵ"]="لحم";e["ﶶ"]="عمي";e["ﶷ"]="كمي";e["ﶸ"]="نجح";e["ﶹ"]="مخي";e["ﶺ"]="لجم";e["ﶻ"]="كمم";e["ﶼ"]="لجم";e["ﶽ"]="نجح";e["ﶾ"]="جحي";e["ﶿ"]="حجي";e["ﷀ"]="مجي";e["ﷁ"]="فمي";e["ﷂ"]="بحي";e["ﷃ"]="كمم";e["ﷄ"]="عجم";e["ﷅ"]="صمم";e["ﷆ"]="سخي";e["ﷇ"]="نجي";e["﹉"]="‾";e["﹊"]="‾";e["﹋"]="‾";e["﹌"]="‾";e["﹍"]="_";e["﹎"]="_";e["﹏"]="_";e["ﺀ"]="ء";e["ﺁ"]="آ";e["ﺂ"]="آ";e["ﺃ"]="أ";e["ﺄ"]="أ";e["ﺅ"]="ؤ";e["ﺆ"]="ؤ";e["ﺇ"]="إ";e["ﺈ"]="إ";e["ﺉ"]="ئ";e["ﺊ"]="ئ";e["ﺋ"]="ئ";e["ﺌ"]="ئ";e["ﺍ"]="ا";e["ﺎ"]="ا";e["ﺏ"]="ب";e["ﺐ"]="ب";e["ﺑ"]="ب";e["ﺒ"]="ب";e["ﺓ"]="ة";e["ﺔ"]="ة";e["ﺕ"]="ت";e["ﺖ"]="ت";e["ﺗ"]="ت";e["ﺘ"]="ت";e["ﺙ"]="ث";e["ﺚ"]="ث";e["ﺛ"]="ث";e["ﺜ"]="ث";e["ﺝ"]="ج";e["ﺞ"]="ج";e["ﺟ"]="ج";e["ﺠ"]="ج";e["ﺡ"]="ح";e["ﺢ"]="ح";e["ﺣ"]="ح";e["ﺤ"]="ح";e["ﺥ"]="خ";e["ﺦ"]="خ";e["ﺧ"]="خ";e["ﺨ"]="خ";e["ﺩ"]="د";e["ﺪ"]="د";e["ﺫ"]="ذ";e["ﺬ"]="ذ";e["ﺭ"]="ر";e["ﺮ"]="ر";e["ﺯ"]="ز";e["ﺰ"]="ز";e["ﺱ"]="س";e["ﺲ"]="س";e["ﺳ"]="س";e["ﺴ"]="س";e["ﺵ"]="ش";e["ﺶ"]="ش";e["ﺷ"]="ش";e["ﺸ"]="ش";e["ﺹ"]="ص";e["ﺺ"]="ص";e["ﺻ"]="ص";e["ﺼ"]="ص";e["ﺽ"]="ض";e["ﺾ"]="ض";e["ﺿ"]="ض";e["ﻀ"]="ض";e["ﻁ"]="ط";e["ﻂ"]="ط";e["ﻃ"]="ط";e["ﻄ"]="ط";e["ﻅ"]="ظ";e["ﻆ"]="ظ";e["ﻇ"]="ظ";e["ﻈ"]="ظ";e["ﻉ"]="ع";e["ﻊ"]="ع";e["ﻋ"]="ع";e["ﻌ"]="ع";e["ﻍ"]="غ";e["ﻎ"]="غ";e["ﻏ"]="غ";e["ﻐ"]="غ";e["ﻑ"]="ف";e["ﻒ"]="ف";e["ﻓ"]="ف";e["ﻔ"]="ف";e["ﻕ"]="ق";e["ﻖ"]="ق";e["ﻗ"]="ق";e["ﻘ"]="ق";e["ﻙ"]="ك";e["ﻚ"]="ك";e["ﻛ"]="ك";e["ﻜ"]="ك";e["ﻝ"]="ل";e["ﻞ"]="ل";e["ﻟ"]="ل";e["ﻠ"]="ل";e["ﻡ"]="م";e["ﻢ"]="م";e["ﻣ"]="م";e["ﻤ"]="م";e["ﻥ"]="ن";e["ﻦ"]="ن";e["ﻧ"]="ن";e["ﻨ"]="ن";e["ﻩ"]="ه";e["ﻪ"]="ه";e["ﻫ"]="ه";e["ﻬ"]="ه";e["ﻭ"]="و";e["ﻮ"]="و";e["ﻯ"]="ى";e["ﻰ"]="ى";e["ﻱ"]="ي";e["ﻲ"]="ي";e["ﻳ"]="ي";e["ﻴ"]="ي";e["ﻵ"]="لآ";e["ﻶ"]="لآ";e["ﻷ"]="لأ";e["ﻸ"]="لأ";e["ﻹ"]="لإ";e["ﻺ"]="لإ";e["ﻻ"]="لا";e["ﻼ"]="لا"});t.mapSpecialUnicodeValues=a;t.reverseIfRtl=s;t.getUnicodeRangeFor=n;t.getNormalizedUnicodes=h;t.getUnicodeForGlyph=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.WorkerMessageHandler=t.WorkerTask=void 0;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},i=r(0),n=r(32),o=r(1),s=function(){function e(e){this.name=e;this.terminated=!1;this._capability=(0,i.createPromiseCapability)()}e.prototype={get finished(){return this._capability.promise},finish:function(){this._capability.resolve()},terminate:function(){this.terminated=!0},ensureNotTerminated:function(){if(this.terminated)throw new Error("Worker task was terminated")}};return e}(),c=function(){function e(e){this._msgHandler=e;this._contentLength=null;this._fullRequestReader=null;this._rangeRequestReaders=[]}function t(e){var t=this;this._msgHandler=e;this._contentLength=null;this._isRangeSupported=!1;this._isStreamingSupported=!1;var r=this._msgHandler.sendWithStream("GetReader");this._reader=r.getReader();this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then(function(e){t._isStreamingSupported=e.isStreamingSupported;t._isRangeSupported=e.isRangeSupported;t._contentLength=e.contentLength})}function r(e,t,r){this._msgHandler=r;this.onProgress=null;var a=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=a.getReader()}e.prototype={getFullReader:function(){(0,i.assert)(!this._fullRequestReader);this._fullRequestReader=new t(this._msgHandler);return this._fullRequestReader},getRangeReader:function(e,t){var a=new r(e,t,this._msgHandler);this._rangeRequestReaders.push(a);return a},cancelAllRequests:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e);this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}};t.prototype={get headersReady(){return this._headersReady},get contentLength(){return this._contentLength},get isStreamingSupported(){return this._isStreamingSupported},get isRangeSupported(){return this._isRangeSupported},read:function(){return this._reader.read().then(function(e){var t=e.value;return e.done?{value:void 0,done:!0}:{value:t.buffer,done:!1}})},cancel:function(e){this._reader.cancel(e)}};r.prototype={get isStreamingSupported(){return!1},read:function(){return this._reader.read().then(function(e){var t=e.value;return e.done?{value:void 0,done:!0}:{value:t.buffer,done:!1}})},cancel:function(e){this._reader.cancel(e)}};return e}(),l={setup:function(e,t){var r=!1;e.on("test",function(t){if(!r){r=!0;if(t instanceof Uint8Array){var a=255===t[0];e.postMessageTransfers=a;var i=new XMLHttpRequest,n="response"in i;try{i.responseType}catch(e){n=!1}n?e.send("test",{supportTypedArray:!0,supportTransfers:a}):e.send("test",!1)}else e.send("test","main",!1)}});e.on("configure",function(e){(0,i.setVerbosityLevel)(e.verbosity)});e.on("GetDocRequest",function(e){return l.createDocumentHandler(e,t)})},createDocumentHandler:function(e,t){function r(){if(m)throw new Error("Worker was terminated")}function l(e){b.push(e)}function u(e){e.finish();var t=b.indexOf(e);b.splice(t,1)}function h(e){var t=(0,i.createPromiseCapability)(),r=function(){var e=g.ensureDoc("numPages"),r=g.ensureDoc("fingerprint"),i=g.ensureXRef("encrypt");Promise.all([e,r,i]).then(function(e){var r={numPages:e[0],fingerprint:e[1],encrypted:!!e[2]};t.resolve(r)},a)},a=function(e){t.reject(e)};g.ensureDoc("checkHeader",[]).then(function(){g.ensureDoc("parseStartXRef",[]).then(function(){g.ensureDoc("parse",[e]).then(r,a)},a)},a);return t.promise}function f(e,t){var a,o=(0,i.createPromiseCapability)(),s=e.source;if(s.data){try{a=new n.LocalPdfManager(v,s.data,s.password,t,y);o.resolve(a)}catch(e){o.reject(e)}return o.promise}var l,u=[];try{l=new c(k)}catch(e){o.reject(e);return o.promise}var h=l.getFullReader();h.headersReady.then(function(){if(h.isRangeSupported){var e=s.disableAutoFetch||h.isStreamingSupported;a=new n.NetworkPdfManager(v,l,{msgHandler:k,url:s.url,password:s.password,length:h.contentLength,disableAutoFetch:e,rangeChunkSize:s.rangeChunkSize},t,y);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,n=r.highWaterMark,o=void 0===n?1:n;a(this,e);this._state="writable";this._storedError=void 0;this._writer=void 0;this._writableStreamController=void 0;this._writeRequests=[];this._inFlightWriteRequest=void 0;this._closeRequest=void 0;this._inFlightCloseRequest=void 0;this._pendingAbortRequest=void 0;this._backpressure=!1;if(void 0!==t.type)throw new RangeError("Invalid type is specified");this._writableStreamController=new we(this,t,i,o);this._writableStreamController.__startSteps()}ie(e,[{key:"abort",value:function(e){return!1===n(this)?Promise.reject(z("abort")):!0===o(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):s(this,e)}},{key:"getWriter",value:function(){if(!1===n(this))throw z("getWriter");return i(this)}},{key:"locked",get:function(){if(!1===n(this))throw z("locked");return o(this)}}]);return e}();e.exports={AcquireWritableStreamDefaultWriter:i,IsWritableStream:n,IsWritableStreamLocked:o,WritableStream:ve,WritableStreamAbort:s,WritableStreamDefaultControllerError:j,WritableStreamDefaultWriterCloseWithErrorPropagation:A,WritableStreamDefaultWriterRelease:O,WritableStreamDefaultWriterWrite:T,WritableStreamCloseQueuedOrInFlight:p};var ye=function(){function e(t){a(this,e);if(!1===n(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===o(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t;t._writer=this;var r=t._state;if("writable"===r){!1===p(t)&&!0===t._backpressure?Z(this):$(this);W(this)}else if("erroring"===r){Q(this,t._storedError);this._readyPromise.catch(function(){});W(this)}else if("closed"===r){$(this);V(this)}else{he("errored"===r,"state must be errored");var i=t._storedError;Q(this,i);this._readyPromise.catch(function(){});X(this,i);this._closedPromise.catch(function(){})}}ie(e,[{key:"abort",value:function(e){return!1===S(this)?Promise.reject(H("abort")):void 0===this._ownerWritableStream?Promise.reject(G("abort")):C(this,e)}},{key:"close",value:function(){if(!1===S(this))return Promise.reject(H("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(G("close")):!0===p(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):x(this)}},{key:"releaseLock",value:function(){if(!1===S(this))throw H("releaseLock");var e=this._ownerWritableStream;if(void 0!==e){he(void 0!==e._writer);O(this)}}},{key:"write",value:function(e){return!1===S(this)?Promise.reject(H("write")):void 0===this._ownerWritableStream?Promise.reject(G("write to")):T(this,e)}},{key:"closed",get:function(){return!1===S(this)?Promise.reject(H("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===S(this))throw H("desiredSize");if(void 0===this._ownerWritableStream)throw G("desiredSize");return _(this)}},{key:"ready",get:function(){return!1===S(this)?Promise.reject(H("ready")):this._readyPromise}}]);return e}(),we=function(){function e(t,r,i,o){a(this,e);if(!1===n(t))throw new TypeError("WritableStreamDefaultController can only be constructed with a WritableStream instance");if(void 0!==t._writableStreamController)throw new TypeError("WritableStreamDefaultController instances can only be created by the WritableStream constructor");this._controlledWritableStream=t;this._underlyingSink=r;this._queue=void 0;this._queueTotalSize=void 0;be(this);this._started=!1;var s=ce(i,o);this._strategySize=s.size;this._strategyHWM=s.highWaterMark;k(t,q(this))}ie(e,[{key:"error",value:function(e){if(!1===M(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&j(this,e)}},{key:"__abortSteps",value:function(e){return se(this._underlyingSink,"abort",[e])}},{key:"__errorSteps",value:function(){be(this)}},{key:"__startSteps",value:function(){var e=this,t=oe(this._underlyingSink,"start",[this]),r=this._controlledWritableStream;Promise.resolve(t).then(function(){he("writable"===r._state||"erroring"===r._state);e._started=!0;D(e)},function(t){he("writable"===r._state||"erroring"===r._state);e._started=!0;l(r,t)}).catch(fe)}}]);return e}()},function(e,t,r){var a=r(0),i=a.IsFiniteNonNegativeNumber,n=r(1),o=n.assert;t.DequeueValue=function(e){o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]].");o(e._queue.length>0,"Spec-level failure: should never dequeue from an empty queue.");var t=e._queue.shift();e._queueTotalSize-=t.size;e._queueTotalSize<0&&(e._queueTotalSize=0);return t.value};t.EnqueueValueWithSize=function(e,t,r){o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]].");r=Number(r);if(!i(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r});e._queueTotalSize+=r};t.PeekQueueValue=function(e){o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]].");o(e._queue.length>0,"Spec-level failure: should never peek at an empty queue.");return e._queue[0].value};t.ResetQueue=function(e){o("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]].");e._queue=[];e._queueTotalSize=0}},function(e,t,r){function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new tt(e)}function n(e){return new et(e)}function o(e){return!!De(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function s(e){Ne(!0===o(e),"IsReadableStreamDisturbed should only be used on known readable streams");return e._disturbed}function c(e){Ne(!0===o(e),"IsReadableStreamLocked should only be used on known readable streams");return void 0!==e._reader}function l(e,t){Ne(!0===o(e));Ne("boolean"==typeof t);var r=n(e),a={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void 0,reason2:void 0};a.promise=new Promise(function(e){a._resolve=e});var i=u();i._reader=r;i._teeState=a;i._cloneForBranch2=t;var s=h();s._stream=e;s._teeState=a;var c=f();c._stream=e;c._teeState=a;var l=Object.create(Object.prototype);Me(l,"pull",i);Me(l,"cancel",s);var d=new $e(l),g=Object.create(Object.prototype);Me(g,"pull",i);Me(g,"cancel",c);var m=new $e(g);i._branch1=d._readableStreamController;i._branch2=m._readableStreamController;r._closedPromise.catch(function(e){if(!0!==a.closedOrErrored){D(i._branch1,e);D(i._branch2,e);a.closedOrErrored=!0}});return[d,m]}function u(){function e(){var t=e._reader,r=e._branch1,a=e._branch2,i=e._teeState;return T(t).then(function(e){Ne(De(e));var t=e.value,n=e.done;Ne("boolean"==typeof n);if(!0===n&&!1===i.closedOrErrored){!1===i.canceled1&&B(r);!1===i.canceled2&&B(a);i.closedOrErrored=!0}if(!0!==i.closedOrErrored){var o=t,s=t;!1===i.canceled1&&M(r,o);!1===i.canceled2&&M(a,s)}})}return e}function h(){function e(t){var r=e._stream,a=e._teeState;a.canceled1=!0;a.reason1=t;if(!0===a.canceled2){var i=Be([a.reason1,a.reason2]),n=m(r,i);a._resolve(n)}return a.promise}return e}function f(){function e(t){var r=e._stream,a=e._teeState;a.canceled2=!0;a.reason2=t;if(!0===a.canceled1){var i=Be([a.reason1,a.reason2]),n=m(r,i);a._resolve(n)}return a.promise}return e}function d(e){Ne(!0===x(e._reader));Ne("readable"===e._state||"closed"===e._state);return new Promise(function(t,r){var a={_resolve:t,_reject:r};e._reader._readIntoRequests.push(a)})}function g(e){Ne(!0===A(e._reader));Ne("readable"===e._state);return new Promise(function(t,r){var a={_resolve:t,_reject:r};e._reader._readRequests.push(a)})}function m(e,t){e._disturbed=!0;if("closed"===e._state)return Promise.resolve(void 0);if("errored"===e._state)return Promise.reject(e._storedError);p(e);return e._readableStreamController.__cancelSteps(t).then(function(){})}function p(e){Ne("readable"===e._state);e._state="closed";var t=e._reader;if(void 0!==t){if(!0===A(t)){for(var r=0;r0);a._readIntoRequests.shift()._resolve(Pe(t,r))}function y(e,t,r){var a=e._reader;Ne(a._readRequests.length>0);a._readRequests.shift()._resolve(Pe(t,r))}function w(e){return e._reader._readIntoRequests.length}function k(e){return e._reader._readRequests.length}function S(e){var t=e._reader;return void 0!==t&&!1!==x(t)}function C(e){var t=e._reader;return void 0!==t&&!1!==A(t)}function x(e){return!!De(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function A(e){return!!De(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function P(e,t){e._ownerReadableStream=t;t._reader=e;if("readable"===t._state)fe(e);else if("closed"===t._state)ge(e);else{Ne("errored"===t._state,"state must be errored");de(e,t._storedError);e._closedPromise.catch(function(){})}}function I(e,t){var r=e._ownerReadableStream;Ne(void 0!==r);return m(r,t)}function _(e){Ne(void 0!==e._ownerReadableStream);Ne(e._ownerReadableStream._reader===e);"readable"===e._ownerReadableStream._state?me(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):pe(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));e._closedPromise.catch(function(){});e._ownerReadableStream._reader=void 0;e._ownerReadableStream=void 0}function O(e,t){var r=e._ownerReadableStream;Ne(void 0!==r);r._disturbed=!0;return"errored"===r._state?Promise.reject(r._storedError):Z(r._readableStreamController,t)}function T(e){var t=e._ownerReadableStream;Ne(void 0!==t);t._disturbed=!0;if("closed"===t._state)return Promise.resolve(Pe(void 0,!0));if("errored"===t._state)return Promise.reject(t._storedError);Ne("readable"===t._state);return t._readableStreamController.__pullSteps()}function E(e){return!!De(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSource")}function R(e){if(!1!==F(e))if(!0!==e._pulling){Ne(!1===e._pullAgain);e._pulling=!0;var t=Oe(e._underlyingSource,"pull",[e]);t.then(function(){e._pulling=!1;if(!0===e._pullAgain){e._pullAgain=!1;return R(e)}},function(t){L(e,t)}).catch(Ue)}else e._pullAgain=!0}function F(e){var t=e._controlledReadableStream;return"closed"!==t._state&&"errored"!==t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===c(t)&&k(t)>0||N(e)>0)))}function B(e){var t=e._controlledReadableStream;Ne(!1===e._closeRequested);Ne("readable"===t._state);e._closeRequested=!0;0===e._queue.length&&p(t)}function M(e,t){var r=e._controlledReadableStream;Ne(!1===e._closeRequested);Ne("readable"===r._state);if(!0===c(r)&&k(r)>0)y(r,t,!1);else{var a=1;if(void 0!==e._strategySize){var i=e._strategySize;try{a=i(t)}catch(t){L(e,t);throw t}}try{ze(e,t,a)}catch(t){L(e,t);throw t}}R(e)}function D(e,t){var r=e._controlledReadableStream;Ne("readable"===r._state);He(e);b(r,t)}function L(e,t){"readable"===e._controlledReadableStream._state&&D(e,t)}function N(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function U(e){return!!De(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingByteSource")}function q(e){return!!De(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function j(e){if(!1!==re(e))if(!0!==e._pulling){Ne(!1===e._pullAgain);e._pulling=!0;var t=Oe(e._underlyingByteSource,"pull",[e]);t.then(function(){e._pulling=!1;if(!0===e._pullAgain){e._pullAgain=!1;j(e)}},function(t){"readable"===e._controlledReadableStream._state&&ne(e,t)}).catch(Ue)}else e._pullAgain=!0}function z(e){K(e);e._pendingPullIntos=[]}function H(e,t){Ne("errored"!==e._state,"state must not be errored");var r=!1;if("closed"===e._state){Ne(0===t.bytesFilled);r=!0}var a=G(t);if("default"===t.readerType)y(e,a,r);else{Ne("byob"===t.readerType);v(e,a,r)}}function G(e){var t=e.bytesFilled,r=e.elementSize;Ne(t<=e.byteLength);Ne(t%r==0);return new e.ctor(e.buffer,e.byteOffset,t/r)}function W(e,t,r,a){e._queue.push({buffer:t,byteOffset:r,byteLength:a});e._queueTotalSize+=a}function X(e,t){var r=t.elementSize,a=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+i,o=n-n%r,s=i,c=!1;if(o>a){s=o-t.bytesFilled;c=!0}for(var l=e._queue;s>0;){var u=l[0],h=Math.min(s,u.byteLength),f=t.byteOffset+t.bytesFilled;Ae(t.buffer,f,u.buffer,u.byteOffset,h);if(u.byteLength===h)l.shift();else{u.byteOffset+=h;u.byteLength-=h}e._queueTotalSize-=h;V(e,h,t);s-=h}if(!1===c){Ne(0===e._queueTotalSize,"queue must be empty");Ne(t.bytesFilled>0);Ne(t.bytesFilled0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];if(!0===X(e,t)){te(e);H(e._controlledReadableStream,t)}}}function Z(e,t){var r=e._controlledReadableStream,a=1;t.constructor!==DataView&&(a=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,n={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:a,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0){n.buffer=Te(n.buffer);e._pendingPullIntos.push(n);return d(r)}if("closed"===r._state){var o=new t.constructor(n.buffer,n.byteOffset,0);return Promise.resolve(Pe(o,!0))}if(e._queueTotalSize>0){if(!0===X(e,n)){var s=G(n);Y(e);return Promise.resolve(Pe(s,!1))}if(!0===e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");ne(e,c);return Promise.reject(c)}}n.buffer=Te(n.buffer);e._pendingPullIntos.push(n);var l=d(r);j(e);return l}function Q(e,t){t.buffer=Te(t.buffer);Ne(0===t.bytesFilled,"bytesFilled must be 0");var r=e._controlledReadableStream;if(!0===S(r))for(;w(r)>0;){var a=te(e);H(r,a)}}function $(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");V(e,t,r);if(!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,n=r.buffer.slice(i-a,i);W(e,n,0,n.byteLength)}r.buffer=Te(r.buffer);r.bytesFilled-=a;H(e._controlledReadableStream,r);J(e)}}function ee(e,t){var r=e._pendingPullIntos[0],a=e._controlledReadableStream;if("closed"===a._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");Q(e,r)}else{Ne("readable"===a._state);$(e,t,r)}}function te(e){var t=e._pendingPullIntos.shift();K(e);return t}function re(e){var t=e._controlledReadableStream;return"readable"===t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===C(t)&&k(t)>0||(!0===S(t)&&w(t)>0||oe(e)>0))))}function ae(e){var t=e._controlledReadableStream;Ne(!1===e._closeRequested);Ne("readable"===t._state);if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){if(e._pendingPullIntos[0].bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");ne(e,r);throw r}}p(t)}}function ie(e,t){var r=e._controlledReadableStream;Ne(!1===e._closeRequested);Ne("readable"===r._state);var a=t.buffer,i=t.byteOffset,n=t.byteLength,o=Te(a);if(!0===C(r))if(0===k(r))W(e,o,i,n);else{Ne(0===e._queue.length);var s=new Uint8Array(o,i,n);y(r,s,!1)}else if(!0===S(r)){W(e,o,i,n);J(e)}else{Ne(!1===c(r),"stream must not be locked");W(e,o,i,n)}}function ne(e,t){var r=e._controlledReadableStream;Ne("readable"===r._state);z(e);He(e);b(r,t)}function oe(e){var t=e._controlledReadableStream,r=t._state;return"errored"===r?null:"closed"===r?0:e._strategyHWM-e._queueTotalSize}function se(e,t){t=Number(t);if(!1===Ie(t))throw new RangeError("bytesWritten must be a finite");Ne(e._pendingPullIntos.length>0);ee(e,t)}function ce(e,t){Ne(e._pendingPullIntos.length>0);var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer;ee(e,t.byteLength)}function le(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function ue(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function he(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function fe(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t;e._closedPromise_reject=r})}function de(e,t){e._closedPromise=Promise.reject(t);e._closedPromise_resolve=void 0;e._closedPromise_reject=void 0}function ge(e){e._closedPromise=Promise.resolve(void 0);e._closedPromise_resolve=void 0;e._closedPromise_reject=void 0}function me(e,t){Ne(void 0!==e._closedPromise_resolve);Ne(void 0!==e._closedPromise_reject);e._closedPromise_reject(t);e._closedPromise_resolve=void 0;e._closedPromise_reject=void 0}function pe(e,t){Ne(void 0===e._closedPromise_resolve);Ne(void 0===e._closedPromise_reject);e._closedPromise=Promise.reject(t)}function be(e){Ne(void 0!==e._closedPromise_resolve);Ne(void 0!==e._closedPromise_reject);e._closedPromise_resolve(void 0);e._closedPromise_resolve=void 0;e._closedPromise_reject=void 0}function ve(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ye(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function we(e){ return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function ke(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Se(e){try{Promise.prototype.then.call(e,void 0,function(){})}catch(e){}}var Ce=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,n=r.highWaterMark;a(this,e);this._state="readable";this._reader=void 0;this._storedError=void 0;this._disturbed=!1;this._readableStreamController=void 0;var o=t.type;if("bytes"===String(o)){void 0===n&&(n=0);this._readableStreamController=new it(this,t,n)}else{if(void 0!==o)throw new RangeError("Invalid type is specified");void 0===n&&(n=1);this._readableStreamController=new rt(this,t,i,n)}}Ce(e,[{key:"cancel",value:function(e){return!1===o(this)?Promise.reject(le("cancel")):!0===c(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):m(this,e)}},{key:"getReader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mode;if(!1===o(this))throw le("getReader");if(void 0===t)return n(this);t=String(t);if("byob"===t)return i(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,a=e.readable;Se(this.pipeTo(r,t));return a}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.preventClose,i=r.preventAbort,s=r.preventCancel;if(!1===o(this))return Promise.reject(le("pipeTo"));if(!1===Xe(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));a=Boolean(a);i=Boolean(i);s=Boolean(s);if(!0===c(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===Ve(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var l=n(this),u=We(e),h=!1,f=Promise.resolve();return new Promise(function(r,n){function o(){f=Promise.resolve();return!0===h?Promise.resolve():u._readyPromise.then(function(){return T(l).then(function(e){var t=e.value;!0!==e.done&&(f=Ze(u,t).catch(function(){}))})}).then(o)}function c(){var e=f;return f.then(function(){return e!==f?c():void 0})}function d(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(Ue)}function g(t,r,a){function i(){t().then(function(){return b(r,a)},function(e){return b(!0,e)}).catch(Ue)}if(!0!==h){h=!0;"writable"===e._state&&!1===Qe(e)?c().then(i):i()}}function p(t,r){if(!0!==h){h=!0;"writable"===e._state&&!1===Qe(e)?c().then(function(){return b(t,r)}).catch(Ue):b(t,r)}}function b(e,t){Je(u);_(l);e?n(t):r(void 0)}d(t,l._closedPromise,function(t){!1===i?g(function(){return Ye(e,t)},!0,t):p(!0,t)});d(e,u._closedPromise,function(e){!1===s?g(function(){return m(t,e)},!0,e):p(!0,e)});!function(e,t,r){"closed"===e._state?r():t.then(r).catch(Ue)}(t,l._closedPromise,function(){!1===a?g(function(){return Ke(u)}):p()});if(!0===Qe(e)||"closed"===e._state){var v=new TypeError("the destination writable stream closed before all data could be piped to it");!1===s?g(function(){return m(t,v)},!0,v):p(!0,v)}o().catch(function(e){f=Promise.resolve();Ue(e)})})}},{key:"tee",value:function(){if(!1===o(this))throw le("tee");var e=l(this,!1);return Be(e)}},{key:"locked",get:function(){if(!1===o(this))throw le("locked");return c(this)}}]);return e}();e.exports={ReadableStream:$e,IsReadableStreamDisturbed:s,ReadableStreamDefaultControllerClose:B,ReadableStreamDefaultControllerEnqueue:M,ReadableStreamDefaultControllerError:D,ReadableStreamDefaultControllerGetDesiredSize:N};var et=function(){function e(t){a(this,e);if(!1===o(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");P(this,t);this._readRequests=[]}Ce(e,[{key:"cancel",value:function(e){return!1===A(this)?Promise.reject(he("cancel")):void 0===this._ownerReadableStream?Promise.reject(ue("cancel")):I(this,e)}},{key:"read",value:function(){return!1===A(this)?Promise.reject(he("read")):void 0===this._ownerReadableStream?Promise.reject(ue("read from")):T(this)}},{key:"releaseLock",value:function(){if(!1===A(this))throw he("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");_(this)}}},{key:"closed",get:function(){return!1===A(this)?Promise.reject(he("closed")):this._closedPromise}}]);return e}(),tt=function(){function e(t){a(this,e);if(!o(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===U(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");P(this,t);this._readIntoRequests=[]}Ce(e,[{key:"cancel",value:function(e){return x(this)?void 0===this._ownerReadableStream?Promise.reject(ue("cancel")):I(this,e):Promise.reject(ve("cancel"))}},{key:"read",value:function(e){return x(this)?void 0===this._ownerReadableStream?Promise.reject(ue("read from")):ArrayBuffer.isView(e)?0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):O(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(ve("read"))}},{key:"releaseLock",value:function(){if(!x(this))throw ve("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");_(this)}}},{key:"closed",get:function(){return x(this)?this._closedPromise:Promise.reject(ve("closed"))}}]);return e}(),rt=function(){function e(t,r,i,n){a(this,e);if(!1===o(t))throw new TypeError("ReadableStreamDefaultController can only be constructed with a ReadableStream instance");if(void 0!==t._readableStreamController)throw new TypeError("ReadableStreamDefaultController instances can only be created by the ReadableStream constructor");this._controlledReadableStream=t;this._underlyingSource=r;this._queue=void 0;this._queueTotalSize=void 0;He(this);this._started=!1;this._closeRequested=!1;this._pullAgain=!1;this._pulling=!1;var s=Ee(i,n);this._strategySize=s.size;this._strategyHWM=s.highWaterMark;var c=this,l=_e(r,"start",[this]);Promise.resolve(l).then(function(){c._started=!0;Ne(!1===c._pulling);Ne(!1===c._pullAgain);R(c)},function(e){L(c,e)}).catch(Ue)}Ce(e,[{key:"close",value:function(){if(!1===E(this))throw ye("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");B(this)}},{key:"enqueue",value:function(e){if(!1===E(this))throw ye("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");return M(this,e)}},{key:"error",value:function(e){if(!1===E(this))throw ye("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");D(this,e)}},{key:"__cancelSteps",value:function(e){He(this);return Oe(this._underlyingSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=je(this);!0===this._closeRequested&&0===this._queue.length?p(e):R(this);return Promise.resolve(Pe(t,!1))}var r=g(e);R(this);return r}},{key:"desiredSize",get:function(){if(!1===E(this))throw ye("desiredSize");return N(this)}}]);return e}(),at=function(){function e(t,r){a(this,e);this._associatedReadableByteStreamController=t;this._view=r}Ce(e,[{key:"respond",value:function(e){if(!1===q(this))throw we("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");se(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===q(this))throw we("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");ce(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){return this._view}}]);return e}(),it=function(){function e(t,r,i){a(this,e);if(!1===o(t))throw new TypeError("ReadableByteStreamController can only be constructed with a ReadableStream instance given a byte source");if(void 0!==t._readableStreamController)throw new TypeError("ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte source");this._controlledReadableStream=t;this._underlyingByteSource=r;this._pullAgain=!1;this._pulling=!1;z(this);this._queue=this._queueTotalSize=void 0;He(this);this._closeRequested=!1;this._started=!1;this._strategyHWM=Re(i);var n=r.autoAllocateChunkSize;if(void 0!==n&&(!1===Number.isInteger(n)||n<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");this._autoAllocateChunkSize=n;this._pendingPullIntos=[];var s=this,c=_e(r,"start",[this]);Promise.resolve(c).then(function(){s._started=!0;Ne(!1===s._pulling);Ne(!1===s._pullAgain);j(s)},function(e){"readable"===t._state&&ne(s,e)}).catch(Ue)}Ce(e,[{key:"close",value:function(){if(!1===U(this))throw ke("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");ae(this)}},{key:"enqueue",value:function(e){if(!1===U(this))throw ke("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");ie(this,e)}},{key:"error",value:function(e){if(!1===U(this))throw ke("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");ne(this,e)}},{key:"__cancelSteps",value:function(e){if(this._pendingPullIntos.length>0){this._pendingPullIntos[0].bytesFilled=0}He(this);return Oe(this._underlyingByteSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;Ne(!0===C(e));if(this._queueTotalSize>0){Ne(0===k(e));var t=this._queue.shift();this._queueTotalSize-=t.byteLength;Y(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(Pe(r,!1))}var a=this._autoAllocateChunkSize;if(void 0!==a){var i=void 0;try{i=new ArrayBuffer(a)}catch(e){return Promise.reject(e)}var n={buffer:i,byteOffset:0,byteLength:a,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(n)}var o=g(e);j(this);return o}},{key:"byobRequest",get:function(){if(!1===U(this))throw ke("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled);this._byobRequest=new at(this,t)}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===U(this))throw ke("desiredSize");return oe(this)}}]);return e}()},function(e,t,r){var a=r(6),i=r(4),n=r(2);t.TransformStream=a.TransformStream;t.ReadableStream=i.ReadableStream;t.IsReadableStreamDisturbed=i.IsReadableStreamDisturbed;t.ReadableStreamDefaultControllerClose=i.ReadableStreamDefaultControllerClose;t.ReadableStreamDefaultControllerEnqueue=i.ReadableStreamDefaultControllerEnqueue;t.ReadableStreamDefaultControllerError=i.ReadableStreamDefaultControllerError;t.ReadableStreamDefaultControllerGetDesiredSize=i.ReadableStreamDefaultControllerGetDesiredSize;t.AcquireWritableStreamDefaultWriter=n.AcquireWritableStreamDefaultWriter;t.IsWritableStream=n.IsWritableStream;t.IsWritableStreamLocked=n.IsWritableStreamLocked;t.WritableStream=n.WritableStream;t.WritableStreamAbort=n.WritableStreamAbort;t.WritableStreamDefaultControllerError=n.WritableStreamDefaultControllerError;t.WritableStreamDefaultWriterCloseWithErrorPropagation=n.WritableStreamDefaultWriterCloseWithErrorPropagation;t.WritableStreamDefaultWriterRelease=n.WritableStreamDefaultWriterRelease;t.WritableStreamDefaultWriterWrite=n.WritableStreamDefaultWriterWrite},function(e,t,r){function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");s(e)}function n(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");var r=e._readableController;try{O(r,t)}catch(t){e._readableClosed=!0;c(e,t);throw e._storedError}!0==E(r)<=0&&!1===e._backpressure&&h(e,!0)}function o(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");l(e,t)}function s(e){w(!1===e._errored);w(!1===e._readableClosed);try{_(e._readableController)}catch(e){w(!1)}e._readableClosed=!0}function c(e,t){!1===e._errored&&l(e,t)}function l(e,t){w(!1===e._errored);e._errored=!0;e._storedError=t;!1===e._writableDone&&B(e._writableController,t);!1===e._readableClosed&&T(e._readableController,t)}function u(e){w(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized");if(!1===e._backpressure)return Promise.resolve();w(!0===e._backpressure,"_backpressure should have been initialized");return e._backpressureChangePromise}function h(e,t){w(e._backpressure!==t,"TransformStreamSetBackpressure() should be called only when backpressure is changed");void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(t);e._backpressureChangePromise=new Promise(function(t){e._backpressureChangePromise_resolve=t});e._backpressureChangePromise.then(function(e){w(e!==t,"_backpressureChangePromise should be fulfilled only when backpressure is changed")});e._backpressure=t}function f(e,t){n(t._controlledTransformStream,e);return Promise.resolve()}function d(e,t){w(!1===e._errored);w(!1===e._transforming);w(!1===e._backpressure);e._transforming=!0;var r=e._transformer,a=e._transformStreamController;return C(r,"transform",[t,a],f,[t,a]).then(function(){e._transforming=!1;return u(e)},function(t){c(e,t);return Promise.reject(t)})}function g(e){return!!A(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function m(e){return!!A(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function p(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function b(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var v=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,e);this._transformer=t;var r=t.readableStrategy,i=t.writableStrategy;this._transforming=!1;this._errored=!1;this._storedError=void 0;this._writableController=void 0;this._readableController=void 0;this._transformStreamController=void 0;this._writableDone=!1;this._readableClosed=!1;this._backpressure=void 0;this._backpressureChangePromise=void 0;this._backpressureChangePromise_resolve=void 0;this._transformStreamController=new L(this);var n=void 0,o=new Promise(function(e){n=e}),s=new D(this,o);this._readable=new I(s,r);var c=new M(this,o);this._writable=new F(c,i);w(void 0!==this._writableController);w(void 0!==this._readableController);h(this,E(this._readableController)<=0);var l=this,u=S(t,"start",[l._transformStreamController]);n(u);o.catch(function(e){if(!1===l._errored){l._errored=!0;l._storedError=e}})}v(e,[{key:"readable",get:function(){if(!1===m(this))throw b("readable");return this._readable}},{key:"writable",get:function(){if(!1===m(this))throw b("writable");return this._writable}}]);return e}();e.exports={TransformStream:N}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";function a(){}Object.defineProperty(t,"__esModule",{value:!0});t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0;var i=r(0),n=r(14),o=r(1),s=r(3),c=r(12),l=r(2);a.prototype={create:function(e,t,r,a){var n=e.fetchIfRef(t);if((0,o.isDict)(n)){var s=(0,o.isRef)(t)?t.toString():"annot_"+a.createObjId(),c=n.get("Subtype");c=(0,o.isName)(c)?c.name:null;var l={xref:e,dict:n,ref:(0,o.isRef)(t)?t:null,subtype:c,id:s,pdfManager:r};switch(c){case"Link":return new b(l);case"Text":return new p(l);case"Widget":var h=i.Util.getInheritableProperty(n,"FT");h=(0,o.isName)(h)?h.name:null;switch(h){case"Tx":return new d(l);case"Btn":return new g(l);case"Ch":return new m(l)}(0,i.warn)('Unimplemented widget field type "'+h+'", falling back to base field type.');return new f(l);case"Popup":return new v(l);case"Line":return new y(l);case"Highlight":return new w(l);case"Underline":return new k(l);case"Squiggly":return new S(l);case"StrikeOut":return new C(l);case"FileAttachment":return new x(l);default:c?(0,i.warn)('Unimplemented annotation type "'+c+'", falling back to base annotation.'):(0,i.warn)("Annotation is missing the required /Subtype.");return new u(l)}}}};var u=function(){function e(e,t,r){var a=i.Util.getAxialAlignedBoundingBox(t,r),n=a[0],o=a[1],s=a[2],c=a[3];if(n===s||o===c)return[1,0,0,1,e[0],e[1]];var l=(e[2]-e[0])/(s-n),u=(e[3]-e[1])/(c-o);return[l,0,0,u,e[0]-n*l,e[1]-o*u]}function t(e){var t=e.dict;this.setFlags(t.get("F"));this.setRectangle(t.getArray("Rect"));this.setColor(t.getArray("C"));this.setBorderStyle(t);this.setAppearance(t);this.data={};this.data.id=e.id;this.data.subtype=e.subtype;this.data.annotationFlags=this.flags;this.data.rect=this.rectangle;this.data.color=this.color;this.data.borderStyle=this.borderStyle;this.data.hasAppearance=!!this.appearance}t.prototype={_hasFlag:function(e,t){return!!(e&t)},_isViewable:function(e){return!this._hasFlag(e,i.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,i.AnnotationFlag.HIDDEN)&&!this._hasFlag(e,i.AnnotationFlag.NOVIEW)},_isPrintable:function(e){return this._hasFlag(e,i.AnnotationFlag.PRINT)&&!this._hasFlag(e,i.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,i.AnnotationFlag.HIDDEN)},get viewable(){return 0===this.flags||this._isViewable(this.flags)},get printable(){return 0!==this.flags&&this._isPrintable(this.flags)},setFlags:function(e){this.flags=(0,i.isInt)(e)&&e>0?e:0},hasFlag:function(e){return this._hasFlag(this.flags,e)},setRectangle:function(e){(0,i.isArray)(e)&&4===e.length?this.rectangle=i.Util.normalizeRect(e):this.rectangle=[0,0,0,0]},setColor:function(e){var t=new Uint8Array(3);if((0,i.isArray)(e))switch(e.length){case 0:this.color=null;break;case 1:s.ColorSpace.singletons.gray.getRgbItem(e,0,t,0);this.color=t;break;case 3:s.ColorSpace.singletons.rgb.getRgbItem(e,0,t,0);this.color=t;break;case 4:s.ColorSpace.singletons.cmyk.getRgbItem(e,0,t,0);this.color=t;break;default:this.color=t}else this.color=t},setBorderStyle:function(e){this.borderStyle=new h;if((0,o.isDict)(e))if(e.has("BS")){var t=e.get("BS"),r=t.get("Type");if(!r||(0,o.isName)(r,"Border")){this.borderStyle.setWidth(t.get("W"));this.borderStyle.setStyle(t.get("S"));this.borderStyle.setDashArray(t.getArray("D"))}}else if(e.has("Border")){var a=e.getArray("Border");if((0,i.isArray)(a)&&a.length>=3){this.borderStyle.setHorizontalCornerRadius(a[0]);this.borderStyle.setVerticalCornerRadius(a[1]);this.borderStyle.setWidth(a[2]);4===a.length&&this.borderStyle.setDashArray(a[3])}}else this.borderStyle.setWidth(0)},setAppearance:function(e){this.appearance=null;var t=e.get("AP");if((0,o.isDict)(t)){var r=t.get("N");if((0,o.isStream)(r))this.appearance=r;else if((0,o.isDict)(r)){var a=e.get("AS");(0,o.isName)(a)&&r.has(a.name)&&(this.appearance=r.get(a.name))}}},_preparePopup:function(e){e.has("C")||(this.data.color=null);this.data.hasPopup=e.has("Popup");this.data.title=(0,i.stringToPDFString)(e.get("T")||"");this.data.contents=(0,i.stringToPDFString)(e.get("Contents")||"")},loadResources:function(e){return this.appearance.dict.getAsync("Resources").then(function(t){if(t){return new n.ObjectLoader(t,e,t.xref).load().then(function(){return t})}})},getOperatorList:function(t,r,a){var n=this;if(!this.appearance)return Promise.resolve(new c.OperatorList);var o=this.data,s=this.appearance.dict,l=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),u=s.getArray("BBox")||[0,0,1,1],h=s.getArray("Matrix")||[1,0,0,1,0,0],f=e(o.rect,u,h);return l.then(function(e){var a=new c.OperatorList;a.addOp(i.OPS.beginAnnotation,[o.rect,f,h]);return t.getOperatorList({stream:n.appearance,task:r,resources:e,operatorList:a}).then(function(){a.addOp(i.OPS.endAnnotation,[]);n.appearance.reset();return a})})}};return t}(),h=function(){function e(){this.width=1;this.style=i.AnnotationBorderStyleType.SOLID;this.dashArray=[3];this.horizontalCornerRadius=0;this.verticalCornerRadius=0}e.prototype={setWidth:function(e){e===(0|e)&&(this.width=e)},setStyle:function(e){if(e)switch(e.name){case"S":this.style=i.AnnotationBorderStyleType.SOLID;break;case"D":this.style=i.AnnotationBorderStyleType.DASHED;break;case"B":this.style=i.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=i.AnnotationBorderStyleType.INSET;break;case"U":this.style=i.AnnotationBorderStyleType.UNDERLINE}},setDashArray:function(e){if((0,i.isArray)(e)&&e.length>0){for(var t=!0,r=!0,a=0,n=e.length;a=0)){t=!1;break}o>0&&(r=!1)}t&&!r?this.dashArray=e:this.width=0}else e&&(this.width=0)},setHorizontalCornerRadius:function(e){e===(0|e)&&(this.horizontalCornerRadius=e)},setVerticalCornerRadius:function(e){e===(0|e)&&(this.verticalCornerRadius=e)}};return e}(),f=function(){function e(e){u.call(this,e);var t=e.dict,r=this.data;r.annotationType=i.AnnotationType.WIDGET;r.fieldName=this._constructFieldName(t);r.fieldValue=i.Util.getInheritableProperty(t,"V",!0);r.alternativeText=(0,i.stringToPDFString)(t.get("TU")||"");r.defaultAppearance=i.Util.getInheritableProperty(t,"DA")||"";var a=i.Util.getInheritableProperty(t,"FT");r.fieldType=(0,o.isName)(a)?a.name:null;this.fieldResources=i.Util.getInheritableProperty(t,"DR")||o.Dict.empty;r.fieldFlags=i.Util.getInheritableProperty(t,"Ff");(!(0,i.isInt)(r.fieldFlags)||r.fieldFlags<0)&&(r.fieldFlags=0);r.readOnly=this.hasFieldFlag(i.AnnotationFieldFlag.READONLY);"Sig"===r.fieldType&&this.setFlags(i.AnnotationFlag.HIDDEN)}i.Util.inherit(e,u,{_constructFieldName:function(e){if(!e.has("T")&&!e.has("Parent")){(0,i.warn)("Unknown field name, falling back to empty field name.");return""}if(!e.has("Parent"))return(0,i.stringToPDFString)(e.get("T"));var t=[];e.has("T")&&t.unshift((0,i.stringToPDFString)(e.get("T")));for(var r=e;r.has("Parent");){r=r.get("Parent");if(!(0,o.isDict)(r))break;r.has("T")&&t.unshift((0,i.stringToPDFString)(r.get("T")))}return t.join(".")},hasFieldFlag:function(e){return!!(this.data.fieldFlags&e)}});return e}(),d=function(){function e(e){f.call(this,e);this.data.fieldValue=(0,i.stringToPDFString)(this.data.fieldValue||"");var t=i.Util.getInheritableProperty(e.dict,"Q");(!(0,i.isInt)(t)||t<0||t>2)&&(t=null);this.data.textAlignment=t;var r=i.Util.getInheritableProperty(e.dict,"MaxLen");(!(0,i.isInt)(r)||r<0)&&(r=null);this.data.maxLen=r;this.data.multiLine=this.hasFieldFlag(i.AnnotationFieldFlag.MULTILINE);this.data.comb=this.hasFieldFlag(i.AnnotationFieldFlag.COMB)&&!this.hasFieldFlag(i.AnnotationFieldFlag.MULTILINE)&&!this.hasFieldFlag(i.AnnotationFieldFlag.PASSWORD)&&!this.hasFieldFlag(i.AnnotationFieldFlag.FILESELECT)&&null!==this.data.maxLen}i.Util.inherit(e,f,{getOperatorList:function(e,t,r){var a=new c.OperatorList;if(r)return Promise.resolve(a);if(this.appearance)return u.prototype.getOperatorList.call(this,e,t,r);if(!this.data.defaultAppearance)return Promise.resolve(a);var n=new l.Stream((0,i.stringToBytes)(this.data.defaultAppearance));return e.getOperatorList({stream:n,task:t,resources:this.fieldResources,operatorList:a}).then(function(){return a})}});return e}(),g=function(){function e(e){f.call(this,e);this.data.checkBox=!this.hasFieldFlag(i.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON);if(this.data.checkBox){if(!(0,o.isName)(this.data.fieldValue))return;this.data.fieldValue=this.data.fieldValue.name}this.data.radioButton=this.hasFieldFlag(i.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(i.AnnotationFieldFlag.PUSHBUTTON);if(this.data.radioButton){this.data.fieldValue=this.data.buttonValue=null;var t=e.dict.get("Parent");if((0,o.isDict)(t)&&t.has("V")){var r=t.get("V");(0,o.isName)(r)&&(this.data.fieldValue=r.name)}var a=e.dict.get("AP");if(!(0,o.isDict)(a))return;var n=a.get("N");if(!(0,o.isDict)(n))return;for(var s=n.getKeys(),c=0,l=s.length;c=0&&"ET"===g[I];--I)g[I]="EN";for(I=p+1;I0&&(O=g[p-1]);var T=x;_+1E&&a(E)&&(F=E)}for(E=R;E>=F;--E){var B=-1;for(p=0,b=k.length;p=0){s(d,B,p);B=-1}}else B<0&&(B=p);B>=0&&s(d,B,k.length)}for(p=0,b=d.length;p"!==M||(d[p]="")}return c(d.join(""),l)}Object.defineProperty(t,"__esModule",{value:!0});t.bidi=void 0;var u=r(0),h=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],f=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"],d=[],g=[];t.bidi=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],i=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],n=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"];t.ISOAdobeCharset=a;t.ExpertCharset=i;t.ExpertSubsetCharset=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CMapFactory=t.IdentityCMap=t.CMap=void 0;var a=r(0),i=r(1),n=r(5),o=r(2),s=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],c=function(){function e(e){this.codespaceRanges=[[],[],[],[]];this.numCodespaceRanges=0;this._map=[];this.name="";this.vertical=!1;this.useCMap=null;this.builtInCMap=e}e.prototype={addCodespaceRange:function(e,t,r){this.codespaceRanges[e-1].push(t,r);this.numCodespaceRanges++},mapCidRange:function(e,t,r){for(;e<=t;)this._map[e++]=r++},mapBfRange:function(e,t,r){for(var a=r.length-1;e<=t;){this._map[e++]=r;r=r.substr(0,a)+String.fromCharCode(r.charCodeAt(a)+1)}},mapBfRangeToArray:function(e,t,r){for(var a=0,i=r.length;e<=t&&a>>0;for(var s=i[o],c=0,l=s.length;c=u&&a<=h){r.charcode=a;r.length=o+1;return}}}r.charcode=0;r.length=1},get length(){return this._map.length},get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}};return e}(),l=function(){function e(e,t){c.call(this);this.vertical=e;this.addCodespaceRange(t,0,65535)}a.Util.inherit(e,c,{});e.prototype={addCodespaceRange:c.prototype.addCodespaceRange,mapCidRange:function(e,t,r){throw new Error("should not call mapCidRange")},mapBfRange:function(e,t,r){throw new Error("should not call mapBfRange")},mapBfRangeToArray:function(e,t,r){throw new Error("should not call mapBfRangeToArray")},mapOne:function(e,t){throw new Error("should not call mapCidOne")},lookup:function(e){return(0,a.isInt)(e)&&e<=65535?e:void 0},contains:function(e){return(0,a.isInt)(e)&&e<=65535},forEach:function(e){for(var t=0;t<=65535;t++)e(t,t)},charCodeOf:function(e){return(0,a.isInt)(e)&&e<=65535?e:-1},getMap:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e},readCharCode:c.prototype.readCharCode,get length(){return 65536},get isIdentityCMap(){throw new Error("should not access .isIdentityCMap")}};return e}(),u=function(){function e(e,t){for(var r=0,a=0;a<=t;a++)r=r<<8|e[a];return r>>>0}function t(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(null,e.subarray(0,t+1))}function r(e,t,r){for(var a=0,i=r;i>=0;i--){a+=e[i]+t[i];e[i]=255&a;a>>=8}}function i(e,t){for(var r=1,a=t;a>=0&&r>0;a--){r+=e[a];e[a]=255&r;r>>=8}}function n(e){this.buffer=e;this.pos=0;this.end=e.length;this.tmpBuf=new Uint8Array(l)}function o(a,o,s){return new Promise(function(l,u){var h=new n(a),f=h.readByte();o.vertical=!!(1&f);for(var d,g,m=null,p=new Uint8Array(c),b=new Uint8Array(c),v=new Uint8Array(c),y=new Uint8Array(c),w=new Uint8Array(c);(g=h.readByte())>=0;){var k=g>>5;if(7!==k){var S=!!(16&g),C=15&g;if(C+1>c)throw new Error("processBinaryCMap: Invalid dataSize.");var x,A=h.readNumber();switch(k){case 0:h.readHex(p,C);h.readHexNumber(b,C);r(b,p,C);o.addCodespaceRange(C+1,e(p,C),e(b,C));for(x=1;x=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new a.FormatError("unexpected EOF in bcmap");e=!(128&r);t=t<<7|127&r}while(!e);return t},readSigned:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1},readHex:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1));this.pos+=t+1},readHexNumber:function(e,t){var r,i=this.tmpBuf,n=0;do{var o=this.readByte();if(o<0)throw new a.FormatError("unexpected EOF in bcmap");r=!(128&o);i[n++]=127&o}while(!r);for(var s=t,c=0,l=0;s>=0;){for(;l<8&&i.length>0;){c=i[--n]<>=8;l-=8}},readHexSigned:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,a=0,i=0;i<=t;i++){a=(1&a)<<8|e[i];e[i]=a>>1^r}},readString:function(){for(var e=this.readNumber(),t="",r=0;r>>0}function t(e){if(!(0,a.isString)(e))throw new a.FormatError("Malformed CMap: expected string.")}function r(e){if(!(0,a.isInt)(e))throw new a.FormatError("Malformed CMap: expected int.")}function h(r,a){for(;;){var n=a.getObj();if((0,i.isEOF)(n))break;if((0,i.isCmd)(n,"endbfchar"))return;t(n);var o=e(n);n=a.getObj();t(n);var s=n;r.mapOne(o,s)}}function f(r,n){for(;;){var o=n.getObj();if((0,i.isEOF)(o))break;if((0,i.isCmd)(o,"endbfrange"))return;t(o);var s=e(o);o=n.getObj();t(o);var c=e(o);o=n.getObj();if((0,a.isInt)(o)||(0,a.isString)(o)){var l=(0,a.isInt)(o)?String.fromCharCode(o):o;r.mapBfRange(s,c,l)}else{if(!(0,i.isCmd)(o,"["))break;o=n.getObj();for(var u=[];!(0,i.isCmd)(o,"]")&&!(0,i.isEOF)(o);){u.push(o);o=n.getObj()}r.mapBfRangeToArray(s,c,u)}}throw new a.FormatError("Invalid bf range.")}function d(a,n){for(;;){var o=n.getObj();if((0,i.isEOF)(o))break;if((0,i.isCmd)(o,"endcidchar"))return;t(o);var s=e(o);o=n.getObj();r(o);var c=o;a.mapOne(s,c)}}function g(a,n){for(;;){var o=n.getObj();if((0,i.isEOF)(o))break;if((0,i.isCmd)(o,"endcidrange"))return;t(o);var s=e(o);o=n.getObj();t(o);var c=e(o);o=n.getObj();r(o);var l=o;a.mapCidRange(s,c,l)}}function m(t,r){for(;;){var n=r.getObj();if((0,i.isEOF)(n))break;if((0,i.isCmd)(n,"endcodespacerange"))return;if(!(0,a.isString)(n))break;var o=e(n);n=r.getObj();if(!(0,a.isString)(n))break;var s=e(n);t.addCodespaceRange(n.length,o,s)}throw new a.FormatError("Invalid codespace range.")}function p(e,t){var r=t.getObj();(0,a.isInt)(r)&&(e.vertical=!!r)}function b(e,t){var r=t.getObj();(0,i.isName)(r)&&(0,a.isString)(r.name)&&(e.name=r.name)}function v(e,t,r,n){var o,s;e:for(;;)try{var c=t.getObj();if((0,i.isEOF)(c))break;if((0,i.isName)(c)){"WMode"===c.name?p(e,t):"CMapName"===c.name&&b(e,t);o=c}else if((0,i.isCmd)(c))switch(c.cmd){case"endcmap":break e;case"usecmap":(0,i.isName)(o)&&(s=o.name);break;case"begincodespacerange":m(e,t);break;case"beginbfchar":h(e,t);break;case"begincidchar":d(e,t);break;case"beginbfrange":f(e,t);break;case"begincidrange":g(e,t)}}catch(e){if(e instanceof a.MissingDataException)throw e;(0,a.warn)("Invalid cMap data: "+e);continue}!n&&s&&(n=s);return n?y(e,r,n):Promise.resolve(e)}function y(e,t,r){return w(r,t).then(function(t){e.useCMap=t;if(0===e.numCodespaceRanges){for(var r=e.useCMap.codespaceRanges,a=0;a100){(0,o.warn)("getInheritedPageProp: maximum loop count exceeded for "+e);return a?a[0]:void 0}r=r.get("Parent")}if(a)return 1!==a.length&&(0,n.isDict)(a[0])?n.Dict.merge(this.xref,a):a[0]},get content(){return this.getPageProp("Contents")},get resources(){return(0,o.shadow)(this,"resources",this.getInheritedPageProp("Resources")||n.Dict.empty)},get mediaBox(){var e=this.getInheritedPageProp("MediaBox",!0);return(0,o.isArray)(e)&&4===e.length?(0,o.shadow)(this,"mediaBox",e):(0,o.shadow)(this,"mediaBox",r)},get cropBox(){var e=this.getInheritedPageProp("CropBox",!0);return(0,o.isArray)(e)&&4===e.length?(0,o.shadow)(this,"cropBox",e):(0,o.shadow)(this,"cropBox",this.mediaBox)},get userUnit(){var e=this.getPageProp("UserUnit");(!(0,o.isNum)(e)||e<=0)&&(e=1);return(0,o.shadow)(this,"userUnit",e)},get view(){var e=this.mediaBox,t=this.cropBox;if(e===t)return(0,o.shadow)(this,"view",e);var r=o.Util.intersect(t,e);return(0,o.shadow)(this,"view",r||e)},get rotate(){var e=this.getInheritedPageProp("Rotate")||0;e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360);return(0,o.shadow)(this,"rotate",e)},getContentStream:function(){var e,t=this.content;if((0,o.isArray)(t)){var r,a=this.xref,i=t.length,c=[];for(r=0;rn&&(r=n-i);for(var s=0;s0;){i-=1024-"startxref".length;i<0&&(i=0);e.pos=i;a=t(e,"startxref",1024,!0)}if(a){e.skip(9);var n;do{n=e.getByte()}while((0,o.isSpace)(n));for(var s="";n>=32&&n<=57;){s+=String.fromCharCode(n);n=e.getByte()}r=parseInt(s,10);isNaN(r)&&(r=0)}}return(0,o.shadow)(this,"startXRef",r)},get mainXRefEntriesOffset(){var e=0,t=this.linearization;t&&(e=t.mainXRefEntriesOffset);return(0,o.shadow)(this,"mainXRefEntriesOffset",e)},checkHeader:function(){var e=this.stream;e.reset();if(t(e,"%PDF-",1024)){e.moveStart();for(var r,a="";(r=e.getByte())>32&&!(a.length>=12);)a+=String.fromCharCode(r);this.pdfFormatVersion||(this.pdfFormatVersion=a.substring(5))}},parseStartXRef:function(){var e=this.startXRef;this.xref.setStartXRef(e)},setup:function(e){var t=this;this.xref.parse(e);var r={createPage:function(e,r,a,i,n){return new f(t.pdfManager,t.xref,e,r,a,i,n)}};this.catalog=new i.Catalog(this.pdfManager,this.xref,r)},get numPages(){var e=this.linearization,t=e?e.numPages:this.catalog.numPages;return(0,o.shadow)(this,"numPages",t)},get documentInfo(){var e,t={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{e=this.xref.trailer.get("Info")}catch(e){if(e instanceof o.MissingDataException)throw e;(0,o.info)("The document information dictionary is invalid.")}if(e){var r=a.entries;for(var i in r)if(e.has(i)){var n=e.get(i);r[i](n)?t[i]="string"!=typeof n?n:(0,o.stringToPDFString)(n):(0,o.info)('Bad value in document info for "'+i+'"')}}return(0,o.shadow)(this,"documentInfo",t)},get fingerprint(){var e,t=this.xref,a="",i=t.trailer.get("ID");if(i&&(0,o.isArray)(i)&&i[0]&&(0,o.isString)(i[0])&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==i[0])e=(0,o.stringToBytes)(i[0]);else{this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(r,this.stream.end));e=(0,u.calculateMD5)(this.stream.bytes.subarray(0,r),0,r)}for(var n=0,s=e.length;n>1;s=i+l+14;o=[];for(c=0;c>1;r>16,s=0,c=0;n+=10;if(o<0)do{i=e[n]<<8|e[n+1];var l=e[n+2]<<8|e[n+3];n+=4;var u,f;if(1&i){u=(e[n]<<24|e[n+1]<<16)>>16;f=(e[n+2]<<24|e[n+3]<<16)>>16;n+=4}else{u=e[n++];f=e[n++]}if(2&i){s=u;c=f}else{s=0;c=0}var d=1,g=1,m=0,p=0;if(8&i){d=g=(e[n]<<24|e[n+1]<<16)/1073741824;n+=2}else if(64&i){d=(e[n]<<24|e[n+1]<<16)/1073741824;g=(e[n+2]<<24|e[n+3]<<16)/1073741824;n+=4}else if(128&i){d=(e[n]<<24|e[n+1]<<16)/1073741824;m=(e[n+2]<<24|e[n+3]<<16)/1073741824;p=(e[n+4]<<24|e[n+5]<<16)/1073741824;g=(e[n+6]<<24|e[n+7]<<16)/1073741824;n+=8}var b=r.glyphs[l];if(b){t.push({cmd:"save"});t.push({cmd:"transform",args:[d,m,p,g,s,c]});h(b,t,r);t.push({cmd:"restore"})}}while(32&i);else{var v,y,w=[];for(v=0;v0;)S.push({flags:i})}for(v=0;v>16;n+=2;break;case 2:s-=e[n++];break;case 18:s+=e[n++]}S[v].x=s}for(v=0;v>16;n+=2;break;case 4:c-=e[n++];break;case 36:c+=e[n++]}S[v].y=c}var x=0;for(n=0;n>1;A=!0;break;case 4:d+=l.pop();i(h,d);A=!0;break;case 5:for(;l.length>0;){h+=l.shift();d+=l.shift();n(h,d)}break;case 6:for(;l.length>0;){h+=l.shift();n(h,d);if(0===l.length)break;d+=l.shift();n(h,d)}break;case 7:for(;l.length>0;){d+=l.shift();n(h,d);if(0===l.length)break;h+=l.shift();n(h,d)}break;case 8:for(;l.length>0;){p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+l.shift();s(p,v,b,y,h,d)}break;case 10:C=l.pop()+r.subrsBias;x=r.subrs[C];x&&c(x);break;case 11:return;case 12:P=e[m++];switch(P){case 34:p=h+l.shift();b=p+l.shift();w=d+l.shift();h=b+l.shift();s(p,d,b,w,h,w);p=h+l.shift();b=p+l.shift();h=b+l.shift();s(p,w,b,d,h,d);break;case 35:p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+l.shift();s(p,v,b,y,h,d);p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+l.shift();s(p,v,b,y,h,d);l.pop();break;case 36:p=h+l.shift();w=d+l.shift();b=p+l.shift();k=w+l.shift();h=b+l.shift();s(p,w,b,k,h,k);p=h+l.shift();b=p+l.shift();S=k+l.shift();h=b+l.shift();s(p,k,b,S,h,d);break;case 37:var I=h,_=d;p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+l.shift();s(p,v,b,y,h,d);p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b;d=y;Math.abs(h-I)>Math.abs(d-_)?h+=l.shift():d+=l.shift();s(p,v,b,y,h,d);break;default:throw new a.FormatError("unknown operator: 12 "+P)}break;case 14:if(l.length>=4){var O=l.pop(),T=l.pop();d=l.pop();h=l.pop();t.push({cmd:"save"});t.push({cmd:"translate",args:[h,d]});var E=u(r.cmap,String.fromCharCode(r.glyphNameMap[o.StandardEncoding[O]]));f(r.glyphs[E.glyphId],t,r);t.push({cmd:"restore"});E=u(r.cmap,String.fromCharCode(r.glyphNameMap[o.StandardEncoding[T]]));f(r.glyphs[E.glyphId],t,r)}return;case 18:g+=l.length>>1;A=!0;break;case 19:case 20:g+=l.length>>1;m+=g+7>>3;A=!0;break;case 21:d+=l.pop();h+=l.pop();i(h,d);A=!0;break;case 22:h+=l.pop();i(h,d);A=!0;break;case 23:g+=l.length>>1;A=!0;break;case 24:for(;l.length>2;){p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+l.shift();s(p,v,b,y,h,d)}h+=l.shift();d+=l.shift();n(h,d);break;case 25:for(;l.length>6;){h+=l.shift();d+=l.shift();n(h,d)}p=h+l.shift();v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+l.shift();s(p,v,b,y,h,d);break;case 26:l.length%2&&(h+=l.shift());for(;l.length>0;){p=h;v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b;d=y+l.shift();s(p,v,b,y,h,d)}break;case 27:l.length%2&&(d+=l.shift());for(;l.length>0;){p=h+l.shift();v=d;b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y;s(p,v,b,y,h,d)}break;case 28:l.push((e[m]<<24|e[m+1]<<16)>>16);m+=2;break;case 29:C=l.pop()+r.gsubrsBias;x=r.gsubrs[C];x&&c(x);break;case 30:for(;l.length>0;){p=h;v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+(1===l.length?l.shift():0);s(p,v,b,y,h,d);if(0===l.length)break;p=h+l.shift();v=d;b=p+l.shift();y=v+l.shift();d=y+l.shift();h=b+(1===l.length?l.shift():0);s(p,v,b,y,h,d)}break;case 31:for(;l.length>0;){p=h+l.shift();v=d;b=p+l.shift();y=v+l.shift();d=y+l.shift();h=b+(1===l.length?l.shift():0);s(p,v,b,y,h,d);if(0===l.length)break;p=h;v=d+l.shift();b=p+l.shift();y=v+l.shift();h=b+l.shift();d=y+(1===l.length?l.shift():0);s(p,v,b,y,h,d)}break;default:if(P<32)throw new a.FormatError("unknown operator: "+P);if(P<247)l.push(P-139);else if(P<251)l.push(256*(P-247)+e[m++]+108);else if(P<255)l.push(256*-(P-251)-e[m++]-108);else{l.push((e[m]<<24|e[m+1]<<16|e[m+2]<<8|e[m+3])/65536);m+=4}}A&&(l.length=0)}}var l=[],h=0,d=0,g=0;c(e)}function d(e){this.compiledGlyphs=Object.create(null);this.compiledCharCodeToGlyphId=Object.create(null);this.fontMatrix=e}function g(e,t,r){r=r||[488e-6,0,0,488e-6,0,0];d.call(this,r);this.glyphs=e;this.cmap=t}function m(e,t,r,a){r=r||[.001,0,0,.001,0,0];d.call(this,r);this.glyphs=e.glyphs;this.gsubrs=e.gsubrs||[];this.subrs=e.subrs||[];this.cmap=t;this.glyphNameMap=a||(0,n.getGlyphsUnicode)();this.gsubrsBias=this.gsubrs.length<1240?107:this.gsubrs.length<33900?1131:32768;this.subrsBias=this.subrs.length<1240?107:this.subrs.length<33900?1131:32768}d.prototype={getPathJs:function(e){var t=u(this.cmap,e),r=this.compiledGlyphs[t.glyphId];if(!r){r=this.compileGlyph(this.glyphs[t.glyphId]);this.compiledGlyphs[t.glyphId]=r}void 0===this.compiledCharCodeToGlyphId[t.charCode]&&(this.compiledCharCodeToGlyphId[t.charCode]=t.glyphId);return r},compileGlyph:function(e){if(!e||0===e.length||14===e[0])return"";var t=[];t.push({cmd:"save"});t.push({cmd:"transform",args:this.fontMatrix.slice()});t.push({cmd:"scale",args:["size","-size"]});this.compileGlyphImpl(e,t);t.push({cmd:"restore"});return t},compileGlyphImpl:function(){throw new Error("Children classes should implement this.")},hasBuiltPath:function(e){var t=u(this.cmap,e);return void 0!==this.compiledGlyphs[t.glyphId]&&void 0!==this.compiledCharCodeToGlyphId[t.charCode]}};a.Util.inherit(g,d,{compileGlyphImpl:function(e,t){h(e,t,this)}});a.Util.inherit(m,d,{compileGlyphImpl:function(e,t){f(e,t,this)}});return{create:function(i,n){for(var o,s,u,h,f,d,p=new Uint8Array(i.data),b=t(p,4),v=0,y=12;v=0?a:0}}else if(c)for(i in t)s[i]=t[i];else{n=h.StandardEncoding;for(i=0;i=0?a:0}}var l,f=e.differences;if(f)for(i in f){var d=f[i];a=r.indexOf(d);if(-1===a){l||(l=(0,u.getGlyphsUnicode)());var g=o(d,l);g!==d&&(a=r.indexOf(g))}s[i]=a>=0?a:0}return s}Object.defineProperty(t,"__esModule",{value:!0});t.getFontType=t.ProblematicCharRanges=t.IdentityToUnicodeMap=t.ToUnicodeMap=t.FontFlags=t.Font=t.ErrorFont=t.PRIVATE_USE_OFFSET_END=t.PRIVATE_USE_OFFSET_START=t.SEAC_ANALYSIS_ENABLED=void 0;var c=r(0),l=r(9),u=r(7),h=r(4),f=r(15),d=r(16),g=r(24),m=r(2),p=r(34),b=57344,v=63743,y=!1,w=1e3,k=!1,S={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144},C=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],x=function(){function e(e,t,r,a,i,n,o,s){this.fontChar=e;this.unicode=t;this.accent=r;this.width=a;this.vmetric=i;this.operatorListId=n;this.isSpace=o;this.isInFont=s}e.prototype.matchesForCache=function(e,t,r,a,i,n,o,s){return this.fontChar===e&&this.unicode===t&&this.accent===r&&this.width===a&&this.vmetric===i&&this.operatorListId===n&&this.isSpace===o&&this.isInFont===s};return e}(),A=function(){function e(e){this._map=e}e.prototype={get length(){return this._map.length},forEach:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))},has:function(e){return void 0!==this._map[e]},get:function(e){return this._map[e]},charCodeOf:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1},amend:function(e){for(var t in e)this._map[t]=e[t]}};return e}(),P=function(){function e(e,t){this.firstChar=e;this.lastChar=t}e.prototype={get length(){return this.lastChar+1-this.firstChar},forEach:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)},has:function(e){return this.firstChar<=e&&e<=this.lastChar},get:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)},charCodeOf:function(e){return(0,c.isInt)(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1},amend:function(e){throw new Error("Should not call amend()")}};return e}(),I=function(){function e(e,t,r){e[t]=r>>8&255;e[t+1]=255&r}function t(e,t,r){e[t]=r>>24&255;e[t+1]=r>>16&255;e[t+2]=r>>8&255;e[t+3]=255&r}function r(e,t,r){var a,i;if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(a=0,i=r.length;ar;){r<<=1;a++}var i=r*t;return{range:i,entry:a,rangeShift:t*e-i}};a.prototype={toArray:function(){var i=this.sfnt,n=this.tables,o=Object.keys(n);o.sort();var s,l,u,h,f,d=o.length,g=12+16*d,m=[g];for(s=0;s>>0;m.push(g)}var p=new Uint8Array(g);for(s=0;s>>0}t(p,g+4,v);t(p,g+8,m[s]);t(p,g+12,n[f].length);g+=16}return p},addTable:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}};return a}(),_=new Int32Array([0,32,127,161,173,174,1536,1920,2208,4256,6016,6144,7168,7248,8192,8208,8209,8210,8232,8240,8287,8304,9676,9677,12288,12289,12644,12645,43616,43648,65520,65536]),O=function(){function e(e,t,r){var i,o,s,l=this;this.name=e;this.loadedName=r.loadedName;this.isType3Font=r.isType3Font;this.sizes=[];this.missingFile=!1;this.glyphCache=Object.create(null);this.isSerifFont=!!(r.flags&S.Serif);this.isSymbolicFont=!!(r.flags&S.Symbolic);this.isMonospace=!!(r.flags&S.FixedPitch);var g=r.type,m=r.subtype;this.type=g;this.fallbackName=this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif";this.differences=r.differences;this.widths=r.widths;this.defaultWidth=r.defaultWidth;this.composite=r.composite;this.wideChars=r.wideChars;this.cMap=r.cMap;this.ascent=r.ascent/w;this.descent=r.descent/w;this.fontMatrix=r.fontMatrix;this.bbox=r.bbox;this.toUnicode=r.toUnicode;this.toFontChar=[];if("Type3"!==r.type){this.cidEncoding=r.cidEncoding;this.vertical=r.vertical;if(this.vertical){this.vmetrics=r.vmetrics;this.defaultVMetrics=r.defaultVMetrics}var p;if(t&&!t.isEmpty){"Type1C"===m&&("Type1"!==g&&"MMType1"!==g?T(t)?m="TrueType":g="Type1":F(t)&&(m="OpenType"));"CIDFontType0C"===m&&"CIDFontType0"!==g&&(g="CIDFontType0");"CIDFontType0"===g&&(m=B(t)?"CIDFontType0":F(t)?"OpenType":"CIDFontType0C");"OpenType"===m&&"OpenType"!==g&&(g="OpenType");var b;switch(g){case"MMType1":(0,c.info)("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var v="Type1C"===m||"CIDFontType0C"===m?new R(t,r):new E(e,t,r);a(r);b=this.convert(e,v,r);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype";b=this.checkAndRepair(e,t,r);if(this.isOpenType){a(r);g="OpenType"}break;default:throw new c.FormatError("Font "+g+" is not supported")}this.data=b;this.fontType=n(g,m);this.fontMatrix=r.fontMatrix;this.widths=r.widths;this.defaultWidth=r.defaultWidth;this.toUnicode=r.toUnicode;this.encoding=r.baseEncoding;this.seacMap=r.seacMap;this.loading=!0}else{t&&(0,c.warn)('Font file is empty in "'+e+'" ('+this.loadedName+")");this.missingFile=!0;var y=e.replace(/[,_]/g,"-"),k=(0,f.getStdFontMap)(),C=(0,f.getNonStdFontMap)(),x=!!k[y]||!(!C[y]||!k[C[y]]);y=k[y]||C[y]||y;this.bold=-1!==y.search(/bold/gi);this.italic=-1!==y.search(/oblique/gi)||-1!==y.search(/italic/gi);this.black=-1!==e.search(/Black/g);this.remeasure=Object.keys(this.widths).length>0;if(x&&"CIDFontType2"===g&&0===r.cidEncoding.indexOf("Identity-")){var I=(0,f.getGlyphMapForStandardFonts)(),_=[];for(i in I)_[+i]=I[i];if(/Arial-?Black/i.test(e)){var O=(0,f.getSupplementalGlyphMapForArialBlack)();for(i in O)_[+i]=O[i]}this.toUnicode instanceof P||this.toUnicode.forEach(function(e,t){_[+e]=t});this.toFontChar=_;this.toUnicode=new A(_)}else if(/Symbol/i.test(y))this.toFontChar=M(h.SymbolSetEncoding,(0,u.getGlyphsUnicode)(),r.differences);else if(/Dingbats/i.test(y)){/Wingdings/i.test(e)&&(0,c.warn)("Non-embedded Wingdings font, falling back to ZapfDingbats.");this.toFontChar=M(h.ZapfDingbatsEncoding,(0,u.getDingbatsGlyphsUnicode)(),r.differences)}else if(x)this.toFontChar=M(r.defaultEncoding,(0,u.getGlyphsUnicode)(),r.differences);else{p=(0,u.getGlyphsUnicode)();this.toUnicode.forEach(function(e,t){if(!l.composite){o=r.differences[e]||r.defaultEncoding[e];s=(0,d.getUnicodeForGlyph)(o,p);-1!==s&&(t=s)}l.toFontChar[e]=t})}this.loadedName=y.split("-")[0];this.loading=!1;this.fontType=n(g,m)}}else{for(i=0;i<256;i++)this.toFontChar[i]=this.differences[i]||r.defaultEncoding[i];this.fontType=c.FontType.TYPE3}}function t(e,t){return(e<<8)+t}function r(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function s(e,t,r,a){return(e<<24)+(t<<16)+(r<<8)+a}function p(e){return String.fromCharCode(e>>8&255,255&e)}function O(e){e=e>32767?32767:e<-32768?-32768:e;return String.fromCharCode(e>>8&255,255&e)}function T(e){var t=e.peekBytes(4);return 65536===(0,c.readUint32)(t,0)}function F(e){var t=e.peekBytes(4);return"OTTO"===(0,c.bytesToString)(t)}function B(e){var t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}function M(e,t,r){for(var a,i=[],n=0,o=e.length;n>1;e<_[a]?r=a-1:t=a}return!(1&t)}function L(e,t,r){var a=t.toUnicode,i=!!(t.flags&S.Symbolic),n=t.toUnicode instanceof P,o=Object.create(null),s=[],c=[],l=b;for(var u in e){u|=0;var h=e[u],f=u,d=!1;if(!n&&a.has(u)){d=!0;var g=a.get(f);1===g.length&&(f=g.charCodeAt(0))}if(!r[h]&&(void 0!==c[f]||D(f)||i&&!d)&&l<=v)do{f=l++;if(y&&61440===f){f=61472;l=f+1}}while(void 0!==c[f]&&l<=v);o[f]=h;s[u]=f;c[f]=!0}return{toFontChar:s,charCodeToGlyphId:o,nextAvailableFontCharCode:l}}function N(e,t){var r=[];for(var a in e)e[a]>=t||r.push({fontCharCode:0|a,glyphId:e[a]});r.sort(function(e,t){return e.fontCharCode-t.fontCharCode});for(var i=[],n=r.length,o=0;o65535?2:1,l="\0\0"+p(s)+"\0\0"+(0,c.string32)(4+8*s);for(r=o.length-1;r>=0&&!(o[r][0]<=65535);--r);var u=r+1;o[r][0]<65535&&65535===o[r][1]&&(o[r][1]=65534);var h,f,d,g,m=o[r][1]<65535?1:0,b=u+m,v=I.getSearchParams(b,2),y="",w="",k="",S="",C="",x=0;for(r=0,a=u;r0){w+="ÿÿ";y+="ÿÿ";k+="\0";S+="\0\0"}var _="\0\0"+p(2*b)+p(v.range)+p(v.entry)+p(v.rangeShift)+w+"\0\0"+y+k+S+C,O="",T="";if(s>1){l+="\0\0\n"+(0,c.string32)(4+8*s+4+_.length);O="";for(r=0,a=o.length;rt.getUint16())return!1;t.getBytes(6);if(0===t.getUint16())return!1;e.data[8]=e.data[9]=0;return!0}function j(e,t,r){r=r||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var a=0,i=0,n=0,o=0,s=null,l=0;if(t)for(var u in t){u|=0;(s>u||!s)&&(s=u);l 123 are reserved for internal usage");o|=1<0&&e.descent>0&&f[1]<0&&(v=-v);var y=r.yMax||b,k=-r.yMin||-v;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,c.string32)(a)+(0,c.string32)(i)+(0,c.string32)(n)+(0,c.string32)(o)+"*21*"+p(e.italicAngle?1:0)+p(s||e.firstChar)+p(l||e.lastChar)+p(b)+p(v)+"\0d"+p(y)+p(k)+"\0\0\0\0\0\0\0\0"+p(e.xHeight)+p(e.capHeight)+p(0)+p(s||e.firstChar)+"\0"}function z(e){var t=Math.floor(e.italicAngle*Math.pow(2,16));return"\0\0\0"+(0,c.string32)(t)+"\0\0\0\0"+(0,c.string32)(e.fixedPitch)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function H(e,t){t||(t=[[],[]]);var r,a,i,n,o,s=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||"",t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],c=[];for(r=0,a=s.length;ro.length)return 0;if(!n&&f>0){a.set(o.subarray(0,h),i);a.set([0,0],i+h);a.set(o.subarray(d,v),i+h+2);v-=f;o.length-v>3&&(v=v+3&-4);return v}if(o.length-v>3){v=v+3&-4;a.set(o.subarray(0,v),i);return v}a.set(o,i);return o.length}function d(e,t){for(var r,a,i,n,o,s=e.data,l=0,u=0,h=0,f=[],d=[],g=[],m=t.tooComplexToFollowFunctions,b=!1,y=0,w=0,k=s.length;l0&&(l+=C-1)}}else{if(b||w){(0,c.warn)("TT: nested FDEFs not allowed");m=!0}b=!0;h=l;n=f.pop();t.functionsDefined[n]={data:s,i:l}}else if(!b&&!w){n=f[f.length-1];t.functionsUsed[n]=!0;if(n in t.functionsStackDeltas)f.length+=t.functionsStackDeltas[n];else if(n in t.functionsDefined&&g.indexOf(n)<0){d.push({data:s,i:l,stackTop:f.length-1});g.push(n);o=t.functionsDefined[n];if(!o){(0,c.warn)("TT: CALL non-existent function");t.hintsValid=!1;return}s=o.data;l=o.i}}if(!b&&!w){var x=S<=142?v[S]:S>=192&&S<=223?-1:S>=224?-2:0;if(S>=113&&S<=117){a=f.pop();isNaN(a)||(x=2*-a)}for(;x<0&&f.length>0;){f.pop();x++}for(;x>0;){f.push(NaN);x--}}}t.tooComplexToFollowFunctions=m;var A=[s];l>s.length&&A.push(new Uint8Array(l-s.length));if(h>u){(0,c.warn)("TT: complementing a missing function tail");A.push(new Uint8Array([34,45]))}p(e,A)}function g(e,t){if(!e.tooComplexToFollowFunctions)if(e.functionsDefined.length>t){(0,c.warn)("TT: more functions defined than expected");e.hintsValid=!1}else for(var r=0,a=e.functionsUsed.length;rt){(0,c.warn)("TT: invalid function id: "+r);e.hintsValid=!1;return}if(e.functionsUsed[r]&&!e.functionsDefined[r]){(0,c.warn)("TT: undefined function: "+r);e.hintsValid=!1;return}}}function p(e,t){if(t.length>1){var r,a,i=0;for(r=0,a=t.length;r>>0,a=e.getInt32()>>>0,i=e.getInt32()>>>0,n=e.pos;e.pos=e.start?e.start:0;e.skip(a);var o=e.getBytes(i);e.pos=n;if("head"===t){o[8]=o[9]=o[10]=o[11]=0;o[17]|=32}return{tag:t,checksum:r,length:i,offset:a,data:o}}(i);S.indexOf(_.tag)<0||0!==_.length&&(P[_.tag]=_)}var T=!P["CFF "];if(T){if(!P.loca)throw new c.FormatError('Required "loca" table is not found');if(!P.glyf){(0,c.warn)('Required "glyf" table is not found -- trying to recover.');P.glyf={tag:"glyf",data:new Uint8Array(0)}}this.isOpenType=!1}else{if(!(("OTTO"!==x.version||n.composite&&n.cidToGidMap)&&P.head&&P.hhea&&P.maxp&&P.post)){w=new m.Stream(P["CFF "].data);y=new R(w,n);a(n);return this.convert(e,y,n)}delete P.glyf;delete P.loca;delete P.fpgm;delete P.prep;delete P["cvt "];this.isOpenType=!0}if(!P.maxp)throw new c.FormatError('Required "maxp" table is not found');i.pos=(i.start||0)+P.maxp.offset;var E=i.getInt32(),F=i.getUint16(),B=0;if(E>=65536&&P.maxp.length>=22){i.pos+=8;if(i.getUint16()>2){P.maxp.data[14]=0;P.maxp.data[15]=2}i.pos+=4;B=i.getUint16()}var M=!1;if("CIDFontType2"===n.type&&n.toUnicode&&n.toUnicode.get(0)>"\0"){M=!0;F++;P.maxp.data[4]=F>>8;P.maxp.data[5]=255&F}var D=function(e,t,r,a){var i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};e&&d(e,i);t&&d(t,i);e&&g(i,a);if(r&&1&r.length){var n=new Uint8Array(r.length+1);n.set(r.data);r.data=n}return i.hintsValid}(P.fpgm,P.prep,P["cvt "],B);if(!D){delete P.fpgm;delete P.prep;delete P["cvt "]}!function(e,t,r,a){if(t){e.pos=(e.start?e.start:0)+t.offset;e.pos+=t.length-2;var i=e.getUint16();if(i>a){(0,c.info)("The numOfMetrics ("+i+") should not be greater than the numGlyphs ("+a+")");i=a;t.data[34]=(65280&i)>>8;t.data[35]=255&i}var n=a-i,o=n-(r.length-4*i>>1);if(o>0){var s=new Uint8Array(r.length+2*o);s.set(r.data);r.data=s}}else r&&(r.data=null)}(i,P.hhea,P.hmtx,F);if(!P.head)throw new c.FormatError('Required "head" table is not found');!function(e,r,a){var i=e.data,n=s(i[0],i[1],i[2],i[3]);if(n>>16!=1){(0,c.info)("Attempting to fix invalid version in head table: "+n);i[0]=0;i[1]=1;i[2]=0;i[3]=0}var o=t(i[50],i[51]);if(o<0||o>1){(0,c.info)("Attempting to fix invalid indexToLocFormat in head table: "+o);var l=r+1;if(a===l<<1){i[50]=0;i[51]=0}else if(a===l<<2){i[50]=0;i[51]=1}else(0,c.warn)("Could not fix indexToLocFormat: "+o)}}(P.head,F,T?P.loca.length:0);var N=Object.create(null);if(T){var G=t(P.head.data[50],P.head.data[51]);N=function(e,t,r,a,i,n){var o,s,c;if(a){o=4;s=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};c=function(e,t,r){e[t]=r>>>24&255;e[t+1]=r>>16&255;e[t+2]=r>>8&255;e[t+3]=255&r}}else{o=2;s=function(e,t){return e[t]<<9|e[t+1]<<1};c=function(e,t,r){e[t]=r>>9&255;e[t+1]=r>>1&255}}var l=e.data,u=o*(1+r);if(l.length!==u){l=new Uint8Array(u);l.set(e.data.subarray(0,u));e.data=l}var h=t.data,d=h.length,g=new Uint8Array(d),m=s(l,0),p=0,b=Object.create(null);b[0]=!0;c(l,0,p);var v,y,w=n?r-1:r;for(v=0,y=o;vd&&(d+3&-4)===k&&(k=d);k>d&&(m=k);var S=f(h,m,k,g,p,i);0===S&&(b[v]=!0);p+=S;c(l,y,p);m=k}if(0===p){var C=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(v=0,y=o;vx+p)t.data=g.subarray(0,x+p);else{t.data=new Uint8Array(x+p);t.data.set(g.subarray(0,p))}t.data.set(g.subarray(0,x),p);c(e.data,l.length-o,p+x)}else t.data=g.subarray(0,p);return b}(P.loca,P.glyf,F,G,D,M)}if(!P.hhea)throw new c.FormatError('Required "hhea" table is not found');if(0===P.hhea.data[10]&&0===P.hhea.data[11]){P.hhea.data[10]=255;P.hhea.data[11]=255}var W={unitsPerEm:t(P.head.data[18],P.head.data[19]),yMax:t(P.head.data[42],P.head.data[43]),yMin:r(P.head.data[38],P.head.data[39]),ascent:t(P.hhea.data[4],P.hhea.data[5]),descent:r(P.hhea.data[6],P.hhea.data[7])};this.ascent=W.ascent/W.unitsPerEm;this.descent=W.descent/W.unitsPerEm;if(P.post){(function(e,t,r){var a=(i.start?i.start:0)+e.offset;i.pos=a;var n=e.length,o=a+n,s=i.getInt32();i.getBytes(28);var l,u,h=!0;switch(s){case 65536:l=C;break;case 131072:var f=i.getUint16();if(f!==r){h=!1;break}var d=[];for(u=0;u=32768){h=!1;break}d.push(g)}if(!h)break;for(var m=[],p=[];i.pos65535)throw new c.FormatError("Max size of CID is 65,535");var r=-1;K?r=t:void 0!==Y[t]&&(r=Y[t]);r>=0&&r>>0,g=!1;if(0===h&&0===f)g=!0;else if(1===h&&0===f)g=!0;else if(3!==h||1!==f||!a&&o){if(r&&3===h&&0===f){g=!0;l=!0}}else{g=!0;r||(l=!0)}g&&(o={platformId:h,encodingId:f,offset:d});if(l)break}o&&(t.pos=n+o.offset);if(!o||-1===t.peekByte()){(0,c.warn)("Could not find a preferred cmap table.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}var m=t.getUint16();t.getUint16();t.getUint16();var p,b,v=!1,y=[];if(0===m){for(p=0;p<256;p++){var w=t.getByte();w&&y.push({charCode:p,glyphId:w})}v=!0}else if(4===m){var k=t.getUint16()>>1;t.getBytes(6);var S,C=[];for(S=0;S>1)-(k-S);i.offsetIndex=P;x=Math.max(x,P+i.end-i.start+1)}else i.offsetIndex=-1}var I=[];for(p=0;p0&&b(se)){V[X]=se;oe=!0}}oe||(V[X]=0)}}}else if(0===Z&&0===Q)for(O=0;O=61440&&X<=61695&&(X&=255);V[X]=$[O].glyphId}}0===V.length&&(V[0]=0);var ce=L(V,n,N);this.toFontChar=ce.toFontChar;P.cmap={tag:"cmap",data:U(ce.charCodeToGlyphId,F)};P["OS/2"]&&q(P["OS/2"])||(P["OS/2"]={tag:"OS/2",data:j(n,ce.charCodeToGlyphId,W)});P.post||(P.post={tag:"post",data:z(n)});if(!T)try{w=new m.Stream(P["CFF "].data);y=new l.CFFParser(w,n,k).parse();var le=new l.CFFCompiler(y);P["CFF "].data=le.compile()}catch(e){(0,c.warn)("Failed to compile font "+n.loadedName)}if(P.name){var ue=function(e){var t=(i.start?i.start:0)+e.offset;i.pos=t;var r=[[],[]],a=e.length,n=t+a;if(0!==i.getUint16()||a<6)return r;var o,s,l=i.getUint16(),u=i.getUint16(),h=[];for(o=0;on)){i.pos=g;var m=d.name;if(d.encoding){for(var p="",b=0,v=d.length;b=n){s+=a;for(;s=0&&(n[o]=t)}}return s(e,n,a)},getSeacs:function(e){var t,r,a=[];for(t=0,r=e.length;t>8&255,255&g)}n.charset=new l.CFFCharset(!1,0,[],d);var m=new l.CFFIndex;m.add([139,14]);for(u=0;u0;k--)w[k]-=w[k-1];b.setByName(y,w)}}n.topDict.privateDict=b;var S=new l.CFFIndex;for(u=0,h=a.length;ua?a:e}function r(e,t,r,a,i,n){var o,s,c,l,u=i*n,h=t<=8?new Uint8Array(u):t<=16?new Uint16Array(u):new Uint32Array(u),f=r/i,d=a/n,g=0,m=new Uint16Array(i),p=r;for(o=0;o>3)*r,c=e.byteLength,l=s===c;if(!a||i&&!l)if(i){n=new Uint8Array(s);n.set(e);for(o=c;o>7&1;l[f+1]=a>>6&1;l[f+2]=a>>5&1;l[f+3]=a>>4&1;l[f+4]=a>>3&1;l[f+5]=a>>2&1;l[f+6]=a>>1&1;l[f+7]=1&a;f+=8}if(f>=1}}}else{var b=0;a=0;for(f=0,r=s;f>v;l[f]=y<0?0:y>h?h:y;a&=(1<m[w+1]){b=255;break}}s[h]=b}}if(s)for(h=0,d=3,f=t*n;h=255?255:0|i;e[f+1]=n<=0?0:n>=255?255:0|n;e[f+2]=o<=0?0:o>=255?255:0|o}else{e[f]=255;e[f+1]=255;e[f+2]=255}}},createImageData:function(e){var t,r=this.drawWidth,n=this.drawHeight,o={width:r,height:n},s=this.numComps,c=this.width,l=this.height,u=this.bpc,h=c*s*u+7>>3;if(!e){var f;"DeviceGray"===this.colorSpace.name&&1===u?f=a.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==u||this.needsDecode||(f=a.ImageKind.RGB_24BPP);if(f&&!this.smask&&!this.mask&&r===c&&n===l){o.kind=f;t=this.getImageBytes(l*h);if(this.image instanceof i.DecodeStream)o.data=t;else{var d=new Uint8Array(t.length);d.set(t);o.data=d}if(this.needsDecode){(0,a.assert)(f===a.ImageKind.GRAYSCALE_1BPP);for(var g=o.data,m=0,p=g.length;m>3,l=this.getImageBytes(o*c),u=this.getComponents(l);if(1!==s){this.needsDecode&&this.decodeBuffer(u);i=n*o;var h=255/((1<>>0}var i=e.getContexts(t),n=1,o=a(1),s=a(1)?a(1)?a(1)?a(1)?a(1)?a(32)+4436:a(12)+340:a(8)+84:a(6)+20:a(4)+4:a(2);return 0===o?s:s>0?-s:null}function o(e,t,r){for(var a=e.getContexts("IAID"),i=1,n=0;n=F&&_=B){z=z<<1&v;for(d=0;d=0&&T=0){E=N[O][T];E&&(z|=E<=e?F<<=1:F=F<<1|C[E][R]}for(h=0;h=w||R<0||R>=y?F<<=1:F=F<<1|a[E][R]}var B=A.readBit(P,F);O[T]=B}}return C}function u(e,t,i,s,u,f,d,g,m,p,b){if(e)throw new n("huffman is not supported");for(var v=[],y=0,w=(0,a.log2)(i.length+s),k=b.decoder,S=b.contextCache;v.length1)A=h(e,t,C,y,0,P,1,i.concat(v),w,0,0,1,0,f,m,p,b);else{var I=o(S,k,w),_=r(S,"IARDX",k),O=r(S,"IARDY",k);A=l(C,y,m,I>1)+U,(N>>1)+q,!1,y,w)}var j,z,H,G=E-(1&m?0:D),W=O-(2&m?M:0);if(d){for(j=0;j>5&7,u=[31&c],h=t+6;if(7===c){l=536870911&(0,a.readUint32)(e,h-1);h+=3;var f=l+7>>3;u[0]=e[h++];for(;--f>0;)u.push(e[h++])}else if(5===c||6===c)throw new n("invalid referred-to flags");r.retainBits=u;var d,m,p=r.number<=256?1:r.number<=65536?2:4,b=[];for(d=0;d>>24&255;C[3]=y.height>>16&255;C[4]=y.height>>8&255;C[5]=255&y.height;for(d=h,m=e.length;d>2&3;f.huffmanDWSelector=d>>4&3;f.bitmapSizeSelector=d>>6&1;f.aggregationInstancesSelector=d>>7&1;f.bitmapCodingContextUsed=!!(256&d);f.bitmapCodingContextRetained=!!(512&d);f.template=d>>10&3;f.refinementTemplate=d>>12&1;u+=2;if(!f.huffman){s=0===f.template?4:1;i=[];for(o=0;o>2&3);m.referenceCorner=p>>4&3;m.transposed=!!(64&p);m.combinationOperator=p>>7&3;m.defaultPixelValue=p>>9&1;m.dsOffset=p<<17>>27;m.refinementTemplate=p>>15&1;if(m.huffman){var b=(0,a.readUint16)(l,u);u+=2;m.huffmanFS=3&b;m.huffmanDS=b>>2&3;m.huffmanDT=b>>4&3;m.huffmanRefinementDW=b>>6&3;m.huffmanRefinementDH=b>>8&3;m.huffmanRefinementDX=b>>10&3;m.huffmanRefinementDY=b>>12&3;m.huffmanRefinementSizeSelector=!!(14&b)}if(m.refinement&&!m.refinementTemplate){i=[];for(o=0;o<2;o++){i.push({x:(0,a.readInt8)(l,u),y:(0,a.readInt8)(l,u+1)});u+=2}m.refinementAt=i}m.numberOfSymbolInstances=(0,a.readUint32)(l,u);u+=4;if(m.huffman)throw new n("huffman is not supported");r=[m,c.referredTo,l,u,h];break;case 38:case 39:var v={};v.info=g(l,u);u+=A;var y=l[u++];v.mmr=!!(1&y);v.template=y>>1&3;v.prediction=!!(8&y);if(!v.mmr){s=0===v.template?4:1;i=[];for(o=0;o>2&1;w.combinationOperator=k>>3&3;w.requiresBuffer=!!(32&k);w.combinationOperatorOverride=!!(64&k);r=[w];break;case 49:case 50:case 51:case 62:break;default:throw new n("segment type "+c.typeName+"("+c.type+") is not implemented")}var S="on"+c.typeName;S in t&&t[S].apply(t,r)}function p(e,t){for(var r=0,a=e.length;r>3,r=new Uint8Array(t*e.height);if(e.defaultPixelValue)for(var a=0,i=r.length;a>3,h=s.combinationOperatorOverride?e.combinationOperator:s.combinationOperator,f=this.buffer,d=128>>(7&e.x),g=e.y*u+(e.x>>3);switch(h){case 0:for(r=0;r>=1;if(!i){i=128;o++}}g+=u}break;case 2:for(r=0;r>=1;if(!i){i=128;o++}}g+=u}break;default:throw new n("operator "+h+" is not supported")}},onImmediateGenericRegion:function(e,r,a,i){var n=e.info,o=new t(r,a,i),s=c(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,o);this.drawBitmap(n,s)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(e,r,a,i,o,s){if(e.huffman)throw new n("huffman is not supported");var c=this.symbols;c||(this.symbols=c={});for(var l=[],h=0,f=a.length;h0&&!e[o-1];)o--;n.push({children:[],index:0});var s,c=n[0];for(r=0;r0;)c=n.pop();c.index++;n.push(c);for(;n.length<=r;){n.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}i++}if(r+10){M--;return B>>M&1}B=e[t++];if(255===B){var r=e[t++];if(r)throw new n("unexpected marker "+(B<<8|r).toString(16))}M=7;return B>>>7}function p(e){for(var t=e;;){t=t[m()];if("number"==typeof t)return t;if("object"!==(void 0===t?"undefined":a(t)))throw new n("invalid huffman sequence")}}function b(e){for(var t=0;e>0;){t=t<<1|m();e--}return t}function v(e){if(1===e)return 1===m()?1:-1;var t=b(e);return t>=1<>4;if(0!==o){i+=s;var c=h[i];e.blockData[t+c]=v(o);i++}else{if(s<15)break;i+=16}}}function w(e,t){var r=p(e.huffmanTableDC),a=0===r?0:v(r)<0)D--;else for(var r=l,a=f;r<=a;){var i=p(e.huffmanTableAC),n=15&i,o=i>>4;if(0!==n){r+=o;var s=h[r];e.blockData[t+s]=v(n)*(1<>4;if(0===r)if(s<15){D=b(s)+(1<=65488&&W<=65495))break;t+=2}U=u(e,t);if(U&&U.invalid){(0,i.warn)("decodeScan - unexpected Scan data, next marker is: "+U.invalid);t=U.offset}return t-F}function s(e,t,r){var a,i,o,s,c,l,u,h,w,k,S,C,x,A,P,I,_,O=e.quantizationTable,T=e.blockData;if(!O)throw new n("missing required Quantization Table.");for(var E=0;E<64;E+=8){w=T[t+E];k=T[t+E+1];S=T[t+E+2];C=T[t+E+3];x=T[t+E+4];A=T[t+E+5];P=T[t+E+6];I=T[t+E+7];w*=O[E];if(0!=(k|S|C|x|A|P|I)){k*=O[E+1];S*=O[E+2];C*=O[E+3];x*=O[E+4];A*=O[E+5];P*=O[E+6];I*=O[E+7];a=v*w+128>>8;i=v*x+128>>8;o=S;s=P;c=y*(k-I)+128>>8;h=y*(k+I)+128>>8;l=C<<4;u=A<<4;a=a+i+1>>1;i=a-i;_=o*b+s*p+128>>8;o=o*p-s*b+128>>8;s=_;c=c+u+1>>1;u=c-u;h=h+l+1>>1;l=h-l;a=a+s+1>>1;s=a-s;i=i+o+1>>1;o=i-o;_=c*m+h*g+2048>>12;c=c*g-h*m+2048>>12;h=_;_=l*d+u*f+2048>>12;l=l*f-u*d+2048>>12;u=_;r[E]=a+h;r[E+7]=a-h;r[E+1]=i+u;r[E+6]=i-u;r[E+2]=o+l;r[E+5]=o-l;r[E+3]=s+c;r[E+4]=s-c}else{_=v*w+512>>10;r[E]=_;r[E+1]=_;r[E+2]=_;r[E+3]=_;r[E+4]=_;r[E+5]=_;r[E+6]=_;r[E+7]=_}}for(var R=0;R<8;++R){w=r[R];k=r[R+8];S=r[R+16];C=r[R+24];x=r[R+32];A=r[R+40];P=r[R+48];I=r[R+56];if(0!=(k|S|C|x|A|P|I)){a=v*w+2048>>12;i=v*x+2048>>12;o=S;s=P;c=y*(k-I)+2048>>12;h=y*(k+I)+2048>>12;l=C;u=A;a=4112+(a+i+1>>1);i=a-i;_=o*b+s*p+2048>>12;o=o*p-s*b+2048>>12;s=_;c=c+u+1>>1;u=c-u;h=h+l+1>>1;l=h-l;a=a+s+1>>1;s=a-s;i=i+o+1>>1;o=i-o;_=c*m+h*g+2048>>12;c=c*g-h*m+2048>>12;h=_;_=l*d+u*f+2048>>12;l=l*f-u*d+2048>>12;u=_;w=a+h;I=a-h;k=i+u;P=i-u;S=o+l;A=o-l;C=s+c;x=s-c;w=w<16?0:w>=4080?255:w>>4;k=k<16?0:k>=4080?255:k>>4;S=S<16?0:S>=4080?255:S>>4;C=C<16?0:C>=4080?255:C>>4;x=x<16?0:x>=4080?255:x>>4;A=A<16?0:A>=4080?255:A>>4;P=P<16?0:P>=4080?255:P>>4;I=I<16?0:I>=4080?255:I>>4;T[t+R]=w;T[t+R+8]=k;T[t+R+16]=S;T[t+R+24]=C;T[t+R+32]=x;T[t+R+40]=A;T[t+R+48]=P;T[t+R+56]=I}else{_=v*w+8192>>14;_=_<-2040?0:_>=2024?255:_+2056>>4;T[t+R]=_;T[t+R+8]=_;T[t+R+16]=_;T[t+R+24]=_;T[t+R+32]=_;T[t+R+40]=_;T[t+R+48]=_;T[t+R+56]=_}}}function c(e,t){for(var a=t.blocksPerLine,i=t.blocksPerColumn,n=new Int16Array(64),o=0;o=255?255:e}function u(e,t,r){function a(t){return e[t]<<8|e[t+1]}var i=e.length-1,n=r=i)return null;var o=a(t);if(o>=65472&&o<=65534)return{invalid:null,marker:o,offset:t};for(var s=a(n);!(s>=65472&&s<=65534);){if(++n>=i)return null;s=a(n)}return{invalid:o.toString(16),marker:s,offset:n}}var h=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),f=4017,d=799,g=3406,m=2276,p=1567,b=3784,v=5793,y=2896;e.prototype={parse:function(e){function r(){var t=e[l]<<8|e[l+1];l+=2;return t}var a,s,l=0,f=null,d=null,g=[],m=[],p=[],b=r();if(65496!==b)throw new n("SOI not found");b=r();for(;65497!==b;){var v,y,w;switch(b){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var k=function(){var t=r(),a=l+t-2,n=u(e,a,l);if(n&&n.invalid){(0,i.warn)("readDataBlock - incorrect length, next marker is: "+n.invalid);a=n.offset}var o=e.subarray(l,a);l+=o.length;return o}();65504===b&&74===k[0]&&70===k[1]&&73===k[2]&&70===k[3]&&0===k[4]&&(f={version:{major:k[5],minor:k[6]},densityUnits:k[7],xDensity:k[8]<<8|k[9],yDensity:k[10]<<8|k[11],thumbWidth:k[12],thumbHeight:k[13],thumbData:k.subarray(14,14+3*k[12]*k[13])});65518===b&&65===k[0]&&100===k[1]&&111===k[2]&&98===k[3]&&101===k[4]&&(d={version:k[5]<<8|k[6],flags0:k[7]<<8|k[8],flags1:k[9]<<8|k[10],transformCode:k[11]});break;case 65499:for(var S,C=r(),x=C+l-2;l>4==0)for(y=0;y<64;y++){S=h[y];P[S]=e[l++]}else{if(A>>4!=1)throw new n("DQT - invalid table spec");for(y=0;y<64;y++){S=h[y];P[S]=r()}}g[15&A]=P}break;case 65472:case 65473:case 65474:if(a)throw new n("Only single frame JPEGs supported");r();a={};a.extended=65473===b;a.progressive=65474===b;a.precision=e[l++];a.scanLines=r();a.samplesPerLine=r();a.components=[];a.componentIds={};var I,_=e[l++],O=0,T=0;for(v=0;v<_;v++){I=e[l];var E=e[l+1]>>4,R=15&e[l+1];O>4==0?p:m)[15&M]=t(D,N)}break;case 65501:r();s=r();break;case 65498:r();var U,q=e[l++],j=[];for(v=0;v>4];U.huffmanTableAC=m[15&H];j.push(U)}var G=e[l++],W=e[l++],X=e[l++],V=o(e,l,a,j,s,G,W,X>>4,15&X);l+=V;break;case 65535:255!==e[l]&&l--;break;default:if(255===e[l-3]&&e[l-2]>=192&&e[l-2]<=254){l-=3;break}throw new n("unknown marker "+b.toString(16))}b=r()}this.width=a.samplesPerLine;this.height=a.scanLines;this.jfif=f;this.adobe=d;this.components=[];for(v=0;v>8)+w[u+1];return v},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,a,i=0,n=e.length;i=0?255:l<=o?0:255+l*(1/255/255)|0;e[n++]=u>=0?255:u<=o?0:255+u*(1/255/255)|0;e[n++]=h>=0?255:h<=o?0:255+h*(1/255/255)|0}return e},getData:function(e,t,r){if(this.numComponents>4)throw new n("Unsupported color mode");var a=this._getLinearizedBlockData(e,t);if(1===this.numComponents&&r){for(var i=a.length,o=new Uint8Array(3*i),s=0,c=0;c>>8;r[i++]=255&n}}}else{if(!("object"===(void 0===e?"undefined":a(e))&&"byteLength"in e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");r=e;i=r.byteLength}var o=i>>2,s=i-4*o,c=new Uint32Array(r.buffer,0,o),l=0,u=0,h=this.h1,f=this.h2,d=3432918353,g=461845907;for(t=0;t>>17;l=l*g&4294901760|13715*l&65535;h^=l;h=h<<13|h>>>19;h=5*h+3864292196}else{u=c[t];u=u*d&4294901760|11601*u&65535;u=u<<15|u>>>17;u=u*g&4294901760|13715*u&65535;f^=u;f=f<<13|f>>>19;f=5*f+3864292196}l=0;switch(s){case 3:l^=r[4*o+2]<<16;case 2:l^=r[4*o+1]<<8;case 1:l^=r[4*o];l=l*d&4294901760|11601*l&65535;l=l<<15|l>>>17;l=l*g&4294901760|13715*l&65535;1&o?h^=l:f^=l}this.h1=h;this.h2=f;return this},hexdigest:function(){var e=this.h1,t=this.h2;e^=t>>>1;e=3981806797*e&4294901760|36045*e&65535;t=4283543511*t&4294901760|(2950163797*(t<<16|e>>>16)&4294901760)>>>16;e^=t>>>1;e=444984403*e&4294901760|60499*e&65535;t=3301882366*t&4294901760|(3120437893*(t<<16|e>>>16)&4294901760)>>>16;e^=t>>>1;for(var r=0,a=[e,t],i="";r>>0).toString(16);n.length<8;)n="0"+n;i+=n}return i}};return t}();t.MurmurHash3_64=i},function(e,t,r){"use strict";function a(e,t,r){var a=t.getArray("Matrix"),n=i.Util.normalizeRect(t.getArray("BBox")),o=t.get("XStep"),s=t.get("YStep"),c=t.get("PaintType"),l=t.get("TilingType");if(n[2]-n[0]==0||n[3]-n[1]==0)throw new i.FormatError("Invalid getTilingPatternIR /BBox array: ["+n+"].");return["TilingPattern",r,e,a,n,o,s,c,l]}Object.defineProperty(t,"__esModule",{value:!0});t.getTilingPatternIR=t.Pattern=void 0;var i=r(0),n=r(3),o=r(1),s=r(6),c={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7},l=function(){function e(){throw new Error("should not call Pattern constructor")}e.prototype={getPattern:function(e){throw new Error("Should not call Pattern.getStyle: "+e)}};e.parseShading=function(e,t,r,a,n){var s=(0,o.isStream)(e)?e.dict:e,l=s.get("ShadingType");try{switch(l){case c.AXIAL:case c.RADIAL:return new u.RadialAxial(s,t,r,a);case c.FREE_FORM_MESH:case c.LATTICE_FORM_MESH:case c.COONS_PATCH_MESH:case c.TENSOR_PATCH_MESH:return new u.Mesh(e,t,r,a);default:throw new i.FormatError("Unsupported ShadingType: "+l)}}catch(e){if(e instanceof i.MissingDataException)throw e;n.send("UnsupportedFeature",{featureId:i.UNSUPPORTED_FEATURES.shadingPattern});(0,i.warn)(e);return new u.Dummy}};return e}(),u={};u.SMALL_NUMBER=1e-6;u.RadialAxial=function(){function e(e,t,r,a){this.matrix=t;this.coordsArr=e.getArray("Coords");this.shadingType=e.get("ShadingType");this.type="Pattern";var o=e.get("ColorSpace","CS");o=n.ColorSpace.parse(o,r,a);this.cs=o;var l=0,h=1;if(e.has("Domain")){var f=e.getArray("Domain");l=f[0];h=f[1]}var d=!1,g=!1;if(e.has("Extend")){var m=e.getArray("Extend");d=m[0];g=m[1]}if(!(this.shadingType!==c.RADIAL||d&&g)){var p=this.coordsArr[0],b=this.coordsArr[1],v=this.coordsArr[2],y=this.coordsArr[3],w=this.coordsArr[4],k=this.coordsArr[5],S=Math.sqrt((p-y)*(p-y)+(b-w)*(b-w));v<=k+S&&k<=v+S&&(0,i.warn)("Unsupported radial gradient.")}this.extendStart=d;this.extendEnd=g;var C=e.get("Function"),x=s.PDFFunction.parseArray(r,C),A=h-l,P=A/10,I=this.colorStops=[];if(l>=h||P<=0)(0,i.info)("Bad shading domain.");else{for(var _,O=new Float32Array(o.numComps),T=new Float32Array(1),E=l;E<=h;E+=P){T[0]=E;x(T,0,O,0);_=o.getRgb(O,0);var R=i.Util.makeCssRgb(_[0],_[1],_[2]);I.push([(E-l)/A,R])}var F="transparent";if(e.has("Background")){_=o.getRgb(e.get("Background"),0);F=i.Util.makeCssRgb(_[0],_[1],_[2])}if(!d){I.unshift([0,F]);I[1][0]+=u.SMALL_NUMBER}if(!g){I[I.length-1][0]-=u.SMALL_NUMBER;I.push([1,F])}this.colorStops=I}}e.prototype={getIR:function(){var e,t,r,a,n,o=this.coordsArr,s=this.shadingType;if(s===c.AXIAL){t=[o[0],o[1]];r=[o[2],o[3]];a=null;n=null;e="axial"}else if(s===c.RADIAL){t=[o[0],o[1]];r=[o[3],o[4]];a=o[2];n=o[5];e="radial"}else(0,i.unreachable)("getPattern type unknown: "+s);var l=this.matrix;if(l){t=i.Util.applyTransform(t,l);r=i.Util.applyTransform(r,l);if(s===c.RADIAL){var u=i.Util.singularValueDecompose2dScale(l);a*=u[0];n*=u[1]}}return["RadialAxial",e,this.colorStops,t,r,a,n]}};return e}();u.Mesh=function(){function e(e,t){this.stream=e;this.context=t;this.buffer=0;this.bufferLength=0;var r=t.numComps;this.tmpCompsBuf=new Float32Array(r);var a=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(a):this.tmpCompsBuf}function t(e,t){for(var r=e.coords,a=e.colors,n=[],o=[],s=0;t.hasData;){var c=t.readFlag(),l=t.readCoordinate(),u=t.readComponents();if(0===s){if(!(0<=c&&c<=2))throw new i.FormatError("Unknown type4 flag");switch(c){case 0:s=3;break;case 1:o.push(o[o.length-2],o[o.length-1]);s=1;break;case 2:o.push(o[o.length-3],o[o.length-1]);s=1}n.push(c)}o.push(r.length);r.push(l);a.push(u);s--;t.align()}e.figures.push({type:"triangles",coords:new Int32Array(o),colors:new Int32Array(o)})}function r(e,t,r){for(var a=e.coords,i=e.colors,n=[];t.hasData;){var o=t.readCoordinate(),s=t.readComponents();n.push(a.length);a.push(o);i.push(s)}e.figures.push({type:"lattice",coords:new Int32Array(n),colors:new Int32Array(n),verticesPerRow:r})}function a(e,t){var r=e.figures[t];(0,i.assert)("patch"===r.type,"Unexpected patch mesh figure");var a=e.coords,n=e.colors,o=r.coords,s=r.colors,c=Math.min(a[o[0]][0],a[o[3]][0],a[o[12]][0],a[o[15]][0]),l=Math.min(a[o[0]][1],a[o[3]][1],a[o[12]][1],a[o[15]][1]),u=Math.max(a[o[0]][0],a[o[3]][0],a[o[12]][0],a[o[15]][0]),h=Math.max(a[o[0]][1],a[o[3]][1],a[o[12]][1],a[o[15]][1]),f=Math.ceil((u-c)*p/(e.bounds[2]-e.bounds[0]));f=Math.max(g,Math.min(m,f));var d=Math.ceil((h-l)*p/(e.bounds[3]-e.bounds[1]));d=Math.max(g,Math.min(m,d));for(var v=f+1,y=new Int32Array((d+1)*v),w=new Int32Array((d+1)*v),k=0,S=new Uint8Array(3),C=new Uint8Array(3),x=n[s[0]],A=n[s[1]],P=n[s[2]],I=n[s[3]],_=b(d),O=b(f),T=0;T<=d;T++){S[0]=(x[0]*(d-T)+P[0]*T)/d|0;S[1]=(x[1]*(d-T)+P[1]*T)/d|0;S[2]=(x[2]*(d-T)+P[2]*T)/d|0;C[0]=(A[0]*(d-T)+I[0]*T)/d|0;C[1]=(A[1]*(d-T)+I[1]*T)/d|0;C[2]=(A[2]*(d-T)+I[2]*T)/d|0;for(var E=0;E<=f;E++,k++)if(0!==T&&T!==d||0!==E&&E!==f){for(var R=0,F=0,B=0,M=0;M<=3;M++)for(var D=0;D<=3;D++,B++){var L=_[T][M]*O[E][D];R+=a[o[B]][0]*L;F+=a[o[B]][1]*L}y[k]=a.length;a.push([R,F]);w[k]=n.length;var N=new Uint8Array(3);N[0]=(S[0]*(f-E)+C[0]*E)/f|0;N[1]=(S[1]*(f-E)+C[1]*E)/f|0;N[2]=(S[2]*(f-E)+C[2]*E)/f|0;n.push(N)}}y[0]=o[0];w[0]=s[0];y[f]=o[3];w[f]=s[1];y[v*d]=o[12];w[v*d]=s[2];y[v*d+f]=o[15];w[v*d+f]=s[3];e.figures[t]={type:"lattice",coords:y,colors:w,verticesPerRow:v}}function l(e,t){for(var r=e.coords,a=e.colors,n=new Int32Array(16),o=new Int32Array(4);t.hasData;){var s=t.readFlag();if(!(0<=s&&s<=3))throw new i.FormatError("Unknown type6 flag");var c,l,u=r.length;for(c=0,l=0!==s?8:12;cs?s:t;r=r>c?c:r;a=a0)return!0;var e=this.stream.getByte();if(e<0)return!1;this.buffer=e;this.bufferLength=8;return!0},readBits:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var a=this.stream.getByte();this.buffer=a&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r},align:function(){this.buffer=0;this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),a=this.context.decode,i=e<32?1/((1<=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));var n=r.join("");switch(n.toLowerCase()){case"if":return s.IF;case"ifelse":return s.IFELSE;default:return s.getOperator(n)}},getNumber:function(){var e=this.currentChar,t=this.strBuf;t.length=0;t[0]=String.fromCharCode(e);for(;(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));var r=parseFloat(t.join(""));if(isNaN(r))throw new a.FormatError("Invalid floating point number: "+r);return r}};return e}();t.PostScriptLexer=c;t.PostScriptParser=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Type1Parser=void 0;var a=r(0),i=r(4),n=r(2),o=function(){function e(){this.width=0;this.lsb=0;this.flexing=!1;this.output=[];this.stack=[]}var t={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};e.prototype={convert:function(e,r,i){for(var n,o,s,c=e.length,l=!1,u=0;ua)return!0;for(var i=a-e,n=i;n>8&255,255&o);else{o=65536*o|0;this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o)}}this.output.push.apply(this.output,t);r?this.stack.splice(i,e):this.stack.length=0;return!1}};return e}(),s=function(){function e(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function t(e,t,r){if(r>=e.length)return new Uint8Array(0);var a,i,n=0|t;for(a=0;a>8;n=52845*(c+n)+22719&65535}return s}function r(t,r,a){var i,n,o=0|r,s=t.length,c=s>>>1,l=new Uint8Array(c);for(i=0,n=0;i>8;o=52845*(f+o)+22719&65535}}}return Array.prototype.slice.call(l,a,n)}function s(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}function c(a,i,o){if(i){var s=a.getBytes(),c=!(e(s[0])&&e(s[1])&&e(s[2])&&e(s[3]));a=new n.Stream(c?t(s,l,4):r(s,l,4))}this.seacAnalysisEnabled=!!o;this.stream=a;this.nextChar()}var l=55665;c.prototype={readNumberArray:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e},readNumber:function(){var e=this.getToken();return parseFloat(e||0)},readInt:function(){var e=this.getToken();return 0|parseInt(e||0,10)},readBoolean:function(){return"true"===this.getToken()?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,a.isSpace)(t))break;t=this.nextChar()}if(s(t)){this.nextChar();return String.fromCharCode(t)}var r="";do{r+=String.fromCharCode(t);t=this.nextChar()}while(t>=0&&!(0,a.isSpace)(t)&&!s(t));return r},extractFontProgram:function(){var e=this.stream,r=[],a=[],i=Object.create(null);i.lenIV=4;for(var n,s,c,l,u,h={subrs:[],charstrings:[],properties:{privateData:i}};null!==(n=this.getToken());)if("/"===n){n=this.getToken();switch(n){case"CharStrings":this.getToken();this.getToken();this.getToken();this.getToken();for(;;){n=this.getToken();if(null===n||"end"===n)break;if("/"===n){var f=this.getToken();s=this.readInt();this.getToken();c=e.makeSubStream(e.pos,s);l=h.properties.privateData.lenIV;u=t(c.getBytes(),4330,l);e.skip(s);this.nextChar();n=this.getToken();"noaccess"===n&&this.getToken();a.push({glyph:f,encoded:u})}}break;case"Subrs":this.readInt();this.getToken();for(;"dup"===(n=this.getToken());){var d=this.readInt();s=this.readInt();this.getToken();c=e.makeSubStream(e.pos,s);l=h.properties.privateData.lenIV;u=t(c.getBytes(),4330,l);e.skip(s);this.nextChar();n=this.getToken();"noaccess"===n&&this.getToken();r[d]=u}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var g=this.readNumberArray();(g.length>0&&g.length,1)||(h.properties.privateData[n]=g);break;case"StemSnapH":case"StemSnapV":h.properties.privateData[n]=this.readNumberArray();break;case"StdHW":case"StdVW":h.properties.privateData[n]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":h.properties.privateData[n]=this.readNumber();break;case"ForceBold":h.properties.privateData[n]=this.readBoolean()}}for(var m=0;m=0,u=/Chrome\/(39|40)\./.test(n),h=n.indexOf("CriOS")>=0,f=n.indexOf("Trident")>=0,d=/\b(iPad|iPhone|iPod)(?=;)/.test(n),g=n.indexOf("Opera")>=0,m=/Safari\//.test(n)&&!/(Chrome\/|Android\s)/.test(n),p="object"===("undefined"==typeof window?"undefined":a(window))&&"object"===("undefined"==typeof document?"undefined":a(document));"undefined"==typeof PDFJS&&(i.PDFJS={});PDFJS.compatibilityChecked=!0;!function(){function e(e,t){return new s(this.slice(e,t))}function t(e,t){arguments.length<2&&(t=0);for(var r=0,a=e.length;r>>0},set:function(t){var r=this.buffer,a=e<<2;r[a]=255&t;r[a+1]=t>>8&255;r[a+2]=t>>16&255;r[a+3]=t>>>24&255}}}function o(e){for(;c>2,l=(3&n)<<4|o>>4,u=r+1>6:64,h=r+2>(-2*a&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return n}}}();!function(){void 0===Function.prototype.bind&&(Function.prototype.bind=function(e){var t=this,r=Array.prototype.slice.call(arguments,1);return function(){var a=r.concat(Array.prototype.slice.call(arguments));return t.apply(e,a)}})}();!function(){if(p){"dataset"in document.createElement("div")||Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)return this._dataset;for(var e={},t=0,r=this.attributes.length;t=0&&a&&n.splice(o,1);e.className=n.join(" ");return o>=0}if(p){if(!("classList"in document.createElement("div"))){var t={add:function(t){e(this.element,t,!0,!1)},contains:function(t){return e(this.element,t,!1,!1)},remove:function(t){e(this.element,t,!1,!0)},toggle:function(t){e(this.element,t,!0,!0)}};Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){if(this._classList)return this._classList;var e=Object.create(t,{element:{value:this,writable:!1,enumerable:!0}});Object.defineProperty(this,"_classList",{value:e,writable:!1,enumerable:!1});return e},enumerable:!0})}}}();!function(){if(!("undefined"==typeof importScripts||"console"in i)){var e={},t={log:function(){var e=Array.prototype.slice.call(arguments);i.postMessage({targetName:"main",action:"console_log",data:e})},error:function(){var e=Array.prototype.slice.call(arguments);i.postMessage({targetName:"main",action:"console_error",data:e})},time:function(t){e[t]=Date.now()},timeEnd:function(t){var r=e[t];if(!r)throw new Error("Unknown timer name "+t);this.log("Timer:",t,Date.now()-r)}};i.console=t}}();!function(){if(p)if("console"in window)if("bind"in console.log);else{console.log=function(e){return function(t){return e(t)}}(console.log);console.error=function(e){return function(t){return e(t)}}(console.error);console.warn=function(e){return function(t){return e(t)}}(console.warn)}else window.console={log:function(){},error:function(){},warn:function(){}}}();!function(){function e(e){t(e.target)&&e.stopPropagation()}function t(e){return e.disabled||e.parentNode&&t(e.parentNode)}g&&document.addEventListener("click",e,!0)}();!function(){(f||h)&&(PDFJS.disableCreateObjectURL=!0)}();!function(){"undefined"!=typeof navigator&&("language"in navigator||(PDFJS.locale=navigator.userLanguage||"en-US"))}();!function(){if(m||s||u||d){PDFJS.disableRange=!0;PDFJS.disableStream=!0}}();!function(){p&&(history.pushState&&!s||(PDFJS.disableHistory=!0))}();!function(){if(p)if(window.CanvasPixelArray)"function"!=typeof window.CanvasPixelArray.prototype.set&&(window.CanvasPixelArray.prototype.set=function(e){for(var t=0,r=this.length;t0;){var r=this.handlers.shift(),a=r.thisPromise._status,i=r.thisPromise._value;try{if(1===a)"function"==typeof r.onResolve&&(i=r.onResolve(i));else if("function"==typeof r.onReject){i=r.onReject(i);a=1;r.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(r.thisPromise)}}catch(t){a=e;i=t}r.nextPromise._updateStatus(a,i);if(Date.now()>=t)break}this.handlers.length>0?setTimeout(this.runHandlers.bind(this),0):this.running=!1},addUnhandledRejection:function(e){this.unhandledRejections.push({promise:e,time:Date.now()});this.scheduleRejectionCheck()},removeUnhandeledRejection:function(e){e._unhandledRejection=!1;for(var t=0;t500){var a=e.unhandledRejections[r].promise._value,i="Unhandled rejection: "+a;a.stack&&(i+="\n"+a.stack);try{throw new Error(i)}catch(e){console.warn(i)}e.unhandledRejections.splice(r);r--}e.unhandledRejections.length&&e.scheduleRejectionCheck()},500)}}},r=function(e){this._status=0;this._handlers=[];try{e.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(e){this._reject(e)}};r.all=function(t){function a(t){if(o._status!==e){c=[];n(t)}}var i,n,o=new r(function(e,t){i=e;n=t}),s=t.length,c=[];if(0===s){i(c);return o}for(var l=0,u=t.length;l32&&t<127&&-1===[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function o(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function s(a,i,s){function c(e){y.push(e)}var l=i||"scheme start",u=0,h="",b=!1,v=!1,y=[];e:for(;(a[u-1]!==g||0===u)&&!this._isInvalid;){var w=a[u];switch(l){case"scheme start":if(!w||!m.test(w)){if(i){c("Invalid scheme.");break e}h="";l="no scheme";continue}h+=w.toLowerCase();l="scheme";break;case"scheme":if(w&&p.test(w))h+=w.toLowerCase();else{if(":"!==w){if(i){if(w===g)break e;c("Code point not allowed in scheme: "+w);break e}h="";u=0;l="no scheme";continue}this._scheme=h;h="";if(i)break e;e(this._scheme)&&(this._isRelative=!0);l="file"===this._scheme?"relative":this._isRelative&&s&&s._scheme===this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":if("?"===w){this._query="?";l="query"}else if("#"===w){this._fragment="#";l="fragment"}else w!==g&&"\t"!==w&&"\n"!==w&&"\r"!==w&&(this._schemeData+=n(w));break;case"no scheme":if(s&&e(s._scheme)){l="relative";continue}c("Missing scheme.");t.call(this);break;case"relative or authority":if("/"!==w||"/"!==a[u+1]){c("Expected /, got: "+w);l="relative";continue}l="authority ignore slashes";break;case"relative":this._isRelative=!0;"file"!==this._scheme&&(this._scheme=s._scheme);if(w===g){this._host=s._host;this._port=s._port;this._path=s._path.slice();this._query=s._query;this._username=s._username;this._password=s._password;break e}if("/"===w||"\\"===w){"\\"===w&&c("\\ is an invalid code point.");l="relative slash"}else if("?"===w){this._host=s._host;this._port=s._port;this._path=s._path.slice();this._query="?";this._username=s._username;this._password=s._password;l="query"}else{if("#"!==w){var k=a[u+1],S=a[u+2];if("file"!==this._scheme||!m.test(w)||":"!==k&&"|"!==k||S!==g&&"/"!==S&&"\\"!==S&&"?"!==S&&"#"!==S){this._host=s._host;this._port=s._port;this._username=s._username;this._password=s._password;this._path=s._path.slice();this._path.pop()}l="relative path";continue}this._host=s._host;this._port=s._port;this._path=s._path.slice();this._query=s._query;this._fragment="#";this._username=s._username;this._password=s._password;l="fragment"}break;case"relative slash":if("/"!==w&&"\\"!==w){if("file"!==this._scheme){this._host=s._host;this._port=s._port;this._username=s._username;this._password=s._password}l="relative path";continue}"\\"===w&&c("\\ is an invalid code point.");l="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==w){c("Expected '/', got: "+w);l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":l="authority ignore slashes";if("/"!==w){c("Expected '/', got: "+w);continue}break;case"authority ignore slashes":if("/"!==w&&"\\"!==w){l="authority";continue}c("Expected authority, got: "+w);break;case"authority":if("@"===w){if(b){c("@ already seen.");h+="%40"}b=!0;for(var C=0;C