function ninjaLoadFontVfs(){jQuery.each(window.ninjaFontVfs,function(t,e){jQuery.each(e,function(e,n){window.pdfMake.vfs["fonts/"+t+"/"+e]=n})})}function ninjaAddVFSDoc(t,e){window.pdfMake.vfs["docs/"+t]=e,window.refreshPDF&&refreshPDF(!0),jQuery(document).trigger("ninjaVFSDocAdded")}"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="0.8.765",PDFJS.build="88ec2bd",function(){"use strict";function t(t){P>=E&&(F("Info: "+t),PDFJS.LogManager.notify("info",t))}function e(t){P>=R&&(F("Warning: "+t),PDFJS.LogManager.notify("warn",t))}function n(t){if(arguments.length>1){var e=["Error:"];e.push.apply(e,arguments),F.apply(null,e),t=[].join.call(arguments," ")}else F("Error: "+t);throw F(i()),PDFJS.LogManager.notify("error",t),new Error(t)}function r(t){e("TODO: "+t)}function i(){try{throw new Error}catch(t){return t.stack?t.stack.split("\n").slice(2).join("\n"):""}}function o(t,e){t||n(e)}function a(t,e){if(!e)return t;if(e.indexOf(":")>=0)return e;if("/"==e.charAt(0)){var n=t.indexOf("://");return n=t.indexOf("/",n+3),t.substring(0,n)+e}var n,r=t.length;n=t.lastIndexOf("#"),r=n>=0?n:r,n=t.lastIndexOf("?",r),r=n>=0?n:r;var i=t.lastIndexOf("/",r);return t.substring(0,i+1)+e}function s(t,e){if(!t)return!1;var n=t.indexOf(":");if(0>n)return e;var r=t.substr(0,n);switch(r){case"http":case"https":case"ftp":case"mailto":return!0;default:return!1}}function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!1}),n}function u(t){for(var e="",n=t.length,r=0;n>r;++r)e+=String.fromCharCode(t[r]);return e}function c(t){for(var e=t.length,n=new Uint8Array(e),r=0;e>r;++r)n[r]=255&t.charCodeAt(r);return n}function l(t){var e,n=t.length,r="";if("þ"===t[0]&&"ÿ"===t[1])for(e=2;n>e;e+=2)r+=String.fromCharCode(t.charCodeAt(e)<<8|t.charCodeAt(e+1));else for(e=0;n>e;++e){var i=W[t.charCodeAt(e)];r+=i?String.fromCharCode(i):t.charAt(e)}return r}function f(t){return"boolean"==typeof t}function d(t){return"number"==typeof t}function p(t){return"string"==typeof t}function g(t){return t instanceof Name}function m(t,e){if(!(t instanceof Dict))return!1;if(!e)return!0;var n=t.get("Type");return g(n)&&n.name==e}function v(t){return t instanceof Array}function y(t){return"object"==typeof t&&null!==t&&void 0!==t&&"getBytes"in t}function b(t){return"object"==typeof t&&null!==t&&void 0!==t&&"byteLength"in t}function w(t){var e;if("object"!=typeof t)return!1;if(m(t))e=t;else{if(!y(t))return!1;e=t.dict}return e.has("FunctionType")}function _(t,r){this.name=t,this.comObj=r,this.callbackIndex=1,this.postMessageTransfers=!0;var i=this.callbacks={},o=this.actionHandler={};o.console_log=[function(t){F.apply(null,t)}],"console"in C?o.console_error=[function(t){C.console.error.apply(null,t)}]:o.console_error=[function(t){F.apply(null,t)}],o._warn=[function(t){e(t)}],r.onmessage=function(t){var e=t.data;if(e.isReply){var a=e.callbackId;if(e.callbackId in i){var s=i[a];delete i[a],s(e.data)}else n("Cannot resolve callback "+a)}else if(e.action in o){var h=o[e.action];if(e.callbackId){var u=new j;u.then(function(t){r.postMessage({isReply:!0,callbackId:e.callbackId,data:t})}),h[0].call(h[1],e.data,u)}else h[0].call(h[1],e.data)}else n("Unkown action from worker: "+e.action)}}function A(t,e,n){var r=new Image;r.onload=function(){n.resolve(t,r)},r.src=e}function x(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,n}function S(t){t.mozCurrentTransform||(t._scaleX=t._scaleX||1,t._scaleY=t._scaleY||1,t._originalSave=t.save,t._originalRestore=t.restore,t._originalRotate=t.rotate,t._originalScale=t.scale,t._originalTranslate=t.translate,t._originalTransform=t.transform,t._originalSetTransform=t.setTransform,t._transformMatrix=[t._scaleX,0,0,t._scaleY,0,0],t._transformStack=[],Object.defineProperty(t,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(t,"mozCurrentTransformInverse",{get:function(){var t=this._transformMatrix,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=e*i-n*r,h=n*r-e*i;return[i/s,n/h,r/h,e/s,(i*o-r*a)/h,(n*o-e*a)/s]}}),t.save=function(){var t=this._transformMatrix;this._transformStack.push(t),this._transformMatrix=t.slice(0,6),this._originalSave()},t.restore=function(){var t=this._transformStack.pop();t&&(this._transformMatrix=t,this._originalRestore())},t.translate=function(t,e){var n=this._transformMatrix;n[4]=n[0]*t+n[2]*e+n[4],n[5]=n[1]*t+n[3]*e+n[5],this._originalTranslate(t,e)},t.scale=function(t,e){var n=this._transformMatrix;n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*e,n[3]=n[3]*e,this._originalScale(t,e)},t.transform=function(e,n,r,i,o,a){var s=this._transformMatrix;this._transformMatrix=[s[0]*e+s[2]*n,s[1]*e+s[3]*n,s[0]*r+s[2]*i,s[1]*r+s[3]*i,s[0]*o+s[2]*a+s[4],s[1]*o+s[3]*a+s[5]],t._originalTransform(e,n,r,i,o,a)},t.setTransform=function(e,n,r,i,o,a){this._transformMatrix=[e,n,r,i,o,a],t._originalSetTransform(e,n,r,i,o,a)},t.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this._transformMatrix;this._transformMatrix=[r[0]*e+r[2]*n,r[1]*e+r[3]*n,r[0]*-n+r[2]*e,r[1]*-n+r[3]*e,r[4],r[5]],this._originalRotate(t)})}function k(t){var e,n,r,i=1e3,o=t.width,a=t.height,s=o+1,h=new Uint8Array(s*(a+1)),u=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=3,l=t.data,f=4*o,d=0;for(0!==l[3]&&(h[0]=1,++d),n=1;o>n;n++)l[c]!==l[c+4]&&(h[n]=l[c]?2:1,++d),c+=4;for(0!==l[c]&&(h[n]=2,++d),c+=4,e=1;a>e;e++){r=e*s,l[c-f]!==l[c]&&(h[r]=l[c]?1:8,++d);var p=(l[c]?4:0)+(l[c-f]?8:0);for(n=1;o>n;n++)p=(p>>2)+(l[c+4]?4:0)+(l[c-f+4]?8:0),u[p]&&(h[r+n]=u[p],++d),c+=4;if(l[c-f]!==l[c]&&(h[r+n]=l[c]?2:4,++d),c+=4,d>i)return null}for(c-=f,r=e*s,0!==l[c]&&(h[r]=8,++d),n=1;o>n;n++)l[c]!==l[c+4]&&(h[r+n]=l[c]?4:8,++d),c+=4;if(0!==l[c]&&(h[r+n]=4,++d),d>i)return null;var g=new Int32Array([0,s,-1,0,-s,0,0,0,1]),m=[];for(e=0;d&&a>=e;e++){for(var v=e*s,y=v+o;y>v&&!h[v];)v++;if(v!==y){var b,w=[v%s,e],_=h[v],A=v;do{var x=g[_];do v+=x;while(!h[v]);b=h[v],5!==b&&10!==b?(_=b,h[v]=0):(_=b&51*_>>4,h[v]&=_>>2|_<<2),w.push(v%s),w.push(v/s|0),--d}while(A!==v);m.push(w),--e}}var S=function(t){t.save(),t.scale(1/o,-1/a),t.translate(0,-a),t.beginPath();for(var e=0,n=m.length;n>e;e++){var r=m[e];t.moveTo(r[0],r[1]);for(var i=2,s=r.length;s>i;i+=2)t.lineTo(r[i],r[i+1])}t.fill(),t.beginPath(),t.restore()};return S}var C="undefined"==typeof window?this:window,I="undefined"==typeof window,R=1,E=5,P=R,T=[.001,0,0,.001,0,0],L={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};C.PDFJS||(C.PDFJS={}),C.PDFJS.pdfBug=!1;var D=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87},F=function(){return"console"in C&&"log"in C.console?C.console.log.bind(C.console):function(){}}();PDFJS.isValidUrl=s;var O=(PDFJS.LogManager=function(){var t=[];return{addLogger:function(e){t.push(e)},notify:function(e,n){for(var r=0,i=t.length;i>r;r++){var o=t[r];o[e]&&o[e](n)}}}}(),PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2}),B=(function(){function t(t,e){this.name="PasswordException",this.message=t,this.code=e}return t.prototype=new Error,t.constructor=t,t}(),function(){function t(t,e){this.name="UnknownErrorException",this.message=t,this.details=e}return t.prototype=new Error,t.constructor=t,t}(),function(){function t(t){this.name="InvalidPDFException",this.message=t}return t.prototype=new Error,t.constructor=t,t}(),function(){function t(t){this.name="MissingPDFException",this.message=t}return t.prototype=new Error,t.constructor=t,t}(),function(){function t(t){this.message=t}return t.prototype=new Error,t.prototype.name="NotImplementedException",t.constructor=t,t}()),M=(function(){function t(t,e){this.begin=t,this.end=e,this.message="Missing data ["+t+", "+e+")"}return t.prototype=new Error,t.prototype.name="MissingDataException",t.constructor=t,t}(),function(){function t(t){this.message=t}return t.prototype=new Error,t.prototype.name="XRefParseException",t.constructor=t,t}(),[1,0,0,1,0,0]),U=PDFJS.Util=function(){function t(){}return t.makeCssRgb=function(t){return"rgb("+t[0]+","+t[1]+","+t[2]+")"},t.makeCssCmyk=function(e){var n=N.singletons.cmyk.getRgb(e,0);return t.makeCssRgb(n)},t.transform=function(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]},t.applyTransform=function(t,e){var n=t[0]*e[0]+t[1]*e[2]+e[4],r=t[0]*e[1]+t[1]*e[3]+e[5];return[n,r]},t.applyInverseTransform=function(t,e){var n=e[0]*e[3]-e[1]*e[2],r=(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/n,i=(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/n;return[r,i]},t.getAxialAlignedBoundingBox=function(e,n){var r=t.applyTransform(e,n),i=t.applyTransform(e.slice(2,4),n),o=t.applyTransform([e[0],e[3]],n),a=t.applyTransform([e[2],e[1]],n);return[Math.min(r[0],i[0],o[0],a[0]),Math.min(r[1],i[1],o[1],a[1]),Math.max(r[0],i[0],o[0],a[0]),Math.max(r[1],i[1],o[1],a[1])]},t.inverseTransform=function(t){var e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]},t.apply3dTransform=function(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2],t[3]*e[0]+t[4]*e[1]+t[5]*e[2],t[6]*e[0]+t[7]*e[1]+t[8]*e[2]]},t.singularValueDecompose2dScale=function(t){var e=[t[0],t[2],t[1],t[3]],n=t[0]*e[0]+t[1]*e[2],r=t[0]*e[1]+t[1]*e[3],i=t[2]*e[0]+t[3]*e[2],o=t[2]*e[1]+t[3]*e[3],a=(n+o)/2,s=Math.sqrt((n+o)*(n+o)-4*(n*o-i*r))/2,h=a+s||1,u=a-s||1;return[Math.sqrt(h),Math.sqrt(u)]},t.normalizeRect=function(t){var e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e},t.intersect=function(e,n){function r(t,e){return t-e}var i=[e[0],e[2],n[0],n[2]].sort(r),o=[e[1],e[3],n[1],n[3]].sort(r),a=[];return e=t.normalizeRect(e),n=t.normalizeRect(n),i[0]===e[0]&&i[1]===n[0]||i[0]===n[0]&&i[1]===e[0]?(a[0]=i[1],a[2]=i[2],o[0]===e[1]&&o[1]===n[1]||o[0]===n[1]&&o[1]===e[1]?(a[1]=o[1],a[3]=o[2],a):!1):!1},t.sign=function(t){return 0>t?-1:1},t.concatenateToArray=function(t,e){Array.prototype.push.apply(t,e)},t.prependToArray=function(t,e){Array.prototype.unshift.apply(t,e)},t.extendObj=function(t,e){for(var n in e)t[n]=e[n]},t.getInheritableProperty=function(t,e){for(;t&&!t.has(e);)t=t.get("Parent");return t?t.get(e):null},t.inherit=function(t,e,n){t.prototype=Object.create(e.prototype),t.prototype.constructor=t;for(var r in n)t.prototype[r]=n[r]},t.loadScript=function(t,e){var n=document.createElement("script"),r=!1;n.setAttribute("src",t),e&&(n.onload=function(){r||e(),r=!0}),document.getElementsByTagName("head")[0].appendChild(n)},t}(),W=(PDFJS.PageViewport=function(){function t(t,e,n,r,i,o){this.viewBox=t,this.scale=e,this.rotation=n,this.offsetX=r,this.offsetY=i;var a,s,h,u,c=(t[2]+t[0])/2,l=(t[3]+t[1])/2;switch(n%=360,n=0>n?n+360:n){case 180:a=-1,s=0,h=0,u=1;break;case 90:a=0,s=1,h=1,u=0;break;case 270:a=0,s=-1,h=-1,u=0;break;default:a=1,s=0,h=0,u=-1}o&&(h=-h,u=-u);var f,d,p,g;0===a?(f=Math.abs(l-t[1])*e+r,d=Math.abs(c-t[0])*e+i,p=Math.abs(t[3]-t[1])*e,g=Math.abs(t[2]-t[0])*e):(f=Math.abs(c-t[0])*e+r,d=Math.abs(l-t[1])*e+i,p=Math.abs(t[2]-t[0])*e,g=Math.abs(t[3]-t[1])*e),this.transform=[a*e,s*e,h*e,u*e,f-a*e*c-h*e*l,d-s*e*c-u*e*l],this.width=p,this.height=g,this.fontScale=e}return t.prototype={clone:function(e){e=e||{};var n="scale"in e?e.scale:this.scale,r="rotation"in e?e.rotation:this.rotation;return new t(this.viewBox.slice(),n,r,this.offsetX,this.offsetY,e.dontFlip)},convertToViewportPoint:function(t,e){return U.applyTransform([t,e],this.transform)},convertToViewportRectangle:function(t){var e=U.applyTransform([t[0],t[1]],this.transform),n=U.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],n[0],n[1]]},convertToPdfPoint:function(t,e){return U.applyInverseTransform([t,e],this.transform)}},t}(),[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]),j=PDFJS.Promise=function(){function t(){this._status=n,this._handlers=[]}var n=0,r=1,i=2,o=500,a={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(t){t._status!=n&&(this.handlers=this.handlers.concat(t._handlers),t._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(;this.handlers.length>0;){var t=this.handlers.shift(),e=t.thisPromise._status,n=t.thisPromise._value;try{e===r?"function"==typeof t.onResolve&&(n=t.onResolve(n)):"function"==typeof t.onReject&&(n=t.onReject(n),e=r,t.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(t.thisPromise))}catch(o){e=i,n=o}t.nextPromise._updateStatus(e,n)}this.running=!1},addUnhandledRejection:function(t){this.unhandledRejections.push({promise:t,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(t){t._unhandledRejection=!1;for(var e=0;eo){var r=this.unhandledRejections[n].promise._value,i="Unhandled rejection: "+r;r.stack&&(i+="\n"+r.stack),e(i),this.unhandledRejections.splice(n),n--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),o))}};return t.all=function(e){function n(t){r._status!==i&&(a=[],r.reject(t))}var r=new t,o=e.length,a=[];if(0===o)return r.resolve(a),r;for(var s=0,h=e.length;h>s;++s){var u=e[s],c=function(t){return function(e){r._status!==i&&(a[t]=e,o--,0===o&&r.resolve(a))}}(s);t.isPromise(u)?u.then(c,n):c(u)}return r},t.isPromise=function(t){return t&&"function"==typeof t.then},t.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(e,n){if(this._status!==r&&this._status!==i){if(e==r&&t.isPromise(n))return void n.then(this._updateStatus.bind(this,r),this._updateStatus.bind(this,i));this._status=e,this._value=n,e===i&&0===this._handlers.length&&(this._unhandledRejection=!0,a.addUnhandledRejection(this)),a.scheduleHandlers(this)}},get isResolved(){return this._status===r},get isRejected(){return this._status===i},resolve:function(t){this._updateStatus(r,t)},reject:function(t){this._updateStatus(i,t)},then:function(e,n){var r=new t;return this._handlers.push({thisPromise:this,onResolve:e,onReject:n,nextPromise:r}),a.scheduleHandlers(this),r}},t}(),z=function(){function t(t,e,n){for(;t.lengthi;++i){var a=e[i].name;a.length>r&&(r=a.length)}for(var i=0,o=e.length;o>i;++i){var s=e[i],h=s.end-s.start;n+=t(s.name," ",r)+" "+h+"ms\n"}return n}},n}();PDFJS.createBlob=function(t,e){if("undefined"!=typeof Blob)return new Blob([t],{type:e});var n=new MozBlobBuilder;return n.append(t),n.getBlob(e)},PDFJS.createObjectURL=function(){if("undefined"!=typeof URL&&URL.createObjectURL)return function(t,e){var n=PDFJS.createBlob(t,e);return URL.createObjectURL(n)};var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(e,n){for(var r="data:"+n+";base64,",i=0,o=e.length;o>i;i+=3){var a=255&e[i],s=255&e[i+1],h=255&e[i+2],u=a>>2,c=(3&a)<<4|s>>4,l=o>i+1?(15&s)<<2|h>>6:64,f=o>i+2?63&h:64;r+=t[u]+t[c]+t[l]+t[f]}return r}}(),_.prototype={on:function(t,e,r){var i=this.actionHandler;i[t]&&n('There is already an actionName called "'+t+'"'),i[t]=[e,r]},send:function(t,e,n,r){var i={action:t,data:e};if(n){var o=this.callbackIndex++;this.callbacks[o]=n,i.callbackId=o}r&&this.postMessageTransfers?this.comObj.postMessage(i,r):this.comObj.postMessage(i)}};var N=function(){function t(){n("should not call ColorSpace constructor")}return t.prototype={getRgb:function(t,e){n("Should not call ColorSpace.getRgb")},getRgbItem:function(t,e,r,i){n("Should not call ColorSpace.getRgbItem")},getRgbBuffer:function(t,e,r,i,o,a){n("Should not call ColorSpace.getRgbBuffer")},getOutputLength:function(t){n("Should not call ColorSpace.getOutputLength")},isPassthrough:function(t){return!1},createRgbBuffer:function(t,e,n,r){if(this.isPassthrough(r))return t.subarray(e);var i=new Uint8Array(3*n),o=1<o&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var a=8>=r?new Uint8Array(o):new Uint16Array(o),s=0;o>s;s++)a[s]=s;var h=new Uint8Array(3*o);this.getRgbBuffer(a,0,o,h,0,r);for(var u=0,s=0;n>s;++s){var c=3*t[e++];i[u++]=h[c],i[u++]=h[c+1],i[u++]=h[c+2]}return i}return this.getRgbBuffer(t,e,n,i,0,r),i},usesZeroToOneRange:!0},t.parse=function(e,n,r){var i=t.parseToIR(e,n,r);return i instanceof H?i:t.fromIR(i)},t.fromIR=function(e){var r=v(e)?e[0]:e;switch(r){case"DeviceGrayCS":return this.singletons.gray;case"DeviceRgbCS":return this.singletons.rgb;case"DeviceCmykCS":return this.singletons.cmyk;case"CalGrayCS":var i=e[1].WhitePoint,o=e[1].BlackPoint,a=e[1].Gamma;return new X(i,o,a);case"PatternCS":var s=e[1];return s&&(s=t.fromIR(s)),new G(s);case"IndexedCS":var h=e[1],u=e[2],c=e[3];return new Z(t.fromIR(h),u,c);case"AlternateCS":var l=e[1],f=e[2],d=e[3];return new H(l,t.fromIR(f),et.fromIR(d));case"LabCS":var i=e[1].WhitePoint,o=e[1].BlackPoint,p=e[1].Range;return new V(i,o,p);default:n("Unkown name "+r)}return null},t.parseToIR=function(e,r,i){if(g(e)){var o=i.get("ColorSpace");if(m(o)){var a=o.get(e.name);a&&(e=a)}}e=r.fetchIfRef(e);var s;if(g(e))switch(s=e.name,this.mode=s,s){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:n("unrecognized colorspace "+s)}else if(v(e))switch(s=e[0].name,this.mode=s,s){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":var h=e[1].getAll();return["CalGrayCS",h];case"CalRGB":return"DeviceRgbCS";case"ICCBased":var u=r.fetchIfRef(e[1]),c=u.dict,l=c.get("N");if(1==l)return"DeviceGrayCS";if(3==l)return"DeviceRgbCS";if(4==l)return"DeviceCmykCS";break;case"Pattern":var f=e[1];return f&&(f=t.parseToIR(f,r,i)),["PatternCS",f];case"Indexed":case"I":var d=t.parseToIR(e[1],r,i),p=e[2]+1,b=r.fetchIfRef(e[3]);return y(b)&&(b=b.getBytes()),["IndexedCS",d,p,b];case"Separation":case"DeviceN":var w=e[1],l=1;g(w)?l=1:v(w)&&(l=w.length);var _=t.parseToIR(e[2],r,i),A=et.getIR(r,r.fetchIfRef(e[3]));return["AlternateCS",l,_,A];case"Lab":var h=e[1].getAll();return["LabCS",h];default:n('unimplemented color space object "'+s+'"')}else n('unrecognized color space object: "'+e+'"');return null},t.isDefaultDecode=function(t,n){if(!t)return!0;if(2*n!==t.length)return e("The decode map is not the correct length"),!0;for(var r=0,i=t.length;i>r;r+=2)if(0!==t[r]||1!=t[r+1])return!1;return!0},t.singletons={get gray(){return h(this,"gray",new Y)},get rgb(){return h(this,"rgb",new J)},get cmyk(){return h(this,"cmyk",new q)}},t}(),H=function(){function t(t,e,n){this.name="Alternate",this.numComps=t,this.defaultColor=new Float32Array(t);for(var r=0;t>r;++r)this.defaultColor[r]=1;this.base=e,this.tintFn=n}return t.prototype={getRgb:function(t,e){var n=new Uint8Array(3);return this.getRgbItem(t,e,n,0),n},getRgbItem:function(t,e,n,r){var i=(this.base.numComps,"subarray"in t?t.subarray(e,e+this.numComps):Array.prototype.slice.call(t,e,e+this.numComps)),o=this.tintFn(i);this.base.getRgbItem(o,0,n,r)},getRgbBuffer:function(t,e,n,r,i,o){for(var a=this.tintFn,s=this.base,h=1/((1<m;m++){for(var v=0;p>v;v++)g[v]=t[e++]*h;var y=a(g);if(c)for(var v=0;u>v;v++)d[f++]=255*y[v];else s.getRgbItem(y,0,d,f),f+=u}l||s.getRgbBuffer(d,0,n,r,i,8)},getOutputLength:function(t){return this.base.getOutputLength(t*this.base.numComps/this.numComps)},isPassthrough:N.prototype.isPassthrough,createRgbBuffer:N.prototype.createRgbBuffer,isDefaultDecode:function(t){return N.isDefaultDecode(t,this.numComps)},usesZeroToOneRange:!0},t}(),G=function(){function t(t){this.name="Pattern",this.base=t}return t.prototype={},t}(),Z=function(){function t(t,e,r){this.name="Indexed",this.numComps=1,this.defaultColor=new Uint8Array([0]),this.base=t,this.highVal=e;var i,o=t.numComps,a=o*e;if(y(r)){i=new Uint8Array(a);var s=r.getBytes(a);i.set(s)}else if(p(r)){i=new Uint8Array(a);for(var h=0;a>h;++h)i[h]=r.charCodeAt(h)}else r instanceof Uint8Array||r instanceof Array?i=r:n("Unrecognized lookup table: "+r);this.lookup=i}return t.prototype={getRgb:function(t,e){var n=this.base.numComps,r=t[e]*n;return this.base.getRgb(this.lookup,r)},getRgbItem:function(t,e,n,r){var i=this.base.numComps,o=t[e]*i;this.base.getRgbItem(this.lookup,o,n,r)},getRgbBuffer:function(t,e,n,r,i){for(var o=this.base,a=o.numComps,s=o.getOutputLength(a),h=this.lookup,u=0;n>u;++u){var c=t[e++]*a;o.getRgbBuffer(h,c,1,r,i,8),i+=s}},getOutputLength:function(t){return this.base.getOutputLength(t*this.base.numComps)},isPassthrough:N.prototype.isPassthrough,createRgbBuffer:N.prototype.createRgbBuffer,isDefaultDecode:function(t){return!0},usesZeroToOneRange:!0},t}(),Y=function(){function t(){this.name="DeviceGray",this.numComps=1,this.defaultColor=new Float32Array([0])}return t.prototype={getRgb:function(t,e){var n=new Uint8Array(3);return this.getRgbItem(t,e,n,0),n},getRgbItem:function(t,e,n,r){var i=255*t[e]|0;i=0>i?0:i>255?255:i,n[r]=n[r+1]=n[r+2]=i},getRgbBuffer:function(t,e,n,r,i,o){for(var a=255/((1<u;++u){var c=a*t[s++]|0;r[h++]=c,r[h++]=c,r[h++]=c}},getOutputLength:function(t){return 3*t},isPassthrough:N.prototype.isPassthrough,createRgbBuffer:N.prototype.createRgbBuffer,isDefaultDecode:function(t){return N.isDefaultDecode(t,this.numComps)},usesZeroToOneRange:!0},t}(),J=function(){function t(){this.name="DeviceRGB",this.numComps=3,this.defaultColor=new Float32Array([0,0,0])}return t.prototype={getRgb:function(t,e){var n=new Uint8Array(3);return this.getRgbItem(t,e,n,0),n},getRgbItem:function(t,e,n,r){var i=255*t[e]|0,o=255*t[e+1]|0,a=255*t[e+2]|0;n[r]=0>i?0:i>255?255:i,n[r+1]=0>o?0:o>255?255:o,n[r+2]=0>a?0:a>255?255:a},getRgbBuffer:function(t,e,n,r,i,o){var a=3*n;if(8==o)return void r.set(t.subarray(e,e+a),i);for(var s=255/((1<c;++c)r[u++]=s*t[h++]|0},getOutputLength:function(t){return t},isPassthrough:function(t){return 8==t},createRgbBuffer:N.prototype.createRgbBuffer,isDefaultDecode:function(t){return N.isDefaultDecode(t,this.numComps)},usesZeroToOneRange:!0},t}(),q=function(){function t(t,e,n,r,i){var o=t[e+0]*n,a=t[e+1]*n,s=t[e+2]*n,h=t[e+3]*n,u=o*(-4.387332384609988*o+54.48615194189176*a+18.82290502165302*s+212.25662451639585*h+-285.2331026137004)+a*(1.7149763477362134*a-5.6096736904047315*s+-17.873870861415444*h-5.497006427196366)+s*(-2.5217340131683033*s-21.248923337353073*h+17.5119270841813)+h*(-21.86122147463605*h-189.48180835922747)+255,c=o*(8.841041422036149*o+60.118027045597366*a+6.871425592049007*s+31.159100130055922*h+-79.2970844816548)+a*(-15.310361306967817*a+17.575251261109482*s+131.35250912493976*h-190.9453302588951)+s*(4.444339102852739*s+9.8632861493405*h-24.86741582555878)+h*(-20.737325471181034*h-187.80453709719578)+255,l=o*(.8842522430003296*o+8.078677503112928*a+30.89978309703729*s-.23883238689178934*h+-14.183576799673286)+a*(10.49593273432072*a+63.02378494754052*s+50.606957656360734*h-112.23884253719248)+s*(.03296041114873217*s+115.60384449646641*h+-193.58209356861505)+h*(-22.33816807309886*h-180.12613974708367)+255;r[i]=u>255?255:0>u?0:u,r[i+1]=c>255?255:0>c?0:c,r[i+2]=l>255?255:0>l?0:l}function e(){this.name="DeviceCMYK",this.numComps=4,this.defaultColor=new Float32Array([0,0,0,1])}return e.prototype={getRgb:function(e,n){var r=new Uint8Array(3);return t(e,n,1,r,0),r},getRgbItem:function(e,n,r,i){t(e,n,1,r,i)},getRgbBuffer:function(e,n,r,i,o,a){for(var s=1/((1<h;h++)t(e,n,s,i,o),n+=4,o+=3},getOutputLength:function(t){return 3*(t>>2)},isPassthrough:N.prototype.isPassthrough,createRgbBuffer:N.prototype.createRgbBuffer,isDefaultDecode:function(t){return N.isDefaultDecode(t,this.numComps)},usesZeroToOneRange:!0},e}(),X=function(){function e(e,i,o){this.name="CalGray",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),e||n("WhitePoint missing - required for color space CalGray"),i=i||[0,0,0],o=o||1,this.XW=e[0],this.YW=e[1],this.ZW=e[2],this.XB=i[0],this.YB=i[1],this.ZB=i[2],this.G=o,(this.XW<0||this.ZW<0||1!==this.YW)&&n("Invalid WhitePoint components for "+this.name+", no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(t("Invalid BlackPoint for "+this.name+", falling back to default"),this.XB=this.YB=this.ZB=0),(0!==this.XB||0!==this.YB||0!==this.ZB)&&r(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported."),this.G<1&&(t("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default"),this.G=1)}return e.prototype={getRgb:function(t,e){var n=new Uint8Array(3);return this.getRgbItem(t,e,n,0),n},getRgbItem:function(t,e,n,r){var i=t[e],o=Math.pow(i,this.G),a=(this.XW*o,this.YW*o),s=(this.ZW*o,a),h=Math.max(116*Math.pow(s,1/3)-16,0);n[r]=255*h/100,n[r+1]=255*h/100,n[r+2]=255*h/100},getRgbBuffer:function(t,e,n,r,i,o){for(var a=255/((1<u;++u){var c=a*t[s++]|0;r[h++]=c,r[h++]=c,r[h++]=c}},getOutputLength:function(t){return 3*t},isPassthrough:N.prototype.isPassthrough,createRgbBuffer:N.prototype.createRgbBuffer,isDefaultDecode:function(t){return N.isDefaultDecode(t,this.numComps)},usesZeroToOneRange:!0},e}(),V=function(){function e(e,r,i){this.name="Lab",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),e||n("WhitePoint missing - required for color space Lab"),r=r||[0,0,0],i=i||[-100,100,-100,100],this.XW=e[0],this.YW=e[1],this.ZW=e[2],this.amin=i[0],this.amax=i[1],this.bmin=i[2],this.bmax=i[3],this.XB=r[0],this.YB=r[1],this.ZB=r[2],(this.XW<0||this.ZW<0||1!==this.YW)&&n("Invalid WhitePoint components, no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(t("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(t("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function r(t){return t>=6/29?t*t*t:108/841*(t-4/29)}function i(t,e,n,r){return n+t*(r-n)/e}function o(t,e,n,o,a,s){var h=e[n],u=e[n+1],c=e[n+2];o!==!1&&(h=i(h,o,0,100),u=i(u,o,t.amin,t.amax),c=i(c,o,t.bmin,t.bmax)),u=u>t.amax?t.amax:ut.bmax?t.bmax:cl?0:l>1?1:l),a[s+1]=255*Math.sqrt(0>f?0:f>1?1:f),a[s+2]=255*Math.sqrt(0>d?0:d>1?1:d)}return e.prototype={getRgb:function(t,e){var n=new Uint8Array(3);return o(this,t,e,!1,n,0),n},getRgbItem:function(t,e,n,r){o(this,t,e,!1,n,r)},getRgbBuffer:function(t,e,n,r,i,a){for(var s=(1<h;h++)o(this,t,e,s,r,i),e+=3,i+=3},getOutputLength:function(t){return t},isPassthrough:N.prototype.isPassthrough,isDefaultDecode:function(t){return!0},usesZeroToOneRange:!1},e}(),K={AXIAL:2,RADIAL:3},Q=function(){function t(){n("should not call Pattern constructor")}return t.prototype={getPattern:function(t){n("Should not call Pattern.getStyle: "+t)}},t.shadingFromIR=function(t){return $[t[0]].fromIR(t)},t.parseShading=function(t,e,n,i){var o=y(t)?t.dict:t,a=o.get("ShadingType");switch(a){case K.AXIAL:case K.RADIAL:return new $.RadialAxial(o,e,n,i);default:return r("Unsupported shading type: "+a),new $.Dummy}},t}(),$={};$.SMALL_NUMBER=.01,$.RadialAxial=function(){function r(r,i,o,a,s){this.matrix=i,this.coordsArr=r.get("Coords"),this.shadingType=r.get("ShadingType"),this.type="Pattern",this.ctx=s;var h=r.get("ColorSpace","CS");h=N.parse(h,o,a),this.cs=h;var u=0,c=1;if(r.has("Domain")){var l=r.get("Domain");u=l[0],c=l[1]}var f=!1,d=!1;if(r.has("Extend")){var p=r.get("Extend");f=p[0],d=p[1]}if(!(this.shadingType!==K.RADIAL||f&&d)){var g=this.coordsArr[0],m=this.coordsArr[1],y=this.coordsArr[2],b=this.coordsArr[3],_=this.coordsArr[4],A=this.coordsArr[5],x=Math.sqrt((g-b)*(g-b)+(m-_)*(m-_));A+x>=y&&y+x>=A&&e("Unsupported radial gradient.")}this.extendStart=f,this.extendEnd=d;var S,k=r.get("Function");if(v(k)){for(var C=[],I=0,R=k.length;R>I;I++){var E=o.fetchIfRef(k[I]);w(E)||n("Invalid function"),C.push(et.parse(o,E))}S=function(t){for(var e=[],n=0,r=C.length;r>n;n++)e.push(C[n](t)[0]);return e}}else w(k)||n("Invalid function"),S=et.parse(o,k);var P=c-u,T=P/10,L=this.colorStops=[];if(u>=c||0>=T)return void t("Bad shading domain.");for(var D=u;c>=D;D+=T){var F=h.getRgb(S([D]),0),O=U.makeCssRgb(F);L.push([(D-u)/P,O])}var B="transparent";if(r.has("Background")){var F=h.getRgb(r.get("Background"),0);B=U.makeCssRgb(F)}f||(L.unshift([0,B]),L[1][0]+=$.SMALL_NUMBER),d||(L[L.length-1][0]-=$.SMALL_NUMBER,L.push([1,B])),this.colorStops=L}return r.fromIR=function(t){var e=t[1],n=t[2],r=t[3],i=t[4],o=t[5],a=t[6];return{type:"Pattern",getPattern:function(t){var s;e==K.AXIAL?s=t.createLinearGradient(r[0],r[1],i[0],i[1]):e==K.RADIAL&&(s=t.createRadialGradient(r[0],r[1],o,i[0],i[1],a));for(var h=0,u=n.length;u>h;++h){var c=n[h];s.addColorStop(c[0],c[1])}return s}}},r.prototype={getIR:function(){var t=this.coordsArr,e=this.shadingType;if(e==K.AXIAL)var r=[t[0],t[1]],i=[t[2],t[3]],o=null,a=null;else if(e==K.RADIAL)var r=[t[0],t[1]],i=[t[3],t[4]],o=t[2],a=t[5];else n("getPattern type unknown: "+e);var s=this.matrix;return s&&(r=U.applyTransform(r,s),i=U.applyTransform(i,s)),["RadialAxial",e,this.colorStops,r,i,o,a]}},r}(),$.Dummy=function(){function t(){this.type="Pattern"}return t.fromIR=function(){ return{type:"Pattern",getPattern:function(){return"hotpink"}}},t.prototype={getIR:function(){return["Dummy"]}},t}();var tt=function(){function t(t,e,n,r,i,o){this.name=t[1][0].name,this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=e,this.objs=r,this.commonObjs=i,this.baseTransform=o,this.type="Pattern",this.ctx=n}var e={COLORED:1,UNCOLORED:2},i=3e3;return t.getIR=function(t,e,n){var r=e.get("Matrix"),i=e.get("BBox"),o=e.get("XStep"),a=e.get("YStep"),s=e.get("PaintType"),h=e.get("TilingType");return["TilingPattern",n,t,r,i,o,a,s,h]},t.prototype={createPatternCanvas:function(t){var e=this.operatorList,n=this.bbox,o=this.xstep,a=this.ystep,s=this.paintType,h=this.tilingType,u=this.color,c=this.objs,l=this.commonObjs;this.ctx;r("TilingType: "+h);var f=n[0],d=n[1],p=n[2],g=n[3],m=[f,d],v=[f+o,d+a],y=v[0]-m[0],b=v[1]-m[1],w=U.singularValueDecompose2dScale(this.matrix),_=U.singularValueDecompose2dScale(this.baseTransform),A=[w[0]*_[0],w[1]*_[1]];y=Math.min(Math.ceil(Math.abs(y*A[0])),i),b=Math.min(Math.ceil(Math.abs(b*A[1])),i);var x=At.getCanvas("pattern",y,b,!0),S=x.context,k=new St(S,l,c);k.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(S,s,u),this.setScale(y,b,o,a),this.transformToScale(k);var C=[1,0,0,1,-m[0],-m[1]];return k.transform.apply(k,C),this.clipBbox(k,n,f,d,p,g),k.executeOperatorList(e),x.canvas},setScale:function(t,e,n,r){this.scale=[t/n,e/r]},transformToScale:function(t){var e=this.scale,n=[e[0],0,0,e[1],0,0];t.transform.apply(t,n)},scaleToContext:function(){var t=this.scale;this.ctx.scale(1/t[0],1/t[1])},clipBbox:function(t,e,n,r,i,o){if(e&&v(e)&&4==e.length){var a=i-n,s=o-r;t.rectangle(n,r,a,s),t.clip(),t.endPath()}},setFillAndStrokeStyleToContext:function(t,r,i){switch(r){case e.COLORED:var o=this.ctx;t.fillStyle=o.fillStyle,t.strokeStyle=o.strokeStyle;break;case e.UNCOLORED:var a=N.singletons.rgb.getRgb(i,0),s=U.makeCssRgb(a);t.fillStyle=s,t.strokeStyle=s;break;default:n("Unsupported paint type: "+r)}},getPattern:function(t,e){var n=this.createPatternCanvas(e),t=this.ctx;return t.setTransform.apply(t,this.baseTransform),t.transform.apply(t,this.matrix),this.scaleToContext(),t.createPattern(n,"repeat")}},t}(),et=function(){var t=0,e=2,i=3,o=4;return{getSampleArray:function(t,e,n,r){for(var i=1,o=0,a=t.length;a>o;o++)i*=t[o];i*=e;for(var s=[],h=0,u=0,c=1/(Math.pow(2,n)-1),l=r.getBytes((i*n+7)/8),f=0,o=0;i>o;o++){for(;n>h;)u<<=8,u|=l[f++],h+=8;h-=n,s.push((u>>h)*c),u&=(1<i;i+=2)n[r]=[t[i],t[i+1]],++r;return n}var a=i.get("Domain"),s=i.get("Range");a&&s||n("No domain or range");var h=a.length/2,u=s.length/2;a=o(a),s=o(s);var c=i.get("Size"),l=i.get("BitsPerSample"),f=i.get("Order")||1;1!==f&&r("No support for cubic spline interpolation: "+f);var d=i.get("Encode");if(!d){d=[];for(var p=0;h>p;++p)d.push(0),d.push(c[p]-1)}d=o(d);var g=i.get("Decode");g=g?o(g):s;var m=this.getSampleArray(c,u,l,e);return[t,h,a,d,g,m,c,u,Math.pow(2,l)-1,s]},constructSampledFromIR:function(t){function e(t,e,n,r,i){return r+(t-e)*((i-r)/(n-e))}return function(r){var i=t[1],o=t[2],a=t[3],s=t[4],h=t[5],u=t[6],c=t[7],l=(t[8],t[9]);i!=r.length&&n("Incorrect number of arguments: "+i+" != "+r.length);for(var f=r,d=1<m;m++)p[m]=1;for(var v=c,y=1,b=0;i>b;++b){var w=o[b][0],_=o[b][1],A=Math.min(Math.max(f[b],w),_),x=e(A,w,_,a[b][0],a[b][1]),S=u[b];x=Math.min(Math.max(x,0),S-1);for(var k=S-1>x?Math.floor(x):x-1,C=k+1-x,I=x-k,R=k*v,E=R+v,m=0;d>m;m++)m&y?(p[m]*=I,g[m]+=E):(p[m]*=C,g[m]+=R);v*=S,y<<=1}for(var P=new Float64Array(c),m=0;c>m;++m){for(var T=0,b=0;d>b;b++)T+=h[g[b]+m]*p[b];T=e(T,0,1,s[m][0],s[m][1]),P[m]=Math.min(Math.max(T,l[m][0]),l[m][1])}return P}},constructInterpolated:function(t,r){var i=r.get("C0")||[0],o=r.get("C1")||[1],a=r.get("N");v(i)&&v(o)||n("Illegal dictionary for interpolated function");for(var s=i.length,h=[],u=0;s>u;++u)h.push(o[u]-i[u]);return[e,i,h,a]},constructInterpolatedFromIR:function(t){var e=t[1],n=t[2],r=t[3],i=n.length;return function(t){for(var o=1==r?t[0]:Math.pow(t[0],r),a=[],s=0;i>s;++s)a.push(e[s]+o*n[s]);return a}},constructStiched:function(t,e,r){var o=e.get("Domain");o||n("No domain");var a=o.length/2;1!=a&&n("Bad domain for stiched function");for(var s=e.get("Functions"),h=[],u=0,c=s.length;c>u;++u)h.push(et.getIR(r,r.fetchIfRef(s[u])));var l=e.get("Bounds"),f=e.get("Encode");return[i,o,l,f,h]},constructStichedFromIR:function(t){for(var e=t[1],n=t[2],r=t[3],i=t[4],o=[],a=0,s=i.length;s>a;a++)o.push(et.fromIR(i[a]));return function(t){for(var i=function(t,e,n){return t>n?t=n:e>t&&(t=e),t},a=i(t[0],e[0],e[1]),s=0,h=n.length;h>s&&!(a0&&(u=n[s-1]);var c=e[1];ss;++s)r.push(t[s]);var u=r.join("_");if(a.has(u))return a.get(u);var c=o.execute(r),l=[];for(s=i-1;s>=0;--s){var f=c.pop(),d=2*s;fn[d+1]&&(f=n[d+1]),l[s]=f}return a.set(u,l),l}}}}(),nt=function(){function t(){this.cache={},this.total=0}var e=1024;return t.prototype={has:function(t){return t in this.cache},get:function(t){return this.cache[t]},set:function(t,n){this.total=e&&n("PostScript function stack overflow."),this.stack.push(t)},pop:function(){return this.stack.length<=0&&n("PostScript function stack underflow."),this.stack.pop()},copy:function(t){this.stack.length+t>=e&&n("PostScript function stack overflow.");for(var r=this.stack,i=r.length-t,o=t-1;o>=0;o--,i++)r.push(r[i])},index:function(t){this.push(this.stack[this.stack.length-t-1])},roll:function(t,e){var n,r,i,o=this.stack,a=o.length-t,s=o.length-1,h=a+(e-Math.floor(e/t)*t);for(n=a,r=s;r>n;n++,r--)i=o[n],o[n]=o[r],o[r]=i;for(n=a,r=h-1;r>n;n++,r--)i=o[n],o[n]=o[r],o[r]=i;for(n=h,r=s;r>n;n++,r--)i=o[n],o[n]=o[r],o[r]=i}},t}(),it=function(){function t(t,e){this.operators=t,this.operands=e}return t.prototype={execute:function(t){for(var e,r,i,o=new rt(t),a=0,s=this.operators,h=s.length;h>a;)if(e=s[a++],"number"!=typeof e)switch(e){case"jz":i=o.pop(),r=o.pop(),r||(a=i);break;case"j":r=o.pop(),a=r;break;case"abs":r=o.pop(),o.push(Math.abs(r));break;case"add":i=o.pop(),r=o.pop(),o.push(r+i);break;case"and":i=o.pop(),r=o.pop(),f(r)&&f(i)?o.push(r&&i):o.push(r&i);break;case"atan":r=o.pop(),o.push(Math.atan(r));break;case"bitshift":i=o.pop(),r=o.pop(),r>0?o.push(r<>i);break;case"ceiling":r=o.pop(),o.push(Math.ceil(r));break;case"copy":r=o.pop(),o.copy(r);break;case"cos":r=o.pop(),o.push(Math.cos(r));break;case"cvi":r=0|o.pop(),o.push(r);break;case"cvr":break;case"div":i=o.pop(),r=o.pop(),o.push(r/i);break;case"dup":o.copy(1);break;case"eq":i=o.pop(),r=o.pop(),o.push(r==i);break;case"exch":o.roll(2,1);break;case"exp":i=o.pop(),r=o.pop(),o.push(Math.pow(r,i));break;case"false":o.push(!1);break;case"floor":r=o.pop(),o.push(Math.floor(r));break;case"ge":i=o.pop(),r=o.pop(),o.push(r>=i);break;case"gt":i=o.pop(),r=o.pop(),o.push(r>i);break;case"idiv":i=o.pop(),r=o.pop(),o.push(r/i|0);break;case"index":r=o.pop(),o.index(r);break;case"le":i=o.pop(),r=o.pop(),o.push(i>=r);break;case"ln":r=o.pop(),o.push(Math.log(r));break;case"log":r=o.pop(),o.push(Math.log(r)/Math.LN10);break;case"lt":i=o.pop(),r=o.pop(),o.push(i>r);break;case"mod":i=o.pop(),r=o.pop(),o.push(r%i);break;case"mul":i=o.pop(),r=o.pop(),o.push(r*i);break;case"ne":i=o.pop(),r=o.pop(),o.push(r!=i);break;case"neg":r=o.pop(),o.push(-i);break;case"not":r=o.pop(),f(r)&&f(i)?o.push(r&&i):o.push(r&i);break;case"or":i=o.pop(),r=o.pop(),f(r)&&f(i)?o.push(r||i):o.push(r|i);break;case"pop":o.pop();break;case"roll":i=o.pop(),r=o.pop(),o.roll(r,i);break;case"round":r=o.pop(),o.push(Math.round(r));break;case"sin":r=o.pop(),o.push(Math.sin(r));break;case"sqrt":r=o.pop(),o.push(Math.sqrt(r));break;case"sub":i=o.pop(),r=o.pop(),o.push(r-i);break;case"true":o.push(!0);break;case"truncate":r=o.pop(),r=0>r?Math.ceil(r):Math.floor(r),o.push(r);break;case"xor":i=o.pop(),r=o.pop(),f(r)&&f(i)?o.push(r!=i):o.push(r^i);break;default:n("Unknown operator "+e)}else o.push(e);return o.stack}},t}(),ot=function(){function t(t){this.lexer=t,this.operators=[],this.token=null,this.prev=null}return t.prototype={nextToken:function(){this.prev=this.token,this.token=this.lexer.getToken()},accept:function(t){return this.token.type==t?(this.nextToken(),!0):!1},expect:function(t){return this.accept(t)?!0:void n("Unexpected symbol: found "+this.token.type+" expected "+t+".")},parse:function(){return this.nextToken(),this.expect(at.LBRACE),this.parseBlock(),this.expect(at.RBRACE),this.operators},parseBlock:function(){for(;;)if(this.accept(at.NUMBER))this.operators.push(this.prev.value);else if(this.accept(at.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(at.LBRACE))return;this.parseCondition()}},parseCondition:function(){var t=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(at.RBRACE),this.accept(at.IF))this.operators[t]=this.operators.length,this.operators[t+1]="jz";else if(this.accept(at.LBRACE)){var e=this.operators.length;this.operators.push(null,null);var r=this.operators.length;this.parseBlock(),this.expect(at.RBRACE),this.expect(at.IFELSE),this.operators[e]=this.operators.length,this.operators[e+1]="j",this.operators[t]=r,this.operators[t+1]="jz"}else n("PS Function: error parsing conditional.")}},t}(),at={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5},st=function(){function t(t,e){this.type=t,this.value=e}var e={};return t.getOperator=function(n){var r=e[n];return r?r:e[n]=new t(at.OPERATOR,n)},t.LBRACE=new t(at.LBRACE,"{"),t.RBRACE=new t(at.RBRACE,"}"),t.IF=new t(at.IF,"IF"),t.IFELSE=new t(at.IFELSE,"IFELSE"),t}(),ht=function(){function t(t){this.stream=t,this.nextChar()}return t.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var t=!1,e=this.currentChar;;){if(0>e)return EOF;if(t)(10===e||13===e)&&(t=!1);else if(37==e)t=!0;else if(!Lexer.isSpace(e))break;e=this.nextChar()}switch(0|e){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 new st(at.NUMBER,this.getNumber());case 123:return this.nextChar(),st.LBRACE;case 125:return this.nextChar(),st.RBRACE}for(var n=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=65&&90>=e||e>=97&&122>=e);)n+=String.fromCharCode(e);switch(n.toLowerCase()){case"if":return st.IF;case"ifelse":return st.IFELSE;default:return st.getOperator(n)}},getNumber:function(){for(var t=this.currentChar,e=String.fromCharCode(t);(t=this.nextChar())>=0&&(t>=48&&57>=t||45===t||46===t);)e+=String.fromCharCode(t);var r=parseFloat(e);return isNaN(r)&&n("Invalid floating point number: "+r),r}},t}(),ut=function(){function t(t,e,n){var r=U.getAxialAlignedBoundingBox(e,n),i=r[0],o=r[1],a=r[2],s=r[3];if(i===a||o===s)return[1,0,0,1,t[0],t[1]];var h=(t[2]-t[0])/(a-i),u=(t[3]-t[1])/(s-o);return[h,0,0,u,t[0]-i*h,t[1]-o*u]}function e(t){var e=t.get("AP");if(m(e)){var n,r=e.get("N");if(m(r)){var i=t.get("AS");i&&r.has(i.name)&&(n=r.get(i.name))}else n=r;return n}}function n(t){if(t.data)return void(this.data=t.data);var n=t.dict,r=this.data={};r.subtype=n.get("Subtype").name;var i=n.get("Rect");r.rect=U.normalizeRect(i),r.annotationFlags=n.get("F");var o=n.get("C");if(v(o)&&3===o.length?r.color=o:r.color=[0,0,0],n.has("BS")){var a=n.get("BS");r.borderWidth=a.has("W")?a.get("W"):1}else{var s=n.get("Border")||[0,0,1];r.borderWidth=s[2]||0}this.appearance=e(n),r.hasAppearance=!!this.appearance}return n.prototype={getData:function(){return this.data},hasHtml:function(){return!1},getHtmlElement:function(t){throw new B("getHtmlElement() should be implemented in subclass")},getEmptyContainer:function(t,e){o(!I,"getEmptyContainer() should be called from main thread"),e=e||this.data.rect;var n=document.createElement(t);return n.style.width=Math.ceil(e[2]-e[0])+"px",n.style.height=Math.ceil(e[3]-e[1])+"px",n},isViewable:function(){var t=this.data;return!(!t||t.annotationFlags&&34&t.annotationFlags||!t.rect)},loadResources:function(t){var e=new j;return this.appearance.dict.getAsync("Resources").then(function(n){if(!n)return void e.resolve();var r=new ObjectLoader(n.map,t,n.xref);r.load().then(function(){e.resolve(n)})}.bind(this)),e},getOperatorList:function(e){var n=new j;if(!this.appearance)return n.resolve(new OperatorList),n;var r=this.data,i=this.appearance.dict,o=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),a=i.get("BBox")||[0,0,1,1],s=i.get("Matrix")||[1,0,0,1,0,0],h=t(r.rect,a,s);r.border;return o.then(function(t){var i=new OperatorList;i.addOp(D.beginAnnotation,[r.rect,h,s]),e.getOperatorList(this.appearance,t,i),i.addOp(D.endAnnotation,[]),n.resolve(i)}.bind(this)),n}},n.getConstructor=function(t,e){if(t){if("Link"===t)return dt;if("Text"===t)return ft;if("Widget"===t){if(!e)return;return"Tx"===e?lt:ct}return n}},n.fromData=function(t){var e=t.subtype,r=t.fieldType,i=n.getConstructor(e,r);return i?new i({data:t}):void 0},n.fromRef=function(t,e){var i=t.fetchIfRef(e);if(m(i)){var o=i.get("Subtype");if(o=g(o)?o.name:""){var a=U.getInheritableProperty(i,"FT");a=g(a)?a.name:"";var s=n.getConstructor(o,a);if(s){var h={dict:i,ref:e},u=new s(h);return u.isViewable()?u:void r("unimplemented annotation type: "+o)}}}},n.appendToOperatorList=function(t,e,n,r){function i(t){o.reject(t)}for(var o=new j,a=[],s=0,h=t.length;h>s;++s)a.push(t[s].getOperatorList(r));return j.all(a).then(function(t){e.addOp(D.beginAnnotations,[]);for(var n=0,r=t.length;r>n;++n){var i=t[n];e.addOpList(i)}e.addOp(D.endAnnotations,[]),o.resolve()},i),o},n}();PDFJS.Annotation=ut;var ct=function(){function t(t){if(ut.call(this,t),!t.data){var e=t.dict,n=this.data;n.fieldValue=l(U.getInheritableProperty(e,"V")||""),n.alternativeText=l(e.get("TU")||""),n.defaultAppearance=U.getInheritableProperty(e,"DA")||"";var r=U.getInheritableProperty(e,"FT");n.fieldType=g(r)?r.name:"",n.fieldFlags=U.getInheritableProperty(e,"Ff")||0,this.fieldResources=U.getInheritableProperty(e,"DR")||new Dict;for(var i=[],o=e,a=t.ref;o;){var s=o.get("Parent"),h=o.getRaw("Parent"),u=o.get("T");if(u)i.unshift(l(u));else{var c,f,d=s.get("Kids");for(c=0,f=d.length;f>c;c++){var p=d[c];if(p.num==a.num&&p.gen==a.gen)break}i.unshift("`"+c)}o=s,a=h}n.fullName=i.join(".")}}var e=ut.prototype;return U.inherit(t,ut,{isViewable:function(){return"Sig"===this.data.fieldType?(r("unimplemented annotation type: Widget signature"),!1):e.isViewable.call(this)}}),t}(),lt=function(){function t(t){ct.call(this,t),t.data||(this.data.textAlignment=U.getInheritableProperty(t.dict,"Q"))}function e(t,e,n){var r=t.style;if(r.fontSize=e.fontSize+"px",r.direction=e.fontDirection<0?"rtl":"ltr",n){r.fontWeight=n.black?n.bold?"bolder":"bold":n.bold?"bold":"normal",r.fontStyle=n.italic?"italic":"normal";var i=n.loadedName,o=i?'"'+i+'", ':"",a=n.fallbackName||"Helvetica, sans-serif";r.fontFamily=o+a}}ct.prototype;return U.inherit(t,ct,{hasHtml:function(){return!this.data.hasAppearance&&!!this.data.fieldValue},getHtmlElement:function(t){o(!I,"getHtmlElement() shall be called from main thread");var n=this.data,r=this.getEmptyContainer("div");r.style.display="table";var i=document.createElement("div");i.textContent=n.fieldValue;var a=n.textAlignment;i.style.textAlign=["left","center","right"][a],i.style.verticalAlign="middle",i.style.display="table-cell";var s=n.fontRefName?t.getData(n.fontRefName):null;e(i,n,s);return r.appendChild(i),r},getOperatorList:function(t){if(this.appearance)return ut.prototype.getOperatorList.call(this,t);var e=new j,n=new OperatorList,r=this.data,i=r.defaultAppearance;if(!i)return e.resolve(n),e;var o=new Stream(c(i));t.getOperatorList(o,this.fieldResources,n);var a=n.fnArray,s=n.argsArray,h=[];r.rgb=[0,0,0];for(var u=0,l=h.length;l>u;++u){var f=a[u],d=s[u];if(f===D.setFont){r.fontRefName=d[0];var p=d[1];0>p?(r.fontDirection=-1,r.fontSize=-p):(r.fontDirection=1,r.fontSize=p)}else if(f===D.setFillRGBColor)r.rgb=d;else if(f===D.setFillGray){var g=255*d[0];r.rgb=[g,g,g]}}return e.resolve(n),e}}),t}(),ft=function(){function t(t){if(ut.call(this,t),!t.data){var e=t.dict,n=this.data,r=e.get("Contents"),i=e.get("T");n.content=l(r||""),n.title=l(i||""),n.name=e.has("Name")?e.get("Name").name:"Note"}}var e=10;return U.inherit(t,ut,{getOperatorList:function(t){var e=new j;return e.resolve(new OperatorList),e},hasHtml:function(){return!0},getHtmlElement:function(t){o(!I,"getHtmlElement() shall be called from main thread");var n=this.data,r=n.rect;r[3]-r[1]d;++d){var g=f[d];l.appendChild(document.createTextNode(g)),p-1>d&&l.appendChild(document.createElement("br"))}c.appendChild(l);var m=function(){i.style.zIndex+=1,h.removeAttribute("hidden")},v=function(t){(t.toElement||t.relatedTarget)&&(i.style.zIndex-=1,h.setAttribute("hidden",!0))};h.addEventListener("mouseover",m,!1),h.addEventListener("mouseout",v,!1),a.addEventListener("mouseover",m,!1),a.addEventListener("mouseout",v,!1)}else h.setAttribute("hidden",!0);return h.appendChild(u),h.appendChild(c),i.appendChild(a),i.appendChild(h),i}}),t}(),dt=function(){function t(t){if(ut.call(this,t),!t.data){var n=t.dict,i=this.data,o=n.get("A");if(o){var a=o.get("S").name;if("URI"===a){var h=e(o.get("URI"));s(h,!1)||(h=""),i.url=h}else if("GoTo"===a)i.dest=o.get("D");else if("GoToR"===a){var u=o.get("F");m(u)&&(h=u.get("F")||""),s(h,!1)||(h=""),i.url=h,i.dest=o.get("D")}else"Named"===a?i.action=o.get("N").name:r("unrecognized link type: "+a)}else if(n.has("Dest")){var c=n.get("Dest");i.dest=g(c)?c.name:c}}}function e(t){return 0===t.indexOf("www.")?"http://"+t:t}return U.inherit(t,ut,{hasOperatorList:function(){return!1},hasHtml:function(){return!0},getHtmlElement:function(t){var e=this.data.rect,n=document.createElement("a"),r=this.data.borderWidth;n.style.borderWidth=r+"px";for(var i=this.data.color,o=[],a=0;3>a;++a)o[a]=Math.round(255*i[a]);n.style.borderColor=U.makeCssRgb(o),n.style.borderStyle="solid";var s=e[2]-e[0]-2*r,h=e[3]-e[1]-2*r;return n.style.width=s+"px",n.style.height=h+"px",n.href=this.data.url||"",n}}),t}();PDFJS.maxImageSize=void 0===PDFJS.maxImageSize?-1:PDFJS.maxImageSize,PDFJS.disableFontFace=void 0===PDFJS.disableFontFace?!1:PDFJS.disableFontFace,PDFJS.imageResourcesPath=void 0===PDFJS.imageResourcesPath?"":PDFJS.imageResourcesPath,PDFJS.disableWorker=void 0===PDFJS.disableWorker?!1:PDFJS.disableWorker,PDFJS.workerSrc=void 0===PDFJS.workerSrc?null:PDFJS.workerSrc,PDFJS.disableRange=void 0===PDFJS.disableRange?!1:PDFJS.disableRange,PDFJS.disableAutoFetch=void 0===PDFJS.disableAutoFetch?!1:PDFJS.disableAutoFetch,PDFJS.pdfBug=void 0===PDFJS.pdfBug?!1:PDFJS.pdfBug,PDFJS.postMessageTransfers=void 0===PDFJS.postMessageTransfers?!0:PDFJS.postMessageTransfers,PDFJS.getDocument=function(t,e,r,i){var o,s,h;"string"==typeof t?t={url:t}:b(t)?t={data:t}:"object"!=typeof t&&n("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"),t.url||t.data||n("Invalid parameter array, need either .data or .url");var u={};for(var c in t)"url"!==c||"undefined"==typeof window?u[c]=t[c]:u[c]=a(window.location.href,t[c]);return o=new PDFJS.Promise,s=new PDFJS.Promise,h=new mt(o,s,e,i),o.then(function(){h.passwordCallback=r,h.fetchDocument(u)}),s};var pt=function(){function t(t,e){this.pdfInfo=t,this.transport=e}return t.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},get embeddedFontsUsed(){return this.transport.embeddedFontsUsed},getPage:function(t){return this.transport.getPage(t)},getPageIndex:function(t){return this.transport.getPageIndex(t)},getDestinations:function(){return this.transport.getDestinations()},getJavaScript:function(){var t=new PDFJS.Promise,e=this.pdfInfo.javaScript;return t.resolve(e),t},getOutline:function(){var t=new PDFJS.Promise,e=this.pdfInfo.outline;return t.resolve(e),t},getMetadata:function(){var t=new PDFJS.Promise,e=this.pdfInfo.info,n=this.pdfInfo.metadata;return t.resolve({info:e,metadata:n?new PDFJS.Metadata(n):null}),t},isEncrypted:function(){var t=new PDFJS.Promise;return t.resolve(this.pdfInfo.encrypted),t},getData:function(){var t=new PDFJS.Promise;return this.transport.getData(t),t},dataLoaded:function(){return this.transport.dataLoaded()},cleanup:function(){this.transport.startCleanup()},destroy:function(){this.transport.destroy()}},t}(),gt=function(){function t(t,e){this.pageInfo=t,this.transport=e,this.stats=new z,this.stats.enabled=!!C.PDFJS.enableStats,this.commonObjs=e.commonObjs,this.objs=new vt,this.receivingOperatorList=!1,this.cleanupAfterRender=!1,this.pendingDestroy=!1,this.renderTasks=[]}return t.prototype={get pageNumber(){return this.pageInfo.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get view(){return this.pageInfo.view},getViewport:function(t,e){return arguments.length<2&&(e=this.rotate),new PDFJS.PageViewport(this.view,t,e,0,0)},getAnnotations:function(){if(this.annotationsPromise)return this.annotationsPromise;var t=new PDFJS.Promise;return this.annotationsPromise=t,this.transport.getAnnotations(this.pageInfo.pageIndex),t},render:function(t){function e(t){var e=o.renderTasks.indexOf(r);e>=0&&o.renderTasks.splice(e,1),o.cleanupAfterRender&&(o.pendingDestroy=!0),o._tryDestroy(),t?i.reject(t):i.resolve(),n.timeEnd("Rendering"),n.timeEnd("Overall")}var n=this.stats;n.time("Overall"),this.pendingDestroy=!1,this.displayReadyPromise||(this.receivingOperatorList=!0,this.displayReadyPromise=new j,this.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1}));var r=new bt(e,t,this.objs,this.commonObjs,this.operatorList,this.pageNumber);this.renderTasks.push(r);var i=new yt(r),o=this;return this.displayReadyPromise.then(function(t){return o.pendingDestroy?void e():(n.time("Rendering"),r.initalizeGraphics(t),void r.operatorListChanged())},function(t){e(t)}),i},getTextContent:function(){var t=new PDFJS.Promise;return this.transport.messageHandler.send("GetTextContent",{pageIndex:this.pageNumber-1},function(e){t.resolve(e)}),t},getOperationList:function(){var t=new PDFJS.Promise,e={dependencyFontsID:null,operatorList:null};return t.resolve(e),t},destroy:function(){this.pendingDestroy=!0,this._tryDestroy()},_tryDestroy:function(){this.pendingDestroy&&0===this.renderTasks.length&&!this.receivingOperatorList&&(delete this.operatorList,delete this.displayReadyPromise,this.objs.clear(),this.pendingDestroy=!1)},_startRenderPage:function(t){this.displayReadyPromise.resolve(t)},_renderPageChunk:function(t){for(var e=0,n=t.length;n>e;e++)this.operatorList.fnArray.push(t.fnArray[e]),this.operatorList.argsArray.push(t.argsArray[e]);this.operatorList.lastChunk=t.lastChunk;for(var e=0;es&&(o.cleanupAfterRender=!0);break;default:n("Got unknown object type "+i)}},this),t.on("DocProgress",function(t){this.progressCallback&&this.progressCallback({loaded:t.loaded,total:t.total})},this),t.on("DocError",function(t){this.workerReadyPromise.reject(t)},this),t.on("PageError",function(t){var e=this.pageCache[t.pageNum-1];e.displayReadyPromise?e.displayReadyPromise.reject(t.error):n(t.error)},this),t.on("JpegDecode",function(t,e){var r=t[0],i=t[1];3!=i&&1!=i&&n("Only 3 component or 1 component can be returned");var o=new Image;o.onload=function(){var t=o.width,n=o.height,r=t*n,a=4*r,s=new Uint8Array(r*i),h=x(t,n),u=h.getContext("2d");u.drawImage(o,0,0);var c=u.getImageData(0,0,t,n).data;if(3==i)for(var l=0,f=0;a>l;l+=4,f+=3)s[f]=c[l],s[f+1]=c[l+1],s[f+2]=c[l+2];else if(1==i)for(var l=0,f=0;a>l;l+=4,f++)s[f]=c[l];e.resolve({data:s,width:t,height:n})}.bind(this),o.src=r})},fetchDocument:function(t){t.disableAutoFetch=PDFJS.disableAutoFetch,t.chunkedViewerLoading=!!this.pdfDataRangeTransport,this.messageHandler.send("GetDocRequest",{source:t,disableRange:PDFJS.disableRange,maxImageSize:PDFJS.maxImageSize,disableFontFace:PDFJS.disableFontFace})},getData:function(t){this.messageHandler.send("GetData",null,function(e){t.resolve(e)})},dataLoaded:function(){var t=new PDFJS.Promise;return this.messageHandler.send("DataLoaded",null,function(e){t.resolve(e)}),t},getPage:function(t,e){var n=t-1;if(n in this.pagePromises)return this.pagePromises[n];var e=new PDFJS.Promise("Page "+t);return this.pagePromises[n]=e,this.messageHandler.send("GetPageRequest",{pageIndex:n}),e},getPageIndex:function(t){var e=new PDFJS.Promise;return this.messageHandler.send("GetPageIndex",{ref:t},function(t){e.resolve(t)}),e},getAnnotations:function(t){this.messageHandler.send("GetAnnotationsRequest",{pageIndex:t})},getDestinations:function(){var t=new PDFJS.Promise;return this.messageHandler.send("GetDestinations",null,function(e){t.resolve(e)}),t},startCleanup:function(){this.messageHandler.send("Cleanup",null,function(){for(var t=0,e=this.pageCache.length;e>t;t++){var n=this.pageCache[t];n&&n.destroy()}this.commonObjs.clear(),kt.clear()}.bind(this))}},r}(),vt=function(){function t(){this.objs={}}return t.prototype={ensureObj:function(t){if(this.objs[t])return this.objs[t];var e={promise:new j(t),data:null,resolved:!1};return this.objs[t]=e,e},get:function(t,e){if(e)return this.ensureObj(t).promise.then(e),null;var r=this.objs[t];return r&&r.resolved||n("Requesting object that isn't resolved yet "+t),r.data},resolve:function(t,e){var n=this.ensureObj(t);n.resolved=!0,n.data=e,n.promise.resolve(e)},isResolved:function(t){var e=this.objs;return e[t]?e[t].resolved:!1},hasData:function(t){return this.isResolved(t)},getData:function(t){var e=this.objs;return e[t]&&e[t].resolved?e[t].data:null},clear:function(){this.objs={}}},t}(),yt=function(){function t(t){this.internalRenderTask=t,j.call(this)}return t.prototype=Object.create(j.prototype),t.prototype.cancel=function(){this.internalRenderTask.cancel()},t}(),bt=function(){function t(t,e,n,r,i,o){this.callback=t,this.params=e,this.objs=n,this.commonObjs=r,this.operatorListIdx=null,this.operatorList=i,this.pageNumber=o,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1, this.cancelled=!1}return t.prototype={initalizeGraphics:function(t){if(!this.cancelled){PDFJS.pdfBug&&"StepperManager"in C&&C.StepperManager.enabled&&(this.stepper=C.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var e=this.params;this.gfx=new St(e.canvasContext,this.commonObjs,this.objs,e.textLayer,e.imageLayer),this.gfx.beginDrawing(e.viewport,t),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}},cancel:function(){this.running=!1,this.cancelled=!0,this.callback("cancelled")},operatorListChanged:function(){return this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),void(this.running||this._continue())):void(this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continue.bind(this)))},_continue:function(){this.running=!0,this.cancelled||(this.params.continueCallback?this.params.continueCallback(this._next.bind(this)):this._next())},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continue.bind(this),this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this.callback())))}},t}(),wt=(PDFJS.Metadata=function(){function t(t){return t.replace(/>\\376\\377([^<]+)/g,function(t,e){for(var n=e.replace(/\\([0-3])([0-7])([0-7])/g,function(t,e,n,r){return String.fromCharCode(64*e+8*n+1*r)}),r="",i=0;i"+r})}function e(e){if("string"==typeof e){e=t(e);var r=new DOMParser;e=r.parseFromString(e,"application/xml")}else e instanceof Document||n("Metadata: Invalid metadata object");this.metaDocument=e,this.metadata={},this.parse()}return e.prototype={parse:function(){var t=this.metaDocument,e=t.documentElement;if("rdf:rdf"!==e.nodeName.toLowerCase())for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName.toLowerCase();)e=e.nextSibling;var n=e?e.nodeName.toLowerCase():null;if(e&&"rdf:rdf"===n&&e.hasChildNodes()){var r,i,o,a,s,h,u,c=e.childNodes;for(a=0,h=c.length;h>a;a++)if(r=c[a],"rdf:description"===r.nodeName.toLowerCase())for(s=0,u=r.childNodes.length;u>s;s++)"#text"!==r.childNodes[s].nodeName.toLowerCase()&&(i=r.childNodes[s],o=i.nodeName.toLowerCase(),this.metadata[o]=i.textContent.trim())}},get:function(t){return this.metadata[t]||null},has:function(t){return"undefined"!=typeof this.metadata[t]}},e}(),16),_t=!0,At=function(){var t={};return{getCanvas:function(e,n,r,i){var o;if(e in t)o=t[e],o.canvas.width=n,o.canvas.height=r,o.context.setTransform(1,0,0,1,0,0);else{var a=x(n,r),s=a.getContext("2d");i&&S(s),t[e]=o={canvas:a,context:s}}return o},clear:function(){t={}}}}(),xt=function(){function t(t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=M,this.fontMatrix=T,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=L.FILL,this.textRise=0,this.fillColorSpace=N.singletons.gray,this.fillColorSpaceObj=null,this.strokeColorSpace=N.singletons.gray,this.strokeColorSpaceObj=null,this.fillColorObj=null,this.strokeColorObj=null,this.fillColor="#000000",this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.paintFormXObjectDepth=0,this.old=t}return t.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(t,e){this.x=t,this.y=e}},t}(),St=function(){function i(t,e,n,r,i){this.ctx=t,this.current=new xt,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=n,this.textLayer=r,this.imageLayer=i,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,t&&S(t)}function a(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData)return void t.putImageData(e,0,0);var n=t.createImageData(e.width,e.height),r=e.data,i=n.data;if("set"in i)i.set(r);else for(var o=0,a=i.length;a>o;o++)i[o]=r[o];t.putImageData(n,0,0)}function s(t,e){for(var n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],r=0,i=n.length;i>r;r++){var o=n[r];o in t&&(e[o]=t[o])}"setLineDash"in t?(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset):"mozDash"in t&&(e.mozDash=t.mozDash,e.mozDashOffset=t.mozDashOffset)}var h=15,u=["butt","round","square"],c=["miter","round","bevel"],l={},f={};i.prototype={beginDrawing:function(t,e){var n=this.ctx.canvas.width,r=this.ctx.canvas.height;e?this.ctx.clearRect(0,0,n,r):(this.ctx.mozOpaque=!0,this.ctx.save(),this.ctx.fillStyle="rgb(255, 255, 255)",this.ctx.fillRect(0,0,n,r),this.ctx.restore());var i=t.transform;this.baseTransform=i.slice(),this.ctx.save(),this.ctx.transform.apply(this.ctx,i),this.textLayer&&this.textLayer.beginLayout(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(t,e,n,r){var i=t.argsArray,o=t.fnArray,a=e||0,s=i.length;if(s==a)return a;for(var u,c=Date.now()+h,l=this.commonObjs,f=this.objs;;){if(r&&a===r.nextBreakPoint)return r.breakIt(a,n),a;if(u=o[a],u!==D.dependency)this[u].apply(this,i[a]);else for(var d=i[a],p=0,g=d.length;g>p;p++){var m=d[p],v="g_"==m.substring(0,2);if(!v&&!f.isResolved(m))return f.get(m,n),a;if(v&&!l.isResolved(m))return l.get(m,n),a}if(a++,a==s)return a;if(n&&Date.now()>c)return setTimeout(n,0),a}},endDrawing:function(){this.ctx.restore(),At.clear(),this.textLayer&&this.textLayer.endLayout(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(t){this.current.lineWidth=t,this.ctx.lineWidth=t},setLineCap:function(t){this.ctx.lineCap=u[t]},setLineJoin:function(t){this.ctx.lineJoin=c[t]},setMiterLimit:function(t){this.ctx.miterLimit=t},setDash:function(t,e){var n=this.ctx;"setLineDash"in n?(n.setLineDash(t),n.lineDashOffset=e):(n.mozDash=t,n.mozDashOffset=e)},setRenderingIntent:function(t){},setFlatness:function(t){},setGState:function(t){for(var n=0,r=t.length;r>n;n++){var i=t[n],o=i[0],a=i[1];switch(o){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=i[1];break;case"ca":this.current.fillAlpha=i[1],this.ctx.globalAlpha=i[1];break;case"BM":if(a&&a.name&&"Normal"!==a.name){var s=a.name.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()}).substring(1);this.ctx.globalCompositeOperation=s,this.ctx.globalCompositeOperation!==s&&e('globalCompositeOperation "'+s+'" is not supported')}else this.ctx.globalCompositeOperation="source-over"}}},save:function(){this.ctx.save();var t=this.current;this.stateStack.push(t),this.current=t.clone()},restore:function(){var t=this.stateStack.pop();t&&(this.current=t,this.ctx.restore())},transform:function(t,e,n,r,i,o){this.ctx.transform(t,e,n,r,i,o)},moveTo:function(t,e){this.ctx.moveTo(t,e),this.current.setCurrentPoint(t,e)},lineTo:function(t,e){this.ctx.lineTo(t,e),this.current.setCurrentPoint(t,e)},curveTo:function(t,e,n,r,i,o){this.ctx.bezierCurveTo(t,e,n,r,i,o),this.current.setCurrentPoint(i,o)},curveTo2:function(t,e,n,r){var i=this.current;this.ctx.bezierCurveTo(i.x,i.y,t,e,n,r),i.setCurrentPoint(n,r)},curveTo3:function(t,e,n,r){this.curveTo(t,e,n,r,n,r),this.current.setCurrentPoint(n,r)},closePath:function(){this.ctx.closePath()},rectangle:function(t,e,n,r){this.ctx.rect(t,e,n,r)},stroke:function(t){t="undefined"!=typeof t?t:!0;var e=this.ctx,n=this.current.strokeColor;0===this.current.lineWidth&&(e.lineWidth=this.getSinglePixelWidth()),e.globalAlpha=this.current.strokeAlpha,n&&n.hasOwnProperty("type")&&"Pattern"===n.type?(e.save(),e.strokeStyle=n.getPattern(e,this),e.stroke(),e.restore()):e.stroke(),t&&this.consumePath(),e.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(t){t="undefined"!=typeof t?t:!0;var e=this.ctx,n=this.current.fillColor,r=!1;if(n&&n.hasOwnProperty("type")&&"Pattern"===n.type&&(e.save(),e.fillStyle=n.getPattern(e,this),r=!0),this.pendingEOFill){if("mozFillRule"in this.ctx)this.ctx.mozFillRule="evenodd",this.ctx.fill(),this.ctx.mozFillRule="nonzero";else try{this.ctx.fill("evenodd")}catch(i){this.ctx.fill()}this.pendingEOFill=!1}else this.ctx.fill();r&&e.restore(),t&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=l},eoClip:function(){this.pendingClip=f},beginText:function(){this.current.textMatrix=M,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){if(!("pendingTextPaths"in this))return void this.ctx.beginPath();var t=this.pendingTextPaths,e=this.ctx;e.save(),e.beginPath();for(var n=0;nr?(r=-r,o.fontDirection=-1):o.fontDirection=1,this.current.font=i,this.current.fontSize=r,!i.coded){var a=i.loadedName||"sans-serif",s=i.black?i.bold?"bolder":"bold":i.bold?"bold":"normal",h=i.italic?"italic":"normal",u='"'+a+'", '+i.fallbackName,c=r>=wt?r:wt;this.current.fontSizeScale=c!=wt?1:r/wt;var l=h+" "+s+" "+c+"px "+u;this.ctx.font=l}},setTextRenderingMode:function(t){this.current.textRenderingMode=t},setTextRise:function(t){this.current.textRise=t},moveText:function(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e},setLeadingMoveText:function(t,e){this.setLeading(-e),this.moveText(t,e)},setTextMatrix:function(t,e,n,r,i,o){this.current.textMatrix=[t,e,n,r,i,o],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},applyTextTransforms:function(){var t=this.ctx,e=this.current;t.transform.apply(t,e.textMatrix),t.translate(e.x,e.y+e.textRise),e.fontDirection>0?t.scale(e.textHScale,-1):t.scale(-e.textHScale,1)},createTextGeometry:function(){var t={},e=this.ctx,n=this.current.font,r=e.mozCurrentTransform,i=r[0],o=r[1],a=r[2],s=r[3],h=r[4],u=r[5],c=i>=0?Math.sqrt(i*i+o*o):-Math.sqrt(i*i+o*o),l=s>=0?Math.sqrt(a*a+s*s):-Math.sqrt(a*a+s*s),f=Math.atan2(o,i),d=h,p=u;return t.x=d,t.y=p,t.hScale=c,t.vScale=l,t.angle=f,t.spaceWidth=n.spaceWidth,t.fontName=n.loadedName,t.fontFamily=n.fallbackName,t.fontSize=this.current.fontSize,t},paintChar:function(t,e,n){var r,i=this.ctx,o=this.current,a=o.font,s=o.fontSize/o.fontSizeScale,h=o.textRenderingMode,u=h&L.FILL_STROKE_MASK,c=!!(h&L.ADD_TO_PATH_FLAG);if((a.disableFontFace||c)&&(r=a.getPathGenerator(this.commonObjs,t)),a.disableFontFace?(i.save(),i.translate(e,n),i.beginPath(),r(i,s),(u===L.FILL||u===L.FILL_STROKE)&&i.fill(),(u===L.STROKE||u===L.FILL_STROKE)&&i.stroke(),i.restore()):((u===L.FILL||u===L.FILL_STROKE)&&i.fillText(t,e,n),(u===L.STROKE||u===L.FILL_STROKE)&&i.strokeText(t,e,n)),c){var l=this.pendingTextPaths||(this.pendingTextPaths=[]);l.push({transform:i.mozCurrentTransform,x:e,y:n,fontSize:s,addToPath:r})}},showText:function(t,e){var n,r=this.ctx,i=this.current,o=i.font,a=i.fontSize,s=i.fontSizeScale,h=i.charSpacing,u=i.wordSpacing,c=i.textHScale*i.fontDirection,l=i.fontMatrix||T,f=t.length,d=this.textLayer,p=d&&!e?!0:!1,g=0,m=o.vertical,v=o.defaultVMetrics;if(o.coded){r.save(),r.transform.apply(r,i.textMatrix),r.translate(i.x,i.y),r.scale(c,1),p&&(this.save(),r.scale(1,-1),n=this.createTextGeometry(),this.restore());for(var y=0;f>y;++y){var b=t[y];if(null!==b){this.processingType3=b,this.save(),r.scale(a,a),r.transform.apply(r,l),this.executeOperatorList(b.operatorList),this.restore();var w=U.applyTransform([b.width,0],l),_=(w[0]*a+h)*i.fontDirection;r.translate(_,0),i.x+=_*c,g+=_}else this.ctx.translate(u,0),i.x+=u*c}r.restore(),this.processingType3=null}else{r.save(),this.applyTextTransforms();var A=i.lineWidth,x=i.textMatrix[0],S=i.textMatrix[1],k=Math.sqrt(x*x+S*S);0===k||0===A?A=this.getSinglePixelWidth():A/=k,p&&(n=this.createTextGeometry()),1!=s&&(r.scale(s,s),A/=s),r.lineWidth=A;for(var C=0,y=0;f>y;++y){var b=t[y];if(null!==b){var I=!1,R=b.fontChar,E=b.vmetric||v;if(m){var P=b.vmetric?E[1]:.5*b.width;P=-P*a*i.fontMatrix[0];var L=E[2]*a*i.fontMatrix[0]}var D,F,O,B,_=E?-E[0]:b.width,M=_*a*i.fontMatrix[0]+h*i.fontDirection,W=b.accent;if(!b.disabled){if(m?(D=P/s,F=(C+L)/s):(D=C/s,F=0),o.remeasure&&_>0){var j=1e3*r.measureText(R).width/i.fontSize*i.fontSizeScale,z=_/j;I=!0,r.save(),r.scale(z,1),D/=z,W&&(O/=z)}this.paintChar(R,D,F),W&&(O=D+W.offset.x/s,B=F-W.offset.y/s,this.paintChar(W.fontChar,O,B))}C+=M,g+=M,I&&r.restore()}else C+=i.fontDirection*u}m?i.y-=C*c:i.x+=C*c,r.restore()}if(p){if(n.canvasWidth=g,m){var N=Math.PI/2;n.angle+=N}this.textLayer.appendText(n)}return g},showSpacedText:function(t){var e,n=this.ctx,r=this.current,i=r.font,o=r.fontSize,a=.001*r.textHScale*r.fontDirection,s=t.length,h=this.textLayer,u=0,c=h?!0:!1,l=i.vertical,f=0;c&&(n.save(),this.applyTextTransforms(),e=this.createTextGeometry(),n.restore());for(var p=0;s>p;++p){var g=t[p];if(d(g)){var m=-g*o*a;l?r.y+=m:r.x+=m,c&&(f+=m)}else{var v=this.showText(g,!0);c&&(u+=f+v,f=0)}}if(c){if(e.canvasWidth=u,l){var y=Math.PI/2;e.angle+=y}this.textLayer.appendText(e)}},nextLineShowText:function(t){this.nextLine(),this.showText(t)},nextLineSetSpacingShowText:function(t,e,n){this.setWordSpacing(t),this.setCharSpacing(e),this.nextLineShowText(n)},setCharWidth:function(t,e){},setCharWidthAndBounds:function(t,e,n,r,i,o){this.rectangle(n,r,i-n,o-r),this.clip(),this.endPath()},setStrokeColorSpace:function(t){this.current.strokeColorSpace=N.fromIR(t)},setFillColorSpace:function(t){this.current.fillColorSpace=N.fromIR(t)},setStrokeColor:function(){var t=this.current.strokeColorSpace,e=t.getRgb(arguments,0),n=U.makeCssRgb(e);this.ctx.strokeStyle=n,this.current.strokeColor=n},getColorN_Pattern:function(t,e){if("TilingPattern"==t[0]){var r,i=t[1],o=e.base;if(o){o.numComps;r=o.getRgb(i,0)}var a=new tt(t,r,this.ctx,this.objs,this.commonObjs,this.baseTransform)}else if("RadialAxial"==t[0]||"Dummy"==t[0])var a=Q.shadingFromIR(t);else n("Unkown IR type "+t[0]);return a},setStrokeColorN:function(){var t=this.current.strokeColorSpace;"Pattern"==t.name?this.current.strokeColor=this.getColorN_Pattern(arguments,t):this.setStrokeColor.apply(this,arguments)},setFillColor:function(){var t=this.current.fillColorSpace,e=t.getRgb(arguments,0),n=U.makeCssRgb(e);this.ctx.fillStyle=n,this.current.fillColor=n},setFillColorN:function(){var t=this.current.fillColorSpace;"Pattern"==t.name?this.current.fillColor=this.getColorN_Pattern(arguments,t):this.setFillColor.apply(this,arguments)},setStrokeGray:function(t){this.current.strokeColorSpace=N.singletons.gray;var e=this.current.strokeColorSpace.getRgb(arguments,0),n=U.makeCssRgb(e);this.ctx.strokeStyle=n,this.current.strokeColor=n},setFillGray:function(t){this.current.fillColorSpace=N.singletons.gray;var e=this.current.fillColorSpace.getRgb(arguments,0),n=U.makeCssRgb(e);this.ctx.fillStyle=n,this.current.fillColor=n},setStrokeRGBColor:function(t,e,n){this.current.strokeColorSpace=N.singletons.rgb;var r=this.current.strokeColorSpace.getRgb(arguments,0),i=U.makeCssRgb(r);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillRGBColor:function(t,e,n){this.current.fillColorSpace=N.singletons.rgb;var r=this.current.fillColorSpace.getRgb(arguments,0),i=U.makeCssRgb(r);this.ctx.fillStyle=i,this.current.fillColor=i},setStrokeCMYKColor:function(t,e,n,r){this.current.strokeColorSpace=N.singletons.cmyk;var i=U.makeCssCmyk(arguments);this.ctx.strokeStyle=i,this.current.strokeColor=i},setFillCMYKColor:function(t,e,n,r){this.current.fillColorSpace=N.singletons.cmyk;var i=U.makeCssCmyk(arguments);this.ctx.fillStyle=i,this.current.fillColor=i},shadingFill:function(t){var e=this.ctx;this.save();var n=Q.shadingFromIR(t);e.fillStyle=n.getPattern(e,this);var r=e.mozCurrentTransformInverse;if(r){var i=e.canvas,o=i.width,a=i.height,s=U.applyTransform([0,0],r),h=U.applyTransform([0,a],r),u=U.applyTransform([o,0],r),c=U.applyTransform([o,a],r),l=Math.min(s[0],h[0],u[0],c[0]),f=Math.min(s[1],h[1],u[1],c[1]),d=Math.max(s[0],h[0],u[0],c[0]),p=Math.max(s[1],h[1],u[1],c[1]);this.ctx.fillRect(l,f,d-l,p-f)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){n("Should not call beginInlineImage")},beginImageData:function(){n("Should not call beginImageData")},paintFormXObjectBegin:function(t,e){if(this.save(),this.current.paintFormXObjectDepth++,this.baseTransformStack.push(this.baseTransform),t&&v(t)&&6==t.length&&this.transform.apply(this,t),this.baseTransform=this.ctx.mozCurrentTransform,e&&v(e)&&4==e.length){var n=e[2]-e[0],r=e[3]-e[1];this.rectangle(e[0],e[1],n,r),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){var t=this.current.paintFormXObjectDepth;do this.restore();while(this.current.paintFormXObjectDepth>=t);this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var n=this.ctx;e.isolated||t("TODO: Support non-isolated groups."),e.knockout&&r("Support knockout groups.");var i=n.mozCurrentTransform;e.matrix&&n.transform.apply(n,e.matrix),o(e.bbox,"Bounding box is required.");var a=U.getAxialAlignedBoundingBox(e.bbox,n.mozCurrentTransform),h=[0,0,n.canvas.width,n.canvas.height];a=U.intersect(a,h)||[0,0,0,0];var u=Math.max(Math.ceil(a[2]-a[0]),1),c=Math.max(Math.ceil(a[3]-a[1]),1),l=At.getCanvas("groupAt"+this.groupLevel,u,c,!0),f=l.context,d=a[0],p=a[1];f.translate(-d,-p),f.transform.apply(f,i),n.setTransform(1,0,0,1,0,0),n.translate(d,p),s(n,f),this.ctx=f,this.setGState([["SMask","None"],["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(n),this.groupLevel++},endGroup:function(t){this.groupLevel--;var e=this.ctx;this.ctx=this.groupStack.pop(),"imageSmoothingEnabled"in this.ctx?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,this.ctx.drawImage(e.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.current=new xt},endAnnotations:function(){this.restore()},beginAnnotation:function(t,e,n){if(this.save(),t&&v(t)&&4==t.length){var r=t[2]-t[0],i=t[3]-t[1];this.rectangle(t[0],t[1],r,i),this.clip(),this.endPath()}this.transform.apply(this,e),this.transform.apply(this,n)},endAnnotation:function(){this.restore()},paintJpegXObject:function(t,e,r){var i=this.objs.get(t);i||n("Dependent image isn't ready yet"),this.save();var o=this.ctx;if(o.scale(1/e,-1/r),o.drawImage(i,0,0,i.width,i.height,0,-r,e,r),this.imageLayer){var a=o.mozCurrentTransformInverse,s=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:t,left:s[0],top:s[1],width:e/a[0],height:r/a[3]})}this.restore()},paintImageMaskXObject:function(t){var e=this.ctx,n=t.width,r=t.height,i=this.processingType3;if(_t&&i&&!("compiled"in i)){var o=1e3;o>=n&&o>=r?i.compiled=k({data:t.data,width:n,height:r}):i.compiled=null}if(i&&i.compiled)return void i.compiled(e);var s=At.getCanvas("maskCanvas",n,r),h=s.context;h.save(),a(h,t),h.globalCompositeOperation="source-in";var u=this.current.fillColor;h.fillStyle=u&&u.hasOwnProperty("type")&&"Pattern"===u.type?u.getPattern(h,this):u,h.fillRect(0,0,n,r),h.restore(),this.paintInlineImageXObject(s.canvas)},paintImageMaskXObjectGroup:function(t){for(var e=this.ctx,n=0,r=t.length;r>n;n++){var i=t[n],o=i.width,s=i.height,h=At.getCanvas("maskCanvas",o,s),u=h.context;u.save(),a(u,i),u.globalCompositeOperation="source-in";var c=this.current.fillColor;u.fillStyle=c&&c.hasOwnProperty("type")&&"Pattern"===c.type?c.getPattern(u,this):c,u.fillRect(0,0,o,s),u.restore(),e.save(),e.transform.apply(e,i.transform),e.scale(1,-1),e.drawImage(h.canvas,0,0,o,s,0,-1,1,1),e.restore()}},paintImageXObject:function(t){var e=this.objs.get(t);e||n("Dependent image isn't ready yet"),this.paintInlineImageXObject(e)},paintInlineImageXObject:function(t){var e=t.width,n=t.height,r=this.ctx;this.save(),r.scale(1/e,-1/n);var i,o=r.mozCurrentTransformInverse,s=o[0],h=o[1],u=Math.max(Math.sqrt(s*s+h*h),1),c=o[2],l=o[3],f=Math.max(Math.sqrt(c*c+l*l),1);if(t instanceof HTMLElement||!t.data)i=t;else{var d=At.getCanvas("inlineImage",e,n),p=d.context;a(p,t),i=d.canvas}for(var g=e,m=n,v="prescale1";u>2&&g>1||f>2&&m>1;){var y=g,b=m;u>2&&g>1&&(y=Math.ceil(g/2),u/=g/y),f>2&&m>1&&(b=Math.ceil(m/2),f/=m/b);var d=At.getCanvas(v,y,b);p=d.context,p.clearRect(0,0,y,b),p.drawImage(i,0,0,g,m,0,0,y,b),i=d.canvas,g=y,m=b,v="prescale1"===v?"prescale2":"prescale1"}if(r.drawImage(i,0,0,g,m,0,-n,e,n),this.imageLayer){var w=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:t,left:w[0],top:w[1],width:e/o[0],height:n/o[3]})}this.restore()},paintInlineImageXObjectGroup:function(t,e){var n=this.ctx,r=t.width,i=t.height,o=At.getCanvas("inlineImage",r,i),s=o.context;a(s,t);for(var h=0,u=e.length;u>h;h++){var c=e[h];if(n.save(),n.transform.apply(n,c.transform),n.scale(1,-1),n.drawImage(o.canvas,c.x,c.y,c.w,c.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(c.x,c.y);this.imageLayer.appendImage({imgData:t,left:l[0],top:l[1],width:r,height:i})}n.restore()}},markPoint:function(t){},markPointProps:function(t,e){},beginMarkedContent:function(t){},beginMarkedContentProps:function(t,e){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){if(this.pendingClip){if(this.pendingClip==f)if("mozFillRule"in this.ctx)this.ctx.mozFillRule="evenodd",this.ctx.clip(),this.ctx.mozFillRule="nonzero";else try{this.ctx.clip("evenodd")}catch(t){this.ctx.clip()}else this.ctx.clip();this.pendingClip=null}this.ctx.beginPath()},getSinglePixelWidth:function(t){var e=this.ctx.mozCurrentTransformInverse;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1],e[2]*e[2]+e[3]*e[3]))},getCanvasPosition:function(t,e){var n=this.ctx.mozCurrentTransform;return[n[0]*t+n[2]*e+n[4],n[1]*t+n[3]*e+n[5]]}};for(var p in D)i.prototype[D[p]]=i.prototype[p];return i}();PDFJS.disableFontFace=!1;var kt={insertRule:function(t){var e=document.getElementById("PDFJS_FONT_STYLE_TAG");e||(e=document.createElement("style"),e.id="PDFJS_FONT_STYLE_TAG",document.documentElement.getElementsByTagName("head")[0].appendChild(e));var n=e.sheet;n.insertRule(t,n.cssRules.length)},clear:function(){var t=document.getElementById("PDFJS_FONT_STYLE_TAG");t&&t.parentNode.removeChild(t)},get loadTestFont(){return h(this,"loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))},loadTestFontId:0,loadingContext:{requests:[],nextRequestId:0},isSyncFontLoadingSupported:function(){if(I)return!1;var t=window.navigator.userAgent,e=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(t);return e&&e[1]>=14?!0:!1}(),bind:function(t,e){o(!I,"bind() shall be called from main thread");for(var n=[],r=[],i=0,a=t.length;a>i;i++){var s=t[i];if(!s.attached&&s.loading!==!1){s.attached=!0;var h=s.bindDOM();h&&(n.push(h),r.push(s))}}var u=kt.queueLoadingCallback(e);n.length>0&&!this.isSyncFontLoadingSupported?kt.prepareFontLoadEvent(n,r,u):u.complete()},queueLoadingCallback:function(t){function e(){for(o(!i.end,"completeRequest() cannot be called twice"),i.end=Date.now();n.requests.length>0&&n.requests[0].end;){var t=n.requests.shift();setTimeout(t.callback,0)}}var n=kt.loadingContext,r="pdfjs-font-loading-"+n.nextRequestId++,i={id:r,complete:e,callback:t,started:Date.now()};return n.requests.push(i),i},prepareFontLoadEvent:function(t,n,r){function i(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function o(t){return String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)}function a(t,e,n,r){var i=p.substr(0,e),o=p.substr(e+n);return i+r+o}function s(t,n){if(f++,f>30)return e("Load test font never loaded."),void n();l.font="30px "+t,l.fillText(".",0,20);var r=l.getImageData(0,0,1,1);return r.data[3]>0?void n():void setTimeout(s.bind(null,t,n))}var h,u,c=document.createElement("canvas");c.width=1,c.height=1;var l=c.getContext("2d"),f=0,d="lt"+Date.now()+this.loadTestFontId++,p=this.loadTestFont,g=976;p=a(p,g,d.length,d);var m=16,v=1482184792,y=i(p,m);for(h=0,u=d.length-3;u>h;h+=4)y=y-v+i(d,h)|0;hh;h++)_.push(n[h].loadedName);_.push(d);var A=document.createElement("div");for(A.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),h=0,u=_.length;u>h;++h){var x=document.createElement("span");x.textContent="Hi",x.style.fontFamily=_[h],A.appendChild(x)}document.body.appendChild(A),s(d,function(){document.body.removeChild(A),r.complete()})}},Ct=function(){function t(t,e,n){if(this.compiledGlyphs={},1!==arguments.length);else{var r=arguments[0];for(var i in r)this[i]=r[i]}}return t.prototype={bindDOM:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var t=u(this.data),e=this.loadedName,n="url(data:"+this.mimetype+";base64,"+window.btoa(t)+");",r='@font-face { font-family:"'+e+'";src:'+n+"}";return kt.insertRule(r),PDFJS.pdfBug&&"FontInspector"in C&&C.FontInspector.enabled&&C.FontInspector.fontAdded(this,n),r},getPathGenerator:function(t,e){if(!(e in this.compiledGlyphs)){var n=t.get(this.loadedName+"_path_"+e);this.compiledGlyphs[e]=new Function("c","size",n)}return this.compiledGlyphs[e]}},t}()}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var t=document.body||document.getElementsByTagName("head")[0],e=t.lastChild.src;return e&&e.replace(/\.js$/i,".worker.js")}()),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),function(){function t(t,e){return new n(this.slice(t,e))}function e(t,e){arguments.length<2&&(e=0);for(var n=0,r=t.length;r>n;++n,++e)this[e]=255&t[n]}function n(n){var r,i,o;if("number"==typeof n)for(r=[],i=0;n>i;++i)r[i]=0;else if("slice"in n)r=n.slice(0);else for(r=[],i=0,o=n.length;o>i;++i)r[i]=n[i];return r.subarray=t,r.buffer=r,r.byteLength=r.length,r.set=e,"object"==typeof n&&n.buffer&&(r.buffer=n.buffer),r}return"undefined"!=typeof Uint8Array?("undefined"==typeof Uint8Array.prototype.subarray&&(Uint8Array.prototype.subarray=function(t,e){return new Uint8Array(this.slice(t,e))},Float32Array.prototype.subarray=function(t,e){return new Float32Array(this.slice(t,e))}),void("undefined"==typeof Float64Array&&(window.Float64Array=Float32Array))):(window.Uint8Array=n,window.Int8Array=n,window.Uint32Array=n,window.Int32Array=n,window.Uint16Array=n,window.Float32Array=n,void(window.Float64Array=n))}(),function(){window.URL||(window.URL=window.webkitURL)}(),function(){if("undefined"!=typeof Object.defineProperty){var t=!0;try{Object.defineProperty(new Image,"id",{value:"test"});var e=function(){};e.prototype={get id(){}},Object.defineProperty(new e,"id",{value:"",configurable:!0,enumerable:!0,writable:!1})}catch(n){t=!1}if(t)return}Object.defineProperty=function(t,e,n){delete t[e],"get"in n&&t.__defineGetter__(e,n.get),"set"in n&&t.__defineSetter__(e,n.set),"value"in n&&(t.__defineSetter__(e,function(t){return this.__defineGetter__(e,function(){return t}),t}),t[e]=n.value)}}(),function(){var t=XMLHttpRequest.prototype,e=new XMLHttpRequest;return"overrideMimeType"in e||Object.defineProperty(t,"overrideMimeType",{value:function(t){}}),"responseType"in e?void 0:(PDFJS.disableWorker=!0,Object.defineProperty(t,"responseType",{get:function(){return this._responseType||"text"},set:function(t){("text"===t||"arraybuffer"===t)&&(this._responseType=t,"arraybuffer"===t&&"function"==typeof this.overrideMimeType&&this.overrideMimeType("text/plain; charset=x-user-defined"))}}),"undefined"!=typeof VBArray?void Object.defineProperty(t,"response",{get:function(){return"arraybuffer"===this.responseType?new Uint8Array(new VBArray(this.responseBody).toArray()):this.responseText}}):void Object.defineProperty(t,"response",{get:function(){if("arraybuffer"!==this.responseType)return this.responseText;var t,e=this.responseText,n=e.length,r=new Uint8Array(n);for(t=0;n>t;++t)r[t]=255&e.charCodeAt(t);return r.buffer}}))}(),function(){if(!("btoa"in window)){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";window.btoa=function(e){var n,r,i="";for(n=0,r=e.length;r>n;n+=3){var o=255&e.charCodeAt(n),a=255&e.charCodeAt(n+1),s=255&e.charCodeAt(n+2),h=o>>2,u=(3&o)<<4|a>>4,c=r>n+1?(15&a)<<2|s>>6:64,l=r>n+2?63&s:64;i+=t.charAt(h)+t.charAt(u)+t.charAt(c)+t.charAt(l)}return i}}}(),function(){if(!("atob"in window)){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";window.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4===1)throw new Error("bad atob input");for(var n,r,i=0,o=0,a="";r=e.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)r=t.indexOf(r);return a}}}(),function(){"undefined"==typeof Function.prototype.bind&&(Function.prototype.bind=function(t){var e=this,n=Array.prototype.slice.call(arguments,1),r=function(){var r=n.concat(Array.prototype.slice.call(arguments));return e.apply(t,r)};return r})}(),function(){var t=document.createElement("div");"dataset"in t||Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)return this._dataset;for(var t={},e=0,n=this.attributes.length;n>e;e++){var r=this.attributes[e];if("data-"===r.name.substring(0,5)){var i=r.name.substring(5).replace(/\-([a-z])/g,function(t,e){return e.toUpperCase()});t[i]=r.value}}return Object.defineProperty(this,"_dataset",{ value:t,writable:!1,enumerable:!1}),t},enumerable:!0})}(),function(){function t(t,e,n,r){var i=t.className||"",o=i.split(/\s+/g);""===o[0]&&o.shift();var a=o.indexOf(e);return 0>a&&n&&o.push(e),a>=0&&r&&o.splice(a,1),t.className=o.join(" "),a>=0}var e=document.createElement("div");if(!("classList"in e)){var n={add:function(e){t(this.element,e,!0,!1)},contains:function(e){return t(this.element,e,!1,!1)},remove:function(e){t(this.element,e,!1,!0)},toggle:function(e){t(this.element,e,!0,!0)}};Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){if(this._classList)return this._classList;var t=Object.create(n,{element:{value:this,writable:!1,enumerable:!0}});return Object.defineProperty(this,"_classList",{value:t,writable:!1,enumerable:!1}),t},enumerable:!0})}}(),function(){"console"in window?"bind"in console.log||(console.log=function(t){return function(e){return t(e)}}(console.log),console.error=function(t){return function(e){return t(e)}}(console.error),console.warn=function(t){return function(e){return t(e)}}(console.warn)):window.console={log:function(){},error:function(){},warn:function(){}}}(),function(){function t(t){e(t.target)&&t.stopPropagation()}function e(t){return t.disabled||t.parentNode&&e(t.parentNode)}-1!==navigator.userAgent.indexOf("Opera")&&document.addEventListener("click",t,!0)}(),function(){navigator.userAgent.indexOf("Trident")>=0&&(PDFJS.disableCreateObjectURL=!0)}(),function(){"language"in navigator||(PDFJS.locale=navigator.userLanguage||"en-US")}(),function(){var t=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,e=/Android\s[0-2][^\d]/,n=e.test(navigator.userAgent),r=/Chrome\/(39|40)\./.test(navigator.userAgent);(t||n||r)&&(PDFJS.disableRange=!0,PDFJS.disableStream=!0)}(),function(){(!history.pushState||navigator.userAgent.indexOf("Android 2.")>=0)&&(PDFJS.disableHistory=!0)}(),function(){if(window.CanvasPixelArray)"function"!=typeof window.CanvasPixelArray.prototype.set&&(window.CanvasPixelArray.prototype.set=function(t){for(var e=0,n=this.length;n>e;e++)this[e]=t[e]});else{var t,e=!1;if(navigator.userAgent.indexOf("Chrom")>=0?(t=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),e=t&&parseInt(t[2])<21):navigator.userAgent.indexOf("Android")>=0?e=/Android\s[0-4][^\d]/g.test(navigator.userAgent):navigator.userAgent.indexOf("Safari")>=0&&(t=navigator.userAgent.match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//),e=t&&parseInt(t[1])<6),e){var n=window.CanvasRenderingContext2D.prototype,r=n.createImageData;n.createImageData=function(t,e){var n=r.call(this,t,e);return n.data.set=function(t){for(var e=0,n=this.length;n>e;e++)this[e]=t[e]},n},n=null}}}(),function(){function t(t){window.setTimeout(t,20)}var e=/(iPad|iPhone|iPod)/g.test(navigator.userAgent);return e?void(window.requestAnimationFrame=t):void("requestAnimationFrame"in window||(window.requestAnimationFrame=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t))}(),function(){var t=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),e=/Android/g.test(navigator.userAgent);(t||e)&&(PDFJS.maxCanvasPixels=5242880)}(),function(){var t=navigator.userAgent.indexOf("Trident")>=0&&window.parent!==window;t&&(PDFJS.disableFullscreen=!0)}(),function(){"currentScript"in document||Object.defineProperty(document,"currentScript",{get:function(){var t=document.getElementsByTagName("script");return t[t.length-1]},enumerable:!0,configurable:!0})}(),!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(e){t.exports=e.pdfMake=n(1)}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t,e,n){this.docDefinition=t,this.fonts=e||s,this.vfs=n}var i=n(6),o=n(105),a=o.saveAs,s={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};r.prototype._createDoc=function(t,n){var r=new i(this.fonts);r.fs.bindFS(this.vfs);var o,a=r.createPdfKitDocument(this.docDefinition,t),s=[];a.on("data",function(t){s.push(t)}),a.on("end",function(){o=e.concat(s),n(o,a._pdfMakePages)}),a.end()},r.prototype._getPages=function(t,e){if(!e)throw"getBuffer is an async method and needs a callback argument";this._createDoc(t,function(t,n){e(n)})},r.prototype.open=function(t){var e=window.open("","_blank");try{this.getDataUrl(function(t){e.location.href=t})}catch(n){throw e.close(),n}},r.prototype.print=function(){this.getDataUrl(function(t){var e=document.createElement("iframe");e.style.position="absolute",e.style.left="-99999px",e.src=t,e.onload=function(){function t(){document.body.removeChild(e),document.removeEventListener("click",t)}document.addEventListener("click",t,!1)},document.body.appendChild(e)},{autoPrint:!0})},r.prototype.download=function(t,e){"function"==typeof t&&(e=t,t=null),t=t||"file.pdf",this.getBuffer(function(n){var r;try{r=new Blob([n],{type:"application/pdf"})}catch(i){if("InvalidStateError"==i.name){var o=new Uint8Array(n);r=new Blob([o.buffer],{type:"application/pdf"})}}if(!r)throw"Could not generate blob";a(r,t),"function"==typeof e&&e()})},r.prototype.getBase64=function(t,e){if(!t)throw"getBase64 is an async method and needs a callback argument";this._createDoc(e,function(e){t(e.toString("base64"))})},r.prototype.getDataUrl=function(t,e){if(!t)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(e,function(e){t("data:application/pdf;base64,"+e.toString("base64"))})},r.prototype.getBuffer=function(t,e){if(!t)throw"getBuffer is an async method and needs a callback argument";this._createDoc(e,function(e){t(e)})},t.exports={createPdf:function(t){return new r(t,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(e,n(2).Buffer)},function(t,e,n){(function(t,r){function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(this.length=0,this.parent=void 0,"number"==typeof e?a(this,e):"string"==typeof e?s(this,e,arguments.length>1?arguments[1]:"utf8"):h(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function a(e,n){if(e=g(e,0>n?0:0|m(n)),!t.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)e[r]=0;return e}function s(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|y(e,n);return t=g(t,r),t.write(e,n),t}function h(e,n){if(t.isBuffer(n))return u(e,n);if(V(n))return c(e,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return l(e,n);if(n instanceof ArrayBuffer)return f(e,n)}return n.length?d(e,n):p(e,n)}function u(t,e){var n=0|m(e.length);return t=g(t,n),e.copy(t,0,0,n),t}function c(t,e){var n=0|m(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function l(t,e){var n=0|m(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function f(e,n){return t.TYPED_ARRAY_SUPPORT?(n.byteLength,e=t._augment(new Uint8Array(n))):e=l(e,new Uint8Array(n)),e}function d(t,e){var n=0|m(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function p(t,e){var n,r=0;"Buffer"===e.type&&V(e.data)&&(n=e.data,r=0|m(n.length)),t=g(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function g(e,n){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(n)),e.__proto__=t.prototype):(e.length=n,e._isBuffer=!0);var r=0!==n&&n<=t.poolSize>>>1;return r&&(e.parent=K),e}function m(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function v(e,n){if(!(this instanceof v))return new v(e,n);var r=new t(e,n);return delete r.parent,r}function y(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return H(t).length;e=(""+e).toLowerCase(),r=!0}}function b(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return E(this,e,n);case"binary":return P(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function w(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[n+a]=s}return a}function _(t,e,n,r){return J(H(e,t.length-n),t,n,r)}function A(t,e,n,r){return J(G(e),t,n,r)}function x(t,e,n,r){return A(t,e,n,r)}function S(t,e,n,r){return J(Y(e),t,n,r)}function k(t,e,n,r){return J(Z(e,t.length-n),t,n,r)}function C(t,e,n){return 0===e&&n===t.length?q.fromByteArray(t):q.fromByteArray(t.slice(e,n))}function I(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;n>i;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var h,u,c,l;switch(s){case 1:128>o&&(a=o);break;case 2:h=t[i+1],128===(192&h)&&(l=(31&o)<<6|63&h,l>127&&(a=l));break;case 3:h=t[i+1],u=t[i+2],128===(192&h)&&128===(192&u)&&(l=(15&o)<<12|(63&h)<<6|63&u,l>2047&&(55296>l||l>57343)&&(a=l));break;case 4:h=t[i+1],u=t[i+2],c=t[i+3],128===(192&h)&&128===(192&u)&&128===(192&c)&&(l=(15&o)<<18|(63&h)<<12|(63&u)<<6|63&c,l>65535&&1114112>l&&(a=l))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return R(r)}function R(t){var e=t.length;if(Q>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function P(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=e;n>o;o++)i+=N(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;ot)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function F(e,n,r,i,o,a){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(n>o||a>n)throw new RangeError("value is out of bounds");if(r+i>e.length)throw new RangeError("index out of range")}function O(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);o>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);o>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function M(t,e,n,r,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function U(t,e,n,r,i){return i||M(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function W(t,e,n,r,i){return i||M(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function j(t){if(t=z(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function N(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((e-=1)<0)break;o.push(n)}else if(2048>n){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function Y(t){return q.toByteArray(j(t))}function J(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}var q=n(3),X=n(4),V=n(5);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var K={};t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array),t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,a=Math.min(r,i);a>o&&e[o]===n[o];)++o;return o!==a&&(r=e[o],i=n[o]),i>r?-1:r>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,n){if(!V(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var r;if(void 0===n)for(n=0,r=0;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,n){function r(t,e,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,n);if(t.isBuffer(e))return r(this,e,n);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,n):r(this,[e],n);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return this.readUInt8(t)},t.prototype.set=function(t,e){return this.writeUInt8(t,e)},t.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return A(this,t,e,n);case"binary":return x(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),e>n&&(n=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,n));else{var o=n-e;i=new t(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||F(this,t,e,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):O(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):O(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):B(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):B(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);F(this,t,e,n,i-1,-i)}var o=0,a=1,s=0>t?1:0;for(this[e]=255&t;++o>0)-s&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);F(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=(t/a>>0)-s&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):O(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):O(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):B(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n=0|n,r||F(this,e,n,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):B(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return W(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return W(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-nr&&i>n)for(o=a-1;o>=0;o--)e[o+n]=this[o+r];else if(1e3>a||!t.TYPED_ARRAY_SUPPORT)for(o=0;a>o;o++)e[o+n]=this[o+r];else e._set(this.subarray(r,r+a),n);return a},t.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=H(t.toString()),o=i.length;for(r=e;n>r;r++)this[r]=i[r%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),n=0,r=e.length;r>n;n+=1)e[n]=this[n];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=$.get,e.set=$.set,e.write=$.write,e.toString=$.toString,e.toLocaleString=$.toString,e.toJSON=$.toJSON,e.equals=$.equals,e.compare=$.compare,e.indexOf=$.indexOf,e.copy=$.copy,e.slice=$.slice,e.readUIntLE=$.readUIntLE,e.readUIntBE=$.readUIntBE,e.readUInt8=$.readUInt8,e.readUInt16LE=$.readUInt16LE,e.readUInt16BE=$.readUInt16BE,e.readUInt32LE=$.readUInt32LE,e.readUInt32BE=$.readUInt32BE,e.readIntLE=$.readIntLE,e.readIntBE=$.readIntBE,e.readInt8=$.readInt8,e.readInt16LE=$.readInt16LE,e.readInt16BE=$.readInt16BE,e.readInt32LE=$.readInt32LE,e.readInt32BE=$.readInt32BE,e.readFloatLE=$.readFloatLE,e.readFloatBE=$.readFloatBE,e.readDoubleLE=$.readDoubleLE,e.readDoubleBE=$.readDoubleBE,e.writeUInt8=$.writeUInt8,e.writeUIntLE=$.writeUIntLE,e.writeUIntBE=$.writeUIntBE,e.writeUInt16LE=$.writeUInt16LE,e.writeUInt16BE=$.writeUInt16BE,e.writeUInt32LE=$.writeUInt32LE,e.writeUInt32BE=$.writeUInt32BE,e.writeIntLE=$.writeIntLE,e.writeIntBE=$.writeIntBE,e.writeInt8=$.writeInt8,e.writeInt16LE=$.writeInt16LE,e.writeInt16BE=$.writeInt16BE,e.writeInt32LE=$.writeInt32LE,e.writeInt32BE=$.writeInt32BE,e.writeFloatLE=$.writeFloatLE,e.writeFloatBE=$.writeFloatBE,e.writeDoubleLE=$.writeDoubleLE,e.writeDoubleBE=$.writeDoubleBE,e.fill=$.fill,e.inspect=$.inspect,e.toArrayBuffer=$.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(2).Buffer,function(){return this}())},function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a||e===l?62:e===s||e===f?63:h>e?-1:h+10>e?e-h+26+26:c+26>e?e-c:u+26>e?e-u+26:void 0}function n(t){function n(t){u[l++]=t}var r,i,a,s,h,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=t.length;h="="===t.charAt(c-2)?2:"="===t.charAt(c-1)?1:0,u=new o(3*t.length/4-h),a=h>0?t.length-4:t.length;var l=0;for(r=0,i=0;a>r;r+=4,i+=3)s=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===h?(s=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&s)):1===h&&(s=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function i(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,a,s=t.length%3,h="";for(i=0,a=t.length-s;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],h+=n(o);switch(s){case 1:o=t[t.length-1],h+=e(o>>2),h+=e(o<<4&63),h+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],h+=e(o>>10),h+=e(o>>4&63),h+=e(o<<2&63),h+="="}return h}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),h="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),l="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,h=(1<>1,c=-7,l=n?i-1:0,f=n?-1:1,d=t[e+l];for(l+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+l],l+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+l],l+=f,c-=8);if(0===o)o=1-u;else{if(o===h)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,h,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),e+=a+l>=1?f/h:f*Math.pow(2,1-l),e*h>=2&&(a++,h/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*h-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[n+d]=255&a,d+=p,a/=256,u-=8);t[n+d-p]|=128*g}},function(t,e){var n=Array.isArray,r=Object.prototype.toString;t.exports=n||function(t){return!!t&&"[object Array]"==r.call(t)}},function(t,e,n){"use strict";function r(t){this.fontDescriptors=t}function i(t){if(!t)return null;if("number"==typeof t||t instanceof Number)t={left:t,right:t,top:t,bottom:t};else if(t instanceof Array)if(2===t.length)t={left:t[0],top:t[1],right:t[0],bottom:t[1]};else{if(4!==t.length)throw"Invalid pageMargins definition";t={left:t[0],top:t[1],right:t[2],bottom:t[3]}}return t}function o(t){t.registerTableLayouts({noBorders:{hLineWidth:function(t){return 0},vLineWidth:function(t){return 0},paddingLeft:function(t){return t&&4||0},paddingRight:function(t,e){return te.options.size[1]?"landscape":"portrait";if(t.pageSize.orientation!==n){var r=e.options.size[0],i=e.options.size[1];e.options.size=[i,r]}}function h(t,e,n){n._pdfMakePages=t;for(var r=0;r0&&(s(t[r],n),n.addPage(n.options));for(var i=t[r],o=0,a=i.items.length;a>o;o++){var h=i.items[o];switch(h.type){case"vector":l(h.item,n);break;case"line":u(h.item,h.item.x,h.item.y,n);break;case"image":f(h.item,h.item.x,h.item.y,n)}}i.watermark&&c(i,n),e.setFontRefsToPdfDoc()}}function u(t,e,n,r){e=e||0,n=n||0;var i=t.getHeight(),o=t.getAscenderHeight();y.drawBackground(t,e,n,r);for(var a=0,s=t.inlines.length;s>a;a++){var h=t.inlines[a];r.fill(h.color||"black"),r.save(),r.transform(1,0,0,-1,0,r.page.height);var u=h.font.encode(h.text);r.addContent("BT"),r.addContent(""+(e+h.x)+" "+(r.page.height-n-o)+" Td"),r.addContent("/"+u.fontId+" "+h.fontSize+" Tf"),r.addContent("<"+u.encodedText+"> Tj"),r.addContent("ET"),h.link&&r.link(e+h.x,r.page.height-n-i,h.width,i,h.link),r.restore()}y.drawDecorations(t,e,n,r)}function c(t,e){var n=t.watermark;e.fill("black"),e.opacity(.6),e.save(),e.transform(1,0,0,-1,0,e.page.height);var r=180*Math.atan2(e.page.height,e.page.width)/Math.PI;e.rotate(r,{origin:[e.page.width/2,e.page.height/2]});var i=n.font.encode(n.text);e.addContent("BT"),e.addContent(""+(e.page.width/2-n.size.size.width/2)+" "+(e.page.height/2-n.size.size.height/4)+" Td"),e.addContent("/"+i.fontId+" "+n.size.fontSize+" Tf"),e.addContent("<"+i.encodedText+"> Tj"),e.addContent("ET"),e.restore()}function l(t,e){switch(e.lineWidth(t.lineWidth||1),t.dash?e.dash(t.dash.length,{space:t.dash.space||t.dash.length}):e.undash(),e.fillOpacity(t.fillOpacity||1),e.strokeOpacity(t.strokeOpacity||1),e.lineJoin(t.lineJoin||"miter"),t.type){case"ellipse":e.ellipse(t.x,t.y,t.r1,t.r2);break;case"rect":t.r?e.roundedRect(t.x,t.y,t.w,t.h,t.r):e.rect(t.x,t.y,t.w,t.h);break;case"line":e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);break;case"polyline":if(0===t.points.length)break;e.moveTo(t.points[0].x,t.points[0].y);for(var n=1,r=t.points.length;r>n;n++)e.lineTo(t.points[n].x,t.points[n].y);if(t.points.length>1){var i=t.points[0],o=t.points[t.points.length-1];(t.closePath||i.x===o.x&&i.y===o.y)&&e.closePath()}}t.color&&t.lineColor?e.fillAndStroke(t.color,t.lineColor):t.color?e.fill(t.color):e.stroke(t.lineColor||"black")}function f(t,e,n,r){r.image(t.image,t.x,t.y,{width:t._width,height:t._height})}var d=(n(7),n(9)),p=n(11),g=n(24),m=(n(46),n(102)),v=n(103),y=n(104),d=n(9);r.prototype.createPdfKitDocument=function(t,e){e=e||{};var n=a(t.pageSize||"a4");"landscape"===t.pageOrientation&&(n={width:n.height,height:n.width}),n.orientation="landscape"===t.pageOrientation?t.pageOrientation:"portrait",this.pdfKitDoc=new g({size:[n.width,n.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",t.info&&(t.info,this.pdfKitDoc.info.Title=t.info.title?t.info.title:null,this.pdfKitDoc.info.Author=t.info.author?t.info.author:null,this.pdfKitDoc.info.Subject=t.info.subject?t.info.subject:null,this.pdfKitDoc.info.Keywords=t.info.keywords?t.info.keywords:null),this.fontProvider=new d(this.fontDescriptors,this.pdfKitDoc),t.images=t.images||{};var r=new p(n,i(t.pageMargins||40),new v(this.pdfKitDoc,t.images));o(r),e.tableLayouts&&r.registerTableLayouts(e.tableLayouts);var s=r.layoutDocument(t.content,this.fontProvider,t.styles||{},t.defaultStyle||{fontSize:12,font:"Roboto"},t.background,t.header,t.footer,t.images,t.watermark,t.pageBreakBefore);if(h(s,this.fontProvider,this.pdfKitDoc),e.autoPrint){var u=this.pdfKitDoc.ref({Type:"Action",S:"Named",N:"Print"});this.pdfKitDoc._root.data.OpenAction=u,u.end()}return this.pdfKitDoc},t.exports=r,r.prototype.fs=n(44)},function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t!==e){var n=null===t,r=t===I,i=t===t,o=null===e,a=e===I,s=e===e;if(t>e&&!o||!i||n&&!a&&s||r&&s)return 1;if(e>t&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function a(t,e,n){ for(var r=t.length,i=n?r:-1;n?i--:++i-1;);return n}function l(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function f(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function d(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,s=i.length,h=n.length;++r=h)return u;var c=n[r];return u*("asc"===c||c===!0?1:-1)}}return t.index-e.index}function p(t){return Yt[t]}function g(t){return Jt[t]}function m(t,e,n){return e?t=Vt[t]:n&&(t=Kt[t]),"\\"+t}function v(t){return"\\"+Kt[t]}function y(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function _(t,e){for(var n=-1,r=t.length,i=-1,o=[];++ne,i=n?t.length:0,o=Yn(0,i,this.__views__),a=o.start,s=o.end,h=s-a,u=r?s:a-1,c=this.__iteratees__,l=c.length,f=0,d=xa(h,this.__takeCount__);if(!n||N>i||i==h&&d==h)return nn(r&&n?t.reverse():t,this.__actions__);var p=[];t:for(;h--&&d>f;){u+=e;for(var g=-1,m=t[u];++g=N?gn(e):null,u=e.length;h&&(o=Kt,a=!1,e=h);t:for(;++in&&(n=-n>i?0:i+n),r=r===I||r>i?i:+r||0,0>r&&(r+=i),i=n>r?0:r>>>0,n>>>=0;i>n;)t[n++]=e;return t}function Ie(t,e){var n=[];return Ba(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Re(t,e,n,r){var i;return n(t,function(t,n,o){return e(t,n,o)?(i=r?n:t,!1):void 0}),i}function Ee(t,e,n,r){r||(r=[]);for(var i=-1,o=t.length;++ir;)t=t[e[r++]];return r&&r==i?t:I}}function Oe(t,e,n,r,i,o){return t===e?!0:null==t||null==e||!Fi(t)&&!b(e)?t!==t&&e!==e:Be(t,e,Oe,n,r,i,o)}function Be(t,e,n,r,i,o,a){var s=Es(t),h=Es(e),u=q,c=q;s||(u=ra.call(t),u==J?u=et:u!=et&&(s=Hi(t))),h||(c=ra.call(e),c==J?c=et:c!=et&&(h=Hi(e)));var l=u==et,f=c==et,d=u==c;if(d&&!s&&!l)return Wn(t,e,u);if(!i){var p=l&&ea.call(t,"__wrapped__"),g=f&&ea.call(e,"__wrapped__");if(p||g)return n(p?t.value():t,g?e.value():e,r,i,o,a)}if(!d)return!1;o||(o=[]),a||(a=[]);for(var m=o.length;m--;)if(o[m]==t)return a[m]==e;o.push(t),a.push(e);var v=(s?Un:jn)(t,e,n,r,i,o,a);return o.pop(),a.pop(),v}function Me(t,e,n){var r=e.length,i=r,o=!n;if(null==t)return!i;for(t=lr(t);r--;){var a=e[r];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++re&&(e=-e>i?0:i+e),n=n===I||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=zo(i);++r=N,h=a?gn():null,u=[];h?(r=Kt,o=!1):(a=!1,h=e?[]:u);t:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=t[o];(n?e>=a:e>a)&&null!==a?r=o+1:i=o}return i}return on(t,e,Ro,n)}function on(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,a=e!==e,s=null===e,h=e===I;o>i;){var u=ya((i+o)/2),c=n(t[u]),l=c!==I,f=c===c;if(a)var d=f||r;else d=s?f&&l&&(r||null!=c):h?f&&(r||l):null==c?!1:r?e>=c:e>c;d?i=u+1:o=u}return xa(o,Pa)}function an(t,e,n){if("function"!=typeof t)return Ro;if(e===I)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,a){return t.call(e,n,r,i,o,a)}}return function(){return t.apply(e,arguments)}}function sn(t){var e=new aa(t.byteLength),n=new pa(e);return n.set(new pa(t)),e}function hn(t,e,n){for(var r=n.length,i=-1,o=Aa(t.length-r,0),a=-1,s=e.length,h=zo(s+o);++a2?n[i-2]:I,a=i>2?n[2]:I,s=i>1?n[i-1]:I;for("function"==typeof o?(o=an(o,s,5),i-=2):(o="function"==typeof s?s:I,i-=o?1:0),a&&$n(n[0],n[1],a)&&(o=3>i?I:o,i=1);++r-1?n[o]:I}return Re(n,r,t)}}function An(t){return function(e,n,r){return e&&e.length?(n=zn(n,r,3),a(e,n,t)):-1}}function xn(t){return function(e,n,r){return n=zn(n,r,3),Re(e,n,t,!0)}}function Sn(t){return function(){for(var e,n=arguments.length,i=t?n:-1,o=0,a=zo(n);t?i--:++i=N)return e.plant(r).value();for(var i=0,o=n?a[i].apply(this,t):r;++iy){var S=s?te(s):I,k=Aa(u-y,0),C=p?x:I,R=p?I:x,T=p?w:I,L=p?I:w;e|=p?F:O,e&=~(p?O:F),g||(e&=~(E|P));var D=[t,e,n,T,C,L,R,S,h,k],B=Ln.apply(I,D);return er(t)&&Ha(B,D),B.placeholder=A,B}}var M=f?n:this,U=d?M[t]:t;return s&&(w=hr(w,s)),l&&h=e||!wa(e))return"";var i=e-r;return n=null==n?" ":n+"",vo(n,ma(i/n.length)).slice(0,i)}function Fn(t,e,n,r){function i(){for(var e=-1,s=arguments.length,h=-1,u=r.length,c=zo(u+s);++hh))return!1;for(;++s-1&&t%1==0&&e>t}function $n(t,e,n){if(!Fi(n))return!1;var r=typeof e;if("number"==r?Kn(n)&&Qn(e,n.length):"string"==r&&e in n){var i=n[e];return t===t?t===i:i!==i}return!1}function tr(t,e){var n=typeof t;if("string"==n&&It.test(t)||"number"==n)return!0;if(Es(t))return!1;var r=!Ct.test(t);return r||null!=e&&t in lr(e)}function er(t){var n=Nn(t);if(!(n in i.prototype))return!1;var r=e[n];if(t===r)return!0;var o=za(r);return!!o&&t===o[0]}function nr(t){return"number"==typeof t&&t>-1&&t%1==0&&La>=t}function rr(t){return t===t&&!Fi(t)}function ir(t,e){var n=t[1],r=e[1],i=n|r,o=B>i,a=r==B&&n==L||r==B&&n==M&&t[7].length<=e[8]||r==(B|M)&&n==L;if(!o&&!a)return t;r&E&&(t[2]=e[2],i|=n&E?0:T);var s=e[3];if(s){var h=t[3];t[3]=h?hn(h,s,e[4]):te(s),t[4]=h?_(t[3],Y):te(e[4])}return s=e[5],s&&(h=t[5],t[5]=h?un(h,s,e[6]):te(s),t[6]=h?_(t[5],Y):te(e[6])),s=e[7],s&&(t[7]=te(s)),r&B&&(t[8]=null==t[8]?e[8]:xa(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function or(t,e){return t===I?e:Ps(t,e,or)}function ar(t,e){t=lr(t);for(var n=-1,r=e.length,i={};++nr;)a[++o]=qe(t,r,r+=e);return a}function gr(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++ee?0:e)):[]}function vr(t,e,n){var r=t?t.length:0;return r?((n?$n(t,e,n):null==e)&&(e=1),e=r-(+e||0),qe(t,0,0>e?0:e)):[]}function yr(t,e,n){return t&&t.length?en(t,zn(e,n,3),!0,!0):[]}function br(t,e,n){return t&&t.length?en(t,zn(e,n,3),!0):[]}function wr(t,e,n,r){var i=t?t.length:0;return i?(n&&"number"!=typeof n&&$n(t,e,n)&&(n=0,r=i),Ce(t,e,n,r)):[]}function _r(t){return t?t[0]:I}function Ar(t,e,n){var r=t?t.length:0;return n&&$n(t,e,n)&&(e=!1),r?Ee(t,e):[]}function xr(t){var e=t?t.length:0;return e?Ee(t,!0):[]}function Sr(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?Aa(r+n,0):n;else if(n){var i=rn(t,e);return r>i&&(e===e?e===t[i]:t[i]!==t[i])?i:-1}return s(t,e,n||0)}function kr(t){return vr(t,1)}function Cr(t){var e=t?t.length:0;return e?t[e-1]:I}function Ir(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(0>n?Aa(r+n,0):xa(n||0,r-1))+1;else if(n){i=rn(t,e,!0)-1;var o=t[i];return(e===e?e===o:o!==o)?i:-1}if(e!==e)return y(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Rr(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=Hn(),i=t.length;++n-1;)da.call(e,o,1);return e}function Er(t,e,n){var r=[];if(!t||!t.length)return r;var i=-1,o=[],a=t.length;for(e=zn(e,n,3);++ie?0:e)):[]}function Dr(t,e,n){var r=t?t.length:0;return r?((n?$n(t,e,n):null==e)&&(e=1),e=r-(+e||0),qe(t,0>e?0:e)):[]}function Fr(t,e,n){return t&&t.length?en(t,zn(e,n,3),!1,!0):[]}function Or(t,e,n){return t&&t.length?en(t,zn(e,n,3)):[]}function Br(t,e,n,r){var i=t?t.length:0;if(!i)return[];null!=e&&"boolean"!=typeof e&&(r=n,n=$n(t,e,r)?I:e,e=!1);var o=zn();return(null!=n||o!==we)&&(n=o(n,r,3)),e&&Hn()==s?A(t,n):$e(t,n)}function Mr(t){if(!t||!t.length)return[];var e=-1,n=0;t=se(t,function(t){return Kn(t)?(n=Aa(t.length,n),!0):void 0});for(var r=zo(n);++en?Aa(i+n,0):n||0,"string"==typeof t||!Es(t)&&Ni(t)?i>=n&&t.indexOf(e,n)>-1:!!i&&Hn(t,e,n)>-1}function ti(t,e,n){var r=Es(t)?he:Ue;return e=zn(e,n,3),r(t,e)}function ei(t,e){return ti(t,Fo(e))}function ni(t,e,n){var r=Es(t)?se:Ie;return e=zn(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function ri(t,e,n){if(n?$n(t,e,n):null==e){t=cr(t);var r=t.length;return r>0?t[Ye(0,r-1)]:I}var i=-1,o=Ji(t),r=o.length,a=r-1;for(e=xa(0>e?0:+e||0,r);++i0&&(n=e.apply(this,arguments)),1>=t&&(e=I),n}}function di(t,e,n){function r(){d&&sa(d),u&&sa(u),g=0,u=d=p=I}function i(e,n){n&&sa(n),u=d=p=I,e&&(g=gs(),c=t.apply(f,h),d||u||(h=f=I))}function o(){var t=e-(gs()-l);0>=t||t>e?i(p,u):d=fa(o,t)}function a(){i(v,d)}function s(){if(h=arguments,l=gs(),f=this,p=v&&(d||!y),m===!1)var n=y&&!d;else{u||y||(g=l);var r=m-(l-g),i=0>=r||r>m;i?(u&&(u=sa(u)),g=l,c=t.apply(f,h)):u||(u=fa(a,r))}return i&&d?d=sa(d):d||e===m||(d=fa(o,e)),n&&(i=!0,c=t.apply(f,h)),!i||d||u||(h=f=I),c}var h,u,c,l,f,d,p,g=0,m=!1,v=!0;if("function"!=typeof t)throw new Vo(Z);if(e=0>e?0:+e||0,n===!0){var y=!0;v=!1}else Fi(n)&&(y=!!n.leading,m="maxWait"in n&&Aa(+n.maxWait||0,e),v="trailing"in n?!!n.trailing:v);return s.cancel=r,s}function pi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Vo(Z);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new pi.Cache,n}function gi(t){if("function"!=typeof t)throw new Vo(Z);return function(){return!t.apply(this,arguments)}}function mi(t){return fi(2,t)}function vi(t,e){if("function"!=typeof t)throw new Vo(Z);return e=Aa(e===I?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=Aa(n.length-e,0),o=zo(i);++re}function Si(t,e){return t>=e}function ki(t){return b(t)&&Kn(t)&&ea.call(t,"callee")&&!ca.call(t,"callee")}function Ci(t){return t===!0||t===!1||b(t)&&ra.call(t)==X}function Ii(t){return b(t)&&ra.call(t)==V}function Ri(t){return!!t&&1===t.nodeType&&b(t)&&!ji(t)}function Ei(t){return null==t?!0:Kn(t)&&(Es(t)||Ni(t)||ki(t)||b(t)&&Di(t.splice))?!t.length:!js(t).length}function Pi(t,e,n,r){n="function"==typeof n?an(n,r,3):I;var i=n?n(t,e):I;return i===I?Oe(t,e,n):!!i}function Ti(t){return b(t)&&"string"==typeof t.message&&ra.call(t)==K}function Li(t){return"number"==typeof t&&wa(t)}function Di(t){return Fi(t)&&ra.call(t)==Q}function Fi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Oi(t,e,n,r){return n="function"==typeof n?an(n,r,3):I,Me(t,Gn(e),n)}function Bi(t){return Wi(t)&&t!=+t}function Mi(t){return null==t?!1:Di(t)?oa.test(ta.call(t)):b(t)&&Bt.test(t)}function Ui(t){return null===t}function Wi(t){return"number"==typeof t||b(t)&&ra.call(t)==tt}function ji(t){var e;if(!b(t)||ra.call(t)!=et||ki(t)||!ea.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return Pe(t,function(t,e){n=e}),n===I||ea.call(t,n)}function zi(t){return Fi(t)&&ra.call(t)==nt}function Ni(t){return"string"==typeof t||b(t)&&ra.call(t)==it}function Hi(t){return b(t)&&nr(t.length)&&!!Gt[ra.call(t)]}function Gi(t){return t===I}function Zi(t,e){return e>t}function Yi(t,e){return e>=t}function Ji(t){var e=t?Na(t):0;return nr(e)?e?te(t):[]:oo(t)}function qi(t){return be(t,to(t))}function Xi(t,e,n){var r=Oa(t);return n&&$n(t,e,n)&&(e=I),e?ve(r,e):r}function Vi(t){return De(t,to(t))}function Ki(t,e,n){var r=null==t?I:Fe(t,fr(e),e+"");return r===I?n:r}function Qi(t,e){if(null==t)return!1;var n=ea.call(t,e);if(!n&&!tr(e)){if(e=fr(e),t=1==e.length?t:Fe(t,qe(e,0,-1)),null==t)return!1;e=Cr(e),n=ea.call(t,e)}return n||nr(t.length)&&Qn(e,t.length)&&(Es(t)||ki(t))}function $i(t,e,n){n&&$n(t,e,n)&&(e=I);for(var r=-1,i=js(t),o=i.length,a={};++r0;++r=xa(e,n)&&tn?0:+n||0,r),n-=e.length,n>=0&&t.indexOf(e,n)==n}function fo(t){return t=u(t),t&&At.test(t)?t.replace(wt,g):t; }function po(t){return t=u(t),t&&Pt.test(t)?t.replace(Et,m):t||"(?:)"}function go(t,e,n){t=u(t),e=+e;var r=t.length;if(r>=e||!wa(e))return t;var i=(e-r)/2,o=ya(i),a=ma(i);return n=Dn("",a,n),n.slice(0,o)+t+n}function mo(t,e,n){return(n?$n(t,e,n):null==e)?e=0:e&&(e=+e),t=wo(t),ka(t,e||(Ot.test(t)?16:10))}function vo(t,e){var n="";if(t=u(t),e=+e,1>e||!t||!wa(e))return n;do e%2&&(n+=t),e=ya(e/2),t+=t;while(e);return n}function yo(t,e,n){return t=u(t),n=null==n?0:xa(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function bo(t,n,r){var i=e.templateSettings;r&&$n(t,n,r)&&(n=r=I),t=u(t),n=me(ve({},r||n),i,ge);var o,a,s=me(ve({},n.imports),i.imports,ge),h=js(s),c=tn(s,h),l=0,f=n.interpolate||Wt,d="__p += '",p=qo((n.escape||Wt).source+"|"+f.source+"|"+(f===kt?Dt:Wt).source+"|"+(n.evaluate||Wt).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Ht+"]")+"\n";t.replace(p,function(e,n,r,i,s,h){return r||(r=i),d+=t.slice(l,h).replace(jt,v),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=h+e.length,e}),d+="';\n";var m=n.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(mt,""):d).replace(vt,"$1").replace(yt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Ks(function(){return Go(h,g+"return "+d).apply(I,c)});if(y.source=d,Ti(y))throw y;return y}function wo(t,e,n){var r=t;return(t=u(t))?(n?$n(r,e,n):null==e)?t.slice(x(t),S(t)+1):(e+="",t.slice(c(t,e),l(t,e)+1)):t}function _o(t,e,n){var r=t;return t=u(t),t?(n?$n(r,e,n):null==e)?t.slice(x(t)):t.slice(c(t,e+"")):t}function Ao(t,e,n){var r=t;return t=u(t),t?(n?$n(r,e,n):null==e)?t.slice(0,S(t)+1):t.slice(0,l(t,e+"")+1):t}function xo(t,e,n){n&&$n(t,e,n)&&(e=I);var r=U,i=W;if(null!=e)if(Fi(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?u(e.omission):i}else r=+e||0;if(t=u(t),r>=t.length)return t;var a=r-i.length;if(1>a)return i;var s=t.slice(0,a);if(null==o)return s+i;if(zi(o)){if(t.slice(a).search(o)){var h,c,l=t.slice(0,a);for(o.global||(o=qo(o.source,(Ft.exec(o)||"")+"g")),o.lastIndex=0;h=o.exec(l);)c=h.index;s=s.slice(0,null==c?a:c)}}else if(t.indexOf(o,a)!=a){var f=s.lastIndexOf(o);f>-1&&(s=s.slice(0,f))}return s+i}function So(t){return t=u(t),t&&_t.test(t)?t.replace(bt,k):t}function ko(t,e,n){return n&&$n(t,e,n)&&(e=I),t=u(t),t.match(e||zt)||[]}function Co(t,e,n){return n&&$n(t,e,n)&&(e=I),b(t)?Eo(t):we(t,e)}function Io(t){return function(){return t}}function Ro(t){return t}function Eo(t){return We(_e(t,!0))}function Po(t,e){return je(t,_e(e,!0))}function To(t,e,n){if(null==n){var r=Fi(e),i=r?js(e):I,o=i&&i.length?De(e,i):I;(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=De(e,js(e)));var a=!0,s=-1,h=Di(t),u=o.length;n===!1?a=!1:Fi(n)&&"chain"in n&&(a=n.chain);for(;++st||!wa(t))return[];var r=-1,i=zo(xa(t,Ea));for(e=an(e,n,1);++rr?i[r]=e(r):e(r);return i}function Uo(t){var e=++na;return u(t)+e}function Wo(t,e){return(+t||0)+(+e||0)}function jo(t,e,n){return n&&$n(t,e,n)&&(e=I),e=zn(e,n,3),1==e.length?de(Es(t)?t:cr(t),e):Qe(t,e)}t=t?ie.defaults(re.Object(),t,ie.pick(re,Nt)):re;var zo=t.Array,No=t.Date,Ho=t.Error,Go=t.Function,Zo=t.Math,Yo=t.Number,Jo=t.Object,qo=t.RegExp,Xo=t.String,Vo=t.TypeError,Ko=zo.prototype,Qo=Jo.prototype,$o=Xo.prototype,ta=Go.prototype.toString,ea=Qo.hasOwnProperty,na=0,ra=Qo.toString,ia=re._,oa=qo("^"+ta.call(ea).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=t.ArrayBuffer,sa=t.clearTimeout,ha=t.parseFloat,ua=Zo.pow,ca=Qo.propertyIsEnumerable,la=Zn(t,"Set"),fa=t.setTimeout,da=Ko.splice,pa=t.Uint8Array,ga=Zn(t,"WeakMap"),ma=Zo.ceil,va=Zn(Jo,"create"),ya=Zo.floor,ba=Zn(zo,"isArray"),wa=t.isFinite,_a=Zn(Jo,"keys"),Aa=Zo.max,xa=Zo.min,Sa=Zn(No,"now"),ka=t.parseInt,Ca=Zo.random,Ia=Yo.NEGATIVE_INFINITY,Ra=Yo.POSITIVE_INFINITY,Ea=4294967295,Pa=Ea-1,Ta=Ea>>>1,La=9007199254740991,Da=ga&&new ga,Fa={};e.support={},e.templateSettings={escape:xt,evaluate:St,interpolate:kt,variable:"",imports:{_:e}};var Oa=function(){function t(){}return function(e){if(Fi(e)){t.prototype=e;var n=new t;t.prototype=I}return n||{}}}(),Ba=fn(Te),Ma=fn(Le,!0),Ua=dn(),Wa=dn(!0),ja=Da?function(t,e){return Da.set(t,e),t}:Ro,za=Da?function(t){return Da.get(t)}:Do,Na=He("length"),Ha=function(){var t=0,e=0;return function(n,r){var i=gs(),o=z-(i-e);if(e=i,o>0){if(++t>=j)return n}else t=0;return ja(n,r)}}(),Ga=vi(function(t,e){return b(t)&&Kn(t)?xe(t,Ee(e,!1,!0)):[]}),Za=An(),Ya=An(!0),Ja=vi(function(t){for(var e=t.length,n=e,r=zo(l),i=Hn(),o=i==s,a=[];n--;){var h=t[n]=Kn(h=t[n])?h:[];r[n]=o&&h.length>=120?gn(n&&h):null}var u=t[0],c=-1,l=u?u.length:0,f=r[0];t:for(;++c2?t[e-2]:I,r=e>1?t[e-1]:I;return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof r?(--e,r):I,r=I),t.length=e,Ur(t,n,r)}),es=vi(function(t){return t=Ee(t),this.thru(function(e){return $t(Es(e)?e:[lr(e)],t)})}),ns=vi(function(t,e){return ye(t,Ee(e))}),rs=cn(function(t,e,n){ea.call(t,n)?++t[n]:t[n]=1}),is=_n(Ba),os=_n(Ma,!0),as=kn(ee,Ba),ss=kn(ne,Ma),hs=cn(function(t,e,n){ea.call(t,n)?t[n].push(e):t[n]=[e]}),us=cn(function(t,e,n){t[n]=e}),cs=vi(function(t,e,n){var r=-1,i="function"==typeof e,o=tr(e),a=Kn(t)?zo(t.length):[];return Ba(t,function(t){var s=i?e:o&&null!=t?t[e]:I;a[++r]=s?s.apply(t,n):Vn(t,e,n)}),a}),ls=cn(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),fs=Tn(ce,Ba),ds=Tn(le,Ma),ps=vi(function(t,e){if(null==t)return[];var n=e[2];return n&&$n(e[0],e[1],n)&&(e.length=1),Ke(t,Ee(e),[])}),gs=Sa||function(){return(new No).getTime()},ms=vi(function(t,e,n){var r=E;if(n.length){var i=_(n,ms.placeholder);r|=F}return Mn(t,r,e,n,i)}),vs=vi(function(t,e){e=e.length?Ee(e):Vi(t);for(var n=-1,r=e.length;++n0||0>e)?new i(n):(0>t?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==I&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n)},i.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},i.prototype.toArray=function(){return this.take(Ra)},Te(i.prototype,function(t,n){var o=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n),s=e[a?"take"+("last"==n?"Right":""):n];s&&(e.prototype[n]=function(){var e=a?[1]:arguments,n=this.__chain__,h=this.__wrapped__,u=!!this.__actions__.length,c=h instanceof i,l=e[0],f=c||Es(h);f&&o&&"function"==typeof l&&1!=l.length&&(c=f=!1);var d=function(t){return a&&n?s(t,1)[0]:s.apply(I,ue([t],e))},p={func:Hr,args:[d],thisArg:I},g=c&&!u;if(a&&!n)return g?(h=h.clone(),h.__actions__.push(p),t.call(h)):s.call(I,this.value())[0];if(!a&&f){h=g?h:new i(this);var m=t.apply(h,e);return m.__actions__.push(p),new r(m,n)}return this.thru(d)})}),ee(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?$o:Ko)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),Te(i.prototype,function(t,n){var r=e[n];if(r){var i=r.name,o=Fa[i]||(Fa[i]=[]);o.push({name:n,func:r})}}),Fa[Ln(I,P).name]=[{name:"wrapper",func:I}],i.prototype.clone=w,i.prototype.reverse=$,i.prototype.value=rt,e.prototype.chain=Gr,e.prototype.commit=Zr,e.prototype.concat=es,e.prototype.plant=Yr,e.prototype.reverse=Jr,e.prototype.toString=qr,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Xr,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var I,R="3.10.1",E=1,P=2,T=4,L=8,D=16,F=32,O=64,B=128,M=256,U=30,W="...",j=150,z=16,N=200,H=1,G=2,Z="Expected a function",Y="__lodash_placeholder__",J="[object Arguments]",q="[object Array]",X="[object Boolean]",V="[object Date]",K="[object Error]",Q="[object Function]",$="[object Map]",tt="[object Number]",et="[object Object]",nt="[object RegExp]",rt="[object Set]",it="[object String]",ot="[object WeakMap]",at="[object ArrayBuffer]",st="[object Float32Array]",ht="[object Float64Array]",ut="[object Int8Array]",ct="[object Int16Array]",lt="[object Int32Array]",ft="[object Uint8Array]",dt="[object Uint8ClampedArray]",pt="[object Uint16Array]",gt="[object Uint32Array]",mt=/\b__p \+= '';/g,vt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39|#96);/g,wt=/[&<>"'`]/g,_t=RegExp(bt.source),At=RegExp(wt.source),xt=/<%-([\s\S]+?)%>/g,St=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,Ct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,It=/^\w*$/,Rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Et=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Pt=RegExp(Et.source),Tt=/[\u0300-\u036f\ufe20-\ufe23]/g,Lt=/\\(\\)?/g,Dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ft=/\w*$/,Ot=/^0[xX]/,Bt=/^\[object .+?Constructor\]$/,Mt=/^\d+$/,Ut=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Wt=/($^)/,jt=/['\n\r\u2028\u2029\\]/g,zt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Nt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ht=-1,Gt={};Gt[st]=Gt[ht]=Gt[ut]=Gt[ct]=Gt[lt]=Gt[ft]=Gt[dt]=Gt[pt]=Gt[gt]=!0,Gt[J]=Gt[q]=Gt[at]=Gt[X]=Gt[V]=Gt[K]=Gt[Q]=Gt[$]=Gt[tt]=Gt[et]=Gt[nt]=Gt[rt]=Gt[it]=Gt[ot]=!1;var Zt={};Zt[J]=Zt[q]=Zt[at]=Zt[X]=Zt[V]=Zt[st]=Zt[ht]=Zt[ut]=Zt[ct]=Zt[lt]=Zt[tt]=Zt[et]=Zt[nt]=Zt[it]=Zt[ft]=Zt[dt]=Zt[pt]=Zt[gt]=!0,Zt[K]=Zt[Q]=Zt[$]=Zt[rt]=Zt[ot]=!1;var Yt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Jt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},qt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Xt={"function":!0,object:!0},Vt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Kt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qt=Xt[typeof e]&&e&&!e.nodeType&&e,$t=Xt[typeof t]&&t&&!t.nodeType&&t,te=Qt&&$t&&"object"==typeof i&&i&&i.Object&&i,ee=Xt[typeof self]&&self&&self.Object&&self,ne=Xt[typeof window]&&window&&window.Object&&window,re=($t&&$t.exports===Qt&&Qt,te||ne!==(this&&this.window)&&ne||ee||this),ie=C();re._=ie,r=function(){return ie}.call(e,n,e,t),!(r!==I&&(t.exports=r))}).call(this)}).call(e,n(8)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t,e){var n="normal";return t&&e?n="bolditalics":t?n="bold":e&&(n="italics"),n}function i(t,e){this.fonts={},this.pdfDoc=e,this.fontWrappers={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];this.fonts[n]={normal:r.normal,bold:r.bold,italics:r.italics,bolditalics:r.bolditalics}}}var o=n(7),a=n(10);i.prototype.provideFont=function(t,e,n){var i=r(e,n);if(!this.fonts[t]||!this.fonts[t][i])throw new Error("Font '"+t+"' in style '"+i+"' is not defined in the font section of the document definition.");return this.fontWrappers[t]=this.fontWrappers[t]||{},this.fontWrappers[t][i]||(this.fontWrappers[t][i]=new a(this.pdfDoc,this.fonts[t][i],t+"("+i+")")),this.fontWrappers[t][i]},i.prototype.setFontRefsToPdfDoc=function(){var t=this;o.each(t.fontWrappers,function(e){o.each(e,function(e){o.each(e.pdfFonts,function(e){t.pdfDoc.page.fonts[e.id]||(t.pdfDoc.page.fonts[e.id]=e.ref())})})})},t.exports=i},function(t,e,n){"use strict";function r(t,e,n){this.MAX_CHAR_TYPES=92,this.pdfkitDoc=t,this.path=e,this.pdfFonts=[],this.charCatalogue=[],this.name=n,Object.defineProperty(this,"ascender",{get:function(){var t=this.getFont(0);return t.ascender}}),Object.defineProperty(this,"decender",{get:function(){var t=this.getFont(0);return t.decender}})}var i=n(7);r.prototype.getFont=function(t){if(!this.pdfFonts[t]){var e=this.name+t;this.postscriptName&&delete this.pdfkitDoc._fontFamilies[this.postscriptName],this.pdfFonts[t]=this.pdfkitDoc.font(this.path,e)._font,this.postscriptName||(this.postscriptName=this.pdfFonts[t].name)}return this.pdfFonts[t]},r.prototype.widthOfString=function(){var t=this.getFont(0);return t.widthOfString.apply(t,arguments)},r.prototype.lineHeight=function(){var t=this.getFont(0);return t.lineHeight.apply(t,arguments)},r.prototype.ref=function(){var t=this.getFont(0);return t.ref.apply(t,arguments)};var o=function(t){return t.charCodeAt(0)};r.prototype.encode=function(t){var e=this,n=i.chain(t.split("")).map(o).uniq().value();if(n.length>e.MAX_CHAR_TYPES)throw new Error("Inline has more than "+e.MAX_CHAR_TYPES+": "+t+" different character types and therefore cannot be properly embedded into pdf.");var r=function(t){return i.uniq(t.concat(n)).length<=e.MAX_CHAR_TYPES},a=i.findIndex(e.charCatalogue,r);0>a&&(a=e.charCatalogue.length,e.charCatalogue[a]=[]);var s=e.getFont(a);s.use(t),i.each(n,function(t){i.includes(e.charCatalogue[a],t)||e.charCatalogue[a].push(t)});var h=i.map(s.encode(t),function(t){return t.charCodeAt(0).toString(16)}).join("");return{encodedText:h,fontId:s.id}},t.exports=r},function(t,e,n){"use strict";function r(t,e){a.each(e,function(e){t.push(e)})}function i(t,e,n){this.pageSize=t,this.pageMargins=e,this.tracker=new s,this.imageMeasure=n,this.tableLayouts={}}function o(t){var e=t.x,n=t.y;t.positions=[],a.each(t.canvas,function(t){var e=t.x,n=t.y,r=t.x1,i=t.y1,o=t.x2,a=t.y2;t.resetXY=function(){t.x=e,t.y=n,t.x1=r,t.y1=i,t.x2=o,t.y2=a}}),t.resetXY=function(){t.x=e,t.y=n,a.each(t.canvas,function(t){t.resetXY()})}}var a=n(7),s=n(12),h=n(13),u=n(19),c=n(20),l=n(16),f=n(23),d=n(22),p=n(17).pack,g=n(17).offsetVector,m=n(17).fontStringify,v=n(17).isFunction,y=n(14),b=n(15);i.prototype.registerTableLayouts=function(t){this.tableLayouts=p(this.tableLayouts,t)},i.prototype.layoutDocument=function(t,e,n,r,i,o,s,u,c,l){function f(t,e){return v(l)?(t=a.reject(t,function(t){return a.isEmpty(t.positions)}),a.each(t,function(t){var n=a.pick(t,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);n.startPosition=a.first(t.positions),n.pageNumbers=a.chain(t.positions).map("pageNumber").uniq().value(),n.pages=e.length,n.stack=a.isArray(t.stack),t.nodeInfo=n}),a.any(t,function(t,e,n){if("before"!==t.pageBreak&&!t.pageBreakCalculated){t.pageBreakCalculated=!0;var r=a.first(t.nodeInfo.pageNumbers),i=a.chain(n).drop(e+1).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r)}).value(),o=a.chain(n).drop(e+1).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r+1)}).value(),s=a.chain(n).take(e).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r)}).value();if(l(t.nodeInfo,a.map(i,"nodeInfo"),a.map(o,"nodeInfo"),a.map(s,"nodeInfo")))return t.pageBreak="before",!0}})):!1}function d(t){a.each(t.linearNodeList,function(t){t.resetXY()})}this.docMeasure=new h(e,n,r,this.imageMeasure,this.tableLayouts,u);for(var p=this.tryLayoutDocument(t,e,n,r,i,o,s,u,c);f(p.linearNodeList,p.pages);)d(p),p=this.tryLayoutDocument(t,e,n,r,i,o,s,u,c);return p.pages},i.prototype.tryLayoutDocument=function(t,e,n,r,i,o,a,s,h,l){this.linearNodeList=[],t=this.docMeasure.measureDocument(t),this.writer=new c(new u(this.pageSize,this.pageMargins),this.tracker);var f=this;return this.writer.context().tracker.startTracking("pageAdded",function(){f.addBackground(i)}),this.addBackground(i),this.processNode(t),this.addHeadersAndFooters(o,a),null!=h&&this.addWatermark(h,e),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},i.prototype.addBackground=function(t){var e=v(t)?t:function(){return t},n=e(this.writer.context().page+1);if(n){var r=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(r.width,r.height),this.processNode(this.docMeasure.measureDocument(n)),this.writer.commitUnbreakableBlock(0,0)}},i.prototype.addStaticRepeatable=function(t,e){this.addDynamicRepeatable(function(){return t},e)},i.prototype.addDynamicRepeatable=function(t,e){for(var n=this.writer.context().pages,r=0,i=n.length;i>r;r++){this.writer.context().page=r;var o=t(r+1,i);if(o){var a=e(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(a.width,a.height),this.processNode(this.docMeasure.measureDocument(o)),this.writer.commitUnbreakableBlock(a.x,a.y)}}},i.prototype.addHeadersAndFooters=function(t,e){var n=function(t,e){return{x:0,y:0,width:t.width,height:e.top}},r=function(t,e){return{x:0,y:t.height-e.bottom,width:t.width,height:e.bottom}};v(t)?this.addDynamicRepeatable(t,n):t&&this.addStaticRepeatable(t,n),v(e)?this.addDynamicRepeatable(e,r):e&&this.addStaticRepeatable(e,r)},i.prototype.addWatermark=function(t,e){function n(t,e,n){for(var r,i=t.width,o=t.height,a=.8*Math.sqrt(i*i+o*o),s=new y(n),h=new b,u=0,c=1e3,l=(u+c)/2;Math.abs(u-c)>1;)h.push({fontSize:l}),r=s.sizeOfString(e,h),r.width>a?(c=l,l=(u+c)/2):r.widtha;a++)o[a].watermark=i},i.prototype.processNode=function(t){function e(e){var r=t._margin;"before"===t.pageBreak&&n.writer.moveToNextPage(t.pageOrientation),r&&(n.writer.context().moveDown(r[1]),n.writer.context().addMargin(r[0],r[2])),e(),r&&(n.writer.context().addMargin(-r[0],-r[2]),n.writer.context().moveDown(r[3])),"after"===t.pageBreak&&n.writer.moveToNextPage(t.pageOrientation)}var n=this;this.linearNodeList.push(t),o(t),e(function(){var e=t.absolutePosition;if(e&&(n.writer.context().beginDetachedBlock(),n.writer.context().moveTo(e.x||0,e.y||0)),t.stack)n.processVerticalContainer(t);else if(t.columns)n.processColumns(t);else if(t.ul)n.processList(!1,t);else if(t.ol)n.processList(!0,t);else if(t.table)n.processTable(t);else if(void 0!==t.text)n.processLeaf(t);else if(t.image)n.processImage(t);else if(t.canvas)n.processCanvas(t);else if(t.qr)n.processQr(t);else if(!t._span)throw"Unrecognized document structure: "+JSON.stringify(t,m);e&&n.writer.context().endDetachedBlock()})},i.prototype.processVerticalContainer=function(t){var e=this;t.stack.forEach(function(n){e.processNode(n),r(t.positions,n.positions)})},i.prototype.processColumns=function(t){function e(t){if(!t)return null;var e=[];e.push(0);for(var r=n.length-1;r>0;r--)e.push(t);return e}var n=t.columns,i=this.writer.context().availableWidth,o=e(t._gap);o&&(i-=(o.length-1)*t._gap),l.buildColumnWidths(n,i);var a=this.processRow(n,n,o);r(t.positions,a.positions)},i.prototype.processRow=function(t,e,n,i,o){function a(t){for(var e,n=0,r=c.length;r>n;n++){var i=c[n];if(i.prevPage===t.prevPage){e=i;break}}e||(e=t,c.push(e)),e.prevY=Math.max(e.prevY,t.prevY),e.y=Math.min(e.y,t.y)}function s(t){return n&&n.length>t?n[t]:0}function h(t,e){if(t.rowSpan&&t.rowSpan>1){var n=o+t.rowSpan-1;if(n>=i.length)throw"Row span for column "+e+" (with indexes starting from 0) exceeded row count";return i[n][e]}return null}var u=this,c=[],l=[];return this.tracker.auto("pageChanged",a,function(){e=e||t,u.writer.context().beginColumnGroup();for(var i=0,o=t.length;o>i;i++){var a=t[i],c=e[i]._calcWidth,f=s(i);if(a.colSpan&&a.colSpan>1)for(var d=1;dn;n++){e.beginRow(n,this.writer);var o=this.processRow(t.table.body[n],t.table.widths,t._offsets.offsets,t.table.body,n);r(t.positions,o.positions),e.endRow(n,this.writer,o.pageBreaks)}e.endTable(this.writer)},i.prototype.processLeaf=function(t){for(var e=this.buildNextLine(t),n=e?e.getHeight():0,r=t.maxHeight||-1;e&&(-1===r||r>n);){var i=this.writer.addLine(e);t.positions.push(i),e=this.buildNextLine(t),e&&(n+=e.getHeight())}},i.prototype.buildNextLine=function(t){if(!t._inlines||0===t._inlines.length)return null;for(var e=new d(this.writer.context().availableWidth);t._inlines&&t._inlines.length>0&&e.hasEnoughSpaceForInline(t._inlines[0]);)e.addInline(t._inlines.shift());return e.lastLineInParagraph=0===t._inlines.length,e},i.prototype.processImage=function(t){var e=this.writer.addImage(t);t.positions.push(e)},i.prototype.processCanvas=function(t){var e=t._minHeight;this.writer.context().availableHeight=0&&n.splice(r,1)}},n.prototype.emit=function(t){var e=Array.prototype.slice.call(arguments,1),n=this.events[t];n&&n.forEach(function(t){t.apply(this,e)})},n.prototype.auto=function(t,e,n){this.startTracking(t,e),n(),this.stopTracking(t,e)},t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r,a,s){this.textTools=new i(t),this.styleStack=new o(e,n),this.imageMeasure=r,this.tableLayouts=a,this.images=s,this.autoImageIndex=1}var i=n(14),o=n(15),a=n(16),s=n(17).fontStringify,h=n(17).pack,u=n(18);r.prototype.measureDocument=function(t){return this.measureNode(t)},r.prototype.measureNode=function(t){function e(t){var e=t._margin;return e&&(t._minWidth+=e[0]+e[2],t._maxWidth+=e[0]+e[2]),t}function n(){function e(t,e){return t.marginLeft||t.marginTop||t.marginRight||t.marginBottom?[t.marginLeft||e[0]||0,t.marginTop||e[1]||0,t.marginRight||e[2]||0,t.marginBottom||e[3]||0]:e}function n(t){for(var e={},n=t.length-1;n>=0;n--){var i=t[n],o=r.styleStack.styleDictionary[i];for(var a in o)o.hasOwnProperty(a)&&(e[a]=o[a])}return e}function i(t){return"number"==typeof t||t instanceof Number?t=[t,t,t,t]:t instanceof Array&&2===t.length&&(t=[t[0],t[1],t[0],t[1]]),t}var o=[void 0,void 0,void 0,void 0];if(t.style){var a=t.style instanceof Array?t.style:[t.style],s=n(a);s&&(o=e(s,o)),s.margin&&(o=i(s.margin))}return o=e(t,o),t.margin&&(o=i(t.margin)),void 0===o[0]&&void 0===o[1]&&void 0===o[2]&&void 0===o[3]?null:o}t instanceof Array?t={stack:t}:("string"==typeof t||t instanceof String)&&(t={text:t}),0===Object.keys(t).length&&(t={text:""});var r=this;return this.styleStack.auto(t,function(){if(t._margin=n(t),t.columns)return e(r.measureColumns(t));if(t.stack)return e(r.measureVerticalContainer(t));if(t.ul)return e(r.measureList(!1,t));if(t.ol)return e(r.measureList(!0,t));if(t.table)return e(r.measureTable(t));if(void 0!==t.text)return e(r.measureLeaf(t));if(t.image)return e(r.measureImage(t));if(t.canvas)return e(r.measureCanvas(t));if(t.qr)return e(r.measureQr(t));throw"Unrecognized document structure: "+JSON.stringify(t,s)})},r.prototype.convertIfBase64Image=function(t){ if(/^data:image\/(jpeg|jpg|png);base64,/.test(t.image)){var e="$$pdfmake$$"+this.autoImageIndex++;this.images[e]=t.image,t.image=e}},r.prototype.measureImage=function(t){this.images&&this.convertIfBase64Image(t);var e=this.imageMeasure.measureImage(t.image);if(t.fit){var n=e.width/e.height>t.fit[0]/t.fit[1]?t.fit[0]/e.width:t.fit[1]/e.height;t._width=t._minWidth=t._maxWidth=e.width*n,t._height=e.height*n}else t._width=t._minWidth=t._maxWidth=t.width||e.width,t._height=t.height||e.height*t._width/e.width;return t._alignment=this.styleStack.getProperty("alignment"),t},r.prototype.measureLeaf=function(t){var e=this.styleStack.clone();e.push(t);var n=this.textTools.buildInlines(t.text,e);return t._inlines=n.items,t._minWidth=n.minWidth,t._maxWidth=n.maxWidth,t},r.prototype.measureVerticalContainer=function(t){var e=t.stack;t._minWidth=0,t._maxWidth=0;for(var n=0,r=e.length;r>n;n++)e[n]=this.measureNode(e[n]),t._minWidth=Math.max(t._minWidth,e[n]._minWidth),t._maxWidth=Math.max(t._maxWidth,e[n]._maxWidth);return t},r.prototype.gapSizeForList=function(t,e){if(t){var n=e.length.toString().replace(/./g,"9");return this.textTools.sizeOfString(n+". ",this.styleStack)}return this.textTools.sizeOfString("9. ",this.styleStack)},r.prototype.buildMarker=function(t,e,n,r){var i;if(t)i={_inlines:this.textTools.buildInlines(e,n).items};else{var o=r.fontSize/6;i={canvas:[{x:o,y:r.height/r.lineHeight+r.decender-r.fontSize/3,r1:o,r2:o,type:"ellipse",color:"black"}]}}return i._minWidth=i._maxWidth=r.width,i._minHeight=i._maxHeight=r.height,i},r.prototype.measureList=function(t,e){var n=this.styleStack.clone(),r=t?e.ol:e.ul;e._gapSize=this.gapSizeForList(t,r),e._minWidth=0,e._maxWidth=0;for(var i=1,o=0,a=r.length;a>o;o++){var s=r[o]=this.measureNode(r[o]),h=i++ +". ";s.ol||s.ul||(s.listMarker=this.buildMarker(t,s.counter||h,n,e._gapSize)),e._minWidth=Math.max(e._minWidth,r[o]._minWidth+e._gapSize.width),e._maxWidth=Math.max(e._maxWidth,r[o]._maxWidth+e._gapSize.width)}return e},r.prototype.measureColumns=function(t){var e=t.columns;t._gap=this.styleStack.getProperty("columnGap")||0;for(var n=0,r=e.length;r>n;n++)e[n]=this.measureNode(e[n]);var i=a.measureMinMax(e);return t._minWidth=i.min+t._gap*(e.length-1),t._maxWidth=i.max+t._gap*(e.length-1),t},r.prototype.measureTable=function(t){function e(t,e){return function(){return null!==e&&"object"==typeof e&&(e.fillColor=t.styleStack.getProperty("fillColor")),t.measureNode(e)}}function n(e){var n=t.layout;("string"==typeof t.layout||t instanceof String)&&(n=e[n]);var r={hLineWidth:function(t,e){return 1},vLineWidth:function(t,e){return 1},hLineColor:function(t,e){return"black"},vLineColor:function(t,e){return"black"},paddingLeft:function(t,e){return 4},paddingRight:function(t,e){return 4},paddingTop:function(t,e){return 2},paddingBottom:function(t,e){return 2}};return h(r,n)}function r(e){for(var n=[],r=0,i=0,o=0,a=t.table.widths.length;a>o;o++){var s=i+e.vLineWidth(o,t)+e.paddingLeft(o,t);n.push(s),r+=s,i=e.paddingRight(o,t)}return r+=i+e.vLineWidth(t.table.widths.length,t),{total:r,offsets:n}}function i(){for(var e,n,r=0,i=g.length;i>r;r++){var a=g[r],s=o(a.col,a.span,t._offsets),h=a.minWidth-s.minWidth,u=a.maxWidth-s.maxWidth;if(h>0)for(e=h/a.span,n=0;n0)for(e=u/a.span,n=0;no;o++)i.minWidth+=t.table.widths[e+o]._minWidth+(o?r.offsets[e+o]:0),i.maxWidth+=t.table.widths[e+o]._maxWidth+(o?r.offsets[e+o]:0);return i}function s(t,e,n){for(var r=1;n>r;r++)t[e+r]={_span:!0,_minWidth:0,_maxWidth:0,rowSpan:t[e].rowSpan}}function u(t,e,n,r){for(var i=1;r>i;i++)t.body[e+i][n]={_span:!0,_minWidth:0,_maxWidth:0,fillColor:t.body[e][n].fillColor}}function c(t){if(t.table.widths||(t.table.widths="auto"),"string"==typeof t.table.widths||t.table.widths instanceof String)for(t.table.widths=[t.table.widths];t.table.widths.lengthe;e++){var r=t.table.widths[e];("number"==typeof r||r instanceof Number||"string"==typeof r||r instanceof String)&&(t.table.widths[e]={width:r})}}c(t),t._layout=n(this.tableLayouts),t._offsets=r(t._layout);var l,f,d,p,g=[];for(l=0,d=t.table.body[0].length;d>l;l++){var m=t.table.widths[l];for(m._minWidth=0,m._maxWidth=0,f=0,p=t.table.body.length;p>f;f++){var v=t.table.body[f],y=v[l];y._span||(y=v[l]=this.styleStack.auto(y,e(this,y)),y.colSpan&&y.colSpan>1?(s(v,l,y.colSpan),g.push({col:l,span:y.colSpan,minWidth:y._minWidth,maxWidth:y._maxWidth})):(m._minWidth=Math.max(m._minWidth,y._minWidth),m._maxWidth=Math.max(m._maxWidth,y._maxWidth))),y.rowSpan&&y.rowSpan>1&&u(t.table,f,l,y.rowSpan)}}i();var b=a.measureMinMax(t.table.widths);return t._minWidth=b.min+t._offsets.total,t._maxWidth=b.max+t._offsets.total,t},r.prototype.measureCanvas=function(t){for(var e=0,n=0,r=0,i=t.canvas.length;i>r;r++){var o=t.canvas[r];switch(o.type){case"ellipse":e=Math.max(e,o.x+o.r1),n=Math.max(n,o.y+o.r2);break;case"rect":e=Math.max(e,o.x+o.w),n=Math.max(n,o.y+o.h);break;case"line":e=Math.max(e,o.x1,o.x2),n=Math.max(n,o.y1,o.y2);break;case"polyline":for(var a=0,s=o.points.length;s>a;a++)e=Math.max(e,o.points[a].x),n=Math.max(n,o.points[a].y)}}return t._minWidth=t._maxWidth=e,t._minHeight=t._maxHeight=n,t},r.prototype.measureQr=function(t){return t=u.measure(t),t._alignment=this.styleStack.getProperty("alignment"),t},t.exports=r},function(t,e){"use strict";function n(t){this.fontProvider=t}function r(t,e){var n=[];t=t.replace(" "," ");var r;r=e?[t,""]:t.match(u);for(var i=0,o=r.length;o-1>i;i++){var a=r[i],s=0===a.length;if(s){var h=0===n.length||n[n.length-1].lineEnd;h?n.push({text:"",lineEnd:!0}):n[n.length-1].lineEnd=!0}else n.push({text:a})}return n}function i(t,e){e=e||{},t=t||{};for(var n in t)"text"!=n&&t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function o(t){var e=[];("string"==typeof t||t instanceof String)&&(t=[t]);for(var n=0,o=t.length;o>n;n++){var a,s=t[n],h=null;"string"==typeof s||s instanceof String?a=r(s):(a=r(s.text,s.noWrap),h=i(s));for(var u=0,c=a.length;c>u;u++){var l={text:a[u].text};a[u].lineEnd&&(l.lineEnd=!0),i(h,l),e.push(l)}}return e}function a(t){return t.replace(/[^A-Za-z0-9\[\] ]/g,function(t){return f[t]||t})}function s(t,e,n,r){var i;return void 0!==t[n]&&null!==t[n]?t[n]:e?(e.auto(t,function(){i=e.getProperty(n)}),null!==i&&void 0!==i?i:r):r}function h(t,e,n){var r=o(e);return r.forEach(function(e){var r=s(e,n,"font","Roboto"),i=s(e,n,"fontSize",12),o=s(e,n,"bold",!1),h=s(e,n,"italics",!1),u=s(e,n,"color","black"),f=s(e,n,"decoration",null),d=s(e,n,"decorationColor",null),p=s(e,n,"decorationStyle",null),g=s(e,n,"background",null),m=s(e,n,"lineHeight",1),v=t.provideFont(r,o,h);e.width=v.widthOfString(a(e.text),i),e.height=v.lineHeight(i)*m;var y=e.text.match(c),b=e.text.match(l);y?e.leadingCut=v.widthOfString(y[0],i):e.leadingCut=0,b?e.trailingCut=v.widthOfString(b[0],i):e.trailingCut=0,e.alignment=s(e,n,"alignment","left"),e.font=v,e.fontSize=i,e.color=u,e.decoration=f,e.decorationColor=d,e.decorationStyle=p,e.background=g}),r}var u=/([^ ,\/!.?:;\-\n]*[ ,\/!.?:;\-]*)|\n/g,c=/^(\s)+/g,l=/(\s)+$/g;n.prototype.buildInlines=function(t,e){function n(t){return Math.max(0,t.width-t.leadingCut-t.trailingCut)}var r,i=h(this.fontProvider,t,e),o=0,a=0;return i.forEach(function(t){o=Math.max(o,t.width-t.leadingCut-t.trailingCut),r||(r={width:0,leadingCut:t.leadingCut,trailingCut:0}),r.width+=t.width,r.trailingCut=t.trailingCut,a=Math.max(a,n(r)),t.lineEnd&&(r=null)}),s({},e,"noWrap",!1)&&(o=a),{items:i,minWidth:o,maxWidth:a}},n.prototype.sizeOfString=function(t,e){t=t.replace(" "," ");var n=s({},e,"font","Roboto"),r=s({},e,"fontSize",12),i=s({},e,"bold",!1),o=s({},e,"italics",!1),h=s({},e,"lineHeight",1),u=this.fontProvider.provideFont(n,i,o);return{width:u.widthOfString(a(t),r),height:u.lineHeight(r)*h,fontSize:r,lineHeight:h,ascender:u.ascender/1e3*r,decender:u.decender/1e3*r}};var f={"Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z"};t.exports=n},function(t,e){"use strict";function n(t,e){this.defaultStyle=e||{},this.styleDictionary=t,this.styleOverrides=[]}n.prototype.clone=function(){var t=new n(this.styleDictionary,this.defaultStyle);return this.styleOverrides.forEach(function(e){t.styleOverrides.push(e)}),t},n.prototype.push=function(t){this.styleOverrides.push(t)},n.prototype.pop=function(t){for(t=t||1;t-->0;)this.styleOverrides.pop()},n.prototype.autopush=function(t){if("string"==typeof t||t instanceof String)return 0;var e=[];t.style&&(e=t.style instanceof Array?t.style:[t.style]);for(var n=0,r=e.length;r>n;n++)this.push(e[n]);var i={},o=!1;return["font","fontSize","bold","italics","alignment","color","columnGap","fillColor","decoration","decorationStyle","decorationColor","background","lineHeight","noWrap"].forEach(function(e){void 0!==t[e]&&null!==t[e]&&(i[e]=t[e],o=!0)}),o&&this.push(i),e.length+(o?1:0)},n.prototype.auto=function(t,e){var n=this.autopush(t),r=e();return n>0&&this.pop(n),r},n.prototype.getProperty=function(t){if(this.styleOverrides)for(var e=this.styleOverrides.length-1;e>=0;e--){var n=this.styleOverrides[e];if("string"==typeof n||n instanceof String){var r=this.styleDictionary[n];if(r&&null!==r[t]&&void 0!==r[t])return r[t]}else if(void 0!==n[t]&&null!==n[t])return n[t]}return this.defaultStyle&&this.defaultStyle[t]},t.exports=n},function(t,e){"use strict";function n(t,e){var n=[],o=0,a=0,s=[],h=0,u=0,c=[],l=e;t.forEach(function(t){r(t)?(n.push(t),o+=t._minWidth,a+=t._maxWidth):i(t)?(s.push(t),h=Math.max(h,t._minWidth),u=Math.max(u,t._maxWidth)):c.push(t)}),c.forEach(function(t){"string"==typeof t.width&&/\d+%/.test(t.width)&&(t.width=parseFloat(t.width)*l/100),t.width=e)n.forEach(function(t){t._calcWidth=t._minWidth}),s.forEach(function(t){t._calcWidth=h});else{if(e>d)n.forEach(function(t){t._calcWidth=t._maxWidth,e-=t._calcWidth});else{var p=e-f,g=d-f;n.forEach(function(t){var n=t._maxWidth-t._minWidth;t._calcWidth=t._minWidth+n*p/g,e-=t._calcWidth})}if(s.length>0){var m=e/s.length;s.forEach(function(t){t._calcWidth=m})}}}function r(t){return"auto"===t.width}function i(t){return null===t.width||void 0===t.width||"*"===t.width||"star"===t.width}function o(t){for(var e={min:0,max:0},n={min:0,max:0},o=0,a=0,s=t.length;s>a;a++){var h=t[a];i(h)?(n.min=Math.max(n.min,h._minWidth),n.max=Math.max(n.max,h._maxWidth),o++):r(h)?(e.min+=h._minWidth,e.max+=h._maxWidth):(e.min+=void 0!==h.width&&h.width||h._minWidth,e.max+=void 0!==h.width&&h.width||h._maxWidth)}return o&&(e.min+=o*n.min,e.max+=o*n.max),e}t.exports={buildColumnWidths:n,measureMinMax:o,isAutoColumn:r,isStarColumn:i}},function(t,e){"use strict";function n(){for(var t={},e=0,n=arguments.length;n>e;e++){var r=arguments[e];if(r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}function r(t,e,n){switch(t.type){case"ellipse":case"rect":t.x+=e,t.y+=n;break;case"line":t.x1+=e,t.x2+=e,t.y1+=n,t.y2+=n;break;case"polyline":for(var r=0,i=t.points.length;i>r;r++)t.points[r].x+=e,t.points[r].y+=n}}function i(t,e){return"font"===t?"font":e}function o(t){var e={};return t&&"[object Function]"===e.toString.call(t)}t.exports={pack:n,fontStringify:i,offsetVector:r,isFunction:o}},function(t,e){"use strict";function n(t,e){var n={numeric:s,alphanumeric:h,octet:u},r={L:p,M:g,Q:m,H:v};e=e||{};var i=e.version||-1,o=r[(e.eccLevel||"L").toUpperCase()],a=e.mode?n[e.mode.toLowerCase()]:-1,c="mask"in e?e.mask:-1;if(0>a)a="string"==typeof t?t.match(l)?s:t.match(d)?h:u:u;else if(a!=s&&a!=h&&a!=u)throw"invalid or unsupported mode";if(t=B(a,t),null===t)throw"invalid data format";if(0>o||o>3)throw"invalid ECC level";if(0>i){for(i=1;40>=i&&!(t.length<=O(i,a,o));++i);if(i>40)throw"too large data for the Qr format"}else if(1>i||i>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=c&&(0>c||c>8))throw"invalid mask";return Y(t,i,a,o,c)}function r(t,e){var r=[],i=t.background||"#fff",o=t.foreground||"#000",a=n(t,e),s=a.length,h=Math.floor(e.fit?e.fit/s:5),u=s*h;r.push({type:"rect",x:0,y:0,w:u,h:u,lineWidth:0,color:i});for(var c=0;s>c;++c)for(var l=0;s>l;++l)a[c][l]&&r.push({type:"rect",x:h*c,y:h*l,w:h,h:h,lineWidth:0,color:o});return{canvas:r,size:u}}function i(t){var e=r(t.qr,t);return t._canvas=e.canvas,t._width=t._height=t._minWidth=t._maxWidth=t._minHeight=t._maxHeight=e.size,t}for(var o=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],a=0,s=1,h=2,u=4,c=8,l=/^\d*$/,f=/^[A-Za-z0-9 $%*+\-./:]*$/,d=/^[A-Z0-9 $%*+\-./:]*$/,p=1,g=0,m=3,v=2,y=[],b=[-1],w=0,_=1;255>w;++w)y.push(_),b[_]=w,_=2*_^(_>=128?285:0);for(var A=[[]],w=0;30>w;++w){for(var x=A[w],S=[],k=0;w>=k;++k){var C=w>k?y[x[k]]:0,I=y[(w+(x[k-1]||0))%255];S.push(b[C^I])}A.push(S)}for(var R={},w=0;45>w;++w)R["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(w)]=w;var E=[function(t,e){return(t+e)%2===0},function(t,e){return t%2===0},function(t,e){return e%3===0},function(t,e){return(t+e)%3===0},function(t,e){return((t/2|0)+(e/3|0))%2===0},function(t,e){return t*e%2+t*e%3===0},function(t,e){return(t*e%2+t*e%3)%2===0},function(t,e){return((t+e)%2+t*e%3)%2===0}],P=function(t){return t>6},T=function(t){return 4*t+17},L=function(t){var e=o[t],n=16*t*t+128*t+64;return P(t)&&(n-=36),e[2].length&&(n-=25*e[2].length*e[2].length-10*e[2].length-55),n},D=function(t,e){var n=-8&L(t),r=o[t];return n-=8*r[0][e]*r[1][e]},F=function(t,e){switch(e){case s:return 10>t?10:27>t?12:14;case h:return 10>t?9:27>t?11:13;case u:return 10>t?8:16;case c:return 10>t?8:27>t?10:12}},O=function(t,e,n){var r=D(t,n)-4-F(t,e);switch(e){case s:return 3*(r/10|0)+(4>r%10?0:7>r%10?1:2);case h:return 2*(r/11|0)+(6>r%11?0:1);case u:return r/8|0;case c:return r/13|0}},B=function(t,e){switch(t){case s:return e.match(l)?e:null;case h:return e.match(f)?e.toUpperCase():null;case u:if("string"==typeof e){for(var n=[],r=0;ri?n.push(i):2048>i?n.push(192|i>>6,128|63&i):65536>i?n.push(224|i>>12,128|i>>6&63,128|63&i):n.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i)}return n}return e}},M=function(t,e,n,r){var i=[],o=0,c=8,l=n.length,f=function(t,e){if(e>=c){for(i.push(o|t>>(e-=c));e>=8;)i.push(t>>(e-=8)&255);o=0,c=8}e>0&&(o|=(t&(1<p;p+=3)f(parseInt(n.substring(p-2,p+1),10),10);f(parseInt(n.substring(p-2),10),[0,4,7][l%3]);break;case h:for(var p=1;l>p;p+=2)f(45*R[n.charAt(p-1)]+R[n.charAt(p)],11);l%2==1&&f(R[n.charAt(p-1)],6);break;case u:for(var p=0;l>p;++p)f(n[p],8)}for(f(a,4),8>c&&i.push(o);i.length+1o;++o)n.push(0);for(var o=0;r>o;){var a=b[n[o++]];if(a>=0)for(var s=0;i>s;++s)n[o+s]^=y[(a+e[s])%255]}return n.slice(r)},W=function(t,e,n){for(var r=[],i=t.length/e|0,o=0,a=e-t.length%e,s=0;a>s;++s)r.push(o),o+=i;for(var s=a;e>s;++s)r.push(o),o+=i+1;r.push(o);for(var h=[],s=0;e>s;++s)h.push(U(t.slice(r[s],r[s+1]),n));for(var u=[],c=t.length/e|0,s=0;c>s;++s)for(var l=0;e>l;++l)u.push(t[r[l]+s]);for(var l=a;e>l;++l)u.push(t[r[l+1]-1]);for(var s=0;sl;++l)u.push(h[l][s]);return u},j=function(t,e,n,r){for(var i=t<=0;--o)i>>r+o&1&&(i^=n<a;++a)r.push([]),i.push([]);var s=function(t,e,n,o,a){for(var s=0;n>s;++s)for(var h=0;o>h;++h)r[t+s][e+h]=a[s]>>h&1,i[t+s][e+h]=1};s(0,0,9,9,[127,65,93,93,93,65,383,0,64]),s(n-8,0,8,9,[256,127,65,93,93,93,65,127]),s(0,n-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var a=9;n-8>a;++a)r[6][a]=r[a][6]=1&~a,i[6][a]=i[a][6]=1;for(var h=e[2],u=h.length,a=0;u>a;++a)for(var c=0===a||a===u-1?1:0,l=0===a?u-1:u,f=c;l>f;++f)s(h[a],h[f],5,5,[31,17,21,17,31]);if(P(t))for(var d=j(t,6,7973,12),p=0,a=0;6>a;++a)for(var f=0;3>f;++f)r[a][n-11+f]=r[n-11+f][a]=d>>p++&1,i[a][n-11+f]=i[n-11+f][a]=1;return{matrix:r,reserved:i}},N=function(t,e,n){for(var r=t.length,i=0,o=-1,a=r-1;a>=0;a-=2){6==a&&--a;for(var s=0>o?r-1:0,h=0;r>h;++h){for(var u=a;u>a-2;--u)e[s][u]||(t[s][u]=n[i>>3]>>(7&~i)&1,++i);s+=o}o=-o}return t},H=function(t,e,n){for(var r=E[n],i=t.length,o=0;i>o;++o)for(var a=0;i>a;++a)e[o][a]||(t[o][a]^=r(o,a));return t},G=function(t,e,n,r){for(var i=t.length,o=21522^j(n<<3|r,5,1335,10),a=0;15>a;++a){var s=[0,1,2,3,4,5,7,8,i-7,i-6,i-5,i-4,i-3,i-2,i-1][a],h=[i-1,i-2,i-3,i-4,i-5,i-6,i-7,i-8,7,5,4,3,2,1,0][a];t[s][8]=t[8][h]=o>>a&1}return t},Z=function(t){for(var e=3,n=3,r=40,i=10,o=function(t){for(var n=0,i=0;i=5&&(n+=e+(t[i]-5));for(var i=5;i=4*o||t[i+1]>=4*o)&&(n+=r)}return n},a=t.length,s=0,h=0,u=0;a>u;++u){var c,l=t[u];c=[0];for(var f=0;a>f;){var d;for(d=0;a>f&&l[f];++d)++f;for(c.push(d),d=0;a>f&&!l[f];++d)++f;c.push(d)}s+=o(c),c=[0];for(var f=0;a>f;){var d;for(d=0;a>f&&t[f][u];++d)++f;for(c.push(d),d=0;a>f&&!t[f][u];++d)++f;c.push(d)}s+=o(c);var p=t[u+1]||[];h+=l[0];for(var f=1;a>f;++f){var g=l[f];h+=g,l[f-1]==g&&p[f]===g&&p[f-1]===g&&(s+=n)}}return s+=i*(Math.abs(h/a/a-.5)/.05|0)},Y=function(t,e,n,r,i){var a=o[e],s=M(e,n,t,D(e,r)>>3);s=W(s,a[1][r],A[a[0][r]]);var h=z(e),u=h.matrix,c=h.reserved;if(N(u,c,s),0>i){H(u,c,0),G(u,c,r,0);var l=0,f=Z(u);for(H(u,c,0),i=1;8>i;++i){H(u,c,i),G(u,c,r,i);var d=Z(u);f>d&&(f=d,l=i),H(u,c,i)}i=l}return H(u,c,i),G(u,c,r,i),u};t.exports={measure:i}},function(t,e,n){"use strict";function r(t,e){this.pages=[],this.pageMargins=e,this.x=e.left,this.availableWidth=t.width-e.left-e.right,this.availableHeight=0,this.page=-1,this.snapshots=[],this.endingCell=null,this.tracker=new a,this.addPage(t)}function i(t,e){return void 0===t?e:"landscape"===t?"landscape":"portrait"}function o(t,e){var n;return n=t.page>e.page?t:e.page>t.page?e:t.y>e.y?t:e,{page:n.page,x:n.x,y:n.y,availableHeight:n.availableHeight,availableWidth:n.availableWidth}}var a=n(12);r.prototype.beginColumnGroup=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,bottomMost:{y:this.y,page:this.page},endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth}),this.lastColumnWidth=0},r.prototype.beginColumn=function(t,e,n){var r=this.snapshots[this.snapshots.length-1];this.calculateBottomMost(r),this.endingCell=n,this.page=r.page,this.x=this.x+this.lastColumnWidth+(e||0),this.y=r.y,this.availableWidth=t,this.availableHeight=r.availableHeight,this.lastColumnWidth=t},r.prototype.calculateBottomMost=function(t){this.endingCell?(this.saveContextInEndingCell(this.endingCell),this.endingCell=null):t.bottomMost=o(this,t.bottomMost)},r.prototype.markEnding=function(t){this.page=t._columnEndingContext.page,this.x=t._columnEndingContext.x,this.y=t._columnEndingContext.y,this.availableWidth=t._columnEndingContext.availableWidth,this.availableHeight=t._columnEndingContext.availableHeight,this.lastColumnWidth=t._columnEndingContext.lastColumnWidth},r.prototype.saveContextInEndingCell=function(t){t._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},r.prototype.completeColumnGroup=function(){var t=this.snapshots.pop();this.calculateBottomMost(t),this.endingCell=null,this.x=t.x,this.y=t.bottomMost.y,this.page=t.bottomMost.page,this.availableWidth=t.availableWidth,this.availableHeight=t.bottomMost.availableHeight,this.lastColumnWidth=t.lastColumnWidth},r.prototype.addMargin=function(t,e){this.x+=t,this.availableWidth-=t+(e||0)},r.prototype.moveDown=function(t){return this.y+=t,this.availableHeight-=t,this.availableHeight>0},r.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},r.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},r.prototype.moveTo=function(t,e){void 0!==t&&null!==t&&(this.x=t,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),void 0!==e&&null!==e&&(this.y=e,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},r.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},r.prototype.endDetachedBlock=function(){var t=this.snapshots.pop();this.x=t.x,this.y=t.y,this.availableWidth=t.availableWidth,this.availableHeight=t.availableHeight,this.page=t.page,this.endingCell=t.endingCell,this.lastColumnWidth=t.lastColumnWidth};var s=function(t,e){return e=i(e,t.pageSize.orientation),e!==t.pageSize.orientation?{orientation:e,width:t.pageSize.height,height:t.pageSize.width}:{orientation:t.pageSize.orientation,width:t.pageSize.width,height:t.pageSize.height}};r.prototype.moveToNextPage=function(t){var e=this.page+1,n=this.page,r=this.y,i=e>=this.pages.length;return i?this.addPage(s(this.getCurrentPage(),t)):(this.page=e,this.initializePage()),{newPageCreated:i,prevPage:n,prevY:r,y:this.y}},r.prototype.addPage=function(t){var e={items:[],pageSize:t};return this.pages.push(e),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),e},r.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},r.prototype.getCurrentPosition=function(){var t=this.getCurrentPage().pageSize,e=t.height-this.pageMargins.top-this.pageMargins.bottom,n=t.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:t.orientation,pageInnerHeight:e,pageInnerWidth:n,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/e,horizontalRatio:(this.x-this.pageMargins.left)/n}},t.exports=r},function(t,e,n){"use strict";function r(t,e){this.transactionLevel=0,this.repeatables=[],this.tracker=e,this.writer=new o(t,e)}function i(t,e){var n=e(t);return n||(t.moveToNextPage(),n=e(t)),n}var o=n(21);r.prototype.addLine=function(t,e,n){return i(this,function(r){return r.writer.addLine(t,e,n)})},r.prototype.addImage=function(t,e){return i(this,function(n){return n.writer.addImage(t,e)})},r.prototype.addQr=function(t,e){return i(this,function(n){return n.writer.addQr(t,e)})},r.prototype.addVector=function(t,e,n,r){return this.writer.addVector(t,e,n,r)},r.prototype.addFragment=function(t,e,n,r){this.writer.addFragment(t,e,n,r)||(this.moveToNextPage(),this.writer.addFragment(t,e,n,r))},r.prototype.moveToNextPage=function(t){var e=this.writer.context.moveToNextPage(t);e.newPageCreated?this.repeatables.forEach(function(t){this.writer.addFragment(t,!0)},this):this.repeatables.forEach(function(t){this.writer.context.moveDown(t.height)},this),this.writer.tracker.emit("pageChanged",{prevPage:e.prevPage,prevY:e.prevY,y:e.y})},r.prototype.beginUnbreakableBlock=function(t,e){0===this.transactionLevel++&&(this.originalX=this.writer.context.x,this.writer.pushContext(t,e))},r.prototype.commitUnbreakableBlock=function(t,e){if(0===--this.transactionLevel){var n=this.writer.context;this.writer.popContext();var r=n.pages.length;if(r>0){var i=n.pages[0];if(i.xOffset=t,i.yOffset=e,r>1)if(void 0!==t||void 0!==e)i.height=n.getCurrentPage().pageSize.height-n.pageMargins.top-n.pageMargins.bottom;else{i.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var o=0,a=this.repeatables.length;a>o;o++)i.height-=this.repeatables[o].height}else i.height=n.y;void 0!==t||void 0!==e?this.writer.addFragment(i,!0,!0,!0):this.addFragment(i)}}},r.prototype.currentBlockToRepeatable=function(){var t=this.writer.context,e={items:[]};return t.pages[0].items.forEach(function(t){e.items.push(t)}),e.xOffset=this.originalX,e.height=t.y,e},r.prototype.pushToRepeatables=function(t){this.repeatables.push(t)},r.prototype.popFromRepeatables=function(){this.repeatables.pop()},r.prototype.context=function(){return this.writer.context},t.exports=r},function(t,e,n){"use strict";function r(t,e){this.context=t,this.contextStack=[],this.tracker=e}function i(t,e,n){null===n||void 0===n||0>n||n>t.items.length?t.items.push(e):t.items.splice(n,0,e)}function o(t){var e=new a(t.maxWidth);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var a=n(22),s=n(17).pack,h=n(17).offsetVector,u=n(19);r.prototype.addLine=function(t,e,n){var r=t.getHeight(),o=this.context,a=o.getCurrentPage(),s=this.getCurrentPositionOnPage();return o.availableHeight0&&t.inlines[0].alignment,i=0;switch(r){case"right":i=e-n;break;case"center":i=(e-n)/2}if(i&&(t.x=(t.x||0)+i),"justify"===r&&!t.newLineForced&&!t.lastLineInParagraph&&t.inlines.length>1)for(var o=(e-n)/(t.inlines.length-1),a=1,s=t.inlines.length;s>a;a++)i=a*o,t.inlines[a].x+=i},r.prototype.addImage=function(t,e){var n=this.context,r=n.getCurrentPage(),o=this.getCurrentPositionOnPage();return n.availableHeighto;o++){var s=t._canvas[o];s.x+=t.x,s.y+=t.y,this.addVector(s,!0,!0,e)}return n.moveDown(t._height),i},r.prototype.alignImage=function(t){var e=this.context.availableWidth,n=t._minWidth,r=0;switch(t._alignment){case"right":r=e-n;break;case"center":r=(e-n)/2}r&&(t.x=(t.x||0)+r)},r.prototype.addVector=function(t,e,n,r){var o=this.context,a=o.getCurrentPage(),s=this.getCurrentPositionOnPage();return a?(h(t,e?0:o.x,n?0:o.y),i(a,{type:"vector",item:t},r),s):void 0},r.prototype.addFragment=function(t,e,n,r){var i=this.context,a=i.getCurrentPage();return!e&&t.height>i.availableHeight?!1:(t.items.forEach(function(r){switch(r.type){case"line":var u=o(r.item);u.x=(u.x||0)+(e?t.xOffset||0:i.x),u.y=(u.y||0)+(n?t.yOffset||0:i.y),a.items.push({type:"line",item:u});break;case"vector":var c=s(r.item);h(c,e?t.xOffset||0:i.x,n?t.yOffset||0:i.y),a.items.push({type:"vector",item:c});break;case"image":var l=s(r.item);l.x=(l.x||0)+(e?t.xOffset||0:i.x),l.y=(l.y||0)+(n?t.yOffset||0:i.y),a.items.push({type:"image",item:l})}}),r||i.moveDown(t.height),!0)},r.prototype.pushContext=function(t,e){void 0===t&&(e=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,t=this.context.availableWidth),("number"==typeof t||t instanceof Number)&&(t=new u({width:t,height:e},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=t},r.prototype.popContext=function(){this.context=this.contextStack.pop()},r.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},t.exports=r},function(t,e){"use strict";function n(t){this.maxWidth=t,this.leadingCut=0,this.trailingCut=0,this.inlineWidths=0,this.inlines=[]}n.prototype.getAscenderHeight=function(){var t=0;return this.inlines.forEach(function(e){t=Math.max(t,e.font.ascender/1e3*e.fontSize)}),t},n.prototype.hasEnoughSpaceForInline=function(t){return 0===this.inlines.length?!0:this.newLineForced?!1:this.inlineWidths+t.width-this.leadingCut-(t.trailingCut||0)<=this.maxWidth},n.prototype.addInline=function(t){0===this.inlines.length&&(this.leadingCut=t.leadingCut||0),this.trailingCut=t.trailingCut||0,t.x=this.inlineWidths-this.leadingCut,this.inlines.push(t),this.inlineWidths+=t.width,t.lineEnd&&(this.newLineForced=!0)},n.prototype.getWidth=function(){return this.inlineWidths-this.leadingCut-this.trailingCut},n.prototype.getHeight=function(){var t=0;return this.inlines.forEach(function(e){t=Math.max(t,e.height||0)}),t},t.exports=n},function(t,e,n){"use strict";function r(t){this.tableNode=t}var i=n(16);r.prototype.beginTable=function(t){function e(){var t=0;return r.table.widths.forEach(function(e){t+=e._calcWidth}),t}function n(){var t=[],e=0,n=0;t.push({left:0,rowSpan:0});for(var r=0,i=a.tableNode.table.body[0].length;i>r;r++){var o=a.layout.paddingLeft(r,a.tableNode)+a.layout.paddingRight(r,a.tableNode),s=a.layout.vLineWidth(r,a.tableNode);n=o+s+a.tableNode.table.widths[r]._calcWidth,t[t.length-1].width=n,e+=n,t.push({left:e,rowSpan:0,width:0})}return t}var r,o,a=this;r=this.tableNode,this.offsets=r._offsets,this.layout=r._layout,o=t.context().availableWidth-this.offsets.total,i.buildColumnWidths(r.table.widths,o),this.tableWidth=r._offsets.total+e(),this.rowSpanData=n(),this.cleanUpRepeatables=!1,this.headerRows=r.table.headerRows||0,this.rowsWithoutPageBreak=this.headerRows+(r.table.keepWithHeaderRows||0),this.dontBreakRows=r.table.dontBreakRows||!1,this.rowsWithoutPageBreak&&t.beginUnbreakableBlock(),this.drawHorizontalLine(0,t)},r.prototype.onRowBreak=function(t,e){var n=this;return function(){var t=n.rowPaddingTop+(n.headerRows?0:n.topLineWidth);e.context().moveDown(t)}},r.prototype.beginRow=function(t,e){this.topLineWidth=this.layout.hLineWidth(t,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(t,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(t+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(t,this.tableNode),this.rowCallback=this.onRowBreak(t,e),e.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&e.beginUnbreakableBlock(),this.rowTopY=e.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,e.context().availableHeight-=this.reservedAtBottom,e.context().moveDown(this.rowPaddingTop)},r.prototype.drawHorizontalLine=function(t,e,n){var r=this.layout.hLineWidth(t,this.tableNode); if(r){for(var i=r/2,o=null,a=0,s=this.rowSpanData.length;s>a;a++){var h=this.rowSpanData[a],u=!h.rowSpan;!o&&u&&(o={left:h.left,width:0}),u&&(o.width+=h.width||0);var c=(n||0)+i;u&&a!==s-1||o&&(e.addVector({type:"line",x1:o.left,x2:o.left+o.width,y1:c,y2:c,lineWidth:r,lineColor:"function"==typeof this.layout.hLineColor?this.layout.hLineColor(t,this.tableNode):this.layout.hLineColor},!1,n),o=null)}e.context().moveDown(r)}},r.prototype.drawVerticalLine=function(t,e,n,r,i){var o=this.layout.vLineWidth(r,this.tableNode);0!==o&&i.addVector({type:"line",x1:t+o/2,x2:t+o/2,y1:e,y2:n,lineWidth:o,lineColor:"function"==typeof this.layout.vLineColor?this.layout.vLineColor(r,this.tableNode):this.layout.vLineColor},!1,!0)},r.prototype.endTable=function(t){this.cleanUpRepeatables&&t.popFromRepeatables()},r.prototype.endRow=function(t,e,n){function r(){for(var e=[],n=0,r=0,i=a.tableNode.table.body[t].length;i>r;r++){if(!n){e.push({x:a.rowSpanData[r].left,index:r});var o=a.tableNode.table.body[t][r];n=o._colSpan||o.colSpan||0}n>0&&n--}return e.push({x:a.rowSpanData[a.rowSpanData.length-1].left,index:a.rowSpanData.length-1}),e}var i,o,a=this;e.tracker.stopTracking("pageChanged",this.rowCallback),e.context().moveDown(this.layout.paddingBottom(t,this.tableNode)),e.context().availableHeight+=this.reservedAtBottom;var s=e.context().page,h=e.context().y,u=r(),c=[],l=n&&n.length>0;if(c.push({y0:this.rowTopY,page:l?n[0].prevPage:s}),l)for(o=0,i=n.length;i>o;o++){var f=n[o];c[c.length-1].y1=f.prevY,c.push({y0:f.y,page:f.prevPage+1})}c[c.length-1].y1=h;for(var d=c[0].y1-c[0].y0===this.rowPaddingTop,p=d?1:0,g=c.length;g>p;p++){var m=p0&&!this.headerRows,y=v?0:this.topLineWidth,b=c[p].y0,w=c[p].y1;for(m&&(w+=this.rowPaddingBottom),e.context().page!=c[p].page&&(e.context().page=c[p].page,this.reservedAtBottom=0),o=0,i=u.length;i>o;o++)if(this.drawVerticalLine(u[o].x,b-y,w+this.bottomLineWidth,u[o].index,e),i-1>o){var _=u[o].index,A=this.tableNode.table.body[t][_].fillColor;if(A){var x=this.layout.vLineWidth(_,this.tableNode),S=u[o].x+x,k=b-y;e.addVector({type:"rect",x:S,y:k,w:u[o+1].x-S,h:w+this.bottomLineWidth-k,lineWidth:0,color:A},!1,!0,0)}}m&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(t+1,e,w),v&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(t,e,b)}e.context().page=s,e.context().y=h;var C=this.tableNode.table.body[t];for(o=0,i=C.length;i>o;o++){if(C[o].rowSpan&&(this.rowSpanData[o].rowSpan=C[o].rowSpan,C[o].colSpan&&C[o].colSpan>1))for(var I=1;I0&&this.rowSpanData[o].rowSpan--}this.drawHorizontalLine(t+1,e),this.headerRows&&t===this.headerRows-1&&(this.headerRepeatable=e.currentBlockToRepeatable()),this.dontBreakRows&&e.tracker.auto("pageChanged",function(){a.drawHorizontalLine(t,e)},function(){e.commitUnbreakableBlock(),a.drawHorizontalLine(t,e)}),!this.headerRepeatable||t!==this.rowsWithoutPageBreak-1&&t!==this.tableNode.table.body.length-1||(e.commitUnbreakableBlock(),e.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},t.exports=r},function(t,e,n){(function(e){(function(){var r,i,o,a,s,h,u={}.hasOwnProperty,c=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};h=n(25),s=n(44),i=n(45),a=n(46),o=n(64),r=function(t){function r(t){var e,n,i,o;if(this.options=null!=t?t:{},r.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null!=(i=this.options.compress)?i:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){o=this.options.info;for(e in o)n=o[e],this.info[e]=n}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.addPage()}var h;return c(r,t),h=function(t){var e,n,i;i=[];for(n in t)e=t[n],i.push(r.prototype[n]=e);return i},h(n(65)),h(n(67)),h(n(69)),h(n(89)),h(n(96)),h(n(101)),r.prototype.addPage=function(t){var e;return null==t&&(t=this.options),this.options.bufferPages||this.flushPages(),this.page=new o(this,t),this._pageBuffer.push(this.page),e=this._root.data.Pages.data,e.Kids.push(this.page.dictionary),e.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this},r.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},r.prototype.switchToPage=function(t){var e;if(!(e=this._pageBuffer[t-this._pageBufferStart]))throw new Error("switchToPage("+t+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1));return this.page=e},r.prototype.flushPages=function(){var t,e,n,r;for(e=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=e.length,n=0,r=e.length;r>n;n++)t=e[n],t.end()},r.prototype.ref=function(t){var e;return e=new a(this,this._offsets.length+1,t),this._offsets.push(null),this._waiting++,e},r.prototype._read=function(){},r.prototype._write=function(t){return e.isBuffer(t)||(t=new e(t+"\n","binary")),this.push(t),this._offset+=t.length},r.prototype.addContent=function(t){return this.page.write(t),this},r.prototype._refEnd=function(t){return this._offsets[t.id-1]=t.offset,0===--this._waiting&&this._ended?(this._finalize(),this._ended=!1):void 0},r.prototype.write=function(t,e){var n;return n=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),this.pipe(s.createWriteStream(t)),this.end(),this.once("end",e)},r.prototype.output=function(t){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},r.prototype.end=function(){var t,e,n,r,i,o;this.flushPages(),this._info=this.ref(),i=this.info;for(e in i)r=i[e],"string"==typeof r&&(r=new String(r)),this._info.data[e]=r;this._info.end(),o=this._fontFamilies;for(n in o)t=o[n],t.embed();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},r.prototype._finalize=function(t){var e,n,r,o,a;for(n=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),a=this._offsets,r=0,o=a.length;o>r;r++)e=a[r],e=("0000000000"+e).slice(-10),this._write(e+" 00000 n ");return this._write("trailer"),this._write(i.convert({Size:this._offsets.length+1,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+n),this._write("%%EOF"),this.push(null)},r.prototype.toString=function(){return"[object PDFDocument]"},r}(h.Readable),t.exports=r}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){function r(){i.call(this)}t.exports=r;var i=n(26).EventEmitter,o=n(27);o(r,i),r.Readable=n(28),r.Writable=n(40),r.Duplex=n(41),r.Transform=n(42),r.PassThrough=n(43),r.Stream=r,r.prototype.pipe=function(t,e){function n(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function o(){c||(c=!0,t.end())}function a(){c||(c=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(h(),0===i.listenerCount(this,"error"))throw t}function h(){u.removeListener("data",n),t.removeListener("drain",r),u.removeListener("end",o),u.removeListener("close",a),u.removeListener("error",s),t.removeListener("error",s),u.removeListener("end",h),u.removeListener("close",h),t.removeListener("close",h)}var u=this;u.on("data",n),t.on("drain",r),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",a));var c=!1;return u.on("error",s),t.on("error",s),u.on("end",h),u.on("close",h),t.on("close",h),t.emit("pipe",u),t}},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,h,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,h=0;i>h;h++)u[h].apply(this,s);return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,"function"==typeof console.trace)),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(s=a;s-->0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){e=t.exports=n(29),e.Stream=n(25),e.Readable=e,e.Writable=n(36),e.Duplex=n(35),e.Transform=n(38),e.PassThrough=n(39)},function(t,e,n){(function(e){function r(t,e){var r=n(35);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,e instanceof r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(R||(R=n(37).StringDecoder),this.decoder=new R(t.encoding),this.encoding=t.encoding)}function i(t){return n(35),this instanceof i?(this._readableState=new r(t,this),this.readable=!0,void C.call(this)):new i(t)}function o(t,e,n,r,i){var o=u(e,n);if(o)t.emit("error",o);else if(I.isNullOrUndefined(n))e.reading=!1,e.ended||c(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else!e.decoder||i||r||(n=e.decoder.write(n)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&l(t)),d(t,e);else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length=P)t=P;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function h(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||I.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=s(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var n=null;return I.isBuffer(e)||I.isString(e)||I.isNullOrUndefined(e)||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(t,e){if(e.decoder&&!e.ended){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,l(t)}function l(t){var n=t._readableState;n.needReadable=!1,n.emittedReadable||(E("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){E("emit readable"),t.emit("readable"),y(t)}function d(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(function(){p(t,n)}))}function p(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=i)n=o?r.join(""):S.concat(r,i),r.length=0;else if(tu&&t>h;u++){var s=r[0],l=Math.min(t-h,s.length);o?n+=s.slice(0,l):s.copy(n,h,0,l),l0)throw new Error("endReadable called on non-empty stream");n.endEmitted||(n.ended=!0,e.nextTick(function(){n.endEmitted||0!==n.length||(n.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function _(t,e){for(var n=0,r=t.length;r>n;n++)e(t[n],n)}function A(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1}t.exports=i;var x=n(31),S=n(2).Buffer;i.ReadableState=r;var k=n(26).EventEmitter;k.listenerCount||(k.listenerCount=function(t,e){return t.listeners(e).length});var C=n(25),I=n(32);I.inherits=n(33);var R,E=n(34);E=E&&E.debuglog?E.debuglog("stream"):function(){},I.inherits(i,C),i.prototype.push=function(t,e){var n=this._readableState;return I.isString(t)&&!n.objectMode&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=new S(t,e),e="")),o(this,n,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return R||(R=n(37).StringDecoder),this._readableState.decoder=new R(t),this._readableState.encoding=t,this};var P=8388608;i.prototype.read=function(t){E("read",t);var e=this._readableState,n=t;if((!I.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return E("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?w(this):l(this),null;if(t=h(t,e),0===t&&e.ended)return 0===e.length&&w(this),null;var r=e.needReadable;E("need readable",r),(0===e.length||e.length-t0?b(t,e):null,I.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),n!==t&&e.ended&&0===e.length&&w(this),I.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,n){function r(t){E("onunpipe"),t===l&&o()}function i(){E("onend"),t.end()}function o(){E("cleanup"),t.removeListener("close",h),t.removeListener("finish",u),t.removeListener("drain",m),t.removeListener("error",s),t.removeListener("unpipe",r),l.removeListener("end",i),l.removeListener("end",o),l.removeListener("data",a),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||m()}function a(e){E("ondata");var n=t.write(e);!1===n&&(E("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function s(e){E("onerror",e),c(),t.removeListener("error",s),0===k.listenerCount(t,"error")&&t.emit("error",e)}function h(){t.removeListener("finish",u),c()}function u(){E("onfinish"),t.removeListener("close",h),c()}function c(){E("unpipe"),l.unpipe(t)}var l=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,E("pipe count=%d opts=%j",f.pipesCount,n);var d=(!n||n.end!==!1)&&t!==e.stdout&&t!==e.stderr,p=d?i:o;f.endEmitted?e.nextTick(p):l.once("end",p),t.on("unpipe",r);var m=g(l);return t.on("drain",m),l.on("data",a),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",h),t.once("finish",u),t.emit("pipe",l),f.flowing||(E("pipe resume"),l.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=A(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,n){var r=C.prototype.on.call(this,t,n);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&l(this,i);else{var o=this;e.nextTick(function(){E("readable nexttick read 0"),o.read(0)})}}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(E("resume"),t.flowing=!0,t.reading||(E("resume read 0"),this.read(0)),m(this,t)),this},i.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;t.on("end",function(){if(E("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)}),t.on("data",function(i){if(E("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=r.push(i);o||(n=!0,t.pause())}});for(var i in t)I.isFunction(t[i])&&I.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(e){t.on(e,r.emit.bind(r,e))}),r._read=function(e){E("wrapped _read",e),n&&(n=!1,t.resume())},r},i._fromList=b}).call(e,n(30))},function(t,e){function n(){u=!1,a.length?h=a.concat(h):c=-1,h.length&&r()}function r(){if(!u){var t=setTimeout(n);u=!0;for(var e=h.length;e;){for(a=h,h=[];++c1)for(var n=1;nn;n++)e(t[n],n)}t.exports=r;var a=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},s=n(32);s.inherits=n(33);var h=n(29),u=n(36);s.inherits(r,h),o(a(u.prototype),function(t){r.prototype[t]||(r.prototype[t]=u.prototype[t])})}).call(e,n(30))},function(t,e,n){(function(e){function r(t,e,n){this.chunk=t,this.encoding=e,this.callback=n}function i(t,e){var r=n(35);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){d(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=n(35);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void x.call(this)):new o(t)}function a(t,n,r){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){r(i)})}function s(t,n,r,i){var o=!0;if(!(A.isBuffer(r)||A.isString(r)||A.isNullOrUndefined(r)||n.objectMode)){var a=new TypeError("Invalid non-string/buffer chunk");t.emit("error",a),e.nextTick(function(){i(a)}),o=!1}return o}function h(t,e,n){return!t.objectMode&&t.decodeStrings!==!1&&A.isString(e)&&(e=new _(e,n)),e}function u(t,e,n,i,o){n=h(e,n,i),A.isBuffer(n)&&(i="buffer");var a=e.objectMode?1:n.length;e.length+=a;var s=e.length1){for(var n=[],r=0;r=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&56319>=r)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,r=e.charCodeAt(i);if(r>=55296&&56319>=r){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},u.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(2>=e&&n>>4==14){this.charLength=3;break}if(3>=e&&n>>3==30){this.charLength=4;break}}this.charReceived=e},u.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e}},function(t,e,n){function r(t,e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,h.isNullOrUndefined(n)||t.push(n),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.lengthi;n=i+=2)e=t[n],t[n]=t[n+1],t[n+1]=e;return t},t.convert=function(s){var h,u,c,l,f,d,p,g,m,v;if("string"==typeof s)return"/"+s;if(s instanceof String){for(p=s.replace(r,function(t){return n[t]}),c=!1,u=m=0,v=p.length;v>m;u=m+=1)if(p.charCodeAt(u)>127){c=!0;break}return c&&(p=a(new e("\ufeff"+p,"utf16le")).toString("binary")),"("+p+")"}if(e.isBuffer(s))return"<"+s.toString("hex")+">";if(s instanceof i)return s.toString();if(s instanceof Date)return"(D:"+o(s.getUTCFullYear(),4)+o(s.getUTCMonth(),2)+o(s.getUTCDate(),2)+o(s.getUTCHours(),2)+o(s.getUTCMinutes(),2)+o(s.getUTCSeconds(),2)+"Z)";if(Array.isArray(s))return l=function(){var e,n,r;for(r=[],e=0,n=s.length;n>e;e++)h=s[e],r.push(t.convert(h));return r}().join(" "),"["+l+"]";if("[object Object]"==={}.toString.call(s)){d=["<<"];for(f in s)g=s[f],d.push("/"+f+" "+t.convert(g));return d.push(">>"),d.join("\n")}return""+s},t}(),t.exports=r,i=n(46)}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){(function(e){(function(){var r,i,o,a=function(t,e){return function(){return t.apply(e,arguments)}};o=n(47),i=function(){function t(t,e,n){this.document=t,this.id=e,this.data=null!=n?n:{},this.finalize=a(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return t.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=o.createDeflate(),this.deflate.on("data",function(t){return function(e){return t.chunks.push(e),t.data.Length+=e.length}}(this)),this.deflate.on("end",this.finalize)},t.prototype.write=function(t){var n;return e.isBuffer(t)||(t=new e(t+"\n","binary")),this.uncompressedLength+=t.length,null==(n=this.data).Length&&(n.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(t)):(this.chunks.push(t),this.data.Length+=t.length)},t.prototype.end=function(t){return("string"==typeof t||e.isBuffer(t))&&this.write(t),this.deflate?this.deflate.end():this.finalize()},t.prototype.finalize=function(){var t,e,n,i;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(r.convert(this.data)),this.chunks.length){for(this.document._write("stream"),i=this.chunks,e=0,n=i.length;n>e;e++)t=i[e],this.document._write(t);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},t.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},t}(),t.exports=i,r=n(45)}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){(function(t,r){function i(e,n,r){function i(){for(var t;null!==(t=e.read());)s.push(t),h+=t.length;e.once("readable",i)}function o(t){e.removeListener("end",a),e.removeListener("readable",i),r(t)}function a(){var n=t.concat(s,h);s=[],r(null,n),e.close()}var s=[],h=0;e.on("error",o),e.on("end",a),e.end(n),i()}function o(e,n){if("string"==typeof n&&(n=new t(n)),!t.isBuffer(n))throw new TypeError("Not a string or buffer");var r=g.Z_FINISH;return e._processChunk(n,r)}function a(t){return this instanceof a?void d.call(this,t,g.DEFLATE):new a(t)}function s(t){return this instanceof s?void d.call(this,t,g.INFLATE):new s(t)}function h(t){return this instanceof h?void d.call(this,t,g.GZIP):new h(t)}function u(t){return this instanceof u?void d.call(this,t,g.GUNZIP):new u(t)}function c(t){return this instanceof c?void d.call(this,t,g.DEFLATERAW):new c(t)}function l(t){return this instanceof l?void d.call(this,t,g.INFLATERAW):new l(t)}function f(t){return this instanceof f?void d.call(this,t,g.UNZIP):new f(t)}function d(n,r){if(this._opts=n=n||{},this._chunkSize=n.chunkSize||e.Z_DEFAULT_CHUNK,p.call(this,n),n.flush&&n.flush!==g.Z_NO_FLUSH&&n.flush!==g.Z_PARTIAL_FLUSH&&n.flush!==g.Z_SYNC_FLUSH&&n.flush!==g.Z_FULL_FLUSH&&n.flush!==g.Z_FINISH&&n.flush!==g.Z_BLOCK)throw new Error("Invalid flush flag: "+n.flush);if(this._flushFlag=n.flush||g.Z_NO_FLUSH,n.chunkSize&&(n.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+n.chunkSize);if(n.windowBits&&(n.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+n.windowBits);if(n.level&&(n.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+n.level);if(n.memLevel&&(n.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+n.memLevel);if(n.strategy&&n.strategy!=e.Z_FILTERED&&n.strategy!=e.Z_HUFFMAN_ONLY&&n.strategy!=e.Z_RLE&&n.strategy!=e.Z_FIXED&&n.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+n.strategy);if(n.dictionary&&!t.isBuffer(n.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new g.Zlib(r);var i=this;this._hadError=!1,this._binding.onerror=function(t,n){i._binding=null,i._hadError=!0;var r=new Error(t);r.errno=n,r.code=e.codes[n],i.emit("error",r)};var o=e.Z_DEFAULT_COMPRESSION;"number"==typeof n.level&&(o=n.level);var a=e.Z_DEFAULT_STRATEGY;"number"==typeof n.strategy&&(a=n.strategy),this._binding.init(n.windowBits||e.Z_DEFAULT_WINDOWBITS,o,n.memLevel||e.Z_DEFAULT_MEMLEVEL,a,n.dictionary),this._buffer=new t(this._chunkSize),this._offset=0,this._closed=!1,this._level=o,this._strategy=a,this.once("end",this.close)}var p=n(42),g=n(48),m=n(60),v=n(63).ok;g.Z_MIN_WINDOWBITS=8,g.Z_MAX_WINDOWBITS=15,g.Z_DEFAULT_WINDOWBITS=15,g.Z_MIN_CHUNK=64,g.Z_MAX_CHUNK=1/0,g.Z_DEFAULT_CHUNK=16384,g.Z_MIN_MEMLEVEL=1,g.Z_MAX_MEMLEVEL=9,g.Z_DEFAULT_MEMLEVEL=8,g.Z_MIN_LEVEL=-1,g.Z_MAX_LEVEL=9,g.Z_DEFAULT_LEVEL=g.Z_DEFAULT_COMPRESSION,Object.keys(g).forEach(function(t){t.match(/^Z/)&&(e[t]=g[t])}),e.codes={Z_OK:g.Z_OK,Z_STREAM_END:g.Z_STREAM_END,Z_NEED_DICT:g.Z_NEED_DICT,Z_ERRNO:g.Z_ERRNO,Z_STREAM_ERROR:g.Z_STREAM_ERROR,Z_DATA_ERROR:g.Z_DATA_ERROR,Z_MEM_ERROR:g.Z_MEM_ERROR,Z_BUF_ERROR:g.Z_BUF_ERROR,Z_VERSION_ERROR:g.Z_VERSION_ERROR},Object.keys(e.codes).forEach(function(t){e.codes[e.codes[t]]=t}),e.Deflate=a,e.Inflate=s,e.Gzip=h,e.Gunzip=u,e.DeflateRaw=c,e.InflateRaw=l,e.Unzip=f,e.createDeflate=function(t){return new a(t)},e.createInflate=function(t){return new s(t)},e.createDeflateRaw=function(t){return new c(t)},e.createInflateRaw=function(t){return new l(t)},e.createGzip=function(t){return new h(t)},e.createGunzip=function(t){return new u(t)},e.createUnzip=function(t){return new f(t)},e.deflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new a(e),t,n)},e.deflateSync=function(t,e){return o(new a(e),t)},e.gzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new h(e),t,n)},e.gzipSync=function(t,e){return o(new h(e),t)},e.deflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new c(e),t,n)},e.deflateRawSync=function(t,e){return o(new c(e),t)},e.unzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new f(e),t,n)},e.unzipSync=function(t,e){return o(new f(e),t)},e.inflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new s(e),t,n)},e.inflateSync=function(t,e){return o(new s(e),t)},e.gunzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new u(e),t,n)},e.gunzipSync=function(t,e){return o(new u(e),t)},e.inflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new l(e),t,n)},e.inflateRawSync=function(t,e){return o(new l(e),t)},m.inherits(d,p),d.prototype.params=function(t,n,i){if(te.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==t||this._strategy!==n){var o=this;this.flush(g.Z_SYNC_FLUSH,function(){o._binding.params(t,n),o._hadError||(o._level=t,o._strategy=n,i&&i())})}else r.nextTick(i)},d.prototype.reset=function(){return this._binding.reset()},d.prototype._flush=function(e){this._transform(new t(0),"",e)},d.prototype.flush=function(e,n){var i=this._writableState;if(("function"==typeof e||void 0===e&&!n)&&(n=e,e=g.Z_FULL_FLUSH),i.ended)n&&r.nextTick(n);else if(i.ending)n&&this.once("end",n);else if(i.needDrain){var o=this;this.once("drain",function(){o.flush(n)})}else this._flushFlag=e,this.write(new t(0),"",n)},d.prototype.close=function(t){if(t&&r.nextTick(t),!this._closed){this._closed=!0,this._binding.close();var e=this;r.nextTick(function(){e.emit("close")})}},d.prototype._transform=function(e,n,r){var i,o=this._writableState,a=o.ending||o.ended,s=a&&(!e||o.length===e.length);return null!==!e||t.isBuffer(e)?(s?i=g.Z_FINISH:(i=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||g.Z_NO_FLUSH)),void this._processChunk(e,i,r)):r(new Error("invalid input"))},d.prototype._processChunk=function(e,n,r){function i(c,d){if(!h._hadError){var p=a-d;if(v(p>=0,"have should not go down"),p>0){var g=h._buffer.slice(h._offset,h._offset+p);h._offset+=p,u?h.push(g):(l.push(g),f+=g.length)}if((0===d||h._offset>=h._chunkSize)&&(a=h._chunkSize,h._offset=0,h._buffer=new t(h._chunkSize)),0===d){if(s+=o-c,o=c,!u)return!0;var m=h._binding.write(n,e,s,o,h._buffer,h._offset,h._chunkSize);return m.callback=i,void(m.buffer=e)}return u?void r():!1}}var o=e&&e.length,a=this._chunkSize-this._offset,s=0,h=this,u="function"==typeof r;if(!u){var c,l=[],f=0;this.on("error",function(t){c=t});do var d=this._binding.writeSync(n,e,s,o,this._buffer,this._offset,a);while(!this._hadError&&i(d[0],d[1]));if(this._hadError)throw c;var p=t.concat(l,f);return this.close(),p}var g=this._binding.write(n,e,s,o,this._buffer,this._offset,a);g.buffer=e,g.callback=i},m.inherits(a,d),m.inherits(s,d),m.inherits(h,d),m.inherits(u,d),m.inherits(c,d),m.inherits(l,d),m.inherits(f,d)}).call(e,n(2).Buffer,n(30))},function(t,e,n){(function(t,r){function i(t){if(te.UNZIP)throw new TypeError("Bad argument");this.mode=t,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function o(t,e){for(var n=0;n4?9:0)}function o(t){for(var e=t.length;--e>=0;)t[e]=0}function a(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(R.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function s(t,e){E._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,a(t.strm)}function h(t,e){t.pending_buf[t.pending++]=e}function u(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function c(t,e,n,r){var i=t.avail_in;return i>r&&(i=r),0===i?0:(t.avail_in-=i,R.arraySet(e,t.input,t.next_in,i,n),1===t.state.wrap?t.adler=P(t.adler,e,i,n):2===t.state.wrap&&(t.adler=T(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)}function l(t,e){var n,r,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,h=t.strstart>t.w_size-ut?t.strstart-(t.w_size-ut):0,u=t.window,c=t.w_mask,l=t.prev,f=t.strstart+ht,d=u[o+a-1],p=u[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do if(n=e,u[n+a]===p&&u[n+a-1]===d&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do;while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&f>o);if(r=ht-(f-o),o=f-ht,r>a){if(t.match_start=e,a=r,r>=s)break;d=u[o+a-1],p=u[o+a]}}while((e=l[e&c])>h&&0!==--i);return a<=t.lookahead?a:t.lookahead}function f(t){var e,n,r,i,o,a=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-ut)){R.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,n=t.hash_size,e=n;do r=t.head[--e],t.head[e]=r>=a?r-a:0;while(--n);n=a,e=n;do r=t.prev[--e],t.prev[e]=r>=a?r-a:0;while(--n);i+=a}if(0===t.strm.avail_in)break;if(n=c(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=st)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(f(t),0===t.lookahead&&e===D)return yt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,s(t,!1),0===t.strm.avail_out))return yt;if(t.strstart-t.block_start>=t.w_size-ut&&(s(t,!1),0===t.strm.avail_out))return yt}return t.insert=0,e===B?(s(t,!0),0===t.strm.avail_out?wt:_t):t.strstart>t.block_start&&(s(t,!1),0===t.strm.avail_out)?yt:yt}function p(t,e){for(var n,r;;){if(t.lookahead=st&&(t.ins_h=(t.ins_h<=st)if(r=E._tr_tally(t,t.strstart-t.match_start,t.match_length-st),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=st){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=st&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=st-1)),t.prev_length>=st&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-st,r=E._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-st),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<=st&&t.strstart>0&&(i=t.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=t.strstart+ht;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&o>i);t.match_length=ht-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=st?(n=E._tr_tally(t,1,t.match_length-st),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=E._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(s(t,!1),0===t.strm.avail_out))return yt}return t.insert=0,e===B?(s(t,!0),0===t.strm.avail_out?wt:_t):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?yt:bt}function v(t,e){for(var n;;){if(0===t.lookahead&&(f(t),0===t.lookahead)){if(e===D)return yt;break}if(t.match_length=0,n=E._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(s(t,!1),0===t.strm.avail_out))return yt}return t.insert=0,e===B?(s(t,!0),0===t.strm.avail_out?wt:_t):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?yt:bt}function y(t){t.window_size=2*t.w_size,o(t.head),t.max_lazy_match=I[t.level].max_lazy,t.good_match=I[t.level].good_length,t.nice_match=I[t.level].nice_length,t.max_chain_length=I[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=st-1,t.match_available=0,t.ins_h=0}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=V,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new R.Buf16(2*ot),this.dyn_dtree=new R.Buf16(2*(2*rt+1)),this.bl_tree=new R.Buf16(2*(2*it+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new R.Buf16(at+1),this.heap=new R.Buf16(2*nt+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new R.Buf16(2*nt+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function w(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=X,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?lt:mt,t.adler=2===e.wrap?0:1,e.last_flush=D,E._tr_init(e),U):r(t,j)}function _(t){var e=w(t);return e===U&&y(t.state),e}function A(t,e){return t&&t.state?2!==t.state.wrap?j:(t.state.gzhead=e,U):j}function x(t,e,n,i,o,a){if(!t)return j;var s=1;if(e===H&&(e=6),0>i?(s=0,i=-i):i>15&&(s=2,i-=16),1>o||o>K||n!==V||8>i||i>15||0>e||e>9||0>a||a>J)return r(t,j);8===i&&(i=9);var h=new b;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=i,h.w_size=1<>1,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=a,h.method=n,_(t)}function S(t,e){return x(t,e,V,Q,$,q)}function k(t,e){var n,s,c,l;if(!t||!t.state||e>M||0>e)return t?r(t,j):j;if(s=t.state,!t.output||!t.input&&0!==t.avail_in||s.status===vt&&e!==B)return r(t,0===t.avail_out?N:j);if(s.strm=t,n=s.last_flush,s.last_flush=e,s.status===lt)if(2===s.wrap)t.adler=0,h(s,31),h(s,139),h(s,8),s.gzhead?(h(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),h(s,255&s.gzhead.time),h(s,s.gzhead.time>>8&255),h(s,s.gzhead.time>>16&255),h(s,s.gzhead.time>>24&255),h(s,9===s.level?2:s.strategy>=Z||s.level<2?4:0),h(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(h(s,255&s.gzhead.extra.length),h(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=T(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=ft):(h(s,0),h(s,0),h(s,0),h(s,0),h(s,0),h(s,9===s.level?2:s.strategy>=Z||s.level<2?4:0),h(s,At),s.status=mt);else{var f=V+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=Z||s.level<2?0:s.level<6?1:6===s.level?2:3,f|=d<<6,0!==s.strstart&&(f|=ct),f+=31-f%31,s.status=mt,u(s,f),0!==s.strstart&&(u(s,t.adler>>>16),u(s,65535&t.adler)),t.adler=1}if(s.status===ft)if(s.gzhead.extra){for(c=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>c&&(t.adler=T(t.adler,s.pending_buf,s.pending-c,c)),a(t),c=s.pending,s.pending!==s.pending_buf_size));)h(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>c&&(t.adler=T(t.adler,s.pending_buf,s.pending-c,c)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=dt)}else s.status=dt;if(s.status===dt)if(s.gzhead.name){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(t.adler=T(t.adler,s.pending_buf,s.pending-c,c)),a(t),c=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexc&&(t.adler=T(t.adler,s.pending_buf,s.pending-c,c)),0===l&&(s.gzindex=0,s.status=pt)}else s.status=pt;if(s.status===pt)if(s.gzhead.comment){c=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>c&&(t.adler=T(t.adler,s.pending_buf,s.pending-c,c)),a(t),c=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexc&&(t.adler=T(t.adler,s.pending_buf,s.pending-c,c)),0===l&&(s.status=gt)}else s.status=gt;if(s.status===gt&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&a(t),s.pending+2<=s.pending_buf_size&&(h(s,255&t.adler),h(s,t.adler>>8&255),t.adler=0,s.status=mt)):s.status=mt),0!==s.pending){if(a(t),0===t.avail_out)return s.last_flush=-1,U}else if(0===t.avail_in&&i(e)<=i(n)&&e!==B)return r(t,N);if(s.status===vt&&0!==t.avail_in)return r(t,N);if(0!==t.avail_in||0!==s.lookahead||e!==D&&s.status!==vt){var p=s.strategy===Z?v(s,e):s.strategy===Y?m(s,e):I[s.level].func(s,e);if((p===wt||p===_t)&&(s.status=vt),p===yt||p===wt)return 0===t.avail_out&&(s.last_flush=-1),U;if(p===bt&&(e===F?E._tr_align(s):e!==M&&(E._tr_stored_block(s,0,0,!1),e===O&&(o(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),a(t),0===t.avail_out))return s.last_flush=-1,U}return e!==B?U:s.wrap<=0?W:(2===s.wrap?(h(s,255&t.adler),h(s,t.adler>>8&255),h(s,t.adler>>16&255),h(s,t.adler>>24&255),h(s,255&t.total_in),h(s,t.total_in>>8&255),h(s,t.total_in>>16&255),h(s,t.total_in>>24&255)):(u(s,t.adler>>>16),u(s,65535&t.adler)),a(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?U:W)}function C(t){var e;return t&&t.state?(e=t.state.status,e!==lt&&e!==ft&&e!==dt&&e!==pt&&e!==gt&&e!==mt&&e!==vt?r(t,j):(t.state=null,e===mt?r(t,z):U)):j}var I,R=n(52),E=n(53),P=n(54),T=n(55),L=n(49),D=0,F=1,O=3,B=4,M=5,U=0,W=1,j=-2,z=-3,N=-5,H=-1,G=1,Z=2,Y=3,J=4,q=0,X=2,V=8,K=9,Q=15,$=8,tt=29,et=256,nt=et+1+tt,rt=30,it=19,ot=2*nt+1,at=15,st=3,ht=258,ut=ht+st+1,ct=32,lt=42,ft=69,dt=73,pt=91,gt=103,mt=113,vt=666,yt=1,bt=2,wt=3,_t=4,At=3,xt=function(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i};I=[new xt(0,0,0,0,d),new xt(4,4,8,4,p),new xt(4,5,16,8,p),new xt(4,6,32,32,p),new xt(4,4,16,16,g),new xt(8,16,32,32,g),new xt(8,16,128,128,g),new xt(8,32,128,256,g),new xt(32,128,258,1024,g),new xt(32,258,258,4096,g)],e.deflateInit=S,e.deflateInit2=x,e.deflateReset=_,e.deflateResetKeep=w,e.deflateSetHeader=A,e.deflate=k,e.deflateEnd=C,e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(n,n+r),i);for(var o=0;r>o;o++)t[i+o]=e[n+o]},flattenChunks:function(t){var e,n,r,i,o,a;for(r=0,e=0,n=t.length;n>e;e++)r+=t[e].length;for(a=new Uint8Array(r),i=0,e=0,n=t.length;n>e;e++)o=t[e],a.set(o,i),i+=o.length;return a}},i={arraySet:function(t,e,n,r,i){for(var o=0;r>o;o++)t[i+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(n)},function(t,e,n){"use strict";function r(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t){return 256>t?at[t]:at[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function a(t,e,n){t.bi_valid>J-n?(t.bi_buf|=e<>J-t.bi_valid,t.bi_valid+=n-J):(t.bi_buf|=e<>>=1,n<<=1;while(--e>0);return n>>>1}function u(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function c(t,e){var n,r,i,o,a,s,h=e.dyn_tree,u=e.max_code,c=e.stat_desc.static_tree,l=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(o=0;Y>=o;o++)t.bl_count[o]=0;for(h[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;Z>n;n++)r=t.heap[n],o=h[2*h[2*r+1]+1]+1,o>p&&(o=p,g++),h[2*r+1]=o,r>u||(t.bl_count[o]++,a=0,r>=d&&(a=f[r-d]),s=h[2*r],t.opt_len+=s*(o+a),l&&(t.static_len+=s*(c[2*r+1]+a)));if(0!==g){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(r=t.bl_count[o];0!==r;)i=t.heap[--n],i>u||(h[2*i+1]!==o&&(t.opt_len+=(o-h[2*i+1])*h[2*i],h[2*i+1]=o),r--)}}function l(t,e,n){var r,i,o=new Array(Y+1),a=0;for(r=1;Y>=r;r++)o[r]=a=a+n[r-1]<<1;for(i=0;e>=i;i++){var s=t[2*i+1];0!==s&&(t[2*i]=h(o[s]++,s))}}function f(){var t,e,n,r,i,o=new Array(Y+1);for(n=0,r=0;j-1>r;r++)for(ht[r]=n,t=0;t<1<<$[r];t++)st[n++]=r;for(st[n-1]=r,i=0,r=0;16>r;r++)for(ut[r]=i,t=0;t<1<>=7;H>r;r++)for(ut[r]=i<<7,t=0;t<1<=e;e++)o[e]=0;for(t=0;143>=t;)it[2*t+1]=8,t++,o[8]++;for(;255>=t;)it[2*t+1]=9,t++,o[9]++;for(;279>=t;)it[2*t+1]=7,t++,o[7]++;for(;287>=t;)it[2*t+1]=8,t++,o[8]++;for(l(it,N+1,o),t=0;H>t;t++)ot[2*t+1]=5,ot[2*t]=h(t,5);ct=new dt(it,$,z+1,N,Y),lt=new dt(ot,tt,0,H,Y),ft=new dt(new Array(0),et,0,G,q)}function d(t){var e;for(e=0;N>e;e++)t.dyn_ltree[2*e]=0;for(e=0;H>e;e++)t.dyn_dtree[2*e]=0;for(e=0;G>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*X]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function p(t){t.bi_valid>8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function g(t,e,n,r){p(t),r&&(o(t,n),o(t,~n)),P.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}function m(t,e,n,r){var i=2*e,o=2*n;return t[i]n;n++)0!==o[2*n]?(t.heap[++t.heap_len]=u=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>u?++u:0,o[2*i]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=a[2*i+1]);for(e.max_code=u,n=t.heap_len>>1;n>=1;n--)v(t,o,n);i=h;do n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],v(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,o[2*i]=o[2*n]+o[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,o[2*n+1]=o[2*r+1]=i,t.heap[1]=i++,v(t,o,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],c(t,e),l(o,u,t.bl_count)}function w(t,e,n){var r,i,o=-1,a=e[1],s=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(n+1)+1]=65535,r=0;n>=r;r++)i=a,a=e[2*(r+1)+1],++ss?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[2*V]++):10>=s?t.bl_tree[2*K]++:t.bl_tree[2*Q]++,s=0,o=i,0===a?(h=138,u=3):i===a?(h=6,u=3):(h=7,u=4))}function _(t,e,n){var r,i,o=-1,h=e[1],u=0,c=7,l=4;for(0===h&&(c=138,l=3),r=0;n>=r;r++)if(i=h,h=e[2*(r+1)+1],!(++uu){do s(t,i,t.bl_tree);while(0!==--u)}else 0!==i?(i!==o&&(s(t,i,t.bl_tree),u--),s(t,V,t.bl_tree),a(t,u-3,2)):10>=u?(s(t,K,t.bl_tree),a(t,u-3,3)):(s(t,Q,t.bl_tree),a(t,u-11,7));u=0,o=i,0===h?(c=138,l=3):i===h?(c=6,l=3):(c=7,l=4)}}function A(t){var e;for(w(t,t.dyn_ltree,t.l_desc.max_code),w(t,t.dyn_dtree,t.d_desc.max_code),b(t,t.bl_desc),e=G-1;e>=3&&0===t.bl_tree[2*nt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function x(t,e,n,r){var i;for(a(t,e-257,5),a(t,n-1,5),a(t,r-4,4),i=0;r>i;i++)a(t,t.bl_tree[2*nt[i]+1],3);_(t,t.dyn_ltree,e-1),_(t,t.dyn_dtree,n-1)}function S(t){var e,n=4093624447;for(e=0;31>=e;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return L;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return D;for(e=32;z>e;e++)if(0!==t.dyn_ltree[2*e])return D;return L}function k(t){gt||(f(),gt=!0),t.l_desc=new pt(t.dyn_ltree,ct),t.d_desc=new pt(t.dyn_dtree,lt),t.bl_desc=new pt(t.bl_tree,ft),t.bi_buf=0,t.bi_valid=0,d(t)}function C(t,e,n,r){a(t,(O<<1)+(r?1:0),3),g(t,e,n,!0)}function I(t){a(t,B<<1,3),s(t,X,it),u(t)}function R(t,e,n,r){var i,o,s=0;t.level>0?(t.strm.data_type===F&&(t.strm.data_type=S(t)),b(t,t.l_desc),b(t,t.d_desc),s=A(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,i>=o&&(i=o)):i=o=n+5,i>=n+4&&-1!==e?C(t,e,n,r):t.strategy===T||o===i?(a(t,(B<<1)+(r?1:0),3),y(t,it,ot)):(a(t,(M<<1)+(r?1:0),3),x(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),y(t,t.dyn_ltree,t.dyn_dtree)),d(t),r&&p(t)}function E(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(st[n]+z+1)]++,t.dyn_dtree[2*i(e)]++),t.last_lit===t.lit_bufsize-1}var P=n(52),T=4,L=0,D=1,F=2,O=0,B=1,M=2,U=3,W=258,j=29,z=256,N=z+1+j,H=30,G=19,Z=2*N+1,Y=15,J=16,q=7,X=256,V=16,K=17,Q=18,$=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],et=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rt=512,it=new Array(2*(N+2));r(it);var ot=new Array(2*H);r(ot);var at=new Array(rt);r(at);var st=new Array(W-U+1);r(st);var ht=new Array(j);r(ht);var ut=new Array(H);r(ut);var ct,lt,ft,dt=function(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length},pt=function(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e},gt=!1;e._tr_init=k,e._tr_stored_block=C,e._tr_flush_block=R,e._tr_tally=E,e._tr_align=I},function(t,e){"use strict";function n(t,e,n,r){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){a=n>2e3?2e3:n,n-=a;do i=i+e[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}t.exports=n},function(t,e){"use strict";function n(){for(var t,e=[],n=0;256>n;n++){t=n;for(var r=0;8>r;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}function r(t,e,n,r){var o=i,a=r+n;t=-1^t;for(var s=r;a>s;s++)t=t>>>8^o[255&(t^e[s])];return-1^t}var i=n();t.exports=r},function(t,e,n){"use strict";function r(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=B,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new v.Buf32(pt),e.distcode=e.distdyn=new v.Buf32(gt),e.sane=1,e.back=-1,R):T}function a(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,o(t)):T}function s(t,e){var n,r;return t&&t.state?(r=t.state,0>e?(n=0,e=-e):(n=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?T:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,a(t))):T}function h(t,e){var n,r;return t?(r=new i,t.state=r,r.window=null,n=s(t,e),n!==R&&(t.state=null),n):T}function u(t){return h(t,vt)}function c(t){if(yt){var e;for(g=new v.Buf32(512),m=new v.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(_(x,t.lens,0,288,g,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;_(S,t.lens,0,32,m,0,t.work,{bits:5}),yt=!1}t.lencode=g,t.lenbits=9,t.distcode=m,t.distbits=5}function l(t,e,n,r){var i,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(v.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),v.arraySet(o.window,e,n-r,i,o.wnext),r-=i,r?(v.arraySet(o.window,e,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaved;){if(0===h)break t;h--,f+=i[a++]<>>8&255,n.check=b(n.check,It,2,0),f=0,d=0,n.mode=M;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&f)<<8)+(f>>8))%31){t.msg="incorrect header check",n.mode=lt;break}if((15&f)!==O){t.msg="unknown compression method",n.mode=lt;break}if(f>>>=4,d-=4,At=(15&f)+8,0===n.wbits)n.wbits=At;else if(At>n.wbits){t.msg="invalid window size",n.mode=lt;break}n.dmax=1<d;){if(0===h)break t;h--,f+=i[a++]<>8&1),512&n.flags&&(It[0]=255&f,It[1]=f>>>8&255,n.check=b(n.check,It,2,0)),f=0,d=0,n.mode=U;case U:for(;32>d;){if(0===h)break t;h--,f+=i[a++]<>>8&255,It[2]=f>>>16&255,It[3]=f>>>24&255,n.check=b(n.check,It,4,0)),f=0,d=0,n.mode=W;case W:for(;16>d;){if(0===h)break t;h--,f+=i[a++]<>8),512&n.flags&&(It[0]=255&f,It[1]=f>>>8&255,n.check=b(n.check,It,2,0)),f=0,d=0,n.mode=j;case j:if(1024&n.flags){for(;16>d;){if(0===h)break t;h--,f+=i[a++]<>>8&255,n.check=b(n.check,It,2,0)),f=0,d=0}else n.head&&(n.head.extra=null);n.mode=z;case z:if(1024&n.flags&&(m=n.length,m>h&&(m=h),m&&(n.head&&(At=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),v.arraySet(n.head.extra,i,a,m,At)),512&n.flags&&(n.check=b(n.check,i,m,a)),h-=m,a+=m,n.length-=m),n.length))break t;n.length=0,n.mode=N;case N:if(2048&n.flags){if(0===h)break t;m=0;do At=i[a+m++],n.head&&At&&n.length<65536&&(n.head.name+=String.fromCharCode(At));while(At&&h>m);if(512&n.flags&&(n.check=b(n.check,i,m,a)),h-=m,a+=m,At)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=H;case H:if(4096&n.flags){if(0===h)break t;m=0;do At=i[a+m++],n.head&&At&&n.length<65536&&(n.head.comment+=String.fromCharCode(At));while(At&&h>m);if(512&n.flags&&(n.check=b(n.check,i,m,a)),h-=m,a+=m,At)break t}else n.head&&(n.head.comment=null);n.mode=G;case G:if(512&n.flags){for(;16>d;){if(0===h)break t;h--,f+=i[a++]<>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=J;break;case Z:for(;32>d;){if(0===h)break t;h--,f+=i[a++]<>>=7&d,d-=7&d,n.mode=ht;break}for(;3>d;){if(0===h)break t;h--,f+=i[a++]<>>=1,d-=1,3&f){case 0:n.mode=X;break;case 1:if(c(n),n.mode=et,e===I){f>>>=2,d-=2;break t}break;case 2:n.mode=Q;break;case 3:t.msg="invalid block type",n.mode=lt}f>>>=2,d-=2;break;case X:for(f>>>=7&d,d-=7&d;32>d;){if(0===h)break t;h--,f+=i[a++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=lt;break}if(n.length=65535&f,f=0,d=0,n.mode=V,e===I)break t;case V:n.mode=K;case K:if(m=n.length){if(m>h&&(m=h),m>u&&(m=u),0===m)break t;v.arraySet(o,i,a,m,s),h-=m,a+=m,u-=m,s+=m,n.length-=m;break}n.mode=J;break;case Q:for(;14>d;){if(0===h)break t;h--,f+=i[a++]<>>=5,d-=5,n.ndist=(31&f)+1,f>>>=5,d-=5,n.ncode=(15&f)+4,f>>>=4,d-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=lt;break}n.have=0,n.mode=$;case $:for(;n.haved;){if(0===h)break t;h--,f+=i[a++]<>>=3,d-=3}for(;n.have<19;)n.lens[Rt[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,St={bits:n.lenbits},xt=_(A,n.lens,0,19,n.lencode,0,n.work,St),n.lenbits=St.bits,xt){t.msg="invalid code lengths set",n.mode=lt;break}n.have=0,n.mode=tt;case tt:for(;n.have>>24,vt=Ct>>>16&255,yt=65535&Ct,!(d>=mt);){if(0===h)break t;h--,f+=i[a++]<yt)f>>>=mt,d-=mt,n.lens[n.have++]=yt;else{if(16===yt){for(kt=mt+2;kt>d;){if(0===h)break t;h--,f+=i[a++]<>>=mt,d-=mt,0===n.have){t.msg="invalid bit length repeat",n.mode=lt;break}At=n.lens[n.have-1],m=3+(3&f),f>>>=2,d-=2}else if(17===yt){for(kt=mt+3;kt>d;){if(0===h)break t;h--,f+=i[a++]<>>=mt,d-=mt,At=0,m=3+(7&f),f>>>=3,d-=3}else{for(kt=mt+7;kt>d;){if(0===h)break t;h--,f+=i[a++]<>>=mt,d-=mt,At=0,m=11+(127&f),f>>>=7,d-=7}if(n.have+m>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=lt;break}for(;m--;)n.lens[n.have++]=At}}if(n.mode===lt)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=lt;break}if(n.lenbits=9,St={bits:n.lenbits},xt=_(x,n.lens,0,n.nlen,n.lencode,0,n.work,St),n.lenbits=St.bits,xt){t.msg="invalid literal/lengths set",n.mode=lt;break}if(n.distbits=6,n.distcode=n.distdyn,St={bits:n.distbits},xt=_(S,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,St),n.distbits=St.bits,xt){t.msg="invalid distances set",n.mode=lt;break}if(n.mode=et,e===I)break t;case et:n.mode=nt;case nt:if(h>=6&&u>=258){t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=h,n.hold=f,n.bits=d,w(t,g),s=t.next_out,o=t.output,u=t.avail_out,a=t.next_in,i=t.input,h=t.avail_in,f=n.hold,d=n.bits,n.mode===J&&(n.back=-1);break}for(n.back=0;Ct=n.lencode[f&(1<>>24,vt=Ct>>>16&255,yt=65535&Ct,!(d>=mt);){if(0===h)break t;h--,f+=i[a++]<>bt)],mt=Ct>>>24,vt=Ct>>>16&255,yt=65535&Ct,!(d>=bt+mt);){if(0===h)break t;h--,f+=i[a++]<>>=bt,d-=bt,n.back+=bt}if(f>>>=mt,d-=mt,n.back+=mt,n.length=yt,0===vt){n.mode=st;break}if(32&vt){n.back=-1,n.mode=J;break}if(64&vt){t.msg="invalid literal/length code",n.mode=lt;break}n.extra=15&vt,n.mode=rt;case rt:if(n.extra){for(kt=n.extra;kt>d;){if(0===h)break t;h--,f+=i[a++]<>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=it;case it:for(;Ct=n.distcode[f&(1<>>24,vt=Ct>>>16&255,yt=65535&Ct,!(d>=mt);){if(0===h)break t;h--,f+=i[a++]<>bt)],mt=Ct>>>24,vt=Ct>>>16&255,yt=65535&Ct,!(d>=bt+mt);){if(0===h)break t;h--,f+=i[a++]<>>=bt,d-=bt,n.back+=bt}if(f>>>=mt,d-=mt,n.back+=mt,64&vt){t.msg="invalid distance code",n.mode=lt;break}n.offset=yt,n.extra=15&vt,n.mode=ot;case ot:if(n.extra){for(kt=n.extra;kt>d;){if(0===h)break t;h--,f+=i[a++]<>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=lt;break}n.mode=at;case at:if(0===u)break t;if(m=g-u,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=lt;break}m>n.wnext?(m-=n.wnext,pt=n.wsize-m):pt=n.wnext-m,m>n.length&&(m=n.length),gt=n.window}else gt=o,pt=s-n.offset,m=n.length;m>u&&(m=u),u-=m,n.length-=m;do o[s++]=gt[pt++];while(--m);0===n.length&&(n.mode=nt);break;case st:if(0===u)break t;o[s++]=n.length,u--,n.mode=nt;break;case ht:if(n.wrap){for(;32>d;){if(0===h)break t;h--,f|=i[a++]<d;){if(0===h)break t;h--,f+=i[a++]<m&&(g+=I[o++]<>>24,g>>>=A,m-=A,A=_>>>16&255,0===A)R[s++]=65535&_;else{if(!(16&A)){if(0===(64&A)){_=v[(65535&_)+(g&(1<m&&(g+=I[o++]<>>=A,m-=A),15>m&&(g+=I[o++]<>>24,g>>>=A,m-=A,A=_>>>16&255,!(16&A)){if(0===(64&A)){_=y[(65535&_)+(g&(1<m&&(g+=I[o++]<m&&(g+=I[o++]<c){t.msg="invalid distance too far back",i.mode=n;break t}if(g>>>=A,m-=A,A=s-h,S>A){if(A=S-A,A>f&&i.sane){t.msg="invalid distance too far back",i.mode=n;break t}if(k=0,C=p,0===d){if(k+=l-A,x>A){x-=A;do R[s++]=p[k++];while(--A);k=s-S,C=R}}else if(A>d){if(k+=l+d-A,A-=d,x>A){x-=A;do R[s++]=p[k++];while(--A);if(k=0,x>d){A=d,x-=A;do R[s++]=p[k++];while(--A);k=s-S,C=R}}}else if(k+=d-A,x>A){x-=A;do R[s++]=p[k++];while(--A);k=s-S,C=R}for(;x>2;)R[s++]=C[k++],R[s++]=C[k++],R[s++]=C[k++],x-=3;x&&(R[s++]=C[k++],x>1&&(R[s++]=C[k++]))}else{k=s-S;do R[s++]=R[k++],R[s++]=R[k++],R[s++]=R[k++],x-=3;while(x>2);x&&(R[s++]=R[k++],x>1&&(R[s++]=R[k++]))}break}}break}}while(a>o&&u>s);x=m>>3,o-=x,m-=x<<3,g&=(1<o?5+(a-o):5-(o-a),t.avail_out=u>s?257+(u-s):257-(s-u),i.hold=g,i.bits=m}},function(t,e,n){"use strict";var r=n(52),i=15,o=852,a=592,s=0,h=1,u=2,c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],f=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],d=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,n,p,g,m,v,y){var b,w,_,A,x,S,k,C,I,R=y.bits,E=0,P=0,T=0,L=0,D=0,F=0,O=0,B=0,M=0,U=0,W=null,j=0,z=new r.Buf16(i+1),N=new r.Buf16(i+1),H=null,G=0;for(E=0;i>=E;E++)z[E]=0;for(P=0;p>P;P++)z[e[n+P]]++;for(D=R,L=i;L>=1&&0===z[L];L--);if(D>L&&(D=L),0===L)return g[m++]=20971520,g[m++]=20971520,y.bits=1,0;for(T=1;L>T&&0===z[T];T++);for(T>D&&(D=T),B=1,E=1;i>=E;E++)if(B<<=1,B-=z[E],0>B)return-1;if(B>0&&(t===s||1!==L))return-1;for(N[1]=0,E=1;i>E;E++)N[E+1]=N[E]+z[E];for(P=0;p>P;P++)0!==e[n+P]&&(v[N[e[n+P]]++]=P);if(t===s?(W=H=v,S=19):t===h?(W=c,j-=257,H=l,G-=257,S=256):(W=f,H=d,S=-1),U=0,P=0,E=T,x=m,F=D,O=0,_=-1,M=1<o||t===u&&M>a)return 1;for(var Z=0;;){Z++,k=E-O,v[P]S?(C=H[G+v[P]],I=W[j+v[P]]):(C=96,I=0),b=1<>O)+w]=k<<24|C<<16|I|0;while(0!==w);for(b=1<>=1;if(0!==b?(U&=b-1,U+=b):U=0,P++,0===--z[E]){if(E===L)break;E=e[n+v[P]]}if(E>D&&(U&A)!==_){for(0===O&&(O=D),x+=T,F=E-O,B=1<F+O&&(B-=z[F+O],!(0>=B));)F++,B<<=1;if(M+=1<o||t===u&&M>a)return 1;_=U&A,g[_]=D<<24|F<<16|x-m|0}}return 0!==U&&(g[x+U]=E-O<<24|64<<16|0),y.bits=D,0}},function(t,e){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,n){(function(t,r){function i(t,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&e._extend(r,n),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),h(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function h(t,n,r){if(t.customInspect&&n&&C(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return b(i)||(i=h(t,i,r)),i}var o=u(t,n);if(o)return o;var a=Object.keys(n),g=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),k(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(C(n)){var m=n.name?": "+n.name:"";return t.stylize("[Function"+m+"]","special")}if(A(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(k(n))return c(n)}var v="",y=!1,w=["{","}"];if(p(n)&&(y=!0,w=["[","]"]),C(n)){var _=n.name?": "+n.name:"";v=" [Function"+_+"]"}if(A(n)&&(v=" "+RegExp.prototype.toString.call(n)),S(n)&&(v=" "+Date.prototype.toUTCString.call(n)),k(n)&&(v=" "+c(n)),0===a.length&&(!y||0==n.length))return w[0]+v+w[1];if(0>r)return A(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var x;return x=y?l(t,n,r,g,a):a.map(function(e){return f(t,n,r,g,e,y)}),t.seen.pop(),d(x,v,w)}function u(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,n,r,i){for(var o=[],a=0,s=e.length;s>a;++a)E(e,String(a))?o.push(f(t,e,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,n,r,i,!0))}),o}function f(t,e,n,r,i,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),E(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?h(t,u.value,null):h(t,u.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),_(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t,e,n){var r=0,i=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function p(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function m(t){return null===t}function v(t){return null==t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function w(t){return"symbol"==typeof t}function _(t){return void 0===t}function A(t){return x(t)&&"[object RegExp]"===R(t)}function x(t){return"object"==typeof t&&null!==t}function S(t){return x(t)&&"[object Date]"===R(t)}function k(t){return x(t)&&("[object Error]"===R(t)||t instanceof Error)}function C(t){return"function"==typeof t}function I(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function R(t){return Object.prototype.toString.call(t)}function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var P=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],n=0;n=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),s=r[n];o>n;s=r[++n])a+=m(s)||!x(s)?" "+s:" "+i(s);return a},e.deprecate=function(n,i){function o(){if(!a){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation,a=!0}return n.apply(this,arguments)}if(_(t.process))return function(){return e.deprecate(n,i).apply(this,arguments)};if(r.noDeprecation===!0)return n;var a=!1;return o};var T,L={};e.debuglog=function(t){return _(T)&&(T=r.env.NODE_DEBUG||""),t=t.toUpperCase(),L[t]||(new RegExp("\\b"+t+"\\b","i").test(T)?(r.pid,L[t]=function(){e.format.apply(e,arguments)}):L[t]=function(){}),L[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=g,e.isNull=m,e.isNullOrUndefined=v,e.isNumber=y,e.isString=b,e.isSymbol=w,e.isUndefined=_,e.isRegExp=A,e.isObject=x,e.isDate=S,e.isError=k,e.isFunction=C,e.isPrimitive=I,e.isBuffer=n(61),e.log=function(){},e.inherits=n(62),e._extend=function(t,e){if(!e||!x(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(e,function(){return this}(),n(30))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){function r(t,e){return d.isUndefined(e)?""+e:d.isNumber(e)&&!isFinite(e)?e.toString():d.isFunction(e)||d.isRegExp(e)?e.toString():e}function i(t,e){return d.isString(t)?t.length=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(i=a[o],!h(t[i],e[i]))return!1;return!0}function l(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function f(t,e,n,r){var i;d.isString(n)&&(r=n,n=null);try{e()}catch(o){i=o}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&a(i,n,"Missing expected exception"+r),!t&&l(i,n)&&a(i,n,"Got unwanted exception"+r),t&&i&&n&&!l(i,n)||!t&&i)throw i}var d=n(60),p=Array.prototype.slice,g=Object.prototype.hasOwnProperty,m=t.exports=s;m.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var e=t.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=e.name,s=r.indexOf("\n"+i);if(s>=0){var h=r.indexOf("\n",s+1);r=r.substring(h+1)}this.stack=r}}},d.inherits(m.AssertionError,Error),m.fail=a,m.ok=s,m.equal=function(t,e,n){t!=e&&a(t,e,n,"==",m.equal)},m.notEqual=function(t,e,n){t==e&&a(t,e,n,"!=",m.notEqual)},m.deepEqual=function(t,e,n){h(t,e)||a(t,e,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(t,e,n){h(t,e)&&a(t,e,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(t,e,n){t!==e&&a(t,e,n,"===",m.strictEqual)},m.notStrictEqual=function(t,e,n){t===e&&a(t,e,n,"!==",m.notStrictEqual)},m["throws"]=function(t,e,n){f.apply(this,[!0].concat(p.call(arguments)))},m.doesNotThrow=function(t,e){f.apply(this,[!1].concat(p.call(arguments)))},m.ifError=function(t){if(t)throw t};var v=Object.keys||function(t){var e=[];for(var n in t)g.call(t,n)&&e.push(n);return e}},function(t,e){(function(){var e;e=function(){function t(t,r){var i;this.document=t,null==r&&(r={}),this.size=r.size||"letter",this.layout=r.layout||"portrait","number"==typeof r.margin?this.margins={top:r.margin,left:r.margin,bottom:r.margin,right:r.margin}:this.margins=r.margins||e,i=Array.isArray(this.size)?this.size:n[this.size.toUpperCase()],this.width=i["portrait"===this.layout?0:1],this.height=i["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(t){return function(){var e;return null!=(e=t.resources.data).Font?e.Font:e.Font={}}}(this)},xobjects:{get:function(t){return function(){var e;return null!=(e=t.resources.data).XObject?e.XObject:e.XObject={}}}(this)},ext_gstates:{get:function(t){return function(){var e;return null!=(e=t.resources.data).ExtGState?e.ExtGState:e.ExtGState={}}}(this)},patterns:{get:function(t){return function(){var e;return null!=(e=t.resources.data).Pattern?e.Pattern:e.Pattern={}}}(this)},annotations:{get:function(t){return function(){var e;return null!=(e=t.dictionary.data).Annots?e.Annots:e.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var e,n;return t.prototype.maxY=function(){return this.height-this.margins.bottom},t.prototype.write=function(t){return this.content.write(t)},t.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},e={top:72,left:72,bottom:72,right:72},n={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i,o,a;a=n(66),e=a.PDFGradient,r=a.PDFLinearGradient,i=a.PDFRadialGradient,t.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(t){var n,r;return t instanceof e?t:("string"==typeof t&&("#"===t.charAt(0)?(4===t.length&&(t=t.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),n=parseInt(t.slice(1),16),t=[n>>16,n>>8&255,255&n]):o[t]&&(t=o[t])),Array.isArray(t)?(3===t.length?t=function(){var e,n,i;for(i=[],e=0,n=t.length;n>e;e++)r=t[e],i.push(r/255);return i}():4===t.length&&(t=function(){ var e,n,i;for(i=[],e=0,n=t.length;n>e;e++)r=t[e],i.push(r/100);return i}()),t):null)},_setColor:function(t,n){var r,i,o,a;return(t=this._normalizeColor(t))?(this._sMasked&&(r=this.ref({Type:"ExtGState",SMask:"None"}),r.end(),i="Gs"+ ++this._opacityCount,this.page.ext_gstates[i]=r,this.addContent("/"+i+" gs"),this._sMasked=!1),o=n?"SCN":"scn",t instanceof e?(this._setColorSpace("Pattern",n),t.apply(o)):(a=4===t.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(a,n),t=t.join(" "),this.addContent(""+t+" "+o)),!0):!1},_setColorSpace:function(t,e){var n;return n=e?"CS":"cs",this.addContent("/"+t+" "+n)},fillColor:function(t,e){var n;return null==e&&(e=1),n=this._setColor(t,!1),n&&this.fillOpacity(e),this._fillColor=[t,e],this},strokeColor:function(t,e){var n;return null==e&&(e=1),n=this._setColor(t,!0),n&&this.strokeOpacity(e),this},opacity:function(t){return this._doOpacity(t,t),this},fillOpacity:function(t){return this._doOpacity(t,null),this},strokeOpacity:function(t){return this._doOpacity(null,t),this},_doOpacity:function(t,e){var n,r,i,o,a;return null!=t||null!=e?(null!=t&&(t=Math.max(0,Math.min(1,t))),null!=e&&(e=Math.max(0,Math.min(1,e))),i=""+t+"_"+e,this._opacityRegistry[i]?(a=this._opacityRegistry[i],n=a[0],o=a[1]):(n={Type:"ExtGState"},null!=t&&(n.ca=t),null!=e&&(n.CA=e),n=this.ref(n),n.end(),r=++this._opacityCount,o="Gs"+r,this._opacityRegistry[i]=[n,o]),this.page.ext_gstates[o]=n,this.addContent("/"+o+" gs")):void 0},linearGradient:function(t,e,n,i){return new r(this,t,e,n,i)},radialGradient:function(t,e,n,r,o,a){return new i(this,t,e,n,r,o,a)}},o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},function(t,e){(function(){var e,n,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};e=function(){function t(t){this.doc=t,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return t.prototype.stop=function(t,e,n){return null==n&&(n=1),n=Math.max(0,Math.min(1,n)),this.stops.push([t,this.doc._normalizeColor(e),n]),this},t.prototype.embed=function(){var t,e,n,r,i,o,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w,_,A,x,S,k,C,I,R,E,P,T,L,D,F,O;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,c=this.stops[this.stops.length-1],c[0]<1&&this.stops.push([1,c[1],c[2]]),t=[],r=[],R=[],u=P=0,D=this.stops.length-1;D>=0?D>P:P>D;u=D>=0?++P:--P)r.push(0,1),u+2!==this.stops.length&&t.push(this.stops[u+1][0]),i=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[u+0][1],C1:this.stops[u+1][1],N:1}),R.push(i),i.end();if(1===R.length?i=R[0]:(i=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:R,Bounds:t,Encode:r}),i.end()),this.id="Sh"+ ++this.doc._gradCount,l=this.doc._ctm.slice(),f=l[0],d=l[1],m=l[2],b=l[3],w=l[4],_=l[5],F=this.transform,p=F[0],g=F[1],v=F[2],y=F[3],e=F[4],n=F[5],l[0]=f*p+m*g,l[1]=d*p+b*g,l[2]=f*v+m*y,l[3]=d*v+b*y,l[4]=f*e+m*n+w,l[5]=d*e+b*n+_,C=this.shader(i),C.end(),x=this.doc.ref({Type:"Pattern",PatternType:2,Shading:C,Matrix:function(){var t,e,n;for(n=[],t=0,e=l.length;e>t;t++)E=l[t],n.push(+E.toFixed(5));return n}()}),this.doc.page.patterns[this.id]=x,x.end(),this.stops.some(function(t){return t[2]<1})){for(a=this.opacityGradient(),a._colorSpace="DeviceGray",O=this.stops,T=0,L=O.length;L>T;T++)I=O[T],a.stop(I[0],[I[2]]);a=a.embed(),s=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),s.end(),S=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:a.data.Shading}}),S.end(),o=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:s,Resources:S}),o.end("/Sh1 sh"),k=this.doc.ref({Type:"Mask",S:"Luminosity",G:o}),k.end(),h=this.doc.ref({Type:"ExtGState",SMask:k}),this.opacity_id=++this.doc._opacityCount,A="Gs"+this.opacity_id,this.doc.page.ext_gstates[A]=h,h.end()}return x}},t.prototype.apply=function(t){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+t),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},t}(),n=function(t){function e(t,n,r,i,o){this.doc=t,this.x1=n,this.y1=r,this.x2=i,this.y2=o,e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.shader=function(t){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:t,Extend:[!0,!0]})},e.prototype.opacityGradient=function(){return new e(this.doc,this.x1,this.y1,this.x2,this.y2)},e}(e),r=function(t){function e(t,n,r,i,o,a,s){this.doc=t,this.x1=n,this.y1=r,this.r1=i,this.x2=o,this.y2=a,this.r2=s,e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.shader=function(t){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:t,Extend:[!0,!0]})},e.prototype.opacityGradient=function(){return new e(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},e}(e),t.exports={PDFGradient:e,PDFLinearGradient:n,PDFRadialGradient:r}}).call(this)},function(t,e,n){(function(){var e,r,i=[].slice;r=n(68),e=4*((Math.sqrt(2)-1)/3),t.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(t){return this.addContent(""+t+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(t){return"string"==typeof t&&(t=this._CAP_STYLES[t.toUpperCase()]),this.addContent(""+t+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(t){return"string"==typeof t&&(t=this._JOIN_STYLES[t.toUpperCase()]),this.addContent(""+t+" j")},miterLimit:function(t){return this.addContent(""+t+" M")},dash:function(t,e){var n,r,i;return null==e&&(e={}),null==t?this:(r=null!=(i=e.space)?i:t,n=e.phase||0,this.addContent("["+t+" "+r+"] "+n+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(t,e){return this.addContent(""+t+" "+e+" m")},lineTo:function(t,e){return this.addContent(""+t+" "+e+" l")},bezierCurveTo:function(t,e,n,r,i,o){return this.addContent(""+t+" "+e+" "+n+" "+r+" "+i+" "+o+" c")},quadraticCurveTo:function(t,e,n,r){return this.addContent(""+t+" "+e+" "+n+" "+r+" v")},rect:function(t,e,n,r){return this.addContent(""+t+" "+e+" "+n+" "+r+" re")},roundedRect:function(t,e,n,r,i){return null==i&&(i=0),this.moveTo(t+i,e),this.lineTo(t+n-i,e),this.quadraticCurveTo(t+n,e,t+n,e+i),this.lineTo(t+n,e+r-i),this.quadraticCurveTo(t+n,e+r,t+n-i,e+r),this.lineTo(t+i,e+r),this.quadraticCurveTo(t,e+r,t,e+r-i),this.lineTo(t,e+i),this.quadraticCurveTo(t,e,t+i,e)},ellipse:function(t,n,r,i){var o,a,s,h,u,c;return null==i&&(i=r),t-=r,n-=i,o=r*e,a=i*e,s=t+2*r,u=n+2*i,h=t+r,c=n+i,this.moveTo(t,c),this.bezierCurveTo(t,c-a,h-o,n,h,n),this.bezierCurveTo(h+o,n,s,c-a,s,c),this.bezierCurveTo(s,c+a,h+o,u,h,u),this.bezierCurveTo(h-o,u,t,c+a,t,c),this.closePath()},circle:function(t,e,n){return this.ellipse(t,e,n)},polygon:function(){var t,e,n,r;for(e=1<=arguments.length?i.call(arguments,0):[],this.moveTo.apply(this,e.shift()),n=0,r=e.length;r>n;n++)t=e[n],this.lineTo.apply(this,t);return this.closePath()},path:function(t){return r.apply(this,t),this},_windingRule:function(t){return/even-?odd/.test(t)?"*":""},fill:function(t,e){return/(even-?odd)|(non-?zero)/.test(t)&&(e=t,t=null),t&&this.fillColor(t),this.addContent("f"+this._windingRule(e))},stroke:function(t){return t&&this.strokeColor(t),this.addContent("S")},fillAndStroke:function(t,e,n){var r;return null==e&&(e=t),r=/(even-?odd)|(non-?zero)/,r.test(t)&&(n=t,t=null),r.test(e)&&(n=e,e=t),t&&(this.fillColor(t),this.strokeColor(e)),this.addContent("B"+this._windingRule(n))},clip:function(t){return this.addContent("W"+this._windingRule(t)+" n")},transform:function(t,e,n,r,i,o){var a,s,h,u,c,l,f,d,p;return a=this._ctm,s=a[0],h=a[1],u=a[2],c=a[3],l=a[4],f=a[5],a[0]=s*t+u*e,a[1]=h*t+c*e,a[2]=s*n+u*r,a[3]=h*n+c*r,a[4]=s*i+u*o+l,a[5]=h*i+c*o+f,p=function(){var a,s,h,u;for(h=[t,e,n,r,i,o],u=[],a=0,s=h.length;s>a;a++)d=h[a],u.push(+d.toFixed(5));return u}().join(" "),this.addContent(""+p+" cm")},translate:function(t,e){return this.transform(1,0,0,1,t,e)},rotate:function(t,e){var n,r,i,o,a,s,h,u;return null==e&&(e={}),r=t*Math.PI/180,n=Math.cos(r),i=Math.sin(r),o=s=0,null!=e.origin&&(u=e.origin,o=u[0],s=u[1],a=o*n-s*i,h=o*i+s*n,o-=a,s-=h),this.transform(n,i,-i,n,o,s)},scale:function(t,e,n){var r,i,o;return null==e&&(e=t),null==n&&(n={}),2===arguments.length&&(e=t,n=e),r=i=0,null!=n.origin&&(o=n.origin,r=o[0],i=o[1],r-=t*r,i-=e*i),this.transform(t,0,0,e,r,i)}}}).call(this)},function(t,e){(function(){var e;e=function(){function t(){}var e,n,r,i,o,a,s,h,u,c,l,f,d;return t.apply=function(t,n){var r;return r=a(n),e(r,t)},o={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},a=function(t){var e,n,r,i,a,s,h,u,c;for(h=[],e=[],i="",a=!1,s=0,u=0,c=t.length;c>u;u++)if(n=t[u],null!=o[n])s=o[n],r&&(i.length>0&&(e[e.length]=+i),h[h.length]={cmd:r,args:e},e=[],i="",a=!1),r=n;else if(" "===n||","===n||"-"===n&&i.length>0&&"e"!==i[i.length-1]||"."===n&&a){if(0===i.length)continue;e.length===s?(h[h.length]={cmd:r,args:e},e=[+i],"M"===r&&(r="L"),"m"===r&&(r="l")):e[e.length]=+i,a="."===n,i="-"===n||"."===n?n:""}else i+=n,"."===n&&(a=!0);return i.length>0&&(e.length===s?(h[h.length]={cmd:r,args:e},e=[+i],"M"===r&&(r="L"),"m"===r&&(r="l")):e[e.length]=+i),h[h.length]={cmd:r,args:e},h},r=i=s=h=f=d=0,e=function(t,e){var n,o,a,c,l;for(r=i=s=h=f=d=0,o=a=0,c=t.length;c>a;o=++a)n=t[o],"function"==typeof u[l=n.cmd]&&u[l](e,n.args);return r=i=s=h=0},u={M:function(t,e){return r=e[0],i=e[1],s=h=null,f=r,d=i,t.moveTo(r,i)},m:function(t,e){return r+=e[0],i+=e[1],s=h=null,f=r,d=i,t.moveTo(r,i)},C:function(t,e){return r=e[4],i=e[5],s=e[2],h=e[3],t.bezierCurveTo.apply(t,e)},c:function(t,e){return t.bezierCurveTo(e[0]+r,e[1]+i,e[2]+r,e[3]+i,e[4]+r,e[5]+i),s=r+e[2],h=i+e[3],r+=e[4],i+=e[5]},S:function(t,e){return null===s&&(s=r,h=i),t.bezierCurveTo(r-(s-r),i-(h-i),e[0],e[1],e[2],e[3]),s=e[0],h=e[1],r=e[2],i=e[3]},s:function(t,e){return null===s&&(s=r,h=i),t.bezierCurveTo(r-(s-r),i-(h-i),r+e[0],i+e[1],r+e[2],i+e[3]),s=r+e[0],h=i+e[1],r+=e[2],i+=e[3]},Q:function(t,e){return s=e[0],h=e[1],r=e[2],i=e[3],t.quadraticCurveTo(e[0],e[1],r,i)},q:function(t,e){return t.quadraticCurveTo(e[0]+r,e[1]+i,e[2]+r,e[3]+i),s=r+e[0],h=i+e[1],r+=e[2],i+=e[3]},T:function(t,e){return null===s?(s=r,h=i):(s=r-(s-r),h=i-(h-i)),t.quadraticCurveTo(s,h,e[0],e[1]),s=r-(s-r),h=i-(h-i),r=e[0],i=e[1]},t:function(t,e){return null===s?(s=r,h=i):(s=r-(s-r),h=i-(h-i)),t.quadraticCurveTo(s,h,r+e[0],i+e[1]),r+=e[0],i+=e[1]},A:function(t,e){return l(t,r,i,e),r=e[5],i=e[6]},a:function(t,e){return e[5]+=r,e[6]+=i,l(t,r,i,e),r=e[5],i=e[6]},L:function(t,e){return r=e[0],i=e[1],s=h=null,t.lineTo(r,i)},l:function(t,e){return r+=e[0],i+=e[1],s=h=null,t.lineTo(r,i)},H:function(t,e){return r=e[0],s=h=null,t.lineTo(r,i)},h:function(t,e){return r+=e[0],s=h=null,t.lineTo(r,i)},V:function(t,e){return i=e[0],s=h=null,t.lineTo(r,i)},v:function(t,e){return i+=e[0],s=h=null,t.lineTo(r,i)},Z:function(t){return t.closePath(),r=f,i=d},z:function(t){return t.closePath(),r=f,i=d}},l=function(t,e,r,i){var o,a,s,h,u,l,f,d,p,g,m,v,y;for(l=i[0],f=i[1],u=i[2],h=i[3],g=i[4],a=i[5],s=i[6],p=n(a,s,l,f,h,g,u,e,r),y=[],m=0,v=p.length;v>m;m++)d=p[m],o=c.apply(null,d),y.push(t.bezierCurveTo.apply(t,o));return y},n=function(t,e,n,r,i,o,a,u,c){var l,f,d,p,g,m,v,y,b,w,_,A,x,S,k,C,I,R,E,P,T,L,D,F,O,B;for(S=a*(Math.PI/180),x=Math.sin(S),g=Math.cos(S),n=Math.abs(n),r=Math.abs(r),s=g*(u-t)*.5+x*(c-e)*.5,h=g*(c-e)*.5-x*(u-t)*.5,y=s*s/(n*n)+h*h/(r*r),y>1&&(y=Math.sqrt(y),n*=y,r*=y),l=g/n,f=x/n,d=-x/r,p=g/r,P=l*u+f*c,D=d*u+p*c,T=l*t+f*e,F=d*t+p*e,m=(T-P)*(T-P)+(F-D)*(F-D),A=1/m-.25,0>A&&(A=0),_=Math.sqrt(A),o===i&&(_=-_),L=.5*(P+T)-_*(F-D),O=.5*(D+F)+_*(T-P),k=Math.atan2(D-O,P-L),C=Math.atan2(F-O,T-L),E=C-k,0>E&&1===o?E+=2*Math.PI:E>0&&0===o&&(E-=2*Math.PI),w=Math.ceil(Math.abs(E/(.5*Math.PI+.001))),b=[],v=B=0;w>=0?w>B:B>w;v=w>=0?++B:--B)I=k+v*E/w,R=k+(v+1)*E/w,b[v]=[L,O,I,R,n,r,x,g];return b},c=function(t,e,n,r,i,o,a,s){var h,u,c,l,f,d,p,g,m,v,y,b;return h=s*i,u=-a*o,c=a*i,l=s*o,d=.5*(r-n),f=8/3*Math.sin(.5*d)*Math.sin(.5*d)/Math.sin(d),p=t+Math.cos(n)-f*Math.sin(n),v=e+Math.sin(n)+f*Math.cos(n),m=t+Math.cos(r),b=e+Math.sin(r),g=m+f*Math.sin(r),y=b-f*Math.cos(r),[h*p+u*v,c*p+l*v,h*g+u*y,c*g+l*y,h*m+u*b,c*m+l*b]},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e;e=n(70),t.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(t,n,r){var i,o,a,s;return"number"==typeof n&&(r=n,n=null),"string"==typeof t&&this._registeredFonts[t]?(i=t,s=this._registeredFonts[t],t=s.src,n=s.family):(i=n||t,"string"!=typeof i&&(i=null)),null!=r&&this.fontSize(r),(o=this._fontFamilies[i])?(this._font=o,this):(a="F"+ ++this._fontCount,this._font=new e(this,t,n,a),(o=this._fontFamilies[this._font.name])?(this._font=o,this):(i&&(this._fontFamilies[i]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(t){return this._fontSize=t,this},currentLineHeight:function(t){return null==t&&(t=!1),this._font.lineHeight(this._fontSize,t)},registerFont:function(t,e,n){return this._registeredFonts[t]={src:e,family:n},this}}}).call(this)},function(t,e,n){(function(e,r){(function(){var i,o,a,s,h;s=n(71),i=n(87),a=n(88),h=n(44),o=function(){function t(t,r,o,h){if(this.document=t,this.id=h,"string"==typeof r){if(r in n)return this.isAFM=!0,this.font=new i(n[r]()),void this.registerAFM(r);if(/\.(ttf|ttc)$/i.test(r))this.font=s.open(r,o);else{if(!/\.dfont$/i.test(r))throw new Error("Not a supported font format or standard PDF font.");this.font=s.fromDFont(r,o)}}else if(e.isBuffer(r))this.font=s.fromBuffer(r,o);else if(r instanceof Uint8Array)this.font=s.fromBuffer(new e(r),o);else{if(!(r instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=s.fromBuffer(new e(new Uint8Array(r)),o)}this.subset=new a(this.font),this.registerTTF()}var n,o;return n={Courier:function(){return h.readFileSync(r+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return h.readFileSync(r+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return h.readFileSync(r+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return h.readFileSync(r+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return h.readFileSync(r+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return h.readFileSync(r+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return h.readFileSync(r+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return h.readFileSync(r+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return h.readFileSync(r+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return h.readFileSync(r+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return h.readFileSync(r+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return h.readFileSync(r+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return h.readFileSync(r+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return h.readFileSync(r+"/font/data/ZapfDingbats.afm","utf8")}},t.prototype.use=function(t){var e;return null!=(e=this.subset)?e.use(t):void 0},t.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},t.prototype.encode=function(t){var e;return this.isAFM?this.font.encodeText(t):(null!=(e=this.subset)?e.encodeText(t):void 0)||t},t.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},t.prototype.registerTTF=function(){var t,e,n,r,i;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var e,n,r,i;for(r=this.font.bbox,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(Math.round(t*this.scaleFactor));return i}.call(this),this.stemV=0,this.font.post.exists?(r=this.font.post.italic_angle,e=r>>16,n=255&r,e&!0&&(e=-((65535^e)+1)),this.italicAngle=+(""+e+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.embedTTF=function(){var t,e,n,r,i,a,s,h;return r=this.subset.encode(),s=this.document.ref(),s.write(r),s.data.Length1=s.uncompressedLength,s.end(),i=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:s,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),i.end(),a=+Object.keys(this.subset.cmap)[0],t=function(){var t,e;t=this.subset.cmap,e=[];for(n in t)h=t[n],e.push(Math.round(this.font.widthOfGlyph(h)));return e}.call(this),e=this.document.ref(),e.end(o(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:i,FirstChar:a,LastChar:a+t.length-1,Widths:t,Encoding:"MacRomanEncoding",ToUnicode:e},this.dictionary.end()},o=function(t){var e,n,r,i,o,a,s;for(o="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",n=Object.keys(t).sort(function(t,e){return t-e}),r=[],a=0,s=n.length;s>a;a++)e=n[a],r.length>=100&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),i=("0000"+t[e].toString(16)).slice(-4),e=(+e).toString(16),r.push("<"+e+"><"+i+">");return r.length&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),o+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},t.prototype.registerAFM=function(t){var e;return this.name=t,e=this.font,this.ascender=e.ascender,this.decender=e.decender,this.bbox=e.bbox,this.lineGap=e.lineGap,e},t.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},t.prototype.widthOfString=function(t,e){var n,r,i,o,a,s;for(t=""+t,o=0,r=a=0,s=t.length;s>=0?s>a:a>s;r=s>=0?++a:--a)n=t.charCodeAt(r),o+=this.font.widthOfGlyph(this.font.characterToGlyph(n))||0;return i=e/1e3,o*i},t.prototype.lineHeight=function(t,e){var n;return null==e&&(e=!1),n=e?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},t}(),t.exports=o}).call(this)}).call(e,n(2).Buffer,"/")},function(t,e,n){(function(){var e,r,i,o,a,s,h,u,c,l,f,d,p,g,m;m=n(44),i=n(72),r=n(73),o=n(74),f=n(75),s=n(78),e=n(79),u=n(80),h=n(81),l=n(82),p=n(83),d=n(84),c=n(85),a=n(86),g=function(){function t(t,e){var n,r,o,a,s,h,u,c,l;if(this.rawData=t,n=this.contents=new i(this.rawData),"ttcf"===n.readString(4)){if(!e)throw new Error("Must specify a font name for TTC files.");for(h=n.readInt(),o=n.readInt(),s=[],r=u=0;o>=0?o>u:u>o;r=o>=0?++u:--u)s[r]=n.readInt();for(r=c=0,l=s.length;l>c;r=++c)if(a=s[r],n.pos=a,this.parse(),this.name.postscriptName===e)return;throw new Error("Font "+e+" not found in TTC file.")}n.pos=0,this.parse()}return t.open=function(e,n){var r;return r=m.readFileSync(e),new t(r,n)},t.fromDFont=function(e,n){var i;return i=r.open(e),new t(i.getNamedFont(n))},t.fromBuffer=function(e,n){var i,o,a;try{if(a=new t(e,n),!(a.head.exists&&a.name.exists&&a.cmap.exists||(i=new r(e),a=new t(i.getNamedFont(n)),a.head.exists&&a.name.exists&&a.cmap.exists)))throw new Error("Invalid TTF file in DFont");return a}catch(s){throw o=s,new Error("Unknown font format in buffer: "+o.message)}},t.prototype.parse=function(){return this.directory=new o(this.contents),this.head=new s(this),this.name=new f(this),this.cmap=new e(this),this.hhea=new h(this),this.maxp=new l(this),this.hmtx=new u(this),this.post=new p(this),this.os2=new d(this),this.loca=new c(this),this.glyf=new a(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t}(),t.exports=g}).call(this)},function(t,e){(function(){var e;e=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.byteAt=function(t){return this.data[t]},t.prototype.readBool=function(){return!!this.readByte()},t.prototype.writeBool=function(t){return this.writeByte(t?1:0)},t.prototype.readUInt32=function(){var t,e,n,r;return t=16777216*this.readByte(),e=this.readByte()<<16,n=this.readByte()<<8,r=this.readByte(),t+e+n+r},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return t=this.readUInt32(),t>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return 0>t&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){var t,e;return t=this.readByte()<<8,e=this.readByte(),t|e},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return t=this.readUInt16(),t>=32768?t-65536:t},t.prototype.writeInt16=function(t){return 0>t&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,n,r;for(n=[],e=r=0;t>=0?t>r:r>t;e=t>=0?++r:--r)n[e]=String.fromCharCode(this.readByte());return n.join("")},t.prototype.writeString=function(t){var e,n,r,i;for(i=[],e=n=0,r=t.length;r>=0?r>n:n>r;e=r>=0?++n:--n)i.push(this.writeByte(t.charCodeAt(e)));return i},t.prototype.stringAt=function(t,e){return this.pos=t,this.readString(e)},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,n,r,i,o,a,s;return t=this.readByte(),e=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*n+4294967296*r+16777216*i+65536*o+256*a+s},t.prototype.writeLongLong=function(t){var e,n;return e=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.slice=function(t,e){return this.data.slice(t,e)},t.prototype.read=function(t){var e,n,r;for(e=[],n=r=0;t>=0?t>r:r>t;n=t>=0?++r:--r)e.push(this.readByte());return e},t.prototype.write=function(t){var e,n,r,i;for(i=[],n=0,r=t.length;r>n;n++)e=t[n],i.push(this.writeByte(e));return i},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i,o,a;a=n(44),r=n(72),i=n(74),o=n(75),e=function(){function t(t){this.contents=new r(t),this.parse(this.contents)}return t.open=function(e){var n;return n=a.readFileSync(e),new t(n)},t.prototype.parse=function(t){var e,n,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w,_,A,x,S,k,C,I,R,E,P,T,L;for(u=t.readInt(),w=t.readInt(),h=t.readInt(),b=t.readInt(),this.map={},t.pos=w+24,P=t.readShort()+w,S=t.readShort()+w,t.pos=P,_=t.readShort(),p=T=0;_>=T;p=T+=1){for(E=t.readString(4),A=t.readShort(),R=t.readShort(),this.map[E]={list:[],named:{}},I=t.pos,t.pos=P+R,m=L=0;A>=L;m=L+=1)g=t.readShort(),k=t.readShort(),e=t.readByte(),n=t.readByte()<<16,a=t.readByte()<<8,s=t.readByte(),c=u+(0|n|a|s),d=t.readUInt32(),l={id:g,attributes:e,offset:c,handle:d},C=t.pos,-1!==k&&w+b>S+k?(t.pos=S+k,v=t.readByte(),l.name=t.readString(v)):"sfnt"===E&&(t.pos=l.offset,y=t.readUInt32(),f={},f.contents=new r(t.slice(t.pos,t.pos+y)),f.directory=new i(f.contents),x=new o(f),l.name=x.fontName[0].raw),t.pos=C,this.map[E].list.push(l),l.name&&(this.map[E].named[l.name]=l);t.pos=I}},t.prototype.getNamedFont=function(t){var e,n,r,i,o,a;if(e=this.contents,i=e.pos,n=null!=(a=this.map.sfnt)?a.named[t]:void 0,!n)throw new Error("Font "+t+" not found in DFont file.");return e.pos=n.offset,r=e.readUInt32(),o=e.slice(e.pos,e.pos+r),e.pos=i,o},t}(),t.exports=e}).call(this)},function(t,e,n){(function(e){(function(){var r,i,o=[].slice;r=n(72),i=function(){function t(t){var e,n,r,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},n=r=0,i=this.tableCount;i>=0?i>r:r>i;n=i>=0?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}var n;return t.prototype.encode=function(t){var i,o,a,s,h,u,c,l,f,d,p,g,m,v;g=Object.keys(t).length,u=Math.log(2),f=16*Math.floor(Math.log(g)/u),s=Math.floor(f/u),l=16*g-f,o=new r,o.writeInt(this.scalarType),o.writeShort(g),o.writeShort(f),o.writeShort(s),o.writeShort(l),a=16*g,c=o.pos+a,h=null,m=[];for(v in t)for(p=t[v],o.writeString(v),o.writeInt(n(p)),o.writeInt(c),o.writeInt(p.length),m=m.concat(p),"head"===v&&(h=c),c+=p.length;c%4;)m.push(0),c++;return o.write(m),d=n(o.data),i=2981146554-d,o.pos=h+8,o.writeUInt32(i),new e(o.data)},n=function(t){var e,n,i,a,s;for(t=o.call(t);t.length%4;)t.push(0);for(i=new r(t),n=0,e=a=0,s=t.length;s>a;e=a+=4)n+=i.readUInt32();return 4294967295&n},t}(),t.exports=i}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){(function(){var e,r,i,o,a,s={}.hasOwnProperty,h=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};o=n(76),e=n(72),a=n(77),i=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}var i;return h(n,t),n.prototype.tag="name",n.prototype.parse=function(t){var e,n,i,o,a,s,h,u,c,l,f,d,p;for(t.pos=this.offset,o=t.readShort(),e=t.readShort(),h=t.readShort(),n=[],a=l=0;e>=0?e>l:l>e;a=e>=0?++l:--l)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+h+t.readShort()});for(u={},a=f=0,d=n.length;d>f;a=++f)i=n[a],t.pos=i.offset,c=t.readString(i.length),s=new r(c,i),null==u[p=i.nameID]&&(u[p]=[]),u[i.nameID].push(s);return this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5],this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""),this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},i="AAAAAA",n.prototype.encode=function(){var t,n,o,s,h,u,c,l,f,d,p,g,m,v;f={},v=this.strings;for(t in v)p=v[t],f[t]=p;h=new r(""+i+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),f[6]=[h],i=a.successorOf(i),u=0;for(t in f)n=f[t],null!=n&&(u+=n.length);d=new e,c=new e,d.writeShort(0),d.writeShort(u),d.writeShort(6+12*u);for(o in f)if(n=f[o],null!=n)for(g=0,m=n.length;m>g;g++)l=n[g],d.writeShort(l.platformID),d.writeShort(l.encodingID), d.writeShort(l.languageID),d.writeShort(o),d.writeShort(l.length),d.writeShort(c.pos),c.writeString(l.raw);return s={postscriptName:h.raw,table:d.data.concat(c.data)}},n}(o),t.exports=i,r=function(){function t(t,e){this.raw=t,this.length=this.raw.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID}return t}()}).call(this)},function(t,e){(function(){var e;e=function(){function t(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}(),t.exports=e}).call(this)},function(t,e){(function(){e.successorOf=function(t){var e,n,r,i,o,a,s,h,u,c;for(n="abcdefghijklmnopqrstuvwxyz",h=n.length,c=t,i=t.length;i>=0;){if(s=t.charAt(--i),isNaN(s)){if(o=n.indexOf(s.toLowerCase()),-1===o)u=s,r=!0;else if(u=n.charAt((o+1)%h),a=s===s.toUpperCase(),a&&(u=u.toUpperCase()),r=o+1>=h,r&&0===i){e=a?"A":"a",c=e+u+c.slice(1);break}}else if(u=+s+1,r=u>9,r&&(u=0),r&&0===i){c="1"+u+c.slice(1);break}if(c=c.slice(0,i)+u+c.slice(i+1),!r)break}return c},e.invert=function(t){var e,n,r;n={};for(e in t)r=t[e],n[r]=e;return n}}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(76),e=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,t),n.prototype.tag="head",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},n.prototype.encode=function(t){var n;return n=new e,n.writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t.type),n.writeShort(this.glyphDataFormat),n.data},n}(i),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i,o,a={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};o=n(76),i=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return s(n,t),n.prototype.tag="cmap",n.prototype.parse=function(t){var n,r,i,o;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=o=0;i>=0?i>o:o>i;r=i>=0?++o:--o)n=new e(t,this.offset),this.tables.push(n),n.isUnicode&&null==this.unicode&&(this.unicode=n);return!0},n.encode=function(t,n){var r,o;return null==n&&(n="macroman"),r=e.encode(t,n),o=new i,o.writeUInt16(0),o.writeUInt16(1),r.table=o.data.concat(r.subtable),r},n}(o),e=function(){function t(t,e){var n,r,i,o,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),l=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=v=0;256>v;s=++v)this.codeMap[s]=t.readByte();break;case 4:for(d=t.readUInt16(),f=d/2,t.pos+=6,i=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),t.pos+=2,g=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),h=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),u=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),r=(this.length-t.pos+this.offset)/2,a=function(){var e,n;for(n=[],s=e=0;r>=0?r>e:e>r;s=r>=0?++e:--e)n.push(t.readUInt16());return n}(),s=y=0,w=i.length;w>y;s=++y)for(m=i[s],p=g[s],n=b=p;m>=p?m>=b:b>=m;n=m>=p?++b:--b)0===u[s]?o=n+h[s]:(c=u[s]/2+(n-p)-(f-s),o=a[c]||0,0!==o&&(o+=h[s])),this.codeMap[n]=65535&o}t.pos=l}return t.encode=function(t,e){var n,r,o,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w,_,A,x,S,k,C,I,R,E,P,T,L,D,F,O,B,M,U,W,j,z,N,H,G,Z,Y,J,q,X;switch(T=new i,a=Object.keys(t).sort(function(t,e){return t-e}),e){case"macroman":for(g=0,m=function(){var t,e;for(e=[],p=t=0;256>t;p=++t)e.push(0);return e}(),y={0:0},o={},L=0,B=a.length;B>L;L++)r=a[L],null==y[Y=t[r]]&&(y[Y]=++g),o[r]={old:t[r],"new":y[t[r]]},m[r]=y[t[r]];return T.writeUInt16(1),T.writeUInt16(0),T.writeUInt32(12),T.writeUInt16(0),T.writeUInt16(262),T.writeUInt16(0),T.write(m),S={charMap:o,subtable:T.data,maxGlyphID:g+1};case"unicode":for(E=[],l=[],b=0,y={},n={},v=u=null,D=0,M=a.length;M>D;D++)r=a[D],_=t[r],null==y[_]&&(y[_]=++b),n[r]={old:_,"new":y[_]},s=y[_]-r,(null==v||s!==u)&&(v&&l.push(v),E.push(r),u=s),v=r;for(v&&l.push(v),l.push(65535),E.push(65535),C=E.length,I=2*C,k=2*Math.pow(Math.log(C)/Math.LN2,2),f=Math.log(k/2)/Math.LN2,x=2*C-k,h=[],A=[],d=[],p=F=0,U=E.length;U>F;p=++F){if(R=E[p],c=l[p],65535===R){h.push(0),A.push(0);break}if(P=n[R]["new"],R-P>=32768)for(h.push(0),A.push(2*(d.length+C-p)),r=O=R;c>=R?c>=O:O>=c;r=c>=R?++O:--O)d.push(n[r]["new"]);else h.push(P-R),A.push(0)}for(T.writeUInt16(3),T.writeUInt16(1),T.writeUInt32(12),T.writeUInt16(4),T.writeUInt16(16+8*C+2*d.length),T.writeUInt16(0),T.writeUInt16(I),T.writeUInt16(k),T.writeUInt16(f),T.writeUInt16(x),G=0,W=l.length;W>G;G++)r=l[G],T.writeUInt16(r);for(T.writeUInt16(0),Z=0,j=E.length;j>Z;Z++)r=E[Z],T.writeUInt16(r);for(J=0,z=h.length;z>J;J++)s=h[J],T.writeUInt16(s);for(q=0,N=A.length;N>q;q++)w=A[q],T.writeUInt16(w);for(X=0,H=d.length;H>X;X++)g=d[X],T.writeUInt16(g);return S={charMap:n,subtable:T.data,maxGlyphID:b+1}}},t}(),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(76),e=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,t),n.prototype.tag="hmtx",n.prototype.parse=function(t){var e,n,r,i,o,a,s,h;for(t.pos=this.offset,this.metrics=[],e=o=0,s=this.file.hhea.numberOfMetrics;s>=0?s>o:o>s;e=s>=0?++o:--o)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i;for(i=[],e=n=0;r>=0?r>n:n>r;e=r>=0?++n:--n)i.push(t.readInt16());return i}(),this.widths=function(){var t,e,n,r;for(n=this.metrics,r=[],t=0,e=n.length;e>t;t++)i=n[t],r.push(i.advance);return r}.call(this),n=this.widths[this.widths.length-1],h=[],e=a=0;r>=0?r>a:a>r;e=r>=0?++a:--a)h.push(this.widths.push(n));return h},n.prototype.forGlyph=function(t){var e;return t in this.metrics?this.metrics[t]:e={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},n.prototype.encode=function(t){var n,r,i,o,a;for(i=new e,o=0,a=t.length;a>o;o++)n=t[o],r=this.forGlyph(n),i.writeUInt16(r.advance),i.writeUInt16(r.lsb);return i.data},n}(i),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(76),e=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,t),n.prototype.tag="hhea",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},n.prototype.encode=function(t){var n,r,i,o;for(r=new e,r.writeInt(this.version),r.writeShort(this.ascender),r.writeShort(this.decender),r.writeShort(this.lineGap),r.writeShort(this.advanceWidthMax),r.writeShort(this.minLeftSideBearing),r.writeShort(this.minRightSideBearing),r.writeShort(this.xMaxExtent),r.writeShort(this.caretSlopeRise),r.writeShort(this.caretSlopeRun),r.writeShort(this.caretOffset),n=i=0,o=8;o>=0?o>i:i>o;n=o>=0?++i:--i)r.writeByte(0);return r.writeShort(this.metricDataFormat),r.writeUInt16(t.length),r.data},n}(i),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(76),e=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,t),n.prototype.tag="maxp",n.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},n.prototype.encode=function(t){var n;return n=new e,n.writeInt(this.version),n.writeUInt16(t.length),n.writeUInt16(this.maxPoints),n.writeUInt16(this.maxContours),n.writeUInt16(this.maxCompositePoints),n.writeUInt16(this.maxComponentContours),n.writeUInt16(this.maxZones),n.writeUInt16(this.maxTwilightPoints),n.writeUInt16(this.maxStorage),n.writeUInt16(this.maxFunctionDefs),n.writeUInt16(this.maxInstructionDefs),n.writeUInt16(this.maxStackElements),n.writeUInt16(this.maxSizeOfInstructions),n.writeUInt16(this.maxComponentElements),n.writeUInt16(this.maxComponentDepth),n.data},n}(i),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(76),e=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}var r;return a(n,t),n.prototype.tag="post",n.prototype.parse=function(t){var e,n,r,i,o;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:for(r=t.readUInt16(),this.glyphNameIndex=[],e=i=0;r>=0?r>i:i>r;e=r>=0?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],o=[];t.pos=0?r>n:n>r;e=r>=0?++n:--n)i.push(t.readUInt32());return i}.call(this)}},n.prototype.glyphFor=function(t){var e;switch(this.format){case 65536:return r[t]||".notdef";case 131072:return e=this.glyphNameIndex[t],257>=e?r[e]:this.names[e-258]||".notdef";case 151552:return r[t+this.offsets[t]]||".notdef";case 196608:return".notdef";case 262144:return this.map[t]||65535}},n.prototype.encode=function(t){var n,i,o,a,s,h,u,c,l,f,d,p,g,m,v;if(!this.exists)return null;if(h=this.raw(),196608===this.format)return h;for(l=new e(h.slice(0,32)),l.writeUInt32(131072),l.pos=32,o=[],c=[],f=0,g=t.length;g>f;f++)n=t[f],s=this.glyphFor(n),a=r.indexOf(s),-1!==a?o.push(a):(o.push(257+c.length),c.push(s));for(l.writeUInt16(Object.keys(t).length),d=0,m=o.length;m>d;d++)i=o[d],l.writeUInt16(i);for(p=0,v=c.length;v>p;p++)u=c[p],l.writeByte(u.length),l.writeString(u);return l.data},r=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion 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\nbracketleft backslash bracketright asciicircum underscore grave\na 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\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),n}(i),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(76),e=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.tag="OS/2",e.prototype.parse=function(t){var e;return t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,r;for(r=[],e=n=0;10>n;e=++n)r.push(t.readByte());return r}(),this.charRange=function(){var n,r;for(r=[],e=n=0;4>n;e=++n)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,r;for(r=[],e=n=0;2>n;e=++n)r.push(t.readInt());return r}(),this.version>1)?(this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()):void 0},e.prototype.encode=function(){return this.raw()},e}(r),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(76),e=n(72),r=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return a(n,t),n.prototype.tag="loca",n.prototype.parse=function(t){var e,n;return t.pos=this.offset,e=this.file.head.indexToLocFormat,0===e?this.offsets=function(){var e,r,i;for(i=[],n=e=0,r=this.length;r>e;n=e+=2)i.push(2*t.readUInt16());return i}.call(this):this.offsets=function(){var e,r,i;for(i=[],n=e=0,r=this.length;r>e;n=e+=4)i.push(t.readUInt32());return i}.call(this)},n.prototype.indexOf=function(t){return this.offsets[t]},n.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},n.prototype.encode=function(t){var n,r,i,o,a,s,h,u,c,l,f;for(o=new e,a=0,u=t.length;u>a;a++)if(r=t[a],r>65535){for(f=this.offsets,s=0,c=f.length;c>s;s++)n=f[s],o.writeUInt32(n);return i={format:1,table:o.data}}for(h=0,l=t.length;l>h;h++)n=t[h],o.writeUInt16(n/2);return i={format:0,table:o.data}},n}(i),t.exports=r}).call(this)},function(t,e,n){(function(){var e,r,i,o,a,s={}.hasOwnProperty,h=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u=[].slice;a=n(76),r=n(72),i=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return h(n,t),n.prototype.tag="glyf",n.prototype.parse=function(t){return this.cache={}},n.prototype.glyphFor=function(t){var n,i,a,s,h,u,c,l,f,d;return t in this.cache?this.cache[t]:(s=this.file.loca,n=this.file.contents,i=s.indexOf(t),a=s.lengthOf(t),0===a?this.cache[t]=null:(n.pos=this.offset+i,u=new r(n.read(a)),h=u.readShort(),l=u.readShort(),d=u.readShort(),c=u.readShort(),f=u.readShort(),-1===h?this.cache[t]=new e(u,l,d,c,f):this.cache[t]=new o(u,h,l,d,c,f),this.cache[t]))},n.prototype.encode=function(t,e,n){var r,i,o,a,s,h;for(a=[],o=[],s=0,h=e.length;h>s;s++)i=e[s],r=t[i],o.push(a.length),r&&(a=a.concat(r.encode(n)));return o.push(a.length),{table:a,offsets:o}},n}(a),o=function(){function t(t,e,n,r,i,o){this.raw=t,this.numberOfContours=e,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=o,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),e=function(){function t(t,r,s,h,u){var c,l;for(this.raw=t,this.xMin=r,this.yMin=s,this.xMax=h,this.yMax=u,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],c=this.raw;l=c.readShort(),this.glyphOffsets.push(c.pos),this.glyphIDs.push(c.readShort()),l&n;)l&e?c.pos+=4:c.pos+=2,l&a?c.pos+=8:l&i?c.pos+=4:l&o&&(c.pos+=2)}var e,n,i,o,a,s;return e=1,o=8,n=32,i=64,a=128,s=256,t.prototype.encode=function(t){var e,n,i,o,a,s;for(i=new r(u.call(this.raw.data)),s=this.glyphIDs,e=o=0,a=s.length;a>o;e=++o)n=s[e],i.pos=this.glyphOffsets[e],i.writeShort(t[n]);return i.data},t}(),t.exports=i}).call(this)},function(t,e,n){(function(){var e,r;r=n(44),e=function(){function t(t){var e,r;this.contents=t,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.parse(),this.charWidths=function(){var t,e;for(e=[],r=t=0;255>=t;r=++t)e.push(this.glyphWidths[n[r]]);return e}.call(this),this.bbox=function(){var t,n,r,i;for(r=this.attributes.FontBBox.split(/\s+/),i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(+e);return i}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var e,n;return t.open=function(e){return new t(r.readFileSync(e,"utf8"))},t.prototype.parse=function(){var t,e,n,r,i,o,a,s,h,u;for(o="",u=this.contents.split("\n"),s=0,h=u.length;h>s;s++)if(n=u[s],r=n.match(/^Start(\w+)/))o=r[1];else if(r=n.match(/^End(\w+)/))o="";else switch(o){case"FontMetrics":r=n.match(/(^\w+)\s+(.*)/),e=r[1],a=r[2],(t=this.attributes[e])?(Array.isArray(t)||(t=this.attributes[e]=[t]),t.push(a)):this.attributes[e]=a;break;case"CharMetrics":if(!/^CH?\s/.test(n))continue;i=n.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[i]=+n.match(/\bWX\s+(\d+)\s*;/)[1]}},e={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},t.prototype.encodeText=function(t){var n,r,i,o,a;for(i="",r=o=0,a=t.length;a>=0?a>o:o>a;r=a>=0?++o:--o)n=t.charCodeAt(r),n=e[n]||n,i+=String.fromCharCode(n);return i},t.prototype.characterToGlyph=function(t){return n[e[t]||t]},t.prototype.widthOfGlyph=function(t){return this.glyphWidths[t]},n=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i,o=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e=n(79),i=n(77),r=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.use=function(t){var e,n,r;if("string"!=typeof t)return this.unicodes[t]?void 0:(this.subset[this.next]=t,this.unicodes[t]=this.next++);for(e=n=0,r=t.length;r>=0?r>n:n>r;e=r>=0?++n:--n)this.use(t.charCodeAt(e))},t.prototype.encodeText=function(t){var e,n,r,i,o;for(r="",n=i=0,o=t.length;o>=0?o>i:i>o;n=o>=0?++i:--i)e=this.unicodes[t.charCodeAt(n)],r+=String.fromCharCode(e);return r},t.prototype.generateCmap=function(){var t,e,n,r,i;r=this.font.cmap.tables[0].codeMap,t={},i=this.subset;for(e in i)n=i[e],t[e]=r[n];return t},t.prototype.glyphIDs=function(){var t,e,n,r,i,a;r=this.font.cmap.tables[0].codeMap,t=[0],a=this.subset;for(e in a)n=a[e],i=r[n],null!=i&&o.call(t,i)<0&&t.push(i);return t.sort()},t.prototype.glyphsFor=function(t){var e,n,r,i,o,a,s;for(r={},o=0,a=t.length;a>o;o++)i=t[o],r[i]=this.font.glyf.glyphFor(i);e=[];for(i in r)n=r[i],(null!=n?n.compound:void 0)&&e.push.apply(e,n.glyphIDs);if(e.length>0){s=this.glyphsFor(e);for(i in s)n=s[i],r[i]=n}return r},t.prototype.encode=function(){var t,n,r,o,a,s,h,u,c,l,f,d,p,g,m,v,y;t=e.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(this.glyphIDs()),d={0:0},v=t.charMap;for(n in v)s=v[n],d[s.old]=s["new"];f=t.maxGlyphID;for(p in o)p in d||(d[p]=f++);c=i.invert(d),l=Object.keys(c).sort(function(t,e){return t-e}),g=function(){var t,e,n;for(n=[],t=0,e=l.length;e>t;t++)a=l[t],n.push(c[a]);return n}(),r=this.font.glyf.encode(o,g,d),h=this.font.loca.encode(r.offsets),u=this.font.name.encode(),this.postscriptName=u.postscriptName,this.cmap={},y=t.charMap;for(n in y)s=y[n],this.cmap[n]=s.old;return m={cmap:t.table,glyf:r.table,loca:h.table,hmtx:this.font.hmtx.encode(g),hhea:this.font.hhea.encode(g),maxp:this.font.maxp.encode(g),post:this.font.post.encode(g),name:u.table,head:this.font.head.encode(h)},this.font.os2.exists&&(m["OS/2"]=this.font.os2.raw()),this.font.directory.encode(m)},t}(),t.exports=r}).call(this)},function(t,e,n){(function(){var e;e=n(90),t.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(t){return this._lineGap=t,this},moveDown:function(t){return null==t&&(t=1),this.y+=this.currentLineHeight(!0)*t+this._lineGap,this},moveUp:function(t){return null==t&&(t=1),this.y-=this.currentLineHeight(!0)*t+this._lineGap,this},_text:function(t,n,r,i,o){var a,s,h,u,c;if(i=this._initOptions(n,r,i),t=""+t,i.wordSpacing&&(t=t.replace(/\s{2,}/g," ")),i.width)s=this._wrapper,s||(s=new e(this,i),s.on("line",o)),this._wrapper=i.continued?s:null,this._textOptions=i.continued?i:null,s.wrap(t,i);else for(c=t.split("\n"),h=0,u=c.length;u>h;h++)a=c[h],o(a,i);return this},text:function(t,e,n,r){return this._text(t,e,n,r,this._line.bind(this))},widthOfString:function(t,e){return null==e&&(e={}),this._font.widthOfString(t,this._fontSize)+(e.characterSpacing||0)*(t.length-1)},heightOfString:function(t,e){var n,r,i,o;return null==e&&(e={}),i=this.x,o=this.y,e=this._initOptions(e),e.height=1/0,r=e.lineGap||this._lineGap||0,this._text(t,this.x,this.y,e,function(t){return function(e,n){return t.y+=t.currentLineHeight(!0)+r}}(this)),n=this.y-o,this.x=i,this.y=o,n},list:function(t,n,r,i,o){var a,s,h,u,c,l,f,d;return i=this._initOptions(n,r,i),d=Math.round(this._font.ascender/1e3*this._fontSize/3),h=i.textIndent||5*d,u=i.bulletIndent||8*d,l=1,c=[],f=[],a=function(t){var e,n,r,i,o;for(o=[],e=r=0,i=t.length;i>r;e=++r)n=t[e],Array.isArray(n)?(l++,a(n),o.push(l--)):(c.push(n),o.push(f.push(l)));return o},a(t),o=new e(this,i),o.on("line",this._line.bind(this)),l=1,s=0,o.on("firstLine",function(t){return function(){var e,n;return(n=f[s++])!==l&&(e=u*(n-l),t.x+=e,o.lineWidth-=e,l=n),t.circle(t.x-h+d,t.y+d+d/2,d),t.fill()}}(this)),o.on("sectionStart",function(t){return function(){var e;return e=h+u*(l-1),t.x+=e,o.lineWidth-=e}}(this)),o.on("sectionEnd",function(t){return function(){var e;return e=h+u*(l-1),t.x-=e,o.lineWidth+=e}}(this)),o.wrap(c.join("\n"),i),this},_initOptions:function(t,e,n){var r,i,o,a;if(null==t&&(t={}),null==n&&(n={}),"object"==typeof t&&(n=t,t=null),n=function(){var t,e,r;e={};for(t in n)r=n[t],e[t]=r;return e}(),this._textOptions){a=this._textOptions;for(r in a)o=a[r],"continued"!==r&&null==n[r]&&(n[r]=o)}return null!=t&&(this.x=t),null!=e&&(this.y=e),n.lineBreak!==!1&&(i=this.page.margins,null==n.width&&(n.width=this.page.width-this.x-i.right)),n.columns||(n.columns=0),null==n.columnGap&&(n.columnGap=18),n},_line:function(t,e,n){var r;return null==e&&(e={}),this._fragment(t,this.x,this.y,e),r=e.lineGap||this._lineGap||0,n?this.y+=this.currentLineHeight(!0)+r:this.x+=this.widthOfString(t)},_fragment:function(t,e,n,r){var i,o,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w,_,A;if(t=""+t,0!==t.length){if(i=r.align||"left",v=r.wordSpacing||0,o=r.characterSpacing||0,r.width)switch(i){case"right":g=this.widthOfString(t.replace(/\s+$/,""),r),e+=r.lineWidth-g;break;case"center":e+=r.lineWidth/2-r.textWidth/2;break;case"justify":y=t.trim().split(/\s+/),g=this.widthOfString(t.replace(/\s+/g,""),r),p=this.widthOfString(" ")+o,v=Math.max(0,(r.lineWidth-g)/Math.max(1,y.length-1)-p)}if(d=r.textWidth+v*(r.wordCount-1)+o*(t.length-1),r.link&&this.link(e,n,d,this.currentLineHeight(),r.link),(r.underline||r.strike)&&(this.save(),r.stroke||this.strokeColor.apply(this,this._fillColor),c=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(c),s=r.underline?1:2,l=n+this.currentLineHeight()/s,r.underline&&(l-=c),this.moveTo(e,l),this.lineTo(e+d,l),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),n=this.page.height-n-this._font.ascender/1e3*this._fontSize,null==(b=this.page.fonts)[A=this._font.id]&&(b[A]=this._font.ref()),this._font.use(t),this.addContent("BT"),this.addContent(""+e+" "+n+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),f=r.fill&&r.stroke?2:r.stroke?1:0,f&&this.addContent(""+f+" Tr"),o&&this.addContent(""+o+" Tc"),v){for(y=t.trim().split(/\s+/),v+=this.widthOfString(" ")+o,v*=1e3/this._fontSize,a=[],w=0,_=y.length;_>w;w++)m=y[w],h=this._font.encode(m),h=function(){var t,e,n;for(n=[],u=t=0,e=h.length;e>t;u=t+=1)n.push(h.charCodeAt(u).toString(16));return n}().join(""),a.push("<"+h+"> "+-v);this.addContent("["+a.join(" ")+"] TJ")}else h=this._font.encode(t),h=function(){var t,e,n;for(n=[],u=t=0,e=h.length;e>t;u=t+=1)n.push(h.charCodeAt(u).toString(16));return n}().join(""),this.addContent("<"+h+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};e=n(26).EventEmitter,r=n(91),i=function(t){function e(t,e){var n;this.document=t,this.indent=e.indent||0,this.characterSpacing=e.characterSpacing||0,this.wordSpacing=0===e.wordSpacing,this.columns=e.columns||1,this.columnGap=null!=(n=e.columnGap)?n:18,this.lineWidth=(e.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x, this.startY=this.document.y,this.column=1,this.ellipsis=e.ellipsis,this.continuedX=0,null!=e.height?(this.height=e.height,this.maxY=this.startY+e.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(t){return function(e){var n;return n=t.continuedX||t.indent,t.document.x+=n,t.lineWidth-=n,t.once("line",function(){return t.document.x-=n,t.lineWidth+=n,e.continued&&!t.continuedX&&(t.continuedX=t.indent),e.continued?void 0:t.continuedX=0})}}(this)),this.on("lastLine",function(t){return function(e){var n;return n=e.align,"justify"===n&&(e.align="left"),t.lastLine=!0,t.once("line",function(){return t.document.y+=e.paragraphGap||0,e.align=n,t.lastLine=!1})}}(this))}return a(e,t),e.prototype.wordWidth=function(t){return this.document.widthOfString(t,this)+this.characterSpacing+this.wordSpacing},e.prototype.eachWord=function(t,e){var n,i,o,a,s,h,u,c,l,f;for(i=new r(t),s=null,f={};n=i.nextBreak();){if(l=t.slice((null!=s?s.position:void 0)||0,n.position),c=null!=f[l]?f[l]:f[l]=this.wordWidth(l),c>this.lineWidth+this.continuedX)for(h=s,o={};l.length;){for(a=l.length;c>this.spaceLeft;)c=this.wordWidth(l.slice(0,--a));if(o.required=athis.maxY||o>this.maxY)&&this.nextSection(),n="",a=0,s=0,i=0,h=this.document.y,r=function(t){return function(){return e.textWidth=a+t.wordSpacing*(s-1),e.wordCount=s,e.lineWidth=t.lineWidth,h=t.document.y,t.emit("line",n,e,t),i++}}(this),this.emit("sectionStart",e,this),this.eachWord(t,function(t){return function(i,o,h,u){var c,l;if((null==u||u.required)&&(t.emit("firstLine",e,t),t.spaceLeft=t.lineWidth),o<=t.spaceLeft&&(n+=i,a+=o,s++),h.required||o>t.spaceLeft){if(h.required&&t.emit("lastLine",e,t),c=t.document.currentLineHeight(!0),null!=t.height&&t.ellipsis&&t.document.y+2*c>t.maxY&&t.column>=t.columns){for(t.ellipsis===!0&&(t.ellipsis="…"),n=n.replace(/\s+$/,""),a=t.wordWidth(n+t.ellipsis);a>t.lineWidth;)n=n.slice(0,-1).replace(/\s+$/,""),a=t.wordWidth(n+t.ellipsis);n+=t.ellipsis}return r(),t.document.y+c>t.maxY&&(l=t.nextSection(),!l)?(s=0,n="",!1):h.required?(o>t.spaceLeft&&(n=i,a=o,s=1,r()),t.spaceLeft=t.lineWidth,n="",a=0,s=0):(t.spaceLeft=t.lineWidth-o,n=i,a=o,s=1)}return t.spaceLeft-=o}}(this)),s>0&&(this.emit("lastLine",e,this),r()),this.emit("sectionEnd",e,this),e.continued===!0?(i>1&&(this.continuedX=0),this.continuedX+=e.textWidth,this.document.y=h):this.document.x=this.startX},e.prototype.nextSection=function(t){var e;if(this.emit("sectionEnd",t,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(e=this.document).fillColor.apply(e,this.document._fillColor),this.emit("pageBreak",t,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",t,this);return this.emit("sectionStart",t,this),!0},e}(e),t.exports=i}).call(this)},function(t,e,n){(function(){var e,r,i,o,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w,_,A,x,S,k,C,I,R,E;A=n(92),C=new A(n(93)),R=n(94),o=R.BK,c=R.CR,p=R.LF,m=R.NL,a=R.CB,i=R.BA,_=R.SP,x=R.WJ,_=R.SP,o=R.BK,p=R.LF,m=R.NL,e=R.AI,r=R.AL,b=R.SA,w=R.SG,S=R.XX,h=R.CJ,f=R.ID,v=R.NS,k=R.characterClasses,E=n(95),l=E.DI_BRK,d=E.IN_BRK,s=E.CI_BRK,u=E.CP_BRK,y=E.PR_BRK,I=E.pairTable,g=function(){function t(t){this.string=t,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var n,f,g;return t.prototype.nextCodePoint=function(){var t,e;return t=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos),t>=55296&&56319>=t&&e>=56320&&57343>=e?(this.pos++,1024*(t-55296)+(e-56320)+65536):t},f=function(t){switch(t){case e:return r;case b:case w:case S:return r;case h:return v;default:return t}},g=function(t){switch(t){case p:case m:return o;case a:return i;case _:return x;default:return t}},t.prototype.nextCharClass=function(t){return null==t&&(t=!1),f(C.get(this.nextCodePoint()))},n=function(){function t(t,e){this.position=t,this.required=null!=e?e:!1}return t}(),t.prototype.nextBreak=function(){var t,e,r;for(null==this.curClass&&(this.curClass=g(this.nextCharClass()));this.pos=this.string.length?this.lastPos>d,a=1<>g,c=1024>>g,s=l+c,v=s,m=32,o=v+m,n=1<t||t>1114111?this.errorValue:55296>t||t>56319&&65535>=t?(e=(this.data[t>>g]<=t?(e=(this.data[l+(t-55296>>g)]<>d)],e=this.data[e+(t>>g&h)],e=(e<s?(d=h,u=h/f):(u=a,d=a*f),"center"===o.align?n=n+h/2-d/2:"right"===o.align&&(n=n+h-d),"center"===o.valign?i=i+a/2-u/2:"bottom"===o.valign&&(i=i+a-u)),this.y===i&&(this.y+=u),this.save(),this.transform(d,0,0,-u,n,i+u),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){(function(e){(function(){var r,i,o,a,s;s=n(44),r=n(72),i=n(98),a=n(99),o=function(){function t(){}return t.open=function(t,n){var r,o;if(e.isBuffer(t))r=t;else if(o=/^data:.+;base64,(.*)$/.exec(t))r=new e(o[1],"base64");else if(r=s.readFileSync(t),!r)return;if(255===r[0]&&216===r[1])return new i(r,n);if(137===r[0]&&"PNG"===r.toString("ascii",1,4))return new a(r,n);throw new Error("Unknown image format.")},t}(),t.exports=o}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){(function(){var e,r,i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};r=n(44),e=function(){function t(t,n){var r,o,a;if(this.data=t,this.label=n,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(a=2;a=0));)a+=this.data.readUInt16BE(a);if(i.call(e,o)<0)throw"Invalid JPEG.";a+=2,this.bits=this.data[a++],this.height=this.data.readUInt16BE(a),a+=2,this.width=this.data.readUInt16BE(a),a+=2,r=this.data[a++],this.colorSpace=function(){switch(r){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var e;return e=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],t.prototype.embed=function(t){return this.obj?void 0:(this.obj=t.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},t}(),t.exports=e}).call(this)},function(t,e,n){(function(e){(function(){var r,i,o;o=n(47),r=n(100),i=function(){function t(t,e){this.label=e,this.image=new r(t),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return t.prototype.embed=function(t){var n,r,i,o,a,s,h,u;if(this.document=t,!this.obj){if(this.obj=t.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(i=t.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=i,i.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(r=t.ref(),r.end(new e(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,r]),this.image.transparency.grayscale)return a=this.image.transparency.greyscale,this.obj.data.Mask=[a,a];if(this.image.transparency.rgb){for(o=this.image.transparency.rgb,n=[],h=0,u=o.length;u>h;h++)s=o[h],n.push(s,s);return this.obj.data.Mask=n}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},t.prototype.finalize=function(){var t;return this.alphaChannel&&(t=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),t.end(this.alphaChannel),this.obj.data.SMask=t),this.obj.end(this.imgData),this.image=null,this.imgData=null},t.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(t){return function(n){var r,i,a,s,h,u,c,l,f;for(a=t.image.colors*t.image.bits/8,f=t.width*t.height,u=new e(f*a),i=new e(f),h=l=r=0,c=n.length;c>h;)u[l++]=n[h++],u[l++]=n[h++],u[l++]=n[h++],i[r++]=n[h++];return s=0,o.deflate(u,function(e,n){if(t.imgData=n,e)throw e;return 2===++s?t.finalize():void 0}),o.deflate(i,function(e,n){if(t.alphaChannel=n,e)throw e;return 2===++s?t.finalize():void 0})}}(this))},t.prototype.loadIndexedAlphaChannel=function(t){var n;return n=this.image.transparency.indexed,this.image.decodePixels(function(t){return function(r){var i,a,s,h,u;for(i=new e(t.width*t.height),a=0,s=h=0,u=r.length;u>h;s=h+=1)i[a++]=n[r[s]];return o.deflate(i,function(e,n){if(t.alphaChannel=n,e)throw e;return t.finalize()})}}(this))},t}(),t.exports=i}).call(this)}).call(e,n(2).Buffer)},function(t,e,n){(function(e){(function(){var r,i,o;i=n(44),o=n(47),t.exports=r=function(){function t(t){var n,r,i,o,a,s,h,u,c,l,f;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){switch(n=this.readUInt32(),s=function(){var t,e;for(e=[],i=t=0;4>t;i=++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(n);break;case"IDAT":for(i=c=0;n>c;i=c+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(n),h=255-this.transparency.indexed.length,h>0)for(i=l=0;h>=0?h>l:l>h;i=h>=0?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(n)[0];break;case 2:this.transparency.rgb=this.read(n)}break;case"tEXt":u=this.read(n),o=u.indexOf(0),a=String.fromCharCode.apply(String,u.slice(0,o)),this.text[a]=String.fromCharCode.apply(String,u.slice(o+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(f=this.colorType)||6===f,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new e(this.imgData));default:this.pos+=n}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return t.decode=function(e,n){return i.readFile(e,function(e,r){var i;return i=new t(r),i.decode(function(t){return n(t)})})},t.load=function(e){var n;return n=i.readFileSync(e),new t(n)},t.prototype.read=function(t){var e,n,r;for(r=[],e=n=0;t>=0?t>n:n>t;e=t>=0?++n:--n)r.push(this.data[this.pos++]);return r},t.prototype.readUInt32=function(){var t,e,n,r;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,n=this.data[this.pos++]<<8,r=this.data[this.pos++],t|e|n|r},t.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},t.prototype.decodePixels=function(t){var n=this;return o.inflate(this.imgData,function(r,i){var o,a,s,h,u,c,l,f,d,p,g,m,v,y,b,w,_,A,x,S,k,C,I;if(r)throw r;for(m=n.pixelBitlength/8,w=m*n.width,v=new e(w*n.height),c=i.length,b=0,y=0,a=0;c>y;){switch(i[y++]){case 0:for(h=x=0;w>x;h=x+=1)v[a++]=i[y++];break;case 1:for(h=S=0;w>S;h=S+=1)o=i[y++],u=m>h?0:v[a-m],v[a++]=(o+u)%256;break;case 2:for(h=k=0;w>k;h=k+=1)o=i[y++],s=(h-h%m)/m,_=b&&v[(b-1)*w+s*m+h%m],v[a++]=(_+o)%256;break;case 3:for(h=C=0;w>C;h=C+=1)o=i[y++],s=(h-h%m)/m,u=m>h?0:v[a-m],_=b&&v[(b-1)*w+s*m+h%m],v[a++]=(o+Math.floor((u+_)/2))%256;break;case 4:for(h=I=0;w>I;h=I+=1)o=i[y++],s=(h-h%m)/m,u=m>h?0:v[a-m],0===b?_=A=0:(_=v[(b-1)*w+s*m+h%m],A=s&&v[(b-1)*w+(s-1)*m+h%m]),l=u+_-A,f=Math.abs(l-u),p=Math.abs(l-_),g=Math.abs(l-A),d=p>=f&&g>=f?u:g>=p?_:A,v[a++]=(o+d)%256;break;default:throw new Error("Invalid filter algorithm: "+i[y-1])}b++}return t(v)})},t.prototype.decodePalette=function(){var t,n,r,i,o,a,s,h,u,c;for(i=this.palette,s=this.transparency.indexed||[],a=new e(s.length+i.length),o=0,r=i.length,t=0,n=h=0,u=i.length;u>h;n=h+=3)a[o++]=i[n],a[o++]=i[n+1],a[o++]=i[n+2],a[o++]=null!=(c=s[t++])?c:255;return a},t.prototype.copyToImageData=function(t,e){var n,r,i,o,a,s,h,u,c,l,f;if(r=this.colors,c=null,n=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),r=4,n=!0),i=(null!=t?t.data:void 0)||t,u=i.length,a=c||e,o=s=0,1===r)for(;u>o;)h=c?4*e[o/4]:s,l=a[h++],i[o++]=l,i[o++]=l,i[o++]=l,i[o++]=n?a[h++]:255,s=h;else for(;u>o;)h=c?4*e[o/4]:s,i[o++]=a[h++],i[o++]=a[h++],i[o++]=a[h++],i[o++]=n?a[h++]:255,s=h},t.prototype.decode=function(t){var n,r=this;return n=new e(this.width*this.height*4),this.decodePixels(function(e){return r.copyToImageData(n,e),t(n)})},t}()}).call(this)}).call(e,n(2).Buffer)},function(t,e){(function(){t.exports={annotate:function(t,e,n,r,i){var o,a,s;i.Type="Annot",i.Rect=this._convertRect(t,e,n,r),i.Border=[0,0,0],"Link"!==i.Subtype&&null==i.C&&(i.C=this._normalizeColor(i.color||[0,0,0])),delete i.color,"string"==typeof i.Dest&&(i.Dest=new String(i.Dest));for(o in i)s=i[o],i[o[0].toUpperCase()+o.slice(1)]=s;return a=this.ref(i),this.page.annotations.push(a),a.end(),this},note:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="Text",o.Contents=new String(i),o.Name="Comment",null==o.color&&(o.color=[243,223,92]),this.annotate(t,e,n,r,o)},link:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="Link",o.A=this.ref({S:"URI",URI:new String(i)}),o.A.end(),this.annotate(t,e,n,r,o)},_markup:function(t,e,n,r,i){var o,a,s,h,u;return null==i&&(i={}),u=this._convertRect(t,e,n,r),o=u[0],s=u[1],a=u[2],h=u[3],i.QuadPoints=[o,h,a,h,o,s,a,s],i.Contents=new String,this.annotate(t,e,n,r,i)},highlight:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Highlight",null==i.color&&(i.color=[241,238,148]),this._markup(t,e,n,r,i)},underline:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Underline",this._markup(t,e,n,r,i)},strike:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="StrikeOut",this._markup(t,e,n,r,i)},lineAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Line",i.Contents=new String,i.L=[t,this.page.height-e,n,this.page.height-r],this.annotate(t,e,n,r,i)},rectAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Square",i.Contents=new String,this.annotate(t,e,n,r,i)},ellipseAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Circle",i.Contents=new String,this.annotate(t,e,n,r,i)},textAnnotation:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="FreeText",o.Contents=new String(i),o.DA=new String,this.annotate(t,e,n,r,o)},_convertRect:function(t,e,n,r){var i,o,a,s,h,u,c,l,f;return l=e,e+=r,c=t+n,f=this._ctm,i=f[0],o=f[1],a=f[2],s=f[3],h=f[4],u=f[5],t=i*t+a*e+h,e=o*t+s*e+u,c=i*c+a*l+h,l=o*c+s*l+u,[t,e,c,l]}}}).call(this)},function(t,e){t.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},function(t,e,n){(function(e){"use strict";function r(t,e){this.pdfDoc=t,this.imageDictionary=e||{}}var i=(n(24),n(97));r.prototype.measureImage=function(t){function n(t){var n=a.imageDictionary[t];if(!n)return t;var r=n.indexOf("base64,");if(0>r)throw"invalid image format, images dictionary should contain dataURL entries";return new e(n.substring(r+7),"base64")}var r,o,a=this;return this.pdfDoc._imageRegistry[t]?r=this.pdfDoc._imageRegistry[t]:(o="I"+ ++this.pdfDoc._imageCount,r=i.open(n(t),o),r.embed(this.pdfDoc),this.pdfDoc._imageRegistry[t]=r),{width:r.width,height:r.height}},t.exports=r}).call(e,n(2).Buffer)},function(t,e){"use strict";function n(t){for(var e=[],n=null,r=0,i=t.inlines.length;i>r;r++){var o=t.inlines[r],a=o.decoration;if(a){var s=o.decorationColor||o.color||"black",h=o.decorationStyle||"solid";a=Array.isArray(a)?a:[a];for(var u=0,c=a.length;c>u;u++){var l=a[u];n&&l===n.decoration&&h===n.decorationStyle&&s===n.decorationColor&&"lineThrough"!==l?n.inlines.push(o):(n={line:t,decoration:l,decorationColor:s,decorationStyle:h,inlines:[o]},e.push(n))}}else n=null}return e}function r(t,e,n,r){function i(){for(var e=0,n=0,r=t.inlines.length;r>n;n++){var i=t.inlines[n];e=i.fontSize>e?n:e}return t.inlines[e]}function o(){for(var e=0,n=0,r=t.inlines.length;r>n;n++)e+=t.inlines[n].width;return e}var a=t.inlines[0],s=i(),h=o(),u=t.line.getAscenderHeight(),c=s.font.ascender/1e3*s.fontSize,l=s.height,f=l-c,d=.5+.12*Math.floor(Math.max(s.fontSize-8,0)/2);switch(t.decoration){case"underline":n+=u+.45*f;break;case"overline":n+=u-.85*c;break;case"lineThrough":n+=u-.25*c;break;default:throw"Unkown decoration : "+t.decoration}if(r.save(),"double"===t.decorationStyle){var p=Math.max(.5,2*d);r.fillColor(t.decorationColor).rect(e+a.x,n-d/2,h,d/2).fill().rect(e+a.x,n+p-d/2,h,d/2).fill()}else if("dashed"===t.decorationStyle){var g=Math.ceil(h/6.8),m=e+a.x;r.rect(m,n,h,d).clip(),r.fillColor(t.decorationColor);for(var v=0;g>v;v++)r.rect(m,n-d/2,3.96,d).fill(),m+=6.8}else if("dotted"===t.decorationStyle){var y=Math.ceil(h/(3*d)),b=e+a.x;r.rect(b,n,h,d).clip(),r.fillColor(t.decorationColor);for(var w=0;y>w;w++)r.rect(b,n-d/2,d,d).fill(),b+=3*d}else if("wavy"===t.decorationStyle){var _=.7,A=1,x=Math.ceil(h/(2*_))+1,S=e+a.x-1;r.rect(e+a.x,n-A,h,n+A).clip(),r.lineWidth(.24),r.moveTo(S,n);for(var k=0;x>k;k++)r.bezierCurveTo(S+_,n-A,S+2*_,n-A,S+3*_,n).bezierCurveTo(S+4*_,n+A,S+5*_,n+A,S+6*_,n),S+=6*_;r.stroke(t.decorationColor)}else r.fillColor(t.decorationColor).rect(e+a.x,n-d/2,h,d).fill();r.restore()}function i(t,e,i,o){for(var a=n(t),s=0,h=a.length;h>s;s++)r(a[s],e,i,o)}function o(t,e,n,r){for(var i=t.getHeight(),o=0,a=t.inlines.length;a>o;o++){var s=t.inlines[o];s.background&&r.fillColor(s.background).rect(e+s.x,n,s.width,i).fill()}}t.exports={drawBackground:o,drawDecorations:i}},function(t,e,n){var r,i,o=o||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,o=function(t){var e=new MouseEvent("click");t.dispatchEvent(e)},a=t.webkitRequestFileSystem,s=t.requestFileSystem||a||t.mozRequestFileSystem,h=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},u="application/octet-stream",c=0,l=500,f=function(e){var r=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};t.chrome?r():setTimeout(r,l)},d=function(t,e,n){e=[].concat(e);for(var r=e.length;r--;){var i=t["on"+e[r]];if("function"==typeof i)try{i.call(t,n||t)}catch(o){h(o)}}},p=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t},g=function(e,h,l){l||(e=p(e));var g,m,v,y=this,b=e.type,w=!1,_=function(){d(y,"writestart progress write writeend".split(" "))},A=function(){if((w||!g)&&(g=n().createObjectURL(e)),m)m.location.href=g;else{var r=t.open(g,"_blank");void 0==r&&"undefined"!=typeof safari&&(t.location.href=g)}y.readyState=y.DONE,_(),f(g)},x=function(t){return function(){return y.readyState!==y.DONE?t.apply(this,arguments):void 0}},S={create:!0,exclusive:!1};return y.readyState=y.INIT,h||(h="download"),i?(g=n().createObjectURL(e),r.href=g,r.download=h,void setTimeout(function(){o(r),_(),f(g),y.readyState=y.DONE})):(t.chrome&&b&&b!==u&&(v=e.slice||e.webkitSlice,e=v.call(e,0,e.size,u),w=!0),a&&"download"!==h&&(h+=".download"),(b===u||a)&&(m=t),s?(c+=e.size,void s(t.TEMPORARY,c,x(function(t){t.root.getDirectory("saved",S,x(function(t){var n=function(){t.getFile(h,S,x(function(t){t.createWriter(x(function(n){n.onwriteend=function(e){m.location.href=t.toURL(),y.readyState=y.DONE,d(y,"writeend",e),f(t)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&A()},"writestart progress write abort".split(" ").forEach(function(t){n["on"+t]=y["on"+t]}),n.write(e),y.abort=function(){n.abort(),y.readyState=y.DONE},y.readyState=y.WRITING}),A)}),A)};t.getFile(h,{create:!1},x(function(t){t.remove(),n()}),x(function(t){t.code===t.NOT_FOUND_ERR?n():A()}))}),A)}),A)):void A())},m=g.prototype,v=function(t,e,n){return new g(t,e,n)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return n||(t=p(t)),navigator.msSaveOrOpenBlob(t,e||"download")}:(m.abort=function(){var t=this;t.readyState=t.DONE,d(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,v)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof t&&t.exports?t.exports.saveAs=o:null!==n(106)&&null!=n(107)&&(r=[],i=function(){return o}.apply(e,r),!(void 0!==i&&(t.exports=i)))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){(function(e){t.exports=e}).call(e,{})}]),window.pdfMake=window.pdfMake||{},window.pdfMake.vfs={},window.ninjaFontVfs&&ninjaLoadFontVfs(); //# sourceMappingURL=pdf.built.js.map