Generic build of PDF.js library.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
218 KiB

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=14)}([function(e,t,r){"use strict";(function(e){function n(e){ae=e}function i(){return ae}function a(e){ae>=re.infos&&console.log("Info: "+e)}function o(e){ae>=re.warnings&&console.log("Warning: "+e)}function s(e){console.log("Deprecated API usage: "+e)}function l(e){throw ae>=re.errors&&(console.log("Error: "+e),console.log(c())),new Error(e)}function c(){try{throw new Error}catch(e){return e.stack?e.stack.split("\n").slice(2).join("\n"):""}}function u(e,t){e||l(t)}function d(e,t){try{var r=new URL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin}function h(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function f(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(h(r))return r}catch(e){}return null}function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}function m(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}}function g(e){return"string"!=typeof e?(o("The argument for removeNullCharacters must be a string."),e):e.replace(ge,"")}function v(e){u(null!==e&&"object"===(void 0===e?"undefined":z(e))&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),a=e.subarray(n,i);r.push(String.fromCharCode.apply(null,a))}return r.join("")}function b(e){u("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function y(e){return void 0!==e.length?e.length:(u(void 0!==e.byteLength),e.byteLength)}function A(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,r,n,i=0,a=e.length;for(t=0;t<a;t++)r=e[t],n=y(r),i+=n;var o=0,s=new Uint8Array(i);for(t=0;t<a;t++)r=e[t],r instanceof Uint8Array||(r="string"==typeof r?b(r):new Uint8Array(r)),n=r.byteLength,s.set(r,o),o+=n;return s}function _(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function S(e){for(var t=1,r=0;e>t;)t<<=1,r++;return r}function w(e,t){return e[t]<<24>>24}function P(e,t){return e[t]<<8|e[t+1]}function x(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function T(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}function k(){try{return new Function(""),!0}catch(e){return!1}}function C(e){var t,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));else for(t=0;t<r;++t){var i=Ae[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}return n.join("")}function R(e){return decodeURIComponent(escape(e))}function E(e){return unescape(encodeURIComponent(e))}function L(e){for(var t in e)return!1;return!0}function O(e){return"boolean"==typeof e}function I(e){return"number"==typeof e&&(0|e)===e}function j(e){return"number"==typeof e}function D(e){return"string"==typeof e}function F(e){return e instanceof Array}function N(e){return"object"===(void 0===e?"undefined":z(e))&&null!==e&&void 0!==e.byteLength}function M(e){return 32===e||9===e||13===e||10===e}function W(){return"undefined"==typeof __pdfjsdev_webpack__&&("object"===("undefined"==typeof proce
}),a=parseFloat(r.style.left),o=parseFloat(r.style.width);return i.CustomStyle.setProp("transformOrigin",this.container,-(a+o)+"px -"+r.style.top),this.container.style.left=a+o+"px",this.container.appendChild(n.render()),this.container}}),e}(),m=function(){function e(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.title=e.title,this.contents=e.contents,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}return e.prototype={render:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var n=.7*(255-r[0])+r[0],i=.7*(255-r[1])+r[1],o=.7*(255-r[2])+r[2];t.style.backgroundColor=a.Util.makeCssRgb(0|n,0|i,0|o)}var s=this._formatContents(this.contents),l=document.createElement("h1");return l.textContent=this.title,this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(l),t.appendChild(s),e.appendChild(t),e},_formatContents:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n<i;++n){var a=r[n];t.appendChild(document.createTextNode(a)),n<i-1&&t.appendChild(document.createElement("br"))}return t},_toggle:function(){this.pinned?this._hide(!0):this._show(!0)},_show:function(e){e&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)},_hide:function(e){e&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}},e}(),g=function(){function e(e){var t=!!(e.data.hasPopup||e.data.title||e.data.contents);o.call(this,e,t,!0)}var t="http://www.w3.org/2000/svg";return a.Util.inherit(e,o,{render:function(){this.container.className="lineAnnotation";var e=this.data,r=e.rect[2]-e.rect[0],n=e.rect[3]-e.rect[1],i=document.createElementNS(t,"svg:svg");i.setAttributeNS(null,"version","1.1"),i.setAttributeNS(null,"width",r+"px"),i.setAttributeNS(null,"height",n+"px"),i.setAttributeNS(null,"preserveAspectRatio","none"),i.setAttributeNS(null,"viewBox","0 0 "+r+" "+n);var a=document.createElementNS(t,"svg:line");return a.setAttributeNS(null,"x1",e.rect[2]-e.lineCoordinates[0]),a.setAttributeNS(null,"y1",e.rect[3]-e.lineCoordinates[1]),a.setAttributeNS(null,"x2",e.rect[2]-e.lineCoordinates[2]),a.setAttributeNS(null,"y2",e.rect[3]-e.lineCoordinates[3]),a.setAttributeNS(null,"stroke-width",e.borderStyle.width),a.setAttributeNS(null,"stroke","transparent"),i.appendChild(a),this.container.append(i),this._createPopup(this.container,a,this.data),this.container}}),e}(),v=function(){function e(e){var t=!!(e.data.hasPopup||e.data.title||e.data.contents);o.call(this,e,t,!0)}return a.Util.inherit(e,o,{render:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}),e}(),b=function(){function e(e){var t=!!(e.data.hasPopup||e.data.title||e.data.contents);o.call(this,e,t,!0)}return a.Util.inherit(e,o,{render:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}),e}(),y=function(){function e(e){var t=!!(e.data.hasPopup||e.data.title||e.data.contents);o.call(this,e,t,!0)}return a.Util.inherit(e,o,{render:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}),e}(),A=function(){function e(e){var t=!!(e.data.hasPopup||e.data.title||e.data.contents);o.call(this,e,t,!0)}return a.Util.inherit(e,o,{render:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}),e}(),_=functi
u.getDefaultSetting)("pdfjsNext")?this.callback(new u.RenderingCancelledException("Rendering cancelled, page "+this.pageNumber,"canvas")):this.callback("cancelled")},operatorListChanged:function(){if(!this.graphicsReady)return void(this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound));this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()},_continue:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())},_scheduleNext:function(){this.useRequestAnimationFrame&&"undefined"!=typeof window?window.requestAnimationFrame(this._nextBound):Promise.resolve(void 0).then(this._nextBound)},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this.callback())))}},e}(),I=function(){var e=[];return{listen:function(t){(0,c.deprecated)("Global UnsupportedManager.listen is used: use PDFDocumentLoadingTask.onUnsupportedFeature instead"),e.push(t)},notify:function(t){for(var r=0,n=e.length;r<n;r++)e[r](t)}}}();t.version=_="1.8.430",t.build=S="e6f5b3e3",t.getDocument=i,t.LoopbackPort=k,t.PDFDataRangeTransport=P,t.PDFWorker=C,t.PDFDocumentProxy=x,t.PDFPageProxy=T,t._UnsupportedManager=I,t.version=_,t.build=S},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(0),i=function(){throw new Error("Not implemented: SVGGraphics")},a={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},o=function(){function e(e,t,r){for(var n=-1,i=t;i<r;i++){var a=255&(n^e[i]);n=n>>>8^s[a]}return-1^n}function t(t,r,n,i){var a=i,o=r.length;n[a]=o>>24&255,n[a+1]=o>>16&255,n[a+2]=o>>8&255,n[a+3]=255&o,a+=4,n[a]=255&t.charCodeAt(0),n[a+1]=255&t.charCodeAt(1),n[a+2]=255&t.charCodeAt(2),n[a+3]=255&t.charCodeAt(3),a+=4,n.set(r,a),a+=r.length;var s=e(n,i+4,a);n[a]=s>>24&255,n[a+1]=s>>16&255,n[a+2]=s>>8&255,n[a+3]=255&s}function r(e,t,r){for(var n=1,i=0,a=t;a<r;++a)n=(n+(255&e[a]))%65521,i=(i+n)%65521;return i<<16|n}function i(e,i,s){var l,c,u,d=e.width,h=e.height,f=e.data;switch(i){case n.ImageKind.GRAYSCALE_1BPP:c=0,l=1,u=d+7>>3;break;case n.ImageKind.RGB_24BPP:c=2,l=8,u=3*d;break;case n.ImageKind.RGBA_32BPP:c=6,l=8,u=4*d;break;default:throw new Error("invalid format")}var p,m,g=new Uint8Array((1+u)*h),v=0,b=0;for(p=0;p<h;++p)g[v++]=0,g.set(f.subarray(b,b+u),v),b+=u,v+=u;if(i===n.ImageKind.GRAYSCALE_1BPP)for(v=0,p=0;p<h;p++)for(v++,m=0;m<u;m++)g[v++]^=255;var y=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,h>>24&255,h>>16&255,h>>8&255,255&h,l,c,0,0,0]),A=g.length,_=Math.ceil(A/65535),S=new Uint8Array(2+A+5*_+4),w=0;S[w++]=120,S[w++]=156;for(var P=0;A>65535;)S[w++]=0,S[w++]=255,S[w++]=255,S[w++]=0,S[w++]=0,S.set(g.subarray(P,P+65535),w),w+=65535,P+=65535,A-=65535;S[w++]=1,S[w++]=255&A,S[w++]=A>>8&255,S[w++]=255&~A,S[w++]=(65535&~A)>>8&255,S.set(g.subarray(P),w),w+=g.length-P;var x=r(g,0,g.length);S[w++]=x>>24&255,S[w++]=x>>16&255,S[w++]=x>>8&255,S[w++]=255&x;var T=a.length+3*o+y.length+S.length,k=new Uint8Array(T),C=0;return k.set(a,C),C+=a.length,t("IHDR",y,k,C),C+=o+y.length,t("IDATA",S,k,C),C+=o+S.length,t("IEND",new Uint8Array(0),k,C),(0,n.createObjectURL)(k,"image/png",s)}for(var a=new Uint8Array([137,80,78,71,13,10,26,10]),o=12,s=new Int32Array(256),l=0;l<256;l++){for(var c=l,u=0;u<8;u++)c=1&c?3988292384^c>>1&2147483647:c>>1&2147483647;s[l]=c}return function(e,t){return i(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t)}}(),s=function(){function e(){this.fontSizeScale=1,this.fontWeight=a.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=a.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lin
c.colorLocation=n.getAttribLocation(l,"a_color"),A=c}function d(e,t,r,n,i){A||u();var a=A,o=a.canvas,s=a.gl;o.width=e,o.height=t,s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.uniform2f(a.resolutionLocation,e,t);var l,c,d,h=0;for(l=0,c=n.length;l<c;l++)switch(n[l].type){case"lattice":d=n[l].coords.length/n[l].verticesPerRow|0,h+=(d-1)*(n[l].verticesPerRow-1)*6;break;case"triangles":h+=n[l].coords.length}var f=new Float32Array(2*h),p=new Uint8Array(3*h),m=i.coords,g=i.colors,v=0,b=0;for(l=0,c=n.length;l<c;l++){var y=n[l],_=y.coords,S=y.colors;switch(y.type){case"lattice":var w=y.verticesPerRow;d=_.length/w|0;for(var P=1;P<d;P++)for(var x=P*w+1,T=1;T<w;T++,x++)f[v]=m[_[x-w-1]],f[v+1]=m[_[x-w-1]+1],f[v+2]=m[_[x-w]],f[v+3]=m[_[x-w]+1],f[v+4]=m[_[x-1]],f[v+5]=m[_[x-1]+1],p[b]=g[S[x-w-1]],p[b+1]=g[S[x-w-1]+1],p[b+2]=g[S[x-w-1]+2],p[b+3]=g[S[x-w]],p[b+4]=g[S[x-w]+1],p[b+5]=g[S[x-w]+2],p[b+6]=g[S[x-1]],p[b+7]=g[S[x-1]+1],p[b+8]=g[S[x-1]+2],f[v+6]=f[v+2],f[v+7]=f[v+3],f[v+8]=f[v+4],f[v+9]=f[v+5],f[v+10]=m[_[x]],f[v+11]=m[_[x]+1],p[b+9]=p[b+3],p[b+10]=p[b+4],p[b+11]=p[b+5],p[b+12]=p[b+6],p[b+13]=p[b+7],p[b+14]=p[b+8],p[b+15]=g[S[x]],p[b+16]=g[S[x]+1],p[b+17]=g[S[x]+2],v+=12,b+=18;break;case"triangles":for(var k=0,C=_.length;k<C;k++)f[v]=m[_[k]],f[v+1]=m[_[k]+1],p[b]=g[S[k]],p[b+1]=g[S[k]+1],p[b+2]=g[S[k]+2],v+=2,b+=3}}r?s.clearColor(r[0]/255,r[1]/255,r[2]/255,1):s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT);var R=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,R),s.bufferData(s.ARRAY_BUFFER,f,s.STATIC_DRAW),s.enableVertexAttribArray(a.positionLocation),s.vertexAttribPointer(a.positionLocation,2,s.FLOAT,!1,0,0);var E=s.createBuffer();return s.bindBuffer(s.ARRAY_BUFFER,E),s.bufferData(s.ARRAY_BUFFER,p,s.STATIC_DRAW),s.enableVertexAttribArray(a.colorLocation),s.vertexAttribPointer(a.colorLocation,3,s.UNSIGNED_BYTE,!1,0,0),s.uniform2f(a.scaleLocation,i.scaleX,i.scaleY),s.uniform2f(a.offsetLocation,i.offsetX,i.offsetY),s.drawArrays(s.TRIANGLES,0,h),s.flush(),s.deleteBuffer(R),s.deleteBuffer(E),o}function h(){v&&v.canvas&&(v.canvas.width=0,v.canvas.height=0),A&&A.canvas&&(A.canvas.width=0,A.canvas.height=0),v=null,A=null}var f,p,m=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",g=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum;
return e}function d(){function e(t){var r=e._stream,n=e._teeState;if(n.canceled1=!0,n.reason1=t,!0===n.canceled2){var i=je([n.reason1,n.reason2]),a=m(r,i);n._resolve(a)}return n.promise}return e}function h(){function e(t){var r=e._stream,n=e._teeState;if(n.canceled2=!0,n.reason2=t,!0===n.canceled1){var i=je([n.reason1,n.reason2]),a=m(r,i);n._resolve(a)}return n.promise}return e}function f(e){return Me(!0===P(e._reader)),Me("readable"===e._state||"closed"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)})}function p(e){return Me(!0===x(e._reader)),Me("readable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)})}function m(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(g(e),e._readableStreamController.__cancelSteps(t).then(function(){}))}function g(e){Me("readable"===e._state),e._state="closed";var t=e._reader;if(void 0!==t){if(!0===x(t)){for(var r=0;r<t._readRequests.length;r++){(0,t._readRequests[r])(Te(void 0,!0))}t._readRequests=[]}ve(t)}}function v(e,t){Me(!0===o(e),"stream must be ReadableStream"),Me("readable"===e._state,"state must be readable"),e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===x(r)){for(var n=0;n<r._readRequests.length;n++){r._readRequests[n]._reject(t)}r._readRequests=[]}else{Me(P(r),"reader must be ReadableStreamBYOBReader");for(var i=0;i<r._readIntoRequests.length;i++){r._readIntoRequests[i]._reject(t)}r._readIntoRequests=[]}me(r,t),r._closedPromise.catch(function(){})}}function b(e,t,r){var n=e._reader;Me(n._readIntoRequests.length>0),n._readIntoRequests.shift()._resolve(Te(t,r))}function y(e,t,r){var n=e._reader;Me(n._readRequests.length>0),n._readRequests.shift()._resolve(Te(t,r))}function A(e){return e._reader._readIntoRequests.length}function _(e){return e._reader._readRequests.length}function S(e){var t=e._reader;return void 0!==t&&!1!==P(t)}function w(e){var t=e._reader;return void 0!==t&&!1!==x(t)}function P(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function x(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function T(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?he(e):"closed"===t._state?pe(e):(Me("errored"===t._state,"state must be errored"),fe(e,t._storedError),e._closedPromise.catch(function(){}))}function k(e,t){var r=e._ownerReadableStream;return Me(void 0!==r),m(r,t)}function C(e){Me(void 0!==e._ownerReadableStream),Me(e._ownerReadableStream._reader===e),"readable"===e._ownerReadableStream._state?me(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ge(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch(function(){}),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function R(e,t){var r=e._ownerReadableStream;return Me(void 0!==r),r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):K(r._readableStreamController,t)}function E(e){var t=e._ownerReadableStream;return Me(void 0!==t),t._disturbed=!0,"closed"===t._state?Promise.resolve(Te(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):(Me("readable"===t._state),t._readableStreamController.__pullSteps())}function L(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSource")}function O(e){if(!1!==I(e)){if(!0===e._pulling)return void(e._pullAgain=!0);Me(!1===e._pullAgain),e._pulling=!0,Re(e._underlyingSource,"pull",[e]).then(function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,O(e)},function(t){N(e,t)}).catch(We)}}function I(e){var t=e._controlledReadableStream;return"closed"!==t._state&&"errored"!==t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===l(t)&&_(t)>0||M(e)>0)))}function j(e){var t=e._controlledReadableStream;Me(!1===e._closeRequested),Me("readable"===t._state),e._closeRequested=!0,0===e._queue.length&&g(t)}function D(e,t){var r
;this._writable=new I(l,i),A(void 0!==this._writableController),A(void 0!==this._readableController),d(this,L(this._readableController)<=0);var c=this,u=S(t,"start",[c._transformStreamController]);a(u),o.catch(function(e){!1===c._errored&&(c._errored=!0,c._storedError=e)})}return b(e,[{key:"readable",get:function(){if(!1===m(this))throw v("readable");return this._readable}},{key:"writable",get:function(){if(!1===m(this))throw v("writable");return this._writable}}]),e}();e.exports={TransformStream:M}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";function n(e){e.mozCurrentTransform||(e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[],Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=t*i-r*n,l=r*n-t*i;return[i/s,r/l,n/l,t/s,(i*a-n*o)/l,(r*a-t*o)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*t,r[3]=r[3]*t,this._originalScale(e,t)},e.transform=function(t,r,n,i,a,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*i,s[1]*n+s[3]*i,s[0]*a+s[2]*o+s[4],s[1]*a+s[3]*o+s[5]],e._originalTransform(t,r,n,i,a,o)},e.setTransform=function(t,r,n,i,a,o){this._transformMatrix=[t,r,n,i,a,o],e._originalSetTransform(t,r,n,i,a,o)},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)})}function i(e){var t,r,n,i,a=e.width,o=e.height,s=a+1,l=new Uint8Array(s*(o+1)),c=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=a+7&-8,d=e.data,h=new Uint8Array(u*o),f=0;for(t=0,i=d.length;t<i;t++)for(var p=128,m=d[t];p>0;)h[f++]=m&p?0:255,p>>=1;var g=0;for(f=0,0!==h[f]&&(l[0]=1,++g),r=1;r<a;r++)h[f]!==h[f+1]&&(l[r]=h[f]?2:1,++g),f++;for(0!==h[f]&&(l[r]=2,++g),t=1;t<o;t++){f=t*u,n=t*s,h[f-u]!==h[f]&&(l[n]=h[f]?1:8,++g);var v=(h[f]?4:0)+(h[f-u]?8:0);for(r=1;r<a;r++)v=(v>>2)+(h[f+1]?4:0)+(h[f-u+1]?8:0),c[v]&&(l[n+r]=c[v],++g),f++;if(h[f-u]!==h[f]&&(l[n+r]=h[f]?2:4,++g),g>1e3)return null}for(f=u*(o-1),n=t*s,0!==h[f]&&(l[n]=8,++g),r=1;r<a;r++)h[f]!==h[f+1]&&(l[n+r]=h[f]?4:8,++g),f++;if(0!==h[f]&&(l[n+r]=4,++g),g>1e3)return null;var b=new Int32Array([0,s,-1,0,-s,0,0,0,1]),y=[];for(t=0;g&&t<=o;t++){for(var A=t*s,_=A+a;A<_&&!l[A];)A++;if(A!==_){var S,w=[A%s,t],P=l[A],x=A;do{var T=b[P];do{A+=T}while(!l[A]);S=l[A],5!==S&&10!==S?(P=S,l[A]=0):(P=S&51*P>>4,l[A]&=P>>2|P<<2),w.push(A%s),w.push(A/s|0),--g}while(x!==A);y.push(w),--t}}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,r=y.length;t<r;t++){var n=y[t];e.moveTo(n[0],n[1]);for(var i=2,s=n.length;i<s;i+=2)e.lineTo(n[i],n[i+1])}e.fill(),e.beginPath(),e.restore()}}Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var a=r(0),o=r(13),s=r(8),l=16,c={get value(){return(0,a.shadow)(c,"value",(0,a.isLittleEndian)())}},u=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,i){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),i&&n(a.context),a},clear:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}
var h=u.createFontFaceRule();h&&(this.insertRule(h),r.push(h),a.push(u))}}var f=this.queueLoadingCallback(t);s?Promise.all(o).then(function(){f.complete()}):r.length>0&&!n.isSyncFontLoadingSupported?this.prepareFontLoadEvent(r,a,f):f.complete()},n.prototype.queueLoadingCallback=function(e){function t(){for((0,i.assert)(!a.end,"completeRequest() cannot be called twice"),a.end=Date.now();r.requests.length>0&&r.requests[0].end;){var e=r.requests.shift();setTimeout(e.callback,0)}}var r=this.loadingContext,n="pdfjs-font-loading-"+r.nextRequestId++,a={id:n,complete:t,callback:e,started:Date.now()};return r.requests.push(a),a},n.prototype.prepareFontLoadEvent=function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substr(0,t)+n+e.substr(t+r)}function o(e,t){return++d>30?((0,i.warn)("Load test font never loaded."),void t()):(u.font="30px "+e,u.fillText(".",0,20),u.getImageData(0,0,1,1).data[3]>0?void t():void setTimeout(o.bind(null,e,t)))}var s,l,c=document.createElement("canvas");c.width=1,c.height=1;var u=c.getContext("2d"),d=0,h="lt"+Date.now()+this.loadTestFontId++,f=this.loadTestFont;f=a(f,976,h.length,h);var p=n(f,16);for(s=0,l=h.length-3;s<l;s+=4)p=p-1482184792+n(h,s)|0;s<h.length&&(p=p-1482184792+n(h+"XXX",s)|0),f=a(f,16,4,(0,i.string32)(p));var m="url(data:font/opentype;base64,"+btoa(f)+");",g='@font-face { font-family:"'+h+'";src:'+m+"}";this.insertRule(g);var v=[];for(s=0,l=t.length;s<l;s++)v.push(t[s].loadedName);v.push(h);var b=document.createElement("div");for(b.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),s=0,l=v.length;s<l;++s){var y=document.createElement("span");y.textContent="Hi",y.style.fontFamily=v[s],b.appendChild(y)}document.body.appendChild(b),o(h,function(){document.body.removeChild(b),r.complete()})},n.isFontLoadingAPISupported="undefined"!=typeof document&&!!document.fonts;var o=function(){if("undefined"==typeof navigator)return!0;var e=!1,t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);return t&&t[1]>=14&&(e=!0),e};Object.defineProperty(n,"isSyncFontLoadingSupported",{get:function(){return(0,i.shadow)(n,"isSyncFontLoadingSupported",o())},enumerable:!0,configurable:!0});var s={get value(){return(0,i.shadow)(this,"value",(0,i.isEvalSupported)())}},l=function(){function e(e,t){this.compiledGlyphs=Object.create(null);for(var r in e)this[r]=e[r];this.options=t}return e.prototype={createNativeFontFace:function(){if(!this.data)return null;if(this.options.disableFontFace)return this.disableFontFace=!0,null;var e=new FontFace(this.loadedName,this.data,{});return this.options.fontRegistry&&this.options.fontRegistry.registerFont(this),e},createFontFaceRule:function(){if(!this.data)return null;if(this.options.disableFontFace)return this.disableFontFace=!0,null;var e=(0,i.bytesToString)(new Uint8Array(this.data)),t=this.loadedName,r="url(data:"+this.mimetype+";base64,"+btoa(e)+");",n='@font-face { font-family:"'+t+'";src:'+r+"}";return this.options.fontRegistry&&this.options.fontRegistry.registerFont(this,r),n},getPathGenerator:function(e,t){if(!(t in this.compiledGlyphs)){var r,n,i,a=e.get(this.loadedName+"_path_"+t);if(this.options.isEvalSupported&&s.value){var o,l="";for(n=0,i=a.length;n<i;n++)r=a[n],o=void 0!==r.args?r.args.join(","):"",l+="c."+r.cmd+"("+o+");\n";this.compiledGlyphs[t]=new Function("c","size",l)}else this.compiledGlyphs[t]=function(e,t){for(n=0,i=a.length;n<i;n++)r=a[n],"scale"===r.cmd&&(r.args=[t,-t]),e[r.cmd].apply(e,r.args)}}return this.compiledGlyphs[t]}},e}();t.FontFaceObject=l,t.FontLoader=n},function(e,t,r){"use strict";function n(e){var t=o[e[0]];return t||(0,i.error)("Unknown IR type: "+e[0]),t.fromIR(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.getShadingPatternFromIR=void 0;var i=r(0),a=r(8),o={};o.RadialAxial={fromIR:function(e){var t=e[1],r=e[2],n=e[3],i=e[4],a=e[5],o=e[6];return{type:"Pattern",getPattern:function(e){var s;"axial"===t?s=e.createLinearGradient(n[0],n[1],i[0],i[1]):"