(function(a,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define("pdfjs-dist/build/pdf",[],t):typeof exports=="object"?exports["pdfjs-dist/build/pdf"]=t():a["pdfjs-dist/build/pdf"]=a.pdfjsLib=t()})(this,function(){return(()=>{var __webpack_modules__=[,(y,a,t)=>{"use strict";function r(S){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(s){return typeof s}:r=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(S)}Object.defineProperty(a,"__esModule",{value:!0}),a.StatTimer=a.RenderingCancelledException=a.PixelsPerInch=a.PageViewport=a.PDFDateString=a.LinkTarget=a.DOMStandardFontDataFactory=a.DOMSVGFactory=a.DOMCanvasFactory=a.DOMCMapReaderFactory=void 0,a.addLinkAttributes=q,a.deprecated=be,a.getFilenameFromUrl=A,a.getPdfFilenameFromUrl=E,a.getXfaPageViewport=Me,a.isDataScheme=R,a.isPdfFile=h,a.isValidFetchUrl=te,a.loadScript=Y;var i=_(t(2)),f=t(4),m=t(135);function _(S){return S&&S.__esModule?S:{default:S}}function D(S,w){var s=typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(!s){if(Array.isArray(S)||(s=L(S))||w&&S&&typeof S.length=="number"){s&&(S=s);var o=0,k=function(){};return{s:k,n:function(){return o>=S.length?{done:!0}:{done:!1,value:S[o++]}},e:function(ve){throw ve},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,W=!1,re;return{s:function(){s=s.call(S)},n:function(){var ve=s.next();return N=ve.done,ve},e:function(ve){W=!0,re=ve},f:function(){try{!N&&s.return!=null&&s.return()}finally{if(W)throw re}}}}function L(S,w){if(!!S){if(typeof S=="string")return $(S,w);var s=Object.prototype.toString.call(S).slice(8,-1);if(s==="Object"&&S.constructor&&(s=S.constructor.name),s==="Map"||s==="Set")return Array.from(S);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return $(S,w)}}function $(S,w){(w==null||w>S.length)&&(w=S.length);for(var s=0,o=new Array(w);s0&&arguments[0]!==void 0?arguments[0]:{},N=k.ownerDocument,W=N===void 0?globalThis.document:N;return O(this,s),o=w.call(this),o._document=W,o}return F(s,[{key:"_createCanvas",value:function(k,N){var W=this._document.createElement("canvas");return W.width=k,W.height=N,W}}]),s}(m.BaseCanvasFactory);a.DOMCanvasFactory=b;function T(S){return U.apply(this,arguments)}function U(){return U=V(i.default.mark(function S(w){var s,o,k=arguments;return i.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(s=k.length>1&&k[1]!==void 0?k[1]:!1,!te(w,document.baseURI)){W.next=21;break}return W.next=4,fetch(w);case 4:if(o=W.sent,o.ok){W.next=7;break}throw new Error(o.statusText);case 7:if(!s){W.next=15;break}return W.t1=Uint8Array,W.next=11,o.arrayBuffer();case 11:W.t2=W.sent,W.t0=new W.t1(W.t2),W.next=20;break;case 15:return W.t3=f.stringToBytes,W.next=18,o.text();case 18:W.t4=W.sent,W.t0=(0,W.t3)(W.t4);case 20:return W.abrupt("return",W.t0);case 21:return W.abrupt("return",new Promise(function(re,fe){var ve=new XMLHttpRequest;ve.open("GET",w,!0),s&&(ve.responseType="arraybuffer"),ve.onreadystatechange=function(){if(ve.readyState===XMLHttpRequest.DONE){if(ve.status===200||ve.status===0){var me;if(s&&ve.response?me=new Uint8Array(ve.response):!s&&ve.responseText&&(me=(0,f.stringToBytes)(ve.responseText)),me){re(me);return}}fe(new Error(ve.statusText))}},ve.send(null)}));case 22:case"end":return W.stop()}},S)})),U.apply(this,arguments)}var M=function(S){x(s,S);var w=g(s);function s(){return O(this,s),w.apply(this,arguments)}return F(s,[{key:"_fetchData",value:function(k,N){return T(k,this.isCompressed).then(function(W){return{cMapData:W,compressionType:N}})}}]),s}(m.BaseCMapReaderFactory);a.DOMCMapReaderFactory=M;var G=function(S){x(s,S);var w=g(s);function s(){return O(this,s),w.apply(this,arguments)}return F(s,[{key:"_fetchData",value:function(k){return T(k,!0)}}]),s}(m.BaseStandardFontDataFactory);a.DOMStandardFontDataFactory=G;var Z=function(S){x(s,S);var w=g(s);function s(){return O(this,s),w.apply(this,arguments)}return F(s,[{key:"_createSVG",value:function(k){return document.createElementNS(d,k)}}]),s}(m.BaseSVGFactory);a.DOMSVGFactory=Z;var J=function(){function S(w){var s=w.viewBox,o=w.scale,k=w.rotation,N=w.offsetX,W=N===void 0?0:N,re=w.offsetY,fe=re===void 0?0:re,ve=w.dontFlip,me=ve===void 0?!1:ve;O(this,S),this.viewBox=s,this.scale=o,this.rotation=k,this.offsetX=W,this.offsetY=fe;var pe=(s[2]+s[0])/2,Ae=(s[3]+s[1])/2,Pe,_e,We,Le;switch(k%=360,k<0&&(k+=360),k){case 180:Pe=-1,_e=0,We=0,Le=1;break;case 90:Pe=0,_e=1,We=1,Le=0;break;case 270:Pe=0,_e=-1,We=-1,Le=0;break;case 0:Pe=1,_e=0,We=0,Le=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}me&&(We=-We,Le=-Le);var je,le,he,z;Pe===0?(je=Math.abs(Ae-s[1])*o+W,le=Math.abs(pe-s[0])*o+fe,he=Math.abs(s[3]-s[1])*o,z=Math.abs(s[2]-s[0])*o):(je=Math.abs(pe-s[0])*o+W,le=Math.abs(Ae-s[1])*o+fe,he=Math.abs(s[2]-s[0])*o,z=Math.abs(s[3]-s[1])*o),this.transform=[Pe*o,_e*o,We*o,Le*o,je-Pe*o*pe-We*o*Ae,le-_e*o*pe-Le*o*Ae],this.width=he,this.height=z}return F(S,[{key:"clone",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=s.scale,k=o===void 0?this.scale:o,N=s.rotation,W=N===void 0?this.rotation:N,re=s.offsetX,fe=re===void 0?this.offsetX:re,ve=s.offsetY,me=ve===void 0?this.offsetY:ve,pe=s.dontFlip,Ae=pe===void 0?!1:pe;return new S({viewBox:this.viewBox.slice(),scale:k,rotation:W,offsetX:fe,offsetY:me,dontFlip:Ae})}},{key:"convertToViewportPoint",value:function(s,o){return f.Util.applyTransform([s,o],this.transform)}},{key:"convertToViewportRectangle",value:function(s){var o=f.Util.applyTransform([s[0],s[1]],this.transform),k=f.Util.applyTransform([s[2],s[3]],this.transform);return[o[0],o[1],k[0],k[1]]}},{key:"convertToPdfPoint",value:function(s,o){return f.Util.applyInverseTransform([s,o],this.transform)}}]),S}();a.PageViewport=J;var ie=function(S){x(s,S);var w=g(s);function s(o,k){var N;return O(this,s),N=w.call(this,o,"RenderingCancelledException"),N.type=k,N}return s}(f.BaseException);a.RenderingCancelledException=ie;var H={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};a.LinkTarget=H;function q(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=w.url,o=w.target,k=w.rel,N=w.enabled,W=N===void 0?!0:N;(0,f.assert)(s&&typeof s=="string",'addLinkAttributes: A valid "url" parameter must provided.');var re=(0,f.removeNullCharacters)(s);W?S.href=S.title=re:(S.href="",S.title="Disabled: ".concat(re),S.onclick=function(){return!1});var fe="";switch(o){case H.NONE:break;case H.SELF:fe="_self";break;case H.BLANK:fe="_blank";break;case H.PARENT:fe="_parent";break;case H.TOP:fe="_top";break}S.target=fe,S.rel=typeof k=="string"?k:v}function R(S){for(var w=S.length,s=0;s0?w:S.length,s>0?s:S.length);return S.substring(S.lastIndexOf("/",o)+1,o)}function E(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"document.pdf";if(typeof S!="string")return w;if(R(S))return(0,f.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),w;var s=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,o=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,k=s.exec(S),N=o.exec(k[1])||o.exec(k[2])||o.exec(k[3]);if(N&&(N=N[0],N.includes("%")))try{N=o.exec(decodeURIComponent(N))[0]}catch(W){}return N||w}var K=function(){function S(){O(this,S),this.started=Object.create(null),this.times=[]}return F(S,[{key:"time",value:function(s){s in this.started&&(0,f.warn)("Timer is already running for ".concat(s)),this.started[s]=Date.now()}},{key:"timeEnd",value:function(s){s in this.started||(0,f.warn)("Timer has not been started for ".concat(s)),this.times.push({name:s,start:this.started[s],end:Date.now()}),delete this.started[s]}},{key:"toString",value:function(){var s=[],o=0,k=D(this.times),N;try{for(k.s();!(N=k.n()).done;){var W=N.value,re=W.name;re.length>o&&(o=re.length)}}catch(Ae){k.e(Ae)}finally{k.f()}var fe=D(this.times),ve;try{for(fe.s();!(ve=fe.n()).done;){var me=ve.value,pe=me.end-me.start;s.push("".concat(me.name.padEnd(o)," ").concat(pe,`ms `))}}catch(Ae){fe.e(Ae)}finally{fe.f()}return s.join("")}}]),S}();a.StatTimer=K;function te(S,w){try{var s=w?new URL(S,w):new URL(S),o=s.protocol;return o==="http:"||o==="https:"}catch(k){return!1}}function Y(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise(function(s,o){var k=document.createElement("script");k.src=S,k.onload=function(N){w&&k.remove(),s(N)},k.onerror=function(){o(new Error("Cannot load script at: ".concat(k.src)))},(document.head||document.documentElement).appendChild(k)})}function be(S){console.log("Deprecated API usage: "+S)}var Ce,we=function(){function S(){O(this,S)}return F(S,null,[{key:"toDateObject",value:function(s){if(!s||!(0,f.isString)(s))return null;Ce||(Ce=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var o=Ce.exec(s);if(!o)return null;var k=parseInt(o[1],10),N=parseInt(o[2],10);N=N>=1&&N<=12?N-1:0;var W=parseInt(o[3],10);W=W>=1&&W<=31?W:1;var re=parseInt(o[4],10);re=re>=0&&re<=23?re:0;var fe=parseInt(o[5],10);fe=fe>=0&&fe<=59?fe:0;var ve=parseInt(o[6],10);ve=ve>=0&&ve<=59?ve:0;var me=o[7]||"Z",pe=parseInt(o[8],10);pe=pe>=0&&pe<=23?pe:0;var Ae=parseInt(o[9],10)||0;return Ae=Ae>=0&&Ae<=59?Ae:0,me==="-"?(re+=pe,fe+=Ae):me==="+"&&(re-=pe,fe-=Ae),new Date(Date.UTC(k,N,W,re,fe,ve))}}]),S}();a.PDFDateString=we;function Me(S,w){var s=w.scale,o=s===void 0?1:s,k=w.rotation,N=k===void 0?0:k,W=S.attributes.style,re=W.width,fe=W.height,ve=[0,0,parseInt(re),parseInt(fe)];return new J({viewBox:ve,scale:o,rotation:N})}},(y,a,t)=>{"use strict";y.exports=t(3)},(y,a,t)=>{"use strict";y=t.nmd(y);function r(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(_){return typeof _}:r=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},r(f)}var i=function(f){"use strict";var m=Object.prototype,_=m.hasOwnProperty,D,L=typeof Symbol=="function"?Symbol:{},$=L.iterator||"@@iterator",j=L.asyncIterator||"@@asyncIterator",V=L.toStringTag||"@@toStringTag";function O(h,A,E){return Object.defineProperty(h,A,{value:E,enumerable:!0,configurable:!0,writable:!0}),h[A]}try{O({},"")}catch(h){O=function(E,K,te){return E[K]=te}}function P(h,A,E,K){var te=A&&A.prototype instanceof l?A:l,Y=Object.create(te.prototype),be=new H(K||[]);return Y._invoke=G(h,E,be),Y}f.wrap=P;function F(h,A,E){try{return{type:"normal",arg:h.call(A,E)}}catch(K){return{type:"throw",arg:K}}}var x="suspendedStart",I="suspendedYield",g="executing",B="completed",p={};function l(){}function u(){}function v(){}var d={};O(d,$,function(){return this});var c=Object.getPrototypeOf,b=c&&c(c(q([])));b&&b!==m&&_.call(b,$)&&(d=b);var T=v.prototype=l.prototype=Object.create(d);u.prototype=v,O(T,"constructor",v),O(v,"constructor",u),u.displayName=O(v,V,"GeneratorFunction");function U(h){["next","throw","return"].forEach(function(A){O(h,A,function(E){return this._invoke(A,E)})})}f.isGeneratorFunction=function(h){var A=typeof h=="function"&&h.constructor;return A?A===u||(A.displayName||A.name)==="GeneratorFunction":!1},f.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,v):(h.__proto__=v,O(h,V,"GeneratorFunction")),h.prototype=Object.create(T),h},f.awrap=function(h){return{__await:h}};function M(h,A){function E(Y,be,Ce,we){var Me=F(h[Y],h,be);if(Me.type==="throw")we(Me.arg);else{var S=Me.arg,w=S.value;return w&&r(w)==="object"&&_.call(w,"__await")?A.resolve(w.__await).then(function(s){E("next",s,Ce,we)},function(s){E("throw",s,Ce,we)}):A.resolve(w).then(function(s){S.value=s,Ce(S)},function(s){return E("throw",s,Ce,we)})}}var K;function te(Y,be){function Ce(){return new A(function(we,Me){E(Y,be,we,Me)})}return K=K?K.then(Ce,Ce):Ce()}this._invoke=te}U(M.prototype),O(M.prototype,j,function(){return this}),f.AsyncIterator=M,f.async=function(h,A,E,K,te){te===void 0&&(te=Promise);var Y=new M(P(h,A,E,K),te);return f.isGeneratorFunction(A)?Y:Y.next().then(function(be){return be.done?be.value:Y.next()})};function G(h,A,E){var K=x;return function(Y,be){if(K===g)throw new Error("Generator is already running");if(K===B){if(Y==="throw")throw be;return R()}for(E.method=Y,E.arg=be;;){var Ce=E.delegate;if(Ce){var we=Z(Ce,E);if(we){if(we===p)continue;return we}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(K===x)throw K=B,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);K=g;var Me=F(h,A,E);if(Me.type==="normal"){if(K=E.done?B:I,Me.arg===p)continue;return{value:Me.arg,done:E.done}}else Me.type==="throw"&&(K=B,E.method="throw",E.arg=Me.arg)}}}function Z(h,A){var E=h.iterator[A.method];if(E===D){if(A.delegate=null,A.method==="throw"){if(h.iterator.return&&(A.method="return",A.arg=D,Z(h,A),A.method==="throw"))return p;A.method="throw",A.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var K=F(E,h.iterator,A.arg);if(K.type==="throw")return A.method="throw",A.arg=K.arg,A.delegate=null,p;var te=K.arg;if(!te)return A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,p;if(te.done)A[h.resultName]=te.value,A.next=h.nextLoc,A.method!=="return"&&(A.method="next",A.arg=D);else return te;return A.delegate=null,p}U(T),O(T,V,"Generator"),O(T,$,function(){return this}),O(T,"toString",function(){return"[object Generator]"});function J(h){var A={tryLoc:h[0]};1 in h&&(A.catchLoc=h[1]),2 in h&&(A.finallyLoc=h[2],A.afterLoc=h[3]),this.tryEntries.push(A)}function ie(h){var A=h.completion||{};A.type="normal",delete A.arg,h.completion=A}function H(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(J,this),this.reset(!0)}f.keys=function(h){var A=[];for(var E in h)A.push(E);return A.reverse(),function K(){for(;A.length;){var te=A.pop();if(te in h)return K.value=te,K.done=!1,K}return K.done=!0,K}};function q(h){if(h){var A=h[$];if(A)return A.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var E=-1,K=function te(){for(;++E=0;--te){var Y=this.tryEntries[te],be=Y.completion;if(Y.tryLoc==="root")return K("end");if(Y.tryLoc<=this.prev){var Ce=_.call(Y,"catchLoc"),we=_.call(Y,"finallyLoc");if(Ce&&we){if(this.prev=0;--K){var te=this.tryEntries[K];if(te.tryLoc<=this.prev&&_.call(te,"finallyLoc")&&this.prev=0;--E){var K=this.tryEntries[E];if(K.finallyLoc===A)return this.complete(K.completion,K.afterLoc),ie(K),p}},catch:function(A){for(var E=this.tryEntries.length-1;E>=0;--E){var K=this.tryEntries[E];if(K.tryLoc===A){var te=K.completion;if(te.type==="throw"){var Y=te.arg;ie(K)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(A,E,K){return this.delegate={iterator:q(A),resultName:E,nextLoc:K},this.method==="next"&&(this.arg=D),p}},f}(r(y)==="object"?y.exports:{});try{regeneratorRuntime=i}catch(f){(typeof globalThis=="undefined"?"undefined":r(globalThis))==="object"?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.VerbosityLevel=a.Util=a.UnknownErrorException=a.UnexpectedResponseException=a.UNSUPPORTED_FEATURES=a.TextRenderingMode=a.StreamType=a.RenderingIntentFlag=a.PermissionFlag=a.PasswordResponses=a.PasswordException=a.PageActionEventType=a.OPS=a.MissingPDFException=a.IsLittleEndianCached=a.IsEvalSupportedCached=a.InvalidPDFException=a.ImageKind=a.IDENTITY_MATRIX=a.FormatError=a.FontType=a.FONT_IDENTITY_MATRIX=a.DocumentActionEventType=a.CMapCompressionType=a.BaseException=a.AnnotationType=a.AnnotationStateModelType=a.AnnotationReviewState=a.AnnotationReplyType=a.AnnotationMode=a.AnnotationMarkedState=a.AnnotationFlag=a.AnnotationFieldFlag=a.AnnotationBorderStyleType=a.AnnotationActionEventType=a.AbortException=void 0,a.arrayByteLength=ce,a.arraysToBytes=Se,a.assert=ve,a.bytesToString=Q,a.createObjectURL=wt,a.createPromiseCapability=At,a.createValidAbsoluteUrl=Ae,a.escapeString=Ze,a.getModificationDate=Yt,a.getVerbosityLevel=N,a.info=W,a.isArrayBuffer=xt,a.isArrayEqual=Ft,a.isAscii=rt,a.isBool=Pt,a.isNum=Xt,a.isSameOrigin=me,a.isString=Ot,a.objectFromMap=De,a.objectSize=Fe,a.removeNullCharacters=ne,a.setVerbosityLevel=k,a.shadow=Pe,a.string32=Ee,a.stringToBytes=de,a.stringToPDFString=Ye,a.stringToUTF16BEString=it,a.stringToUTF8String=yt,a.unreachable=fe,a.utf8StringToString=ht,a.warn=re,t(5);function r(ue,ke){for(var se=0;se=ue.length?{done:!0}:{done:!1,value:ue[ye++]}},e:function(ot){throw ot},f:Ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ze=!0,$e=!1,qe;return{s:function(){se=se.call(ue)},n:function(){var ot=se.next();return ze=ot.done,ot},e:function(ot){$e=!0,qe=ot},f:function(){try{!ze&&se.return!=null&&se.return()}finally{if($e)throw qe}}}}function P(ue,ke){if(!!ue){if(typeof ue=="string")return F(ue,ke);var se=Object.prototype.toString.call(ue).slice(8,-1);if(se==="Object"&&ue.constructor&&(se=ue.constructor.name),se==="Map"||se==="Set")return Array.from(ue);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return F(ue,ke)}}function F(ue,ke){(ke==null||ke>ue.length)&&(ke=ue.length);for(var se=0,ye=new Array(ke);se=we.INFOS&&console.log("Info: ".concat(ue))}function re(ue){o>=we.WARNINGS&&console.log("Warning: ".concat(ue))}function fe(ue){throw new Error(ue)}function ve(ue,ke){ue||fe(ke)}function me(ue,ke){var se;try{if(se=new URL(ue),!se.origin||se.origin==="null")return!1}catch(Ge){return!1}var ye=new URL(ke,se);return se.origin===ye.origin}function pe(ue){if(!ue)return!1;switch(ue.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function Ae(ue){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ue)return null;try{if(se&&typeof ue=="string"){if(se.addDefaultProtocol&&ue.startsWith("www.")){var ye=ue.match(/\./g);ye&&ye.length>=2&&(ue="http://".concat(ue))}if(se.tryConvertEncoding)try{ue=yt(ue)}catch(ze){}}var Ge=ke?new URL(ue,ke):new URL(ue);if(pe(Ge))return Ge}catch(ze){}return null}function Pe(ue,ke,se){return Object.defineProperty(ue,ke,{value:se,enumerable:!0,configurable:!0,writable:!1}),se}var _e=function(){function ke(se,ye){this.constructor===ke&&fe("Cannot initialize BaseException."),this.message=se,this.name=ye}return ke.prototype=new Error,ke.constructor=ke,ke}();a.BaseException=_e;var We=function(ue){g(se,ue);var ke=p(se);function se(ye,Ge){var ze;return I(this,se),ze=ke.call(this,ye,"PasswordException"),ze.code=Ge,ze}return se}(_e);a.PasswordException=We;var Le=function(ue){g(se,ue);var ke=p(se);function se(ye,Ge){var ze;return I(this,se),ze=ke.call(this,ye,"UnknownErrorException"),ze.details=Ge,ze}return se}(_e);a.UnknownErrorException=Le;var je=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"InvalidPDFException")}return se}(_e);a.InvalidPDFException=je;var le=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"MissingPDFException")}return se}(_e);a.MissingPDFException=le;var he=function(ue){g(se,ue);var ke=p(se);function se(ye,Ge){var ze;return I(this,se),ze=ke.call(this,ye,"UnexpectedResponseException"),ze.status=Ge,ze}return se}(_e);a.UnexpectedResponseException=he;var z=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"FormatError")}return se}(_e);a.FormatError=z;var ee=function(ue){g(se,ue);var ke=p(se);function se(ye){return I(this,se),ke.call(this,ye,"AbortException")}return se}(_e);a.AbortException=ee;var X=/\x00+/g,oe=/[\x01-\x1F]/g;function ne(ue){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return typeof ue!="string"?(re("The argument for removeNullCharacters must be a string."),ue):(ke&&(ue=ue.replace(oe," ")),ue.replace(X,""))}function Q(ue){ve(ue!==null&&x(ue)==="object"&&ue.length!==void 0,"Invalid argument for bytesToString");var ke=ue.length,se=8192;if(ke>24&255,ue>>16&255,ue>>8&255,ue&255)}function Fe(ue){return Object.keys(ue).length}function De(ue){var ke=Object.create(null),se=O(ue),ye;try{for(se.s();!(ye=se.n()).done;){var Ge=L(ye.value,2),ze=Ge[0],$e=Ge[1];ke[ze]=$e}}catch(qe){se.e(qe)}finally{se.f()}return ke}function Re(){var ue=new Uint8Array(4);ue[0]=1;var ke=new Uint32Array(ue.buffer,0,1);return ke[0]===1}var Ne={get value(){return Pe(this,"value",Re())}};a.IsLittleEndianCached=Ne;function Oe(){try{return new Function(""),!0}catch(ue){return!1}}var xe={get value(){return Pe(this,"value",Oe())}};a.IsEvalSupportedCached=xe;var Be=f(Array(256).keys()).map(function(ue){return ue.toString(16).padStart(2,"0")}),Ue=function(){function ue(){I(this,ue)}return i(ue,null,[{key:"makeHexColor",value:function(se,ye,Ge){return"#".concat(Be[se]).concat(Be[ye]).concat(Be[Ge])}},{key:"transform",value:function(se,ye){return[se[0]*ye[0]+se[2]*ye[1],se[1]*ye[0]+se[3]*ye[1],se[0]*ye[2]+se[2]*ye[3],se[1]*ye[2]+se[3]*ye[3],se[0]*ye[4]+se[2]*ye[5]+se[4],se[1]*ye[4]+se[3]*ye[5]+se[5]]}},{key:"applyTransform",value:function(se,ye){var Ge=se[0]*ye[0]+se[1]*ye[2]+ye[4],ze=se[0]*ye[1]+se[1]*ye[3]+ye[5];return[Ge,ze]}},{key:"applyInverseTransform",value:function(se,ye){var Ge=ye[0]*ye[3]-ye[1]*ye[2],ze=(se[0]*ye[3]-se[1]*ye[2]+ye[2]*ye[5]-ye[4]*ye[3])/Ge,$e=(-se[0]*ye[1]+se[1]*ye[0]+ye[4]*ye[1]-ye[5]*ye[0])/Ge;return[ze,$e]}},{key:"getAxialAlignedBoundingBox",value:function(se,ye){var Ge=ue.applyTransform(se,ye),ze=ue.applyTransform(se.slice(2,4),ye),$e=ue.applyTransform([se[0],se[3]],ye),qe=ue.applyTransform([se[2],se[1]],ye);return[Math.min(Ge[0],ze[0],$e[0],qe[0]),Math.min(Ge[1],ze[1],$e[1],qe[1]),Math.max(Ge[0],ze[0],$e[0],qe[0]),Math.max(Ge[1],ze[1],$e[1],qe[1])]}},{key:"inverseTransform",value:function(se){var ye=se[0]*se[3]-se[1]*se[2];return[se[3]/ye,-se[1]/ye,-se[2]/ye,se[0]/ye,(se[2]*se[5]-se[4]*se[3])/ye,(se[4]*se[1]-se[5]*se[0])/ye]}},{key:"apply3dTransform",value:function(se,ye){return[se[0]*ye[0]+se[1]*ye[1]+se[2]*ye[2],se[3]*ye[0]+se[4]*ye[1]+se[5]*ye[2],se[6]*ye[0]+se[7]*ye[1]+se[8]*ye[2]]}},{key:"singularValueDecompose2dScale",value:function(se){var ye=[se[0],se[2],se[1],se[3]],Ge=se[0]*ye[0]+se[1]*ye[2],ze=se[0]*ye[1]+se[1]*ye[3],$e=se[2]*ye[0]+se[3]*ye[2],qe=se[2]*ye[1]+se[3]*ye[3],nt=(Ge+qe)/2,ot=Math.sqrt(Math.pow(Ge+qe,2)-4*(Ge*qe-$e*ze))/2,vt=nt+ot||1,ft=nt-ot||1;return[Math.sqrt(vt),Math.sqrt(ft)]}},{key:"normalizeRect",value:function(se){var ye=se.slice(0);return se[0]>se[2]&&(ye[0]=se[2],ye[2]=se[0]),se[1]>se[3]&&(ye[1]=se[3],ye[3]=se[1]),ye}},{key:"intersect",value:function(se,ye){function Ge(nt,ot){return nt-ot}var ze=[se[0],se[2],ye[0],ye[2]].sort(Ge),$e=[se[1],se[3],ye[1],ye[3]].sort(Ge),qe=[];if(se=ue.normalizeRect(se),ye=ue.normalizeRect(ye),ze[0]===se[0]&&ze[1]===ye[0]||ze[0]===ye[0]&&ze[1]===se[0])qe[0]=ze[1],qe[2]=ze[2];else return null;if($e[0]===se[1]&&$e[1]===ye[1]||$e[0]===ye[1]&&$e[1]===se[1])qe[1]=$e[1],qe[3]=$e[2];else return null;return qe}},{key:"bezierBoundingBox",value:function(se,ye,Ge,ze,$e,qe,nt,ot){for(var vt=[],ft=[[],[]],_t,gt,It,at,Gt,jt,nr,qt,zt=0;zt<2;++zt){if(zt===0?(gt=6*se-12*Ge+6*$e,_t=-3*se+9*Ge-9*$e+3*nt,It=3*Ge-3*se):(gt=6*ye-12*ze+6*qe,_t=-3*ye+9*ze-9*qe+3*ot,It=3*ze-3*ye),Math.abs(_t)<1e-12){if(Math.abs(gt)<1e-12)continue;at=-It/gt,0>8&255),String.fromCharCode(Ge&255))}return ke.join("")}function yt(ue){return decodeURIComponent(escape(ue))}function ht(ue){return unescape(encodeURIComponent(ue))}function Pt(ue){return typeof ue=="boolean"}function Xt(ue){return typeof ue=="number"}function Ot(ue){return typeof ue=="string"}function xt(ue){return x(ue)==="object"&&ue!==null&&ue.byteLength!==void 0}function Ft(ue,ke){if(ue.length!==ke.length)return!1;for(var se=0,ye=ue.length;se0&&arguments[0]!==void 0?arguments[0]:new Date,ke=[ue.getUTCFullYear().toString(),(ue.getUTCMonth()+1).toString().padStart(2,"0"),ue.getUTCDate().toString().padStart(2,"0"),ue.getUTCHours().toString().padStart(2,"0"),ue.getUTCMinutes().toString().padStart(2,"0"),ue.getUTCSeconds().toString().padStart(2,"0")];return ke.join("")}function At(){var ue=Object.create(null),ke=!1;return Object.defineProperty(ue,"settled",{get:function(){return ke}}),ue.promise=new Promise(function(se,ye){ue.resolve=function(Ge){ke=!0,se(Ge)},ue.reject=function(Ge){ke=!0,ye(Ge)}}),ue}function wt(ue){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(URL.createObjectURL&&typeof Blob!="undefined"&&!se)return URL.createObjectURL(new Blob([ue],{type:ke}));for(var ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ge="data:".concat(ke,";base64,"),ze=0,$e=ue.length;ze<$e;ze+=3){var qe=ue[ze]&255,nt=ue[ze+1]&255,ot=ue[ze+2]&255,vt=qe>>2,ft=(qe&3)<<4|nt>>4,_t=ze+1<$e?(nt&15)<<2|ot>>6:64,gt=ze+2<$e?ot&63:64;Ge+=ye[vt]+ye[ft]+ye[_t]+ye[gt]}return Ge}},(y,a,t)=>{"use strict";var r=t(6);(typeof globalThis=="undefined"||!globalThis._pdfjsCompatibilityChecked)&&((typeof globalThis=="undefined"||globalThis.Math!==Math)&&(globalThis=t(7)),globalThis._pdfjsCompatibilityChecked=!0,function(){globalThis.btoa||!r.isNodeJS||(globalThis.btoa=function(f){return Buffer.from(f,"binary").toString("base64")})}(),function(){globalThis.atob||!r.isNodeJS||(globalThis.atob=function(f){return Buffer.from(f,"base64").toString("binary")})}(),function(){globalThis.DOMMatrix||!r.isNodeJS||(globalThis.DOMMatrix=t(69))}(),function(){Object.fromEntries||t(70)}(),function(){globalThis.Promise.allSettled||(globalThis.Promise=t(97))}(),function(){globalThis.ReadableStream||!r.isNodeJS||(globalThis.ReadableStream=t(134).ReadableStream)}())},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.isNodeJS=void 0;function t(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(m){return typeof m}:t=function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},t(i)}var r=(typeof process=="undefined"?"undefined":t(process))==="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");a.isNodeJS=r},(y,a,t)=>{t(8),y.exports=t(10)},(y,a,t)=>{var r=t(9),i=t(10);r({global:!0},{globalThis:i})},(y,a,t)=>{var r=t(10),i=t(11).f,f=t(47),m=t(50),_=t(41),D=t(57),L=t(68);y.exports=function($,j){var V=$.target,O=$.global,P=$.stat,F,x,I,g,B,p;if(O?x=r:P?x=r[V]||_(V,{}):x=(r[V]||{}).prototype,x)for(I in j){if(B=j[I],$.noTargetGet?(p=i(x,I),g=p&&p.value):g=x[I],F=L(O?I:V+(P?".":"#")+I,$.forced),!F&&g!==void 0){if(typeof B==typeof g)continue;D(B,g)}($.sham||g&&g.sham)&&f(B,"sham",!0),m(x,I,B,$)}}},y=>{var a=function(t){return t&&t.Math==Math&&t};y.exports=a(typeof globalThis=="object"&&globalThis)||a(typeof window=="object"&&window)||a(typeof self=="object"&&self)||a(typeof global=="object"&&global)||function(){return this}()||Function("return this")()},(y,a,t)=>{var r=t(12),i=t(14),f=t(15),m=t(16),_=t(17),D=t(22),L=t(42),$=t(45),j=Object.getOwnPropertyDescriptor;a.f=r?j:function(O,P){if(O=_(O),P=D(P),$)try{return j(O,P)}catch(F){}if(L(O,P))return m(!i(f.f,O,P),O[P])}},(y,a,t)=>{var r=t(13);y.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},y=>{y.exports=function(a){try{return!!a()}catch(t){return!0}}},y=>{var a=Function.prototype.call;y.exports=a.bind?a.bind(a):function(){return a.apply(a,arguments)}},(y,a)=>{"use strict";var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!t.call({1:2},1);a.f=i?function(m){var _=r(this,m);return!!_&&_.enumerable}:t},y=>{y.exports=function(a,t){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:t}}},(y,a,t)=>{var r=t(18),i=t(21);y.exports=function(f){return r(i(f))}},(y,a,t)=>{var r=t(10),i=t(19),f=t(13),m=t(20),_=r.Object,D=i("".split);y.exports=f(function(){return!_("z").propertyIsEnumerable(0)})?function(L){return m(L)=="String"?D(L,""):_(L)}:_},y=>{var a=Function.prototype,t=a.bind,r=a.call,i=t&&t.bind(r);y.exports=t?function(f){return f&&i(r,f)}:function(f){return f&&function(){return r.apply(f,arguments)}}},(y,a,t)=>{var r=t(19),i=r({}.toString),f=r("".slice);y.exports=function(m){return f(i(m),8,-1)}},(y,a,t)=>{var r=t(10),i=r.TypeError;y.exports=function(f){if(f==null)throw i("Can't call method on "+f);return f}},(y,a,t)=>{var r=t(23),i=t(26);y.exports=function(f){var m=r(f,"string");return i(m)?m:m+""}},(y,a,t)=>{var r=t(10),i=t(14),f=t(24),m=t(26),_=t(33),D=t(36),L=t(37),$=r.TypeError,j=L("toPrimitive");y.exports=function(V,O){if(!f(V)||m(V))return V;var P=_(V,j),F;if(P){if(O===void 0&&(O="default"),F=i(P,V,O),!f(F)||m(F))return F;throw $("Can't convert object to primitive value")}return O===void 0&&(O="number"),D(V,O)}},(y,a,t)=>{var r=t(25);y.exports=function(i){return typeof i=="object"?i!==null:r(i)}},y=>{y.exports=function(a){return typeof a=="function"}},(y,a,t)=>{var r=t(10),i=t(27),f=t(25),m=t(28),_=t(29),D=r.Object;y.exports=_?function(L){return typeof L=="symbol"}:function(L){var $=i("Symbol");return f($)&&m($.prototype,D(L))}},(y,a,t)=>{var r=t(10),i=t(25),f=function(m){return i(m)?m:void 0};y.exports=function(m,_){return arguments.length<2?f(r[m]):r[m]&&r[m][_]}},(y,a,t)=>{var r=t(19);y.exports=r({}.isPrototypeOf)},(y,a,t)=>{var r=t(30);y.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},(y,a,t)=>{var r=t(31),i=t(13);y.exports=!!Object.getOwnPropertySymbols&&!i(function(){var f=Symbol();return!String(f)||!(Object(f)instanceof Symbol)||!Symbol.sham&&r&&r<41})},(y,a,t)=>{var r=t(10),i=t(32),f=r.process,m=r.Deno,_=f&&f.versions||m&&m.version,D=_&&_.v8,L,$;D&&(L=D.split("."),$=L[0]>0&&L[0]<4?1:+(L[0]+L[1])),!$&&i&&(L=i.match(/Edge\/(\d+)/),(!L||L[1]>=74)&&(L=i.match(/Chrome\/(\d+)/),L&&($=+L[1]))),y.exports=$},(y,a,t)=>{var r=t(27);y.exports=r("navigator","userAgent")||""},(y,a,t)=>{var r=t(34);y.exports=function(i,f){var m=i[f];return m==null?void 0:r(m)}},(y,a,t)=>{var r=t(10),i=t(25),f=t(35),m=r.TypeError;y.exports=function(_){if(i(_))return _;throw m(f(_)+" is not a function")}},(y,a,t)=>{var r=t(10),i=r.String;y.exports=function(f){try{return i(f)}catch(m){return"Object"}}},(y,a,t)=>{var r=t(10),i=t(14),f=t(25),m=t(24),_=r.TypeError;y.exports=function(D,L){var $,j;if(L==="string"&&f($=D.toString)&&!m(j=i($,D))||f($=D.valueOf)&&!m(j=i($,D))||L!=="string"&&f($=D.toString)&&!m(j=i($,D)))return j;throw _("Can't convert object to primitive value")}},(y,a,t)=>{var r=t(10),i=t(38),f=t(42),m=t(44),_=t(30),D=t(29),L=i("wks"),$=r.Symbol,j=$&&$.for,V=D?$:$&&$.withoutSetter||m;y.exports=function(O){if(!f(L,O)||!(_||typeof L[O]=="string")){var P="Symbol."+O;_&&f($,O)?L[O]=$[O]:D&&j?L[O]=j(P):L[O]=V(P)}return L[O]}},(y,a,t)=>{var r=t(39),i=t(40);(y.exports=function(f,m){return i[f]||(i[f]=m!==void 0?m:{})})("versions",[]).push({version:"3.19.3",mode:r?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},y=>{y.exports=!1},(y,a,t)=>{var r=t(10),i=t(41),f="__core-js_shared__",m=r[f]||i(f,{});y.exports=m},(y,a,t)=>{var r=t(10),i=Object.defineProperty;y.exports=function(f,m){try{i(r,f,{value:m,configurable:!0,writable:!0})}catch(_){r[f]=m}return m}},(y,a,t)=>{var r=t(19),i=t(43),f=r({}.hasOwnProperty);y.exports=Object.hasOwn||function(_,D){return f(i(_),D)}},(y,a,t)=>{var r=t(10),i=t(21),f=r.Object;y.exports=function(m){return f(i(m))}},(y,a,t)=>{var r=t(19),i=0,f=Math.random(),m=r(1 .toString);y.exports=function(_){return"Symbol("+(_===void 0?"":_)+")_"+m(++i+f,36)}},(y,a,t)=>{var r=t(12),i=t(13),f=t(46);y.exports=!r&&!i(function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!=7})},(y,a,t)=>{var r=t(10),i=t(24),f=r.document,m=i(f)&&i(f.createElement);y.exports=function(_){return m?f.createElement(_):{}}},(y,a,t)=>{var r=t(12),i=t(48),f=t(16);y.exports=r?function(m,_,D){return i.f(m,_,f(1,D))}:function(m,_,D){return m[_]=D,m}},(y,a,t)=>{var r=t(10),i=t(12),f=t(45),m=t(49),_=t(22),D=r.TypeError,L=Object.defineProperty;a.f=i?L:function(j,V,O){if(m(j),V=_(V),m(O),f)try{return L(j,V,O)}catch(P){}if("get"in O||"set"in O)throw D("Accessors not supported");return"value"in O&&(j[V]=O.value),j}},(y,a,t)=>{var r=t(10),i=t(24),f=r.String,m=r.TypeError;y.exports=function(_){if(i(_))return _;throw m(f(_)+" is not an object")}},(y,a,t)=>{var r=t(10),i=t(25),f=t(42),m=t(47),_=t(41),D=t(51),L=t(52),$=t(56).CONFIGURABLE,j=L.get,V=L.enforce,O=String(String).split("String");(y.exports=function(P,F,x,I){var g=I?!!I.unsafe:!1,B=I?!!I.enumerable:!1,p=I?!!I.noTargetGet:!1,l=I&&I.name!==void 0?I.name:F,u;if(i(x)&&(String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!f(x,"name")||$&&x.name!==l)&&m(x,"name",l),u=V(x),u.source||(u.source=O.join(typeof l=="string"?l:""))),P===r){B?P[F]=x:_(F,x);return}else g?!p&&P[F]&&(B=!0):delete P[F];B?P[F]=x:m(P,F,x)})(Function.prototype,"toString",function(){return i(this)&&j(this).source||D(this)})},(y,a,t)=>{var r=t(19),i=t(25),f=t(40),m=r(Function.toString);i(f.inspectSource)||(f.inspectSource=function(_){return m(_)}),y.exports=f.inspectSource},(y,a,t)=>{var r=t(53),i=t(10),f=t(19),m=t(24),_=t(47),D=t(42),L=t(40),$=t(54),j=t(55),V="Object already initialized",O=i.TypeError,P=i.WeakMap,F,x,I,g=function(c){return I(c)?x(c):F(c,{})},B=function(c){return function(b){var T;if(!m(b)||(T=x(b)).type!==c)throw O("Incompatible receiver, "+c+" required");return T}};if(r||L.state){var p=L.state||(L.state=new P),l=f(p.get),u=f(p.has),v=f(p.set);F=function(c,b){if(u(p,c))throw new O(V);return b.facade=c,v(p,c,b),b},x=function(c){return l(p,c)||{}},I=function(c){return u(p,c)}}else{var d=$("state");j[d]=!0,F=function(c,b){if(D(c,d))throw new O(V);return b.facade=c,_(c,d,b),b},x=function(c){return D(c,d)?c[d]:{}},I=function(c){return D(c,d)}}y.exports={set:F,get:x,has:I,enforce:g,getterFor:B}},(y,a,t)=>{var r=t(10),i=t(25),f=t(51),m=r.WeakMap;y.exports=i(m)&&/native code/.test(f(m))},(y,a,t)=>{var r=t(38),i=t(44),f=r("keys");y.exports=function(m){return f[m]||(f[m]=i(m))}},y=>{y.exports={}},(y,a,t)=>{var r=t(12),i=t(42),f=Function.prototype,m=r&&Object.getOwnPropertyDescriptor,_=i(f,"name"),D=_&&function(){}.name==="something",L=_&&(!r||r&&m(f,"name").configurable);y.exports={EXISTS:_,PROPER:D,CONFIGURABLE:L}},(y,a,t)=>{var r=t(42),i=t(58),f=t(11),m=t(48);y.exports=function(_,D){for(var L=i(D),$=m.f,j=f.f,V=0;V{var r=t(27),i=t(19),f=t(59),m=t(67),_=t(49),D=i([].concat);y.exports=r("Reflect","ownKeys")||function($){var j=f.f(_($)),V=m.f;return V?D(j,V($)):j}},(y,a,t)=>{var r=t(60),i=t(66),f=i.concat("length","prototype");a.f=Object.getOwnPropertyNames||function(_){return r(_,f)}},(y,a,t)=>{var r=t(19),i=t(42),f=t(17),m=t(61).indexOf,_=t(55),D=r([].push);y.exports=function(L,$){var j=f(L),V=0,O=[],P;for(P in j)!i(_,P)&&i(j,P)&&D(O,P);for(;$.length>V;)i(j,P=$[V++])&&(~m(O,P)||D(O,P));return O}},(y,a,t)=>{var r=t(17),i=t(62),f=t(64),m=function(_){return function(D,L,$){var j=r(D),V=f(j),O=i($,V),P;if(_&&L!=L){for(;V>O;)if(P=j[O++],P!=P)return!0}else for(;V>O;O++)if((_||O in j)&&j[O]===L)return _||O||0;return!_&&-1}};y.exports={includes:m(!0),indexOf:m(!1)}},(y,a,t)=>{var r=t(63),i=Math.max,f=Math.min;y.exports=function(m,_){var D=r(m);return D<0?i(D+_,0):f(D,_)}},y=>{var a=Math.ceil,t=Math.floor;y.exports=function(r){var i=+r;return i!==i||i===0?0:(i>0?t:a)(i)}},(y,a,t)=>{var r=t(65);y.exports=function(i){return r(i.length)}},(y,a,t)=>{var r=t(63),i=Math.min;y.exports=function(f){return f>0?i(r(f),9007199254740991):0}},y=>{y.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(y,a)=>{a.f=Object.getOwnPropertySymbols},(y,a,t)=>{var r=t(13),i=t(25),f=/#|\.prototype\./,m=function(j,V){var O=D[_(j)];return O==$?!0:O==L?!1:i(V)?r(V):!!V},_=m.normalize=function(j){return String(j).replace(f,".").toLowerCase()},D=m.data={},L=m.NATIVE="N",$=m.POLYFILL="P";y.exports=m},(y,a,t)=>{"use strict";var r,i;function f(m){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(D){return typeof D}:f=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},f(m)}(function(m,_){f(a)==="object"?y.exports=_():(r=_,i=typeof r=="function"?r.call(a,t,a,y):r,i!==void 0&&(y.exports=i))})(void 0,function(){"use strict";function m(p){var l=new x,u=Array.from(p);if(!u.every(function(we){return!Number.isNaN(we)}))throw TypeError('CSSMatrix: "'+p+'" must only have numbers.');if(u.length===16){var v=u[0],d=u[1],c=u[2],b=u[3],T=u[4],U=u[5],M=u[6],G=u[7],Z=u[8],J=u[9],ie=u[10],H=u[11],q=u[12],R=u[13],h=u[14],A=u[15];l.m11=v,l.a=v,l.m21=T,l.c=T,l.m31=Z,l.m41=q,l.e=q,l.m12=d,l.b=d,l.m22=U,l.d=U,l.m32=J,l.m42=R,l.f=R,l.m13=c,l.m23=M,l.m33=ie,l.m43=h,l.m14=b,l.m24=G,l.m34=H,l.m44=A}else if(u.length===6){var E=u[0],K=u[1],te=u[2],Y=u[3],be=u[4],Ce=u[5];l.m11=E,l.a=E,l.m12=K,l.b=K,l.m21=te,l.c=te,l.m22=Y,l.d=Y,l.m41=be,l.e=be,l.m42=Ce,l.f=Ce}else throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");return l}function _(p){var l=Object.keys(new x);if(f(p)==="object"&&l.every(function(u){return u in p}))return m([p.m11,p.m12,p.m13,p.m14,p.m21,p.m22,p.m23,p.m24,p.m31,p.m32,p.m33,p.m34,p.m41,p.m42,p.m43,p.m44]);throw TypeError('CSSMatrix: "'+p+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function D(p){if(typeof p!="string")throw TypeError('CSSMatrix: "'+p+'" is not a string.');var l=String(p).replace(/\s/g,""),u=new x,v='CSSMatrix: invalid transform string "'+p+'"';return l.split(")").filter(function(d){return d}).forEach(function(d){var c=d.split("("),b=c[0],T=c[1];if(!T)throw TypeError(v);var U=T.split(",").map(function(Y){return Y.includes("rad")?parseFloat(Y)*(180/Math.PI):parseFloat(Y)}),M=U[0],G=U[1],Z=U[2],J=U[3],ie=[M,G,Z],H=[M,G,Z,J];if(b==="perspective"&&M&&[G,Z].every(function(Y){return Y===void 0}))u.m34=-1/M;else if(b.includes("matrix")&&[6,16].includes(U.length)&&U.every(function(Y){return!Number.isNaN(+Y)})){var q=U.map(function(Y){return Math.abs(Y)<1e-6?0:Y});u=u.multiply(m(q))}else if(b==="translate3d"&&ie.every(function(Y){return!Number.isNaN(+Y)}))u=u.translate(M,G,Z);else if(b==="translate"&&M&&Z===void 0)u=u.translate(M,G||0,0);else if(b==="rotate3d"&&H.every(function(Y){return!Number.isNaN(+Y)})&&J)u=u.rotateAxisAngle(M,G,Z,J);else if(b==="rotate"&&M&&[G,Z].every(function(Y){return Y===void 0}))u=u.rotate(0,0,M);else if(b==="scale3d"&&ie.every(function(Y){return!Number.isNaN(+Y)})&&ie.some(function(Y){return Y!==1}))u=u.scale(M,G,Z);else if(b==="scale"&&!Number.isNaN(M)&&M!==1&&Z===void 0){var R=Number.isNaN(+G),h=R?M:G;u=u.scale(M,h,1)}else if(b==="skew"&&M&&Z===void 0)u=u.skewX(M),u=G?u.skewY(G):u;else if(/[XYZ]/.test(b)&&M&&[G,Z].every(function(Y){return Y===void 0})&&["translate","rotate","scale","skew"].some(function(Y){return b.includes(Y)}))if(["skewX","skewY"].includes(b))u=u[b](M);else{var A=b.replace(/[XYZ]/,""),E=b.replace(A,""),K=["X","Y","Z"].indexOf(E),te=[K===0?M:0,K===1?M:0,K===2?M:0];u=u[A].apply(u,te)}else throw TypeError(v)}),u}function L(p,l,u){var v=new x;return v.m41=p,v.e=p,v.m42=l,v.f=l,v.m43=u,v}function $(p,l,u){var v=new x,d=Math.PI/180,c=p*d,b=l*d,T=u*d,U=Math.cos(c),M=-Math.sin(c),G=Math.cos(b),Z=-Math.sin(b),J=Math.cos(T),ie=-Math.sin(T),H=G*J,q=-G*ie;v.m11=H,v.a=H,v.m12=q,v.b=q,v.m13=Z;var R=M*Z*J+U*ie;v.m21=R,v.c=R;var h=U*J-M*Z*ie;return v.m22=h,v.d=h,v.m23=-M*G,v.m31=M*ie-U*Z*J,v.m32=M*J+U*Z*ie,v.m33=U*G,v}function j(p,l,u,v){var d=new x,c=v*(Math.PI/360),b=Math.sin(c),T=Math.cos(c),U=b*b,M=Math.sqrt(p*p+l*l+u*u),G=p,Z=l,J=u;M===0?(G=0,Z=0,J=1):(G/=M,Z/=M,J/=M);var ie=G*G,H=Z*Z,q=J*J,R=1-2*(H+q)*U;d.m11=R,d.a=R;var h=2*(G*Z*U+J*b*T);d.m12=h,d.b=h,d.m13=2*(G*J*U-Z*b*T);var A=2*(Z*G*U-J*b*T);d.m21=A,d.c=A;var E=1-2*(q+ie)*U;return d.m22=E,d.d=E,d.m23=2*(Z*J*U+G*b*T),d.m31=2*(J*G*U+Z*b*T),d.m32=2*(J*Z*U-G*b*T),d.m33=1-2*(ie+H)*U,d}function V(p,l,u){var v=new x;return v.m11=p,v.a=p,v.m22=l,v.d=l,v.m33=u,v}function O(p){var l=new x,u=p*Math.PI/180,v=Math.tan(u);return l.m21=v,l.c=v,l}function P(p){var l=new x,u=p*Math.PI/180,v=Math.tan(u);return l.m12=v,l.b=v,l}function F(p,l){var u=l.m11*p.m11+l.m12*p.m21+l.m13*p.m31+l.m14*p.m41,v=l.m11*p.m12+l.m12*p.m22+l.m13*p.m32+l.m14*p.m42,d=l.m11*p.m13+l.m12*p.m23+l.m13*p.m33+l.m14*p.m43,c=l.m11*p.m14+l.m12*p.m24+l.m13*p.m34+l.m14*p.m44,b=l.m21*p.m11+l.m22*p.m21+l.m23*p.m31+l.m24*p.m41,T=l.m21*p.m12+l.m22*p.m22+l.m23*p.m32+l.m24*p.m42,U=l.m21*p.m13+l.m22*p.m23+l.m23*p.m33+l.m24*p.m43,M=l.m21*p.m14+l.m22*p.m24+l.m23*p.m34+l.m24*p.m44,G=l.m31*p.m11+l.m32*p.m21+l.m33*p.m31+l.m34*p.m41,Z=l.m31*p.m12+l.m32*p.m22+l.m33*p.m32+l.m34*p.m42,J=l.m31*p.m13+l.m32*p.m23+l.m33*p.m33+l.m34*p.m43,ie=l.m31*p.m14+l.m32*p.m24+l.m33*p.m34+l.m34*p.m44,H=l.m41*p.m11+l.m42*p.m21+l.m43*p.m31+l.m44*p.m41,q=l.m41*p.m12+l.m42*p.m22+l.m43*p.m32+l.m44*p.m42,R=l.m41*p.m13+l.m42*p.m23+l.m43*p.m33+l.m44*p.m43,h=l.m41*p.m14+l.m42*p.m24+l.m43*p.m34+l.m44*p.m44;return m([u,v,d,c,b,T,U,M,G,Z,J,ie,H,q,R,h])}var x=function(){for(var l=[],u=arguments.length;u--;)l[u]=arguments[u];var v=this;if(v.a=1,v.b=0,v.c=0,v.d=1,v.e=0,v.f=0,v.m11=1,v.m12=0,v.m13=0,v.m14=0,v.m21=0,v.m22=1,v.m23=0,v.m24=0,v.m31=0,v.m32=0,v.m33=1,v.m34=0,v.m41=0,v.m42=0,v.m43=0,v.m44=1,l&&l.length){var d=[16,6].some(function(c){return c===l.length})?l:l[0];return v.setMatrixValue(d)}return v},I={isIdentity:{configurable:!0},is2D:{configurable:!0}};I.isIdentity.set=function(p){this.isIdentity=p},I.isIdentity.get=function(){var p=this;return p.m11===1&&p.m12===0&&p.m13===0&&p.m14===0&&p.m21===0&&p.m22===1&&p.m23===0&&p.m24===0&&p.m31===0&&p.m32===0&&p.m33===1&&p.m34===0&&p.m41===0&&p.m42===0&&p.m43===0&&p.m44===1},I.is2D.get=function(){var p=this;return p.m31===0&&p.m32===0&&p.m33===1&&p.m34===0&&p.m43===0&&p.m44===1},I.is2D.set=function(p){this.is2D=p},x.prototype.setMatrixValue=function(l){var u=this;return[Array,Float64Array,Float32Array].some(function(v){return l instanceof v})?m(l):typeof l=="string"&&l.length&&l!=="none"?D(l):f(l)==="object"?_(l):u},x.prototype.toArray=function(){var l=this,u=Math.pow(10,6),v;return l.is2D?v=[l.a,l.b,l.c,l.d,l.e,l.f]:v=[l.m11,l.m12,l.m13,l.m14,l.m21,l.m22,l.m23,l.m24,l.m31,l.m32,l.m33,l.m34,l.m41,l.m42,l.m43,l.m44],v.map(function(d){return Math.abs(d)<1e-6?0:(d*u>>0)/u})},x.prototype.toString=function(){var l=this,u=l.toArray(),v=l.is2D?"matrix":"matrix3d";return v+"("+u+")"},x.prototype.toJSON=function(){var l=this,u=l.is2D,v=l.isIdentity;return Object.assign({},l,{is2D:u,isIdentity:v})},x.prototype.multiply=function(l){return F(this,l)},x.prototype.translate=function(l,u,v){var d=l,c=u,b=v;return b===void 0&&(b=0),c===void 0&&(c=0),F(this,L(d,c,b))},x.prototype.scale=function(l,u,v){var d=l,c=u,b=v;return c===void 0&&(c=l),b===void 0&&(b=1),F(this,V(d,c,b))},x.prototype.rotate=function(l,u,v){var d=l,c=u,b=v;return c===void 0&&(c=0),b===void 0&&(b=d,d=0),F(this,$(d,c,b))},x.prototype.rotateAxisAngle=function(l,u,v,d){if([l,u,v,d].some(function(c){return Number.isNaN(c)}))throw new TypeError("CSSMatrix: expecting 4 values");return F(this,j(l,u,v,d))},x.prototype.skewX=function(l){return F(this,O(l))},x.prototype.skewY=function(l){return F(this,P(l))},x.prototype.transformPoint=function(l){var u=this,v=L(l.x,l.y,l.z);return v.m44=l.w||1,v=u.multiply(v),{x:v.m41,y:v.m42,z:v.m43,w:v.m44}},x.prototype.transform=function(l){var u=this,v=u.m11*l.x+u.m12*l.y+u.m13*l.z+u.m14*l.w,d=u.m21*l.x+u.m22*l.y+u.m23*l.z+u.m24*l.w,c=u.m31*l.x+u.m32*l.y+u.m33*l.z+u.m34*l.w,b=u.m41*l.x+u.m42*l.y+u.m43*l.z+u.m44*l.w;return{x:v/b,y:d/b,z:c/b,w:b}},Object.defineProperties(x.prototype,I),Object.assign(x,{Translate:L,Rotate:$,RotateAxisAngle:j,Scale:V,SkewX:O,SkewY:P,Multiply:F,fromArray:m,fromMatrix:_,fromString:D});var g="0.0.24",B=g;return Object.assign(x,{Version:B}),x})},(y,a,t)=>{t(71),t(86);var r=t(96);y.exports=r.Object.fromEntries},(y,a,t)=>{"use strict";var r=t(17),i=t(72),f=t(77),m=t(52),_=t(78),D="Array Iterator",L=m.set,$=m.getterFor(D);y.exports=_(Array,"Array",function(j,V){L(this,{type:D,target:r(j),index:0,kind:V})},function(){var j=$(this),V=j.target,O=j.kind,P=j.index++;return!V||P>=V.length?(j.target=void 0,{value:void 0,done:!0}):O=="keys"?{value:P,done:!1}:O=="values"?{value:V[P],done:!1}:{value:[P,V[P]],done:!1}},"values"),f.Arguments=f.Array,i("keys"),i("values"),i("entries")},(y,a,t)=>{var r=t(37),i=t(73),f=t(48),m=r("unscopables"),_=Array.prototype;_[m]==null&&f.f(_,m,{configurable:!0,value:i(null)}),y.exports=function(D){_[m][D]=!0}},(y,a,t)=>{var r=t(49),i=t(74),f=t(66),m=t(55),_=t(76),D=t(46),L=t(54),$=">",j="<",V="prototype",O="script",P=L("IE_PROTO"),F=function(){},x=function(l){return j+O+$+l+j+"/"+O+$},I=function(l){l.write(x("")),l.close();var u=l.parentWindow.Object;return l=null,u},g=function(){var l=D("iframe"),u="java"+O+":",v;return l.style.display="none",_.appendChild(l),l.src=String(u),v=l.contentWindow.document,v.open(),v.write(x("document.F=Object")),v.close(),v.F},B,p=function(){try{B=new ActiveXObject("htmlfile")}catch(u){}p=typeof document!="undefined"?document.domain&&B?I(B):g():I(B);for(var l=f.length;l--;)delete p[V][f[l]];return p()};m[P]=!0,y.exports=Object.create||function(u,v){var d;return u!==null?(F[V]=r(u),d=new F,F[V]=null,d[P]=u):d=p(),v===void 0?d:i(d,v)}},(y,a,t)=>{var r=t(12),i=t(48),f=t(49),m=t(17),_=t(75);y.exports=r?Object.defineProperties:function(L,$){f(L);for(var j=m($),V=_($),O=V.length,P=0,F;O>P;)i.f(L,F=V[P++],j[F]);return L}},(y,a,t)=>{var r=t(60),i=t(66);y.exports=Object.keys||function(m){return r(m,i)}},(y,a,t)=>{var r=t(27);y.exports=r("document","documentElement")},y=>{y.exports={}},(y,a,t)=>{"use strict";var r=t(9),i=t(14),f=t(39),m=t(56),_=t(25),D=t(79),L=t(81),$=t(84),j=t(83),V=t(47),O=t(50),P=t(37),F=t(77),x=t(80),I=m.PROPER,g=m.CONFIGURABLE,B=x.IteratorPrototype,p=x.BUGGY_SAFARI_ITERATORS,l=P("iterator"),u="keys",v="values",d="entries",c=function(){return this};y.exports=function(b,T,U,M,G,Z,J){D(U,T,M);var ie=function(be){if(be===G&&A)return A;if(!p&&be in R)return R[be];switch(be){case u:return function(){return new U(this,be)};case v:return function(){return new U(this,be)};case d:return function(){return new U(this,be)}}return function(){return new U(this)}},H=T+" Iterator",q=!1,R=b.prototype,h=R[l]||R["@@iterator"]||G&&R[G],A=!p&&h||ie(G),E=T=="Array"&&R.entries||h,K,te,Y;if(E&&(K=L(E.call(new b)),K!==Object.prototype&&K.next&&(!f&&L(K)!==B&&($?$(K,B):_(K[l])||O(K,l,c)),j(K,H,!0,!0),f&&(F[H]=c))),I&&G==v&&h&&h.name!==v&&(!f&&g?V(R,"name",v):(q=!0,A=function(){return i(h,this)})),G)if(te={values:ie(v),keys:Z?A:ie(u),entries:ie(d)},J)for(Y in te)(p||q||!(Y in R))&&O(R,Y,te[Y]);else r({target:T,proto:!0,forced:p||q},te);return(!f||J)&&R[l]!==A&&O(R,l,A,{name:G}),F[T]=A,te}},(y,a,t)=>{"use strict";var r=t(80).IteratorPrototype,i=t(73),f=t(16),m=t(83),_=t(77),D=function(){return this};y.exports=function(L,$,j,V){var O=$+" Iterator";return L.prototype=i(r,{next:f(+!V,j)}),m(L,O,!1,!0),_[O]=D,L}},(y,a,t)=>{"use strict";var r=t(13),i=t(25),f=t(73),m=t(81),_=t(50),D=t(37),L=t(39),$=D("iterator"),j=!1,V,O,P;[].keys&&(P=[].keys(),"next"in P?(O=m(m(P)),O!==Object.prototype&&(V=O)):j=!0);var F=V==null||r(function(){var x={};return V[$].call(x)!==x});F?V={}:L&&(V=f(V)),i(V[$])||_(V,$,function(){return this}),y.exports={IteratorPrototype:V,BUGGY_SAFARI_ITERATORS:j}},(y,a,t)=>{var r=t(10),i=t(42),f=t(25),m=t(43),_=t(54),D=t(82),L=_("IE_PROTO"),$=r.Object,j=$.prototype;y.exports=D?$.getPrototypeOf:function(V){var O=m(V);if(i(O,L))return O[L];var P=O.constructor;return f(P)&&O instanceof P?P.prototype:O instanceof $?j:null}},(y,a,t)=>{var r=t(13);y.exports=!r(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype})},(y,a,t)=>{var r=t(48).f,i=t(42),f=t(37),m=f("toStringTag");y.exports=function(_,D,L){_&&!i(_=L?_:_.prototype,m)&&r(_,m,{configurable:!0,value:D})}},(y,a,t)=>{var r=t(19),i=t(49),f=t(85);y.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var m=!1,_={},D;try{D=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),D(_,[]),m=_ instanceof Array}catch(L){}return function($,j){return i($),f(j),m?D($,j):$.__proto__=j,$}}():void 0)},(y,a,t)=>{var r=t(10),i=t(25),f=r.String,m=r.TypeError;y.exports=function(_){if(typeof _=="object"||i(_))return _;throw m("Can't set "+f(_)+" as a prototype")}},(y,a,t)=>{var r=t(9),i=t(87),f=t(95);r({target:"Object",stat:!0},{fromEntries:function(_){var D={};return i(_,function(L,$){f(D,L,$)},{AS_ENTRIES:!0}),D}})},(y,a,t)=>{var r=t(10),i=t(88),f=t(14),m=t(49),_=t(35),D=t(89),L=t(64),$=t(28),j=t(90),V=t(91),O=t(94),P=r.TypeError,F=function(I,g){this.stopped=I,this.result=g},x=F.prototype;y.exports=function(I,g,B){var p=B&&B.that,l=!!(B&&B.AS_ENTRIES),u=!!(B&&B.IS_ITERATOR),v=!!(B&&B.INTERRUPTED),d=i(g,p),c,b,T,U,M,G,Z,J=function(H){return c&&O(c,"normal",H),new F(!0,H)},ie=function(H){return l?(m(H),v?d(H[0],H[1],J):d(H[0],H[1])):v?d(H,J):d(H)};if(u)c=I;else{if(b=V(I),!b)throw P(_(I)+" is not iterable");if(D(b)){for(T=0,U=L(I);U>T;T++)if(M=ie(I[T]),M&&$(x,M))return M;return new F(!1)}c=j(I,b)}for(G=c.next;!(Z=f(G,c)).done;){try{M=ie(Z.value)}catch(H){O(c,"throw",H)}if(typeof M=="object"&&M&&$(x,M))return M}return new F(!1)}},(y,a,t)=>{var r=t(19),i=t(34),f=r(r.bind);y.exports=function(m,_){return i(m),_===void 0?m:f?f(m,_):function(){return m.apply(_,arguments)}}},(y,a,t)=>{var r=t(37),i=t(77),f=r("iterator"),m=Array.prototype;y.exports=function(_){return _!==void 0&&(i.Array===_||m[f]===_)}},(y,a,t)=>{var r=t(10),i=t(14),f=t(34),m=t(49),_=t(35),D=t(91),L=r.TypeError;y.exports=function($,j){var V=arguments.length<2?D($):j;if(f(V))return m(i(V,$));throw L(_($)+" is not iterable")}},(y,a,t)=>{var r=t(92),i=t(33),f=t(77),m=t(37),_=m("iterator");y.exports=function(D){if(D!=null)return i(D,_)||i(D,"@@iterator")||f[r(D)]}},(y,a,t)=>{var r=t(10),i=t(93),f=t(25),m=t(20),_=t(37),D=_("toStringTag"),L=r.Object,$=m(function(){return arguments}())=="Arguments",j=function(V,O){try{return V[O]}catch(P){}};y.exports=i?m:function(V){var O,P,F;return V===void 0?"Undefined":V===null?"Null":typeof(P=j(O=L(V),D))=="string"?P:$?m(O):(F=m(O))=="Object"&&f(O.callee)?"Arguments":F}},(y,a,t)=>{var r=t(37),i=r("toStringTag"),f={};f[i]="z",y.exports=String(f)==="[object z]"},(y,a,t)=>{var r=t(14),i=t(49),f=t(33);y.exports=function(m,_,D){var L,$;i(m);try{if(L=f(m,"return"),!L){if(_==="throw")throw D;return D}L=r(L,m)}catch(j){$=!0,L=j}if(_==="throw")throw D;if($)throw L;return i(L),D}},(y,a,t)=>{"use strict";var r=t(22),i=t(48),f=t(16);y.exports=function(m,_,D){var L=r(_);L in m?i.f(m,L,f(0,D)):m[L]=D}},(y,a,t)=>{var r=t(10);y.exports=r},(y,a,t)=>{t(98),t(71),t(105),t(107),t(129),t(130),t(131),t(132);var r=t(96);y.exports=r.Promise},(y,a,t)=>{"use strict";var r=t(9),i=t(10),f=t(28),m=t(81),_=t(84),D=t(57),L=t(73),$=t(47),j=t(16),V=t(99),O=t(101),P=t(87),F=t(102),x=t(37),I=t(104),g=x("toStringTag"),B=i.Error,p=[].push,l=function(d,c){var b=arguments.length>2?arguments[2]:void 0,T=f(u,this),U;_?U=_(new B(void 0),T?m(this):u):(U=T?this:L(u),$(U,g,"Error")),$(U,"message",F(c,"")),I&&$(U,"stack",V(U.stack,1)),O(U,b);var M=[];return P(d,p,{that:M}),$(U,"errors",M),U};_?_(l,B):D(l,B);var u=l.prototype=L(B.prototype,{constructor:j(1,l),message:j(1,""),name:j(1,"AggregateError")});r({global:!0},{AggregateError:l})},(y,a,t)=>{var r=t(19),i=t(100),f=r("".replace),m=r("".split),_=r([].join),D=function(V){return String(Error(V).stack)}("zxcasd"),L=/\n\s*at [^:]*:[^\n]*/,$=L.test(D),j=/@[^\n]*\n/.test(D)&&!/zxcasd/.test(D);y.exports=function(V,O){if(typeof V!="string")return V;if($)for(;O--;)V=f(V,L,"");else if(j)return _(i(m(V,` `),O),` `);return V}},(y,a,t)=>{var r=t(10),i=t(62),f=t(64),m=t(95),_=r.Array,D=Math.max;y.exports=function(L,$,j){for(var V=f(L),O=i($,V),P=i(j===void 0?V:j,V),F=_(D(P-O,0)),x=0;O{var r=t(24),i=t(47);y.exports=function(f,m){r(m)&&"cause"in m&&i(f,"cause",m.cause)}},(y,a,t)=>{var r=t(103);y.exports=function(i,f){return i===void 0?arguments.length<2?"":f:r(i)}},(y,a,t)=>{var r=t(10),i=t(92),f=r.String;y.exports=function(m){if(i(m)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return f(m)}},(y,a,t)=>{var r=t(13),i=t(16);y.exports=!r(function(){var f=Error("a");return"stack"in f?(Object.defineProperty(f,"stack",i(1,7)),f.stack!==7):!0})},(y,a,t)=>{var r=t(93),i=t(50),f=t(106);r||i(Object.prototype,"toString",f,{unsafe:!0})},(y,a,t)=>{"use strict";var r=t(93),i=t(92);y.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},(y,a,t)=>{"use strict";var r=t(9),i=t(39),f=t(10),m=t(27),_=t(14),D=t(108),L=t(50),$=t(109),j=t(84),V=t(83),O=t(110),P=t(34),F=t(25),x=t(24),I=t(111),g=t(51),B=t(87),p=t(112),l=t(113),u=t(116).set,v=t(121),d=t(124),c=t(126),b=t(125),T=t(127),U=t(52),M=t(68),G=t(37),Z=t(128),J=t(120),ie=t(31),H=G("species"),q="Promise",R=U.getterFor(q),h=U.set,A=U.getterFor(q),E=D&&D.prototype,K=D,te=E,Y=f.TypeError,be=f.document,Ce=f.process,we=b.f,Me=we,S=!!(be&&be.createEvent&&f.dispatchEvent),w=F(f.PromiseRejectionEvent),s="unhandledrejection",o="rejectionhandled",k=0,N=1,W=2,re=1,fe=2,ve=!1,me,pe,Ae,Pe,_e=M(q,function(){var Q=g(K),de=Q!==String(K);if(!de&&ie===66||i&&!te.finally)return!0;if(ie>=51&&/native code/.test(Q))return!1;var ce=new K(function(Fe){Fe(1)}),Se=function(Fe){Fe(function(){},function(){})},Ee=ce.constructor={};return Ee[H]=Se,ve=ce.then(function(){})instanceof Se,ve?!de&&Z&&!w:!0}),We=_e||!p(function(Q){K.all(Q).catch(function(){})}),Le=function(Q){var de;return x(Q)&&F(de=Q.then)?de:!1},je=function(Q,de){if(!Q.notified){Q.notified=!0;var ce=Q.reactions;v(function(){for(var Se=Q.value,Ee=Q.state==N,Fe=0;ce.length>Fe;){var De=ce[Fe++],Re=Ee?De.ok:De.fail,Ne=De.resolve,Oe=De.reject,xe=De.domain,Be,Ue,He;try{Re?(Ee||(Q.rejection===fe&&ee(Q),Q.rejection=re),Re===!0?Be=Se:(xe&&xe.enter(),Be=Re(Se),xe&&(xe.exit(),He=!0)),Be===De.promise?Oe(Y("Promise-chain cycle")):(Ue=Le(Be))?_(Ue,Be,Ne,Oe):Ne(Be)):Oe(Se)}catch(Ye){xe&&!He&&xe.exit(),Oe(Ye)}}Q.reactions=[],Q.notified=!1,de&&!Q.rejection&&he(Q)})}},le=function(Q,de,ce){var Se,Ee;S?(Se=be.createEvent("Event"),Se.promise=de,Se.reason=ce,Se.initEvent(Q,!1,!0),f.dispatchEvent(Se)):Se={promise:de,reason:ce},!w&&(Ee=f["on"+Q])?Ee(Se):Q===s&&c("Unhandled promise rejection",ce)},he=function(Q){_(u,f,function(){var de=Q.facade,ce=Q.value,Se=z(Q),Ee;if(Se&&(Ee=T(function(){J?Ce.emit("unhandledRejection",ce,de):le(s,de,ce)}),Q.rejection=J||z(Q)?fe:re,Ee.error))throw Ee.value})},z=function(Q){return Q.rejection!==re&&!Q.parent},ee=function(Q){_(u,f,function(){var de=Q.facade;J?Ce.emit("rejectionHandled",de):le(o,de,Q.value)})},X=function(Q,de,ce){return function(Se){Q(de,Se,ce)}},oe=function(Q,de,ce){Q.done||(Q.done=!0,ce&&(Q=ce),Q.value=de,Q.state=W,je(Q,!0))},ne=function(Q,de,ce){if(!Q.done){Q.done=!0,ce&&(Q=ce);try{if(Q.facade===de)throw Y("Promise can't be resolved itself");var Se=Le(de);Se?v(function(){var Ee={done:!1};try{_(Se,de,X(ne,Ee,Q),X(oe,Ee,Q))}catch(Fe){oe(Ee,Fe,Q)}}):(Q.value=de,Q.state=N,je(Q,!1))}catch(Ee){oe({done:!1},Ee,Q)}}};if(_e&&(K=function(de){I(this,te),P(de),_(me,this);var ce=R(this);try{de(X(ne,ce),X(oe,ce))}catch(Se){oe(ce,Se)}},te=K.prototype,me=function(de){h(this,{type:q,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:k,value:void 0})},me.prototype=$(te,{then:function(de,ce){var Se=A(this),Ee=Se.reactions,Fe=we(l(this,K));return Fe.ok=F(de)?de:!0,Fe.fail=F(ce)&&ce,Fe.domain=J?Ce.domain:void 0,Se.parent=!0,Ee[Ee.length]=Fe,Se.state!=k&&je(Se,!1),Fe.promise},catch:function(Q){return this.then(void 0,Q)}}),pe=function(){var Q=new me,de=R(Q);this.promise=Q,this.resolve=X(ne,de),this.reject=X(oe,de)},b.f=we=function(Q){return Q===K||Q===Ae?new pe(Q):Me(Q)},!i&&F(D)&&E!==Object.prototype)){Pe=E.then,ve||(L(E,"then",function(de,ce){var Se=this;return new K(function(Ee,Fe){_(Pe,Se,Ee,Fe)}).then(de,ce)},{unsafe:!0}),L(E,"catch",te.catch,{unsafe:!0}));try{delete E.constructor}catch(Q){}j&&j(E,te)}r({global:!0,wrap:!0,forced:_e},{Promise:K}),V(K,q,!1,!0),O(q),Ae=m(q),r({target:q,stat:!0,forced:_e},{reject:function(de){var ce=we(this);return _(ce.reject,void 0,de),ce.promise}}),r({target:q,stat:!0,forced:i||_e},{resolve:function(de){return d(i&&this===Ae?K:this,de)}}),r({target:q,stat:!0,forced:We},{all:function(de){var ce=this,Se=we(ce),Ee=Se.resolve,Fe=Se.reject,De=T(function(){var Re=P(ce.resolve),Ne=[],Oe=0,xe=1;B(de,function(Be){var Ue=Oe++,He=!1;xe++,_(Re,ce,Be).then(function(Ye){He||(He=!0,Ne[Ue]=Ye,--xe||Ee(Ne))},Fe)}),--xe||Ee(Ne)});return De.error&&Fe(De.value),Se.promise},race:function(de){var ce=this,Se=we(ce),Ee=Se.reject,Fe=T(function(){var De=P(ce.resolve);B(de,function(Re){_(De,ce,Re).then(Se.resolve,Ee)})});return Fe.error&&Ee(Fe.value),Se.promise}})},(y,a,t)=>{var r=t(10);y.exports=r.Promise},(y,a,t)=>{var r=t(50);y.exports=function(i,f,m){for(var _ in f)r(i,_,f[_],m);return i}},(y,a,t)=>{"use strict";var r=t(27),i=t(48),f=t(37),m=t(12),_=f("species");y.exports=function(D){var L=r(D),$=i.f;m&&L&&!L[_]&&$(L,_,{configurable:!0,get:function(){return this}})}},(y,a,t)=>{var r=t(10),i=t(28),f=r.TypeError;y.exports=function(m,_){if(i(_,m))return m;throw f("Incorrect invocation")}},(y,a,t)=>{var r=t(37),i=r("iterator"),f=!1;try{var m=0,_={next:function(){return{done:!!m++}},return:function(){f=!0}};_[i]=function(){return this},Array.from(_,function(){throw 2})}catch(D){}y.exports=function(D,L){if(!L&&!f)return!1;var $=!1;try{var j={};j[i]=function(){return{next:function(){return{done:$=!0}}}},D(j)}catch(V){}return $}},(y,a,t)=>{var r=t(49),i=t(114),f=t(37),m=f("species");y.exports=function(_,D){var L=r(_).constructor,$;return L===void 0||($=r(L)[m])==null?D:i($)}},(y,a,t)=>{var r=t(10),i=t(115),f=t(35),m=r.TypeError;y.exports=function(_){if(i(_))return _;throw m(f(_)+" is not a constructor")}},(y,a,t)=>{var r=t(19),i=t(13),f=t(25),m=t(92),_=t(27),D=t(51),L=function(){},$=[],j=_("Reflect","construct"),V=/^\s*(?:class|function)\b/,O=r(V.exec),P=!V.exec(L),F=function(I){if(!f(I))return!1;try{return j(L,$,I),!0}catch(g){return!1}},x=function(I){if(!f(I))return!1;switch(m(I)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return P||!!O(V,D(I))};y.exports=!j||i(function(){var I;return F(F.call)||!F(Object)||!F(function(){I=!0})||I})?x:F},(y,a,t)=>{var r=t(10),i=t(117),f=t(88),m=t(25),_=t(42),D=t(13),L=t(76),$=t(118),j=t(46),V=t(119),O=t(120),P=r.setImmediate,F=r.clearImmediate,x=r.process,I=r.Dispatch,g=r.Function,B=r.MessageChannel,p=r.String,l=0,u={},v="onreadystatechange",d,c,b,T;try{d=r.location}catch(J){}var U=function(J){if(_(u,J)){var ie=u[J];delete u[J],ie()}},M=function(J){return function(){U(J)}},G=function(J){U(J.data)},Z=function(J){r.postMessage(p(J),d.protocol+"//"+d.host)};(!P||!F)&&(P=function(ie){var H=$(arguments,1);return u[++l]=function(){i(m(ie)?ie:g(ie),void 0,H)},c(l),l},F=function(ie){delete u[ie]},O?c=function(J){x.nextTick(M(J))}:I&&I.now?c=function(J){I.now(M(J))}:B&&!V?(b=new B,T=b.port2,b.port1.onmessage=G,c=f(T.postMessage,T)):r.addEventListener&&m(r.postMessage)&&!r.importScripts&&d&&d.protocol!=="file:"&&!D(Z)?(c=Z,r.addEventListener("message",G,!1)):v in j("script")?c=function(J){L.appendChild(j("script"))[v]=function(){L.removeChild(this),U(J)}}:c=function(J){setTimeout(M(J),0)}),y.exports={set:P,clear:F}},y=>{var a=Function.prototype,t=a.apply,r=a.bind,i=a.call;y.exports=typeof Reflect=="object"&&Reflect.apply||(r?i.bind(t):function(){return i.apply(t,arguments)})},(y,a,t)=>{var r=t(19);y.exports=r([].slice)},(y,a,t)=>{var r=t(32);y.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},(y,a,t)=>{var r=t(20),i=t(10);y.exports=r(i.process)=="process"},(y,a,t)=>{var r=t(10),i=t(88),f=t(11).f,m=t(116).set,_=t(119),D=t(122),L=t(123),$=t(120),j=r.MutationObserver||r.WebKitMutationObserver,V=r.document,O=r.process,P=r.Promise,F=f(r,"queueMicrotask"),x=F&&F.value,I,g,B,p,l,u,v,d;x||(I=function(){var c,b;for($&&(c=O.domain)&&c.exit();g;){b=g.fn,g=g.next;try{b()}catch(T){throw g?p():B=void 0,T}}B=void 0,c&&c.enter()},!_&&!$&&!L&&j&&V?(l=!0,u=V.createTextNode(""),new j(I).observe(u,{characterData:!0}),p=function(){u.data=l=!l}):!D&&P&&P.resolve?(v=P.resolve(void 0),v.constructor=P,d=i(v.then,v),p=function(){d(I)}):$?p=function(){O.nextTick(I)}:(m=i(m,r),p=function(){m(I)})),y.exports=x||function(c){var b={fn:c,next:void 0};B&&(B.next=b),g||(g=b,p()),B=b}},(y,a,t)=>{var r=t(32),i=t(10);y.exports=/ipad|iphone|ipod/i.test(r)&&i.Pebble!==void 0},(y,a,t)=>{var r=t(32);y.exports=/web0s(?!.*chrome)/i.test(r)},(y,a,t)=>{var r=t(49),i=t(24),f=t(125);y.exports=function(m,_){if(r(m),i(_)&&_.constructor===m)return _;var D=f.f(m),L=D.resolve;return L(_),D.promise}},(y,a,t)=>{"use strict";var r=t(34),i=function(f){var m,_;this.promise=new f(function(D,L){if(m!==void 0||_!==void 0)throw TypeError("Bad Promise constructor");m=D,_=L}),this.resolve=r(m),this.reject=r(_)};y.exports.f=function(f){return new i(f)}},(y,a,t)=>{var r=t(10);y.exports=function(i,f){var m=r.console;m&&m.error&&(arguments.length==1?m.error(i):m.error(i,f))}},y=>{y.exports=function(a){try{return{error:!1,value:a()}}catch(t){return{error:!0,value:t}}}},y=>{y.exports=typeof window=="object"},(y,a,t)=>{"use strict";var r=t(9),i=t(14),f=t(34),m=t(125),_=t(127),D=t(87);r({target:"Promise",stat:!0},{allSettled:function($){var j=this,V=m.f(j),O=V.resolve,P=V.reject,F=_(function(){var x=f(j.resolve),I=[],g=0,B=1;D($,function(p){var l=g++,u=!1;B++,i(x,j,p).then(function(v){u||(u=!0,I[l]={status:"fulfilled",value:v},--B||O(I))},function(v){u||(u=!0,I[l]={status:"rejected",reason:v},--B||O(I))})}),--B||O(I)});return F.error&&P(F.value),V.promise}})},(y,a,t)=>{"use strict";var r=t(9),i=t(34),f=t(27),m=t(14),_=t(125),D=t(127),L=t(87),$="No one promise resolved";r({target:"Promise",stat:!0},{any:function(V){var O=this,P=f("AggregateError"),F=_.f(O),x=F.resolve,I=F.reject,g=D(function(){var B=i(O.resolve),p=[],l=0,u=1,v=!1;L(V,function(d){var c=l++,b=!1;u++,m(B,O,d).then(function(T){b||v||(v=!0,x(T))},function(T){b||v||(b=!0,p[c]=T,--u||I(new P(p,$)))})}),--u||I(new P(p,$))});return g.error&&I(g.value),F.promise}})},(y,a,t)=>{"use strict";var r=t(9),i=t(39),f=t(108),m=t(13),_=t(27),D=t(25),L=t(113),$=t(124),j=t(50),V=!!f&&m(function(){f.prototype.finally.call({then:function(){}},function(){})});if(r({target:"Promise",proto:!0,real:!0,forced:V},{finally:function(P){var F=L(this,_("Promise")),x=D(P);return this.then(x?function(I){return $(F,P()).then(function(){return I})}:P,x?function(I){return $(F,P()).then(function(){throw I})}:P)}}),!i&&D(f)){var O=_("Promise").prototype.finally;f.prototype.finally!==O&&j(f.prototype,"finally",O,{unsafe:!0})}},(y,a,t)=>{"use strict";var r=t(133).charAt,i=t(103),f=t(52),m=t(78),_="String Iterator",D=f.set,L=f.getterFor(_);m(String,"String",function($){D(this,{type:_,string:i($),index:0})},function(){var j=L(this),V=j.string,O=j.index,P;return O>=V.length?{value:void 0,done:!0}:(P=r(V,O),j.index+=P.length,{value:P,done:!1})})},(y,a,t)=>{var r=t(19),i=t(63),f=t(103),m=t(21),_=r("".charAt),D=r("".charCodeAt),L=r("".slice),$=function(j){return function(V,O){var P=f(m(V)),F=i(O),x=P.length,I,g;return F<0||F>=x?j?"":void 0:(I=D(P,F),I<55296||I>56319||F+1===x||(g=D(P,F+1))<56320||g>57343?j?_(P,F):I:j?L(P,F,F+2):(I-55296<<10)+(g-56320)+65536)}};y.exports={codeAt:$(!1),charAt:$(!0)}},function(y,a){(function(t,r){r(a)})(this,function(t){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(e){return"Symbol("+e+")"};function i(){}function f(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global}var m=f();function _(e){return typeof e=="object"&&e!==null||typeof e=="function"}var D=i,L=Promise,$=Promise.prototype.then,j=Promise.resolve.bind(L),V=Promise.reject.bind(L);function O(e){return new L(e)}function P(e){return j(e)}function F(e){return V(e)}function x(e,n,C){return $.call(e,n,C)}function I(e,n,C){x(x(e,n,C),void 0,D)}function g(e,n){I(e,n)}function B(e,n){I(e,void 0,n)}function p(e,n,C){return x(e,n,C)}function l(e){x(e,void 0,D)}var u=function(){var e=m&&m.queueMicrotask;if(typeof e=="function")return e;var n=P(void 0);return function(C){return x(n,C)}}();function v(e,n,C){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,n,C)}function d(e,n,C){try{return P(v(e,n,C))}catch(ae){return F(ae)}}var c=16384,b=function(){function e(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.push=function(n){var C=this._back,ae=C;C._elements.length===c-1&&(ae={_elements:[],_next:void 0}),C._elements.push(n),ae!==C&&(this._back=ae,C._next=ae),++this._size},e.prototype.shift=function(){var n=this._front,C=n,ae=this._cursor,ge=ae+1,Te=n._elements,Ie=Te[ae];return ge===c&&(C=n._next,ge=0),--this._size,this._cursor=ge,n!==C&&(this._front=C),Te[ae]=void 0,Ie},e.prototype.forEach=function(n){for(var C=this._cursor,ae=this._front,ge=ae._elements;(C!==ge.length||ae._next!==void 0)&&!(C===ge.length&&(ae=ae._next,ge=ae._elements,C=0,ge.length===0));)n(ge[C]),++C},e.prototype.peek=function(){var n=this._front,C=this._cursor;return n._elements[C]},e}();function T(e,n){e._ownerReadableStream=n,n._reader=e,n._state==="readable"?Z(e):n._state==="closed"?ie(e):J(e,n._storedError)}function U(e,n){var C=e._ownerReadableStream;return bt(C,n)}function M(e){e._ownerReadableStream._state==="readable"?H(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):q(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function G(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Z(e){e._closedPromise=O(function(n,C){e._closedPromise_resolve=n,e._closedPromise_reject=C})}function J(e,n){Z(e),H(e,n)}function ie(e){Z(e),R(e)}function H(e,n){e._closedPromise_reject!==void 0&&(l(e._closedPromise),e._closedPromise_reject(n),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function q(e,n){J(e,n)}function R(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}var h=r("[[AbortSteps]]"),A=r("[[ErrorSteps]]"),E=r("[[CancelSteps]]"),K=r("[[PullSteps]]"),te=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Y=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function be(e){return typeof e=="object"||typeof e=="function"}function Ce(e,n){if(e!==void 0&&!be(e))throw new TypeError(n+" is not an object.")}function we(e,n){if(typeof e!="function")throw new TypeError(n+" is not a function.")}function Me(e){return typeof e=="object"&&e!==null||typeof e=="function"}function S(e,n){if(!Me(e))throw new TypeError(n+" is not an object.")}function w(e,n,C){if(e===void 0)throw new TypeError("Parameter "+n+" is required in '"+C+"'.")}function s(e,n,C){if(e===void 0)throw new TypeError(n+" is required in '"+C+"'.")}function o(e){return Number(e)}function k(e){return e===0?0:e}function N(e){return k(Y(e))}function W(e,n){var C=0,ae=Number.MAX_SAFE_INTEGER,ge=Number(e);if(ge=k(ge),!te(ge))throw new TypeError(n+" is not a finite number");if(ge=N(ge),geae)throw new TypeError(n+" is outside the accepted range of "+C+" to "+ae+", inclusive");return!te(ge)||ge===0?0:ge}function re(e,n){if(!Nt(e))throw new TypeError(n+" is not a ReadableStream.")}function fe(e){return new Pe(e)}function ve(e,n){e._reader._readRequests.push(n)}function me(e,n,C){var ae=e._reader,ge=ae._readRequests.shift();C?ge._closeSteps():ge._chunkSteps(n)}function pe(e){return e._reader._readRequests.length}function Ae(e){var n=e._reader;return!(n===void 0||!_e(n))}var Pe=function(){function e(n){if(w(n,1,"ReadableStreamDefaultReader"),re(n,"First parameter"),Bt(n))throw new TypeError("This stream has already been locked for exclusive reading by another reader");T(this,n),this._readRequests=new b}return Object.defineProperty(e.prototype,"closed",{get:function(){return _e(this)?this._closedPromise:F(Le("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(n){return n===void 0&&(n=void 0),_e(this)?this._ownerReadableStream===void 0?F(G("cancel")):U(this,n):F(Le("cancel"))},e.prototype.read=function(){if(!_e(this))return F(Le("read"));if(this._ownerReadableStream===void 0)return F(G("read from"));var n,C,ae=O(function(Te,Ie){n=Te,C=Ie}),ge={_chunkSteps:function(Te){return n({value:Te,done:!1})},_closeSteps:function(){return n({value:void 0,done:!0})},_errorSteps:function(Te){return C(Te)}};return We(this,ge),ae},e.prototype.releaseLock=function(){if(!_e(this))throw Le("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");M(this)}},e}();Object.defineProperties(Pe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Pe.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function _e(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readRequests")?!1:e instanceof Pe}function We(e,n){var C=e._ownerReadableStream;C._disturbed=!0,C._state==="closed"?n._closeSteps():C._state==="errored"?n._errorSteps(C._storedError):C._readableStreamController[K](n)}function Le(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}var je,le;typeof r.asyncIterator=="symbol"&&(le=(je={},je[r.asyncIterator]=function(){return this},je),Object.defineProperty(le,r.asyncIterator,{enumerable:!1}));var he=function(){function e(n,C){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=n,this._preventCancel=C}return e.prototype.next=function(){var n=this,C=function(){return n._nextSteps()};return this._ongoingPromise=this._ongoingPromise?p(this._ongoingPromise,C,C):C(),this._ongoingPromise},e.prototype.return=function(n){var C=this,ae=function(){return C._returnSteps(n)};return this._ongoingPromise?p(this._ongoingPromise,ae,ae):ae()},e.prototype._nextSteps=function(){var n=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var C=this._reader;if(C._ownerReadableStream===void 0)return F(G("iterate"));var ae,ge,Te=O(function(Ve,Ke){ae=Ve,ge=Ke}),Ie={_chunkSteps:function(Ve){n._ongoingPromise=void 0,u(function(){return ae({value:Ve,done:!1})})},_closeSteps:function(){n._ongoingPromise=void 0,n._isFinished=!0,M(C),ae({value:void 0,done:!0})},_errorSteps:function(Ve){n._ongoingPromise=void 0,n._isFinished=!0,M(C),ge(Ve)}};return We(C,Ie),Te},e.prototype._returnSteps=function(n){if(this._isFinished)return Promise.resolve({value:n,done:!0});this._isFinished=!0;var C=this._reader;if(C._ownerReadableStream===void 0)return F(G("finish iterating"));if(!this._preventCancel){var ae=U(C,n);return M(C),p(ae,function(){return{value:n,done:!0}})}return M(C),P({value:n,done:!0})},e}(),z={next:function(){return X(this)?this._asyncIteratorImpl.next():F(oe("next"))},return:function(e){return X(this)?this._asyncIteratorImpl.return(e):F(oe("return"))}};le!==void 0&&Object.setPrototypeOf(z,le);function ee(e,n){var C=fe(e),ae=new he(C,n),ge=Object.create(z);return ge._asyncIteratorImpl=ae,ge}function X(e){if(!_(e)||!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof he}catch(n){return!1}}function oe(e){return new TypeError("ReadableStreamAsyncIterator."+e+" can only be used on a ReadableSteamAsyncIterator")}var ne=Number.isNaN||function(e){return e!==e};function Q(e){return e.slice()}function de(e,n,C,ae,ge){new Uint8Array(e).set(new Uint8Array(C,ae,ge),n)}function ce(e){return e}function Se(e){return!1}function Ee(e,n,C){if(e.slice)return e.slice(n,C);var ae=C-n,ge=new ArrayBuffer(ae);return de(ge,0,e,n,ae),ge}function Fe(e){return!(typeof e!="number"||ne(e)||e<0)}function De(e){var n=Ee(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(n)}function Re(e){var n=e._queue.shift();return e._queueTotalSize-=n.size,e._queueTotalSize<0&&(e._queueTotalSize=0),n.value}function Ne(e,n,C){if(!Fe(C)||C===Infinity)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:n,size:C}),e._queueTotalSize+=C}function Oe(e){var n=e._queue.peek();return n.value}function xe(e){e._queue=new b,e._queueTotalSize=0}var Be=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"view",{get:function(){if(!Ye(this))throw It("view");return this._view},enumerable:!1,configurable:!0}),e.prototype.respond=function(n){if(!Ye(this))throw It("respond");if(w(n,1,"respond"),n=W(n,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Se(this._view.buffer),ot(this._associatedReadableByteStreamController,n)},e.prototype.respondWithNewView=function(n){if(!Ye(this))throw It("respondWithNewView");if(w(n,1,"respondWithNewView"),!ArrayBuffer.isView(n))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");Se(n.buffer),vt(this._associatedReadableByteStreamController,n)},e}();Object.defineProperties(Be.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Be.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ue=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"byobRequest",{get:function(){if(!He(this))throw at("byobRequest");return qe(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!He(this))throw at("desiredSize");return nt(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!He(this))throw at("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var n=this._controlledReadableByteStream._state;if(n!=="readable")throw new TypeError("The stream (in "+n+" state) is not in the readable state and cannot be closed");Ge(this)},e.prototype.enqueue=function(n){if(!He(this))throw at("enqueue");if(w(n,1,"enqueue"),!ArrayBuffer.isView(n))throw new TypeError("chunk must be an array buffer view");if(n.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(n.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var C=this._controlledReadableByteStream._state;if(C!=="readable")throw new TypeError("The stream (in "+C+" state) is not in the readable state and cannot be enqueued to");ze(this,n)},e.prototype.error=function(n){if(n===void 0&&(n=void 0),!He(this))throw at("error");$e(this,n)},e.prototype[E]=function(n){rt(this),xe(this);var C=this._cancelAlgorithm(n);return ye(this),C},e.prototype[K]=function(n){var C=this._controlledReadableByteStream;if(this._queueTotalSize>0){var ae=this._queue.shift();this._queueTotalSize-=ae.byteLength,Ot(this);var ge=new Uint8Array(ae.buffer,ae.byteOffset,ae.byteLength);n._chunkSteps(ge);return}var Te=this._autoAllocateChunkSize;if(Te!==void 0){var Ie=void 0;try{Ie=new ArrayBuffer(Te)}catch(Ke){n._errorSteps(Ke);return}var Ve={buffer:Ie,bufferByteLength:Te,byteOffset:0,byteLength:Te,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Ve)}ve(C,n),Ze(this)},e}();Object.defineProperties(Ue.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ue.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function He(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")?!1:e instanceof Ue}function Ye(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")?!1:e instanceof Be}function Ze(e){var n=se(e);if(!!n){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;var C=e._pullAlgorithm();I(C,function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Ze(e))},function(ae){$e(e,ae)})}}function rt(e){xt(e),e._pendingPullIntos=new b}function it(e,n){var C=!1;e._state==="closed"&&(C=!0);var ae=yt(n);n.readerType==="default"?me(e,ae,C):nr(e,ae,C)}function yt(e){var n=e.bytesFilled,C=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,n/C)}function ht(e,n,C,ae){e._queue.push({buffer:n,byteOffset:C,byteLength:ae}),e._queueTotalSize+=ae}function Pt(e,n){var C=n.elementSize,ae=n.bytesFilled-n.bytesFilled%C,ge=Math.min(e._queueTotalSize,n.byteLength-n.bytesFilled),Te=n.bytesFilled+ge,Ie=Te-Te%C,Ve=ge,Ke=!1;Ie>ae&&(Ve=Ie-n.bytesFilled,Ke=!0);for(var Qe=e._queue;Ve>0;){var Je=Qe.peek(),et=Math.min(Ve,Je.byteLength),ct=n.byteOffset+n.bytesFilled;de(n.buffer,ct,Je.buffer,Je.byteOffset,et),Je.byteLength===et?Qe.shift():(Je.byteOffset+=et,Je.byteLength-=et),e._queueTotalSize-=et,Xt(e,et,n),Ve-=et}return Ke}function Xt(e,n,C){C.bytesFilled+=n}function Ot(e){e._queueTotalSize===0&&e._closeRequested?(ye(e),cr(e._controlledReadableByteStream)):Ze(e)}function xt(e){e._byobRequest!==null&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ft(e){for(;e._pendingPullIntos.length>0;){if(e._queueTotalSize===0)return;var n=e._pendingPullIntos.peek();Pt(e,n)&&(ke(e),it(e._controlledReadableByteStream,n))}}function Yt(e,n,C){var ae=e._controlledReadableByteStream,ge=1;n.constructor!==DataView&&(ge=n.constructor.BYTES_PER_ELEMENT);var Te=n.constructor,Ie=ce(n.buffer),Ve={buffer:Ie,bufferByteLength:Ie.byteLength,byteOffset:n.byteOffset,byteLength:n.byteLength,bytesFilled:0,elementSize:ge,viewConstructor:Te,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(Ve),jt(ae,C);return}if(ae._state==="closed"){var Ke=new Te(Ve.buffer,Ve.byteOffset,0);C._closeSteps(Ke);return}if(e._queueTotalSize>0){if(Pt(e,Ve)){var Qe=yt(Ve);Ot(e),C._chunkSteps(Qe);return}if(e._closeRequested){var Je=new TypeError("Insufficient bytes to fill elements in the given buffer");$e(e,Je),C._errorSteps(Je);return}}e._pendingPullIntos.push(Ve),jt(ae,C),Ze(e)}function At(e,n){var C=e._controlledReadableByteStream;if(zt(C))for(;qt(C)>0;){var ae=ke(e);it(C,ae)}}function wt(e,n,C){if(Xt(e,n,C),!(C.bytesFilled0){var ge=C.byteOffset+C.bytesFilled,Te=Ee(C.buffer,ge-ae,ge);ht(e,Te,0,Te.byteLength)}C.bytesFilled-=ae,it(e._controlledReadableByteStream,C),Ft(e)}}function ue(e,n){var C=e._pendingPullIntos.peek();xt(e);var ae=e._controlledReadableByteStream._state;ae==="closed"?At(e):wt(e,n,C),Ze(e)}function ke(e){var n=e._pendingPullIntos.shift();return n}function se(e){var n=e._controlledReadableByteStream;if(n._state!=="readable"||e._closeRequested||!e._started)return!1;if(Ae(n)&&pe(n)>0||zt(n)&&qt(n)>0)return!0;var C=nt(e);return C>0}function ye(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Ge(e){var n=e._controlledReadableByteStream;if(!(e._closeRequested||n._state!=="readable")){if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){var C=e._pendingPullIntos.peek();if(C.bytesFilled>0){var ae=new TypeError("Insufficient bytes to fill elements in the given buffer");throw $e(e,ae),ae}}ye(e),cr(n)}}function ze(e,n){var C=e._controlledReadableByteStream;if(!(e._closeRequested||C._state!=="readable")){var ae=n.buffer,ge=n.byteOffset,Te=n.byteLength,Ie=ce(ae);if(e._pendingPullIntos.length>0){var Ve=e._pendingPullIntos.peek();Se(Ve.buffer),Ve.buffer=ce(Ve.buffer)}if(xt(e),Ae(C))if(pe(C)===0)ht(e,Ie,ge,Te);else{e._pendingPullIntos.length>0&&ke(e);var Ke=new Uint8Array(Ie,ge,Te);me(C,Ke,!1)}else zt(C)?(ht(e,Ie,ge,Te),Ft(e)):ht(e,Ie,ge,Te);Ze(e)}}function $e(e,n){var C=e._controlledReadableByteStream;C._state==="readable"&&(rt(e),xe(e),ye(e),bn(C,n))}function qe(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){var n=e._pendingPullIntos.peek(),C=new Uint8Array(n.buffer,n.byteOffset+n.bytesFilled,n.byteLength-n.bytesFilled),ae=Object.create(Be.prototype);gt(ae,e,C),e._byobRequest=ae}return e._byobRequest}function nt(e){var n=e._controlledReadableByteStream._state;return n==="errored"?null:n==="closed"?0:e._strategyHWM-e._queueTotalSize}function ot(e,n){var C=e._pendingPullIntos.peek(),ae=e._controlledReadableByteStream._state;if(ae==="closed"){if(n!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(n===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(C.bytesFilled+n>C.byteLength)throw new RangeError("bytesWritten out of range")}C.buffer=ce(C.buffer),ue(e,n)}function vt(e,n){var C=e._pendingPullIntos.peek(),ae=e._controlledReadableByteStream._state;if(ae==="closed"){if(n.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(n.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(C.byteOffset+C.bytesFilled!==n.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(C.bufferByteLength!==n.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(C.bytesFilled+n.byteLength>C.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var ge=n.byteLength;C.buffer=ce(n.buffer),ue(e,ge)}function ft(e,n,C,ae,ge,Te,Ie){n._controlledReadableByteStream=e,n._pullAgain=!1,n._pulling=!1,n._byobRequest=null,n._queue=n._queueTotalSize=void 0,xe(n),n._closeRequested=!1,n._started=!1,n._strategyHWM=Te,n._pullAlgorithm=ae,n._cancelAlgorithm=ge,n._autoAllocateChunkSize=Ie,n._pendingPullIntos=new b,e._readableStreamController=n;var Ve=C();I(P(Ve),function(){n._started=!0,Ze(n)},function(Ke){$e(n,Ke)})}function _t(e,n,C){var ae=Object.create(Ue.prototype),ge=function(){},Te=function(){return P(void 0)},Ie=function(){return P(void 0)};n.start!==void 0&&(ge=function(){return n.start(ae)}),n.pull!==void 0&&(Te=function(){return n.pull(ae)}),n.cancel!==void 0&&(Ie=function(Ke){return n.cancel(Ke)});var Ve=n.autoAllocateChunkSize;if(Ve===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");ft(e,ae,ge,Te,Ie,C,Ve)}function gt(e,n,C){e._associatedReadableByteStreamController=n,e._view=C}function It(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function at(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Gt(e){return new mt(e)}function jt(e,n){e._reader._readIntoRequests.push(n)}function nr(e,n,C){var ae=e._reader,ge=ae._readIntoRequests.shift();C?ge._closeSteps(n):ge._chunkSteps(n)}function qt(e){return e._reader._readIntoRequests.length}function zt(e){var n=e._reader;return!(n===void 0||!ut(n))}var mt=function(){function e(n){if(w(n,1,"ReadableStreamBYOBReader"),re(n,"First parameter"),Bt(n))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!He(n._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");T(this,n),this._readIntoRequests=new b}return Object.defineProperty(e.prototype,"closed",{get:function(){return ut(this)?this._closedPromise:F(hr("closed"))},enumerable:!1,configurable:!0}),e.prototype.cancel=function(n){return n===void 0&&(n=void 0),ut(this)?this._ownerReadableStream===void 0?F(G("cancel")):U(this,n):F(hr("cancel"))},e.prototype.read=function(n){if(!ut(this))return F(hr("read"));if(!ArrayBuffer.isView(n))return F(new TypeError("view must be an array buffer view"));if(n.byteLength===0)return F(new TypeError("view must have non-zero byteLength"));if(n.buffer.byteLength===0)return F(new TypeError("view's buffer must have non-zero byteLength"));if(Se(n.buffer),this._ownerReadableStream===void 0)return F(G("read from"));var C,ae,ge=O(function(Ie,Ve){C=Ie,ae=Ve}),Te={_chunkSteps:function(Ie){return C({value:Ie,done:!1})},_closeSteps:function(Ie){return C({value:Ie,done:!0})},_errorSteps:function(Ie){return ae(Ie)}};return Mt(this,n,Te),ge},e.prototype.releaseLock=function(){if(!ut(this))throw hr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");M(this)}},e}();Object.defineProperties(mt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(mt.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ut(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")?!1:e instanceof mt}function Mt(e,n,C){var ae=e._ownerReadableStream;ae._disturbed=!0,ae._state==="errored"?C._errorSteps(ae._storedError):Yt(ae._readableStreamController,n,C)}function hr(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ar(e,n){var C=e.highWaterMark;if(C===void 0)return n;if(ne(C)||C<0)throw new RangeError("Invalid highWaterMark");return C}function vr(e){var n=e.size;return n||function(){return 1}}function pr(e,n){Ce(e,n);var C=e==null?void 0:e.highWaterMark,ae=e==null?void 0:e.size;return{highWaterMark:C===void 0?void 0:o(C),size:ae===void 0?void 0:In(ae,n+" has member 'size' that")}}function In(e,n){return we(e,n),function(C){return o(e(C))}}function Mn(e,n){Ce(e,n);var C=e==null?void 0:e.abort,ae=e==null?void 0:e.close,ge=e==null?void 0:e.start,Te=e==null?void 0:e.type,Ie=e==null?void 0:e.write;return{abort:C===void 0?void 0:Dn(C,e,n+" has member 'abort' that"),close:ae===void 0?void 0:Ln(ae,e,n+" has member 'close' that"),start:ge===void 0?void 0:Nn(ge,e,n+" has member 'start' that"),write:Ie===void 0?void 0:Bn(Ie,e,n+" has member 'write' that"),type:Te}}function Dn(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function Ln(e,n,C){return we(e,C),function(){return d(e,n,[])}}function Nn(e,n,C){return we(e,C),function(ae){return v(e,n,[ae])}}function Bn(e,n,C){return we(e,C),function(ae,ge){return d(e,n,[ae,ge])}}function Kr(e,n){if(!Kt(e))throw new TypeError(n+" is not a WritableStream.")}function Wn(e){if(typeof e!="object"||e===null)return!1;try{return typeof e.aborted=="boolean"}catch(n){return!1}}var Un=typeof AbortController=="function";function Gn(){if(Un)return new AbortController}var ir=function(){function e(n,C){n===void 0&&(n={}),C===void 0&&(C={}),n===void 0?n=null:S(n,"First parameter");var ae=pr(C,"Second parameter"),ge=Mn(n,"First parameter");Jr(this);var Te=ge.type;if(Te!==void 0)throw new RangeError("Invalid type is specified");var Ie=vr(ae),Ve=ar(ae,1);ta(this,ge,Ve,Ie)}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Kt(this))throw Sr("locked");return Qt(this)},enumerable:!1,configurable:!0}),e.prototype.abort=function(n){return n===void 0&&(n=void 0),Kt(this)?Qt(this)?F(new TypeError("Cannot abort a stream that already has a writer")):yr(this,n):F(Sr("abort"))},e.prototype.close=function(){return Kt(this)?Qt(this)?F(new TypeError("Cannot close a stream that already has a writer")):kt(this)?F(new TypeError("Cannot close an already-closing stream")):Zr(this):F(Sr("close"))},e.prototype.getWriter=function(){if(!Kt(this))throw Sr("getWriter");return Qr(this)},e}();Object.defineProperties(ir.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ir.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function Qr(e){return new or(e)}function jn(e,n,C,ae,ge,Te){ge===void 0&&(ge=1),Te===void 0&&(Te=function(){return 1});var Ie=Object.create(ir.prototype);Jr(Ie);var Ve=Object.create(Jt.prototype);return on(Ie,Ve,e,n,C,ae,ge,Te),Ie}function Jr(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new b,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Kt(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")?!1:e instanceof ir}function Qt(e){return e._writer!==void 0}function yr(e,n){var C;if(e._state==="closed"||e._state==="errored")return P(void 0);e._writableStreamController._abortReason=n,(C=e._writableStreamController._abortController)===null||C===void 0||C.abort();var ae=e._state;if(ae==="closed"||ae==="errored")return P(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;var ge=!1;ae==="erroring"&&(ge=!0,n=void 0);var Te=O(function(Ie,Ve){e._pendingAbortRequest={_promise:void 0,_resolve:Ie,_reject:Ve,_reason:n,_wasAlreadyErroring:ge}});return e._pendingAbortRequest._promise=Te,ge||Lr(e,n),Te}function Zr(e){var n=e._state;if(n==="closed"||n==="errored")return F(new TypeError("The stream (in "+n+" state) is not in the writable state and cannot be closed"));var C=O(function(ge,Te){var Ie={_resolve:ge,_reject:Te};e._closeRequest=Ie}),ae=e._writer;return ae!==void 0&&e._backpressure&&n==="writable"&&Vr(ae),ra(e._writableStreamController),C}function zn(e){var n=O(function(C,ae){var ge={_resolve:C,_reject:ae};e._writeRequests.push(ge)});return n}function Dr(e,n){var C=e._state;if(C==="writable"){Lr(e,n);return}Nr(e)}function Lr(e,n){var C=e._writableStreamController;e._state="erroring",e._storedError=n;var ae=e._writer;ae!==void 0&&tn(ae,n),!Yn(e)&&C._started&&Nr(e)}function Nr(e){e._state="errored",e._writableStreamController[A]();var n=e._storedError;if(e._writeRequests.forEach(function(ge){ge._reject(n)}),e._writeRequests=new b,e._pendingAbortRequest===void 0){gr(e);return}var C=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,C._wasAlreadyErroring){C._reject(n),gr(e);return}var ae=e._writableStreamController[h](C._reason);I(ae,function(){C._resolve(),gr(e)},function(ge){C._reject(ge),gr(e)})}function Hn(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Vn(e,n){e._inFlightWriteRequest._reject(n),e._inFlightWriteRequest=void 0,Dr(e,n)}function $n(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var n=e._state;n==="erroring"&&(e._storedError=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var C=e._writer;C!==void 0&&cn(C)}function Xn(e,n){e._inFlightCloseRequest._reject(n),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0&&(e._pendingAbortRequest._reject(n),e._pendingAbortRequest=void 0),Dr(e,n)}function kt(e){return!(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)}function Yn(e){return!(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)}function qn(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Kn(e){e._inFlightWriteRequest=e._writeRequests.shift()}function gr(e){e._closeRequest!==void 0&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var n=e._writer;n!==void 0&&zr(n,e._storedError)}function Br(e,n){var C=e._writer;C!==void 0&&n!==e._backpressure&&(n?ua(C):Vr(C)),e._backpressure=n}var or=function(){function e(n){if(w(n,1,"WritableStreamDefaultWriter"),Kr(n,"First parameter"),Qt(n))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=n,n._writer=this;var C=n._state;if(C==="writable")!kt(n)&&n._backpressure?_r(this):fn(this),Ar(this);else if(C==="erroring")Hr(this,n._storedError),Ar(this);else if(C==="closed")fn(this),sa(this);else{var ae=n._storedError;Hr(this,ae),un(this,ae)}}return Object.defineProperty(e.prototype,"closed",{get:function(){return Ht(this)?this._closedPromise:F(Vt("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Ht(this))throw Vt("desiredSize");if(this._ownerWritableStream===void 0)throw sr("desiredSize");return ea(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ready",{get:function(){return Ht(this)?this._readyPromise:F(Vt("ready"))},enumerable:!1,configurable:!0}),e.prototype.abort=function(n){return n===void 0&&(n=void 0),Ht(this)?this._ownerWritableStream===void 0?F(sr("abort")):Qn(this,n):F(Vt("abort"))},e.prototype.close=function(){if(!Ht(this))return F(Vt("close"));var n=this._ownerWritableStream;return n===void 0?F(sr("close")):kt(n)?F(new TypeError("Cannot close an already-closing stream")):en(this)},e.prototype.releaseLock=function(){if(!Ht(this))throw Vt("releaseLock");var n=this._ownerWritableStream;n!==void 0&&rn(this)},e.prototype.write=function(n){return n===void 0&&(n=void 0),Ht(this)?this._ownerWritableStream===void 0?F(sr("write to")):nn(this,n):F(Vt("write"))},e}();Object.defineProperties(or.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(or.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Ht(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")?!1:e instanceof or}function Qn(e,n){var C=e._ownerWritableStream;return yr(C,n)}function en(e){var n=e._ownerWritableStream;return Zr(n)}function Jn(e){var n=e._ownerWritableStream,C=n._state;return kt(n)||C==="closed"?P(void 0):C==="errored"?F(n._storedError):en(e)}function Zn(e,n){e._closedPromiseState==="pending"?zr(e,n):la(e,n)}function tn(e,n){e._readyPromiseState==="pending"?dn(e,n):ca(e,n)}function ea(e){var n=e._ownerWritableStream,C=n._state;return C==="errored"||C==="erroring"?null:C==="closed"?0:sn(n._writableStreamController)}function rn(e){var n=e._ownerWritableStream,C=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");tn(e,C),Zn(e,C),n._writer=void 0,e._ownerWritableStream=void 0}function nn(e,n){var C=e._ownerWritableStream,ae=C._writableStreamController,ge=na(ae,n);if(C!==e._ownerWritableStream)return F(sr("write to"));var Te=C._state;if(Te==="errored")return F(C._storedError);if(kt(C)||Te==="closed")return F(new TypeError("The stream is closing or closed and cannot be written to"));if(Te==="erroring")return F(C._storedError);var Ie=zn(C);return aa(ae,n,ge),Ie}var an={},Jt=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"abortReason",{get:function(){if(!Wr(this))throw jr("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){if(!Wr(this))throw jr("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),e.prototype.error=function(n){if(n===void 0&&(n=void 0),!Wr(this))throw jr("error");var C=this._controlledWritableStream._state;C==="writable"&&ln(this,n)},e.prototype[h]=function(n){var C=this._abortAlgorithm(n);return mr(this),C},e.prototype[A]=function(){xe(this)},e}();Object.defineProperties(Jt.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Jt.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Wr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")?!1:e instanceof Jt}function on(e,n,C,ae,ge,Te,Ie,Ve){n._controlledWritableStream=e,e._writableStreamController=n,n._queue=void 0,n._queueTotalSize=void 0,xe(n),n._abortReason=void 0,n._abortController=Gn(),n._started=!1,n._strategySizeAlgorithm=Ve,n._strategyHWM=Ie,n._writeAlgorithm=ae,n._closeAlgorithm=ge,n._abortAlgorithm=Te;var Ke=Gr(n);Br(e,Ke);var Qe=C(),Je=P(Qe);I(Je,function(){n._started=!0,br(n)},function(et){n._started=!0,Dr(e,et)})}function ta(e,n,C,ae){var ge=Object.create(Jt.prototype),Te=function(){},Ie=function(){return P(void 0)},Ve=function(){return P(void 0)},Ke=function(){return P(void 0)};n.start!==void 0&&(Te=function(){return n.start(ge)}),n.write!==void 0&&(Ie=function(Qe){return n.write(Qe,ge)}),n.close!==void 0&&(Ve=function(){return n.close()}),n.abort!==void 0&&(Ke=function(Qe){return n.abort(Qe)}),on(e,ge,Te,Ie,Ve,Ke,C,ae)}function mr(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ra(e){Ne(e,an,0),br(e)}function na(e,n){try{return e._strategySizeAlgorithm(n)}catch(C){return Ur(e,C),1}}function sn(e){return e._strategyHWM-e._queueTotalSize}function aa(e,n,C){try{Ne(e,n,C)}catch(Te){Ur(e,Te);return}var ae=e._controlledWritableStream;if(!kt(ae)&&ae._state==="writable"){var ge=Gr(e);Br(ae,ge)}br(e)}function br(e){var n=e._controlledWritableStream;if(!!e._started&&n._inFlightWriteRequest===void 0){var C=n._state;if(C==="erroring"){Nr(n);return}if(e._queue.length!==0){var ae=Oe(e);ae===an?ia(e):oa(e,ae)}}}function Ur(e,n){e._controlledWritableStream._state==="writable"&&ln(e,n)}function ia(e){var n=e._controlledWritableStream;qn(n),Re(e);var C=e._closeAlgorithm();mr(e),I(C,function(){$n(n)},function(ae){Xn(n,ae)})}function oa(e,n){var C=e._controlledWritableStream;Kn(C);var ae=e._writeAlgorithm(n);I(ae,function(){Hn(C);var ge=C._state;if(Re(e),!kt(C)&&ge==="writable"){var Te=Gr(e);Br(C,Te)}br(e)},function(ge){C._state==="writable"&&mr(e),Vn(C,ge)})}function Gr(e){var n=sn(e);return n<=0}function ln(e,n){var C=e._controlledWritableStream;mr(e),Lr(C,n)}function Sr(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function jr(e){return new TypeError("WritableStreamDefaultController.prototype."+e+" can only be used on a WritableStreamDefaultController")}function Vt(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function sr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Ar(e){e._closedPromise=O(function(n,C){e._closedPromise_resolve=n,e._closedPromise_reject=C,e._closedPromiseState="pending"})}function un(e,n){Ar(e),zr(e,n)}function sa(e){Ar(e),cn(e)}function zr(e,n){e._closedPromise_reject!==void 0&&(l(e._closedPromise),e._closedPromise_reject(n),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function la(e,n){un(e,n)}function cn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function _r(e){e._readyPromise=O(function(n,C){e._readyPromise_resolve=n,e._readyPromise_reject=C}),e._readyPromiseState="pending"}function Hr(e,n){_r(e),dn(e,n)}function fn(e){_r(e),Vr(e)}function dn(e,n){e._readyPromise_reject!==void 0&&(l(e._readyPromise),e._readyPromise_reject(n),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function ua(e){_r(e)}function ca(e,n){Hr(e,n)}function Vr(e){e._readyPromise_resolve!==void 0&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}var hn=typeof DOMException!="undefined"?DOMException:void 0;function fa(e){if(!(typeof e=="function"||typeof e=="object"))return!1;try{return new e,!0}catch(n){return!1}}function da(){var e=function(C,ae){this.message=C||"",this.name=ae||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}var ha=fa(hn)?hn:da();function vn(e,n,C,ae,ge,Te){var Ie=fe(e),Ve=Qr(n);e._disturbed=!0;var Ke=!1,Qe=P(void 0);return O(function(Je,et){var ct;if(Te!==void 0){if(ct=function(){var Xe=new ha("Aborted","AbortError"),tt=[];ae||tt.push(function(){return n._state==="writable"?yr(n,Xe):P(void 0)}),ge||tt.push(function(){return e._state==="readable"?bt(e,Xe):P(void 0)}),pt(function(){return Promise.all(tt.map(function(lt){return lt()}))},!0,Xe)},Te.aborted){ct();return}Te.addEventListener("abort",ct)}function St(){return O(function(Xe,tt){function lt(Rt){Rt?Xe():x(tr(),lt,tt)}lt(!1)})}function tr(){return Ke?P(!0):x(Ve._readyPromise,function(){return O(function(Xe,tt){We(Ie,{_chunkSteps:function(lt){Qe=x(nn(Ve,lt),void 0,i),Xe(!1)},_closeSteps:function(){return Xe(!0)},_errorSteps:tt})})})}if(dt(e,Ie._closedPromise,function(Xe){ae?Et(!0,Xe):pt(function(){return yr(n,Xe)},!0,Xe)}),dt(n,Ve._closedPromise,function(Xe){ge?Et(!0,Xe):pt(function(){return bt(e,Xe)},!0,Xe)}),Tt(e,Ie._closedPromise,function(){C?Et():pt(function(){return Jn(Ve)})}),kt(n)||n._state==="closed"){var Wt=new TypeError("the destination writable stream closed before all data could be piped to it");ge?Et(!0,Wt):pt(function(){return bt(e,Wt)},!0,Wt)}l(St());function Ct(){var Xe=Qe;return x(Qe,function(){return Xe!==Qe?Ct():void 0})}function dt(Xe,tt,lt){Xe._state==="errored"?lt(Xe._storedError):B(tt,lt)}function Tt(Xe,tt,lt){Xe._state==="closed"?lt():g(tt,lt)}function pt(Xe,tt,lt){if(Ke)return;Ke=!0,n._state==="writable"&&!kt(n)?g(Ct(),Rt):Rt();function Rt(){I(Xe(),function(){return st(tt,lt)},function(Ut){return st(!0,Ut)})}}function Et(Xe,tt){Ke||(Ke=!0,n._state==="writable"&&!kt(n)?g(Ct(),function(){return st(Xe,tt)}):st(Xe,tt))}function st(Xe,tt){rn(Ve),M(Ie),Te!==void 0&&Te.removeEventListener("abort",ct),Xe?et(tt):Je(void 0)}})}var Zt=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!kr(this))throw Rr("desiredSize");return $r(this)},enumerable:!1,configurable:!0}),e.prototype.close=function(){if(!kr(this))throw Rr("close");if(!er(this))throw new TypeError("The stream is not in a state that permits close");ur(this)},e.prototype.enqueue=function(n){if(n===void 0&&(n=void 0),!kr(this))throw Rr("enqueue");if(!er(this))throw new TypeError("The stream is not in a state that permits enqueue");return Tr(this,n)},e.prototype.error=function(n){if(n===void 0&&(n=void 0),!kr(this))throw Rr("error");Dt(this,n)},e.prototype[E]=function(n){xe(this);var C=this._cancelAlgorithm(n);return Cr(this),C},e.prototype[K]=function(n){var C=this._controlledReadableStream;if(this._queue.length>0){var ae=Re(this);this._closeRequested&&this._queue.length===0?(Cr(this),cr(C)):lr(this),n._chunkSteps(ae)}else ve(C,n),lr(this)},e}();Object.defineProperties(Zt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Zt.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function kr(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")?!1:e instanceof Zt}function lr(e){var n=pn(e);if(!!n){if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;var C=e._pullAlgorithm();I(C,function(){e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,lr(e))},function(ae){Dt(e,ae)})}}function pn(e){var n=e._controlledReadableStream;if(!er(e)||!e._started)return!1;if(Bt(n)&&pe(n)>0)return!0;var C=$r(e);return C>0}function Cr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function ur(e){if(!!er(e)){var n=e._controlledReadableStream;e._closeRequested=!0,e._queue.length===0&&(Cr(e),cr(n))}}function Tr(e,n){if(!!er(e)){var C=e._controlledReadableStream;if(Bt(C)&&pe(C)>0)me(C,n,!1);else{var ae=void 0;try{ae=e._strategySizeAlgorithm(n)}catch(ge){throw Dt(e,ge),ge}try{Ne(e,n,ae)}catch(ge){throw Dt(e,ge),ge}}lr(e)}}function Dt(e,n){var C=e._controlledReadableStream;C._state==="readable"&&(xe(e),Cr(e),bn(C,n))}function $r(e){var n=e._controlledReadableStream._state;return n==="errored"?null:n==="closed"?0:e._strategyHWM-e._queueTotalSize}function va(e){return!pn(e)}function er(e){var n=e._controlledReadableStream._state;return!e._closeRequested&&n==="readable"}function yn(e,n,C,ae,ge,Te,Ie){n._controlledReadableStream=e,n._queue=void 0,n._queueTotalSize=void 0,xe(n),n._started=!1,n._closeRequested=!1,n._pullAgain=!1,n._pulling=!1,n._strategySizeAlgorithm=Ie,n._strategyHWM=Te,n._pullAlgorithm=ae,n._cancelAlgorithm=ge,e._readableStreamController=n;var Ve=C();I(P(Ve),function(){n._started=!0,lr(n)},function(Ke){Dt(n,Ke)})}function pa(e,n,C,ae){var ge=Object.create(Zt.prototype),Te=function(){},Ie=function(){return P(void 0)},Ve=function(){return P(void 0)};n.start!==void 0&&(Te=function(){return n.start(ge)}),n.pull!==void 0&&(Ie=function(){return n.pull(ge)}),n.cancel!==void 0&&(Ve=function(Ke){return n.cancel(Ke)}),yn(e,ge,Te,Ie,Ve,C,ae)}function Rr(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function ya(e,n){return He(e._readableStreamController)?ma(e):ga(e)}function ga(e,n){var C=fe(e),ae=!1,ge=!1,Te=!1,Ie=!1,Ve,Ke,Qe,Je,et,ct=O(function(dt){et=dt});function St(){if(ae)return ge=!0,P(void 0);ae=!0;var dt={_chunkSteps:function(Tt){u(function(){ge=!1;var pt=Tt,Et=Tt;Te||Tr(Qe._readableStreamController,pt),Ie||Tr(Je._readableStreamController,Et),ae=!1,ge&&St()})},_closeSteps:function(){ae=!1,Te||ur(Qe._readableStreamController),Ie||ur(Je._readableStreamController),(!Te||!Ie)&&et(void 0)},_errorSteps:function(){ae=!1}};return We(C,dt),P(void 0)}function tr(dt){if(Te=!0,Ve=dt,Ie){var Tt=Q([Ve,Ke]),pt=bt(e,Tt);et(pt)}return ct}function Wt(dt){if(Ie=!0,Ke=dt,Te){var Tt=Q([Ve,Ke]),pt=bt(e,Tt);et(pt)}return ct}function Ct(){}return Qe=Xr(Ct,St,tr),Je=Xr(Ct,St,Wt),B(C._closedPromise,function(dt){Dt(Qe._readableStreamController,dt),Dt(Je._readableStreamController,dt),(!Te||!Ie)&&et(void 0)}),[Qe,Je]}function ma(e){var n=fe(e),C=!1,ae=!1,ge=!1,Te=!1,Ie=!1,Ve,Ke,Qe,Je,et,ct=O(function(st){et=st});function St(st){B(st._closedPromise,function(Xe){st===n&&($e(Qe._readableStreamController,Xe),$e(Je._readableStreamController,Xe),(!Te||!Ie)&&et(void 0))})}function tr(){ut(n)&&(M(n),n=fe(e),St(n));var st={_chunkSteps:function(Xe){u(function(){ae=!1,ge=!1;var tt=Xe,lt=Xe;if(!Te&&!Ie)try{lt=De(Xe)}catch(Rt){$e(Qe._readableStreamController,Rt),$e(Je._readableStreamController,Rt),et(bt(e,Rt));return}Te||ze(Qe._readableStreamController,tt),Ie||ze(Je._readableStreamController,lt),C=!1,ae?Ct():ge&&dt()})},_closeSteps:function(){C=!1,Te||Ge(Qe._readableStreamController),Ie||Ge(Je._readableStreamController),Qe._readableStreamController._pendingPullIntos.length>0&&ot(Qe._readableStreamController,0),Je._readableStreamController._pendingPullIntos.length>0&&ot(Je._readableStreamController,0),(!Te||!Ie)&&et(void 0)},_errorSteps:function(){C=!1}};We(n,st)}function Wt(st,Xe){_e(n)&&(M(n),n=Gt(e),St(n));var tt=Xe?Je:Qe,lt=Xe?Qe:Je,Rt={_chunkSteps:function(Ut){u(function(){ae=!1,ge=!1;var rr=Xe?Ie:Te,dr=Xe?Te:Ie;if(dr)rr||vt(tt._readableStreamController,Ut);else{var Fn=void 0;try{Fn=De(Ut)}catch(qr){$e(tt._readableStreamController,qr),$e(lt._readableStreamController,qr),et(bt(e,qr));return}rr||vt(tt._readableStreamController,Ut),ze(lt._readableStreamController,Fn)}C=!1,ae?Ct():ge&&dt()})},_closeSteps:function(Ut){C=!1;var rr=Xe?Ie:Te,dr=Xe?Te:Ie;rr||Ge(tt._readableStreamController),dr||Ge(lt._readableStreamController),Ut!==void 0&&(rr||vt(tt._readableStreamController,Ut),!dr&<._readableStreamController._pendingPullIntos.length>0&&ot(lt._readableStreamController,0)),(!rr||!dr)&&et(void 0)},_errorSteps:function(){C=!1}};Mt(n,st,Rt)}function Ct(){if(C)return ae=!0,P(void 0);C=!0;var st=qe(Qe._readableStreamController);return st===null?tr():Wt(st._view,!1),P(void 0)}function dt(){if(C)return ge=!0,P(void 0);C=!0;var st=qe(Je._readableStreamController);return st===null?tr():Wt(st._view,!0),P(void 0)}function Tt(st){if(Te=!0,Ve=st,Ie){var Xe=Q([Ve,Ke]),tt=bt(e,Xe);et(tt)}return ct}function pt(st){if(Ie=!0,Ke=st,Te){var Xe=Q([Ve,Ke]),tt=bt(e,Xe);et(tt)}return ct}function Et(){}return Qe=mn(Et,Ct,Tt),Je=mn(Et,dt,pt),St(n),[Qe,Je]}function ba(e,n){Ce(e,n);var C=e,ae=C==null?void 0:C.autoAllocateChunkSize,ge=C==null?void 0:C.cancel,Te=C==null?void 0:C.pull,Ie=C==null?void 0:C.start,Ve=C==null?void 0:C.type;return{autoAllocateChunkSize:ae===void 0?void 0:W(ae,n+" has member 'autoAllocateChunkSize' that"),cancel:ge===void 0?void 0:Sa(ge,C,n+" has member 'cancel' that"),pull:Te===void 0?void 0:Aa(Te,C,n+" has member 'pull' that"),start:Ie===void 0?void 0:_a(Ie,C,n+" has member 'start' that"),type:Ve===void 0?void 0:ka(Ve,n+" has member 'type' that")}}function Sa(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function Aa(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function _a(e,n,C){return we(e,C),function(ae){return v(e,n,[ae])}}function ka(e,n){if(e=""+e,e!=="bytes")throw new TypeError(n+" '"+e+"' is not a valid enumeration value for ReadableStreamType");return e}function Ca(e,n){Ce(e,n);var C=e==null?void 0:e.mode;return{mode:C===void 0?void 0:Ta(C,n+" has member 'mode' that")}}function Ta(e,n){if(e=""+e,e!=="byob")throw new TypeError(n+" '"+e+"' is not a valid enumeration value for ReadableStreamReaderMode");return e}function Ra(e,n){Ce(e,n);var C=e==null?void 0:e.preventCancel;return{preventCancel:Boolean(C)}}function gn(e,n){Ce(e,n);var C=e==null?void 0:e.preventAbort,ae=e==null?void 0:e.preventCancel,ge=e==null?void 0:e.preventClose,Te=e==null?void 0:e.signal;return Te!==void 0&&Pa(Te,n+" has member 'signal' that"),{preventAbort:Boolean(C),preventCancel:Boolean(ae),preventClose:Boolean(ge),signal:Te}}function Pa(e,n){if(!Wn(e))throw new TypeError(n+" is not an AbortSignal.")}function wa(e,n){Ce(e,n);var C=e==null?void 0:e.readable;s(C,"readable","ReadableWritablePair"),re(C,n+" has member 'readable' that");var ae=e==null?void 0:e.writable;return s(ae,"writable","ReadableWritablePair"),Kr(ae,n+" has member 'writable' that"),{readable:C,writable:ae}}var Lt=function(){function e(n,C){n===void 0&&(n={}),C===void 0&&(C={}),n===void 0?n=null:S(n,"First parameter");var ae=pr(C,"Second parameter"),ge=ba(n,"First parameter");if(Yr(this),ge.type==="bytes"){if(ae.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var Te=ar(ae,0);_t(this,ge,Te)}else{var Ie=vr(ae),Te=ar(ae,1);pa(this,ge,Te,Ie)}}return Object.defineProperty(e.prototype,"locked",{get:function(){if(!Nt(this))throw $t("locked");return Bt(this)},enumerable:!1,configurable:!0}),e.prototype.cancel=function(n){return n===void 0&&(n=void 0),Nt(this)?Bt(this)?F(new TypeError("Cannot cancel a stream that already has a reader")):bt(this,n):F($t("cancel"))},e.prototype.getReader=function(n){if(n===void 0&&(n=void 0),!Nt(this))throw $t("getReader");var C=Ca(n,"First parameter");return C.mode===void 0?fe(this):Gt(this)},e.prototype.pipeThrough=function(n,C){if(C===void 0&&(C={}),!Nt(this))throw $t("pipeThrough");w(n,1,"pipeThrough");var ae=wa(n,"First parameter"),ge=gn(C,"Second parameter");if(Bt(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Qt(ae.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var Te=vn(this,ae.writable,ge.preventClose,ge.preventAbort,ge.preventCancel,ge.signal);return l(Te),ae.readable},e.prototype.pipeTo=function(n,C){if(C===void 0&&(C={}),!Nt(this))return F($t("pipeTo"));if(n===void 0)return F("Parameter 1 is required in 'pipeTo'.");if(!Kt(n))return F(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var ae;try{ae=gn(C,"Second parameter")}catch(ge){return F(ge)}return Bt(this)?F(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Qt(n)?F(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):vn(this,n,ae.preventClose,ae.preventAbort,ae.preventCancel,ae.signal)},e.prototype.tee=function(){if(!Nt(this))throw $t("tee");var n=ya(this);return Q(n)},e.prototype.values=function(n){if(n===void 0&&(n=void 0),!Nt(this))throw $t("values");var C=Ra(n,"First parameter");return ee(this,C.preventCancel)},e}();Object.defineProperties(Lt.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Lt.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(Lt.prototype,r.asyncIterator,{value:Lt.prototype.values,writable:!0,configurable:!0});function Xr(e,n,C,ae,ge){ae===void 0&&(ae=1),ge===void 0&&(ge=function(){return 1});var Te=Object.create(Lt.prototype);Yr(Te);var Ie=Object.create(Zt.prototype);return yn(Te,Ie,e,n,C,ae,ge),Te}function mn(e,n,C){var ae=Object.create(Lt.prototype);Yr(ae);var ge=Object.create(Ue.prototype);return ft(ae,ge,e,n,C,0,void 0),ae}function Yr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function Nt(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")?!1:e instanceof Lt}function Bt(e){return e._reader!==void 0}function bt(e,n){if(e._disturbed=!0,e._state==="closed")return P(void 0);if(e._state==="errored")return F(e._storedError);cr(e);var C=e._reader;C!==void 0&&ut(C)&&(C._readIntoRequests.forEach(function(ge){ge._closeSteps(void 0)}),C._readIntoRequests=new b);var ae=e._readableStreamController[E](n);return p(ae,i)}function cr(e){e._state="closed";var n=e._reader;n!==void 0&&(R(n),_e(n)&&(n._readRequests.forEach(function(C){C._closeSteps()}),n._readRequests=new b))}function bn(e,n){e._state="errored",e._storedError=n;var C=e._reader;C!==void 0&&(H(C,n),_e(C)?(C._readRequests.forEach(function(ae){ae._errorSteps(n)}),C._readRequests=new b):(C._readIntoRequests.forEach(function(ae){ae._errorSteps(n)}),C._readIntoRequests=new b))}function $t(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function Sn(e,n){Ce(e,n);var C=e==null?void 0:e.highWaterMark;return s(C,"highWaterMark","QueuingStrategyInit"),{highWaterMark:o(C)}}var An=function(e){return e.byteLength};Object.defineProperty(An,"name",{value:"size",configurable:!0});var Pr=function(){function e(n){w(n,1,"ByteLengthQueuingStrategy"),n=Sn(n,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=n.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!kn(this))throw _n("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!kn(this))throw _n("size");return An},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Pr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Pr.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function _n(e){return new TypeError("ByteLengthQueuingStrategy.prototype."+e+" can only be used on a ByteLengthQueuingStrategy")}function kn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")?!1:e instanceof Pr}var Cn=function(){return 1};Object.defineProperty(Cn,"name",{value:"size",configurable:!0});var wr=function(){function e(n){w(n,1,"CountQueuingStrategy"),n=Sn(n,"First parameter"),this._countQueuingStrategyHighWaterMark=n.highWaterMark}return Object.defineProperty(e.prototype,"highWaterMark",{get:function(){if(!Rn(this))throw Tn("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){if(!Rn(this))throw Tn("size");return Cn},enumerable:!1,configurable:!0}),e}();Object.defineProperties(wr.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(wr.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Tn(e){return new TypeError("CountQueuingStrategy.prototype."+e+" can only be used on a CountQueuingStrategy")}function Rn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")?!1:e instanceof wr}function Ea(e,n){Ce(e,n);var C=e==null?void 0:e.flush,ae=e==null?void 0:e.readableType,ge=e==null?void 0:e.start,Te=e==null?void 0:e.transform,Ie=e==null?void 0:e.writableType;return{flush:C===void 0?void 0:Oa(C,e,n+" has member 'flush' that"),readableType:ae,start:ge===void 0?void 0:xa(ge,e,n+" has member 'start' that"),transform:Te===void 0?void 0:Fa(Te,e,n+" has member 'transform' that"),writableType:Ie}}function Oa(e,n,C){return we(e,C),function(ae){return d(e,n,[ae])}}function xa(e,n,C){return we(e,C),function(ae){return v(e,n,[ae])}}function Fa(e,n,C){return we(e,C),function(ae,ge){return d(e,n,[ae,ge])}}var Er=function(){function e(n,C,ae){n===void 0&&(n={}),C===void 0&&(C={}),ae===void 0&&(ae={}),n===void 0&&(n=null);var ge=pr(C,"Second parameter"),Te=pr(ae,"Third parameter"),Ie=Ea(n,"First parameter");if(Ie.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(Ie.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Ve=ar(Te,0),Ke=vr(Te),Qe=ar(ge,1),Je=vr(ge),et,ct=O(function(St){et=St});Ia(this,ct,Qe,Je,Ve,Ke),Da(this,Ie),Ie.start!==void 0?et(Ie.start(this._transformStreamController)):et(void 0)}return Object.defineProperty(e.prototype,"readable",{get:function(){if(!Pn(this))throw xn("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"writable",{get:function(){if(!Pn(this))throw xn("writable");return this._writable},enumerable:!1,configurable:!0}),e}();Object.defineProperties(Er.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Er.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function Ia(e,n,C,ae,ge,Te){function Ie(){return n}function Ve(ct){return Ba(e,ct)}function Ke(ct){return Wa(e,ct)}function Qe(){return Ua(e)}e._writable=jn(Ie,Ve,Qe,Ke,C,ae);function Je(){return Ga(e)}function et(ct){return xr(e,ct),P(void 0)}e._readable=Xr(Ie,Je,et,ge,Te),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Fr(e,!0),e._transformStreamController=void 0}function Pn(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")?!1:e instanceof Er}function Or(e,n){Dt(e._readable._readableStreamController,n),xr(e,n)}function xr(e,n){wn(e._transformStreamController),Ur(e._writable._writableStreamController,n),e._backpressure&&Fr(e,!1)}function Fr(e,n){e._backpressureChangePromise!==void 0&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=O(function(C){e._backpressureChangePromise_resolve=C}),e._backpressure=n}var fr=function(){function e(){throw new TypeError("Illegal constructor")}return Object.defineProperty(e.prototype,"desiredSize",{get:function(){if(!Ir(this))throw Mr("desiredSize");var n=this._controlledTransformStream._readable._readableStreamController;return $r(n)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(n){if(n===void 0&&(n=void 0),!Ir(this))throw Mr("enqueue");En(this,n)},e.prototype.error=function(n){if(n===void 0&&(n=void 0),!Ir(this))throw Mr("error");La(this,n)},e.prototype.terminate=function(){if(!Ir(this))throw Mr("terminate");Na(this)},e}();Object.defineProperties(fr.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(fr.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Ir(e){return!_(e)||!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")?!1:e instanceof fr}function Ma(e,n,C,ae){n._controlledTransformStream=e,e._transformStreamController=n,n._transformAlgorithm=C,n._flushAlgorithm=ae}function Da(e,n){var C=Object.create(fr.prototype),ae=function(Te){try{return En(C,Te),P(void 0)}catch(Ie){return F(Ie)}},ge=function(){return P(void 0)};n.transform!==void 0&&(ae=function(Te){return n.transform(Te,C)}),n.flush!==void 0&&(ge=function(){return n.flush(C)}),Ma(e,C,ae,ge)}function wn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function En(e,n){var C=e._controlledTransformStream,ae=C._readable._readableStreamController;if(!er(ae))throw new TypeError("Readable side is not in a state that permits enqueue");try{Tr(ae,n)}catch(Te){throw xr(C,Te),C._readable._storedError}var ge=va(ae);ge!==C._backpressure&&Fr(C,!0)}function La(e,n){Or(e._controlledTransformStream,n)}function On(e,n){var C=e._transformAlgorithm(n);return p(C,void 0,function(ae){throw Or(e._controlledTransformStream,ae),ae})}function Na(e){var n=e._controlledTransformStream,C=n._readable._readableStreamController;ur(C);var ae=new TypeError("TransformStream terminated");xr(n,ae)}function Ba(e,n){var C=e._transformStreamController;if(e._backpressure){var ae=e._backpressureChangePromise;return p(ae,function(){var ge=e._writable,Te=ge._state;if(Te==="erroring")throw ge._storedError;return On(C,n)})}return On(C,n)}function Wa(e,n){return Or(e,n),P(void 0)}function Ua(e){var n=e._readable,C=e._transformStreamController,ae=C._flushAlgorithm();return wn(C),p(ae,function(){if(n._state==="errored")throw n._storedError;ur(n._readableStreamController)},function(ge){throw Or(e,ge),n._storedError})}function Ga(e){return Fr(e,!1),e._backpressureChangePromise}function Mr(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function xn(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}t.ByteLengthQueuingStrategy=Pr,t.CountQueuingStrategy=wr,t.ReadableByteStreamController=Ue,t.ReadableStream=Lt,t.ReadableStreamBYOBReader=mt,t.ReadableStreamBYOBRequest=Be,t.ReadableStreamDefaultController=Zt,t.ReadableStreamDefaultReader=Pe,t.TransformStream=Er,t.TransformStreamDefaultController=fr,t.WritableStream=ir,t.WritableStreamDefaultController=Jt,t.WritableStreamDefaultWriter=or,Object.defineProperty(t,"__esModule",{value:!0})})},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BaseStandardFontDataFactory=a.BaseSVGFactory=a.BaseCanvasFactory=a.BaseCMapReaderFactory=void 0;var r=f(t(2)),i=t(4);function f(F){return F&&F.__esModule?F:{default:F}}function m(F,x,I,g,B,p,l){try{var u=F[p](l),v=u.value}catch(d){I(d);return}u.done?x(v):Promise.resolve(v).then(g,B)}function _(F){return function(){var x=this,I=arguments;return new Promise(function(g,B){var p=F.apply(x,I);function l(v){m(p,g,B,l,u,"next",v)}function u(v){m(p,g,B,l,u,"throw",v)}l(void 0)})}}function D(F,x){if(!(F instanceof x))throw new TypeError("Cannot call a class as a function")}function L(F,x){for(var I=0;I{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2)),_util=__w_pdfjs_require__(4),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(137),_node_utils=__w_pdfjs_require__(138),_annotation_storage=__w_pdfjs_require__(139),_canvas=__w_pdfjs_require__(140),_worker_options=__w_pdfjs_require__(142),_is_node=__w_pdfjs_require__(6),_message_handler=__w_pdfjs_require__(143),_metadata=__w_pdfjs_require__(144),_optional_content_config=__w_pdfjs_require__(145),_transport_stream=__w_pdfjs_require__(146),_xfa_text=__w_pdfjs_require__(147);function _interopRequireDefault(y){return y&&y.__esModule?y:{default:y}}function _classPrivateFieldInitSpec(y,a,t){_checkPrivateRedeclaration(y,a),a.set(y,t)}function _checkPrivateRedeclaration(y,a){if(a.has(y))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(y,a,t){var r=_classExtractFieldDescriptor(y,a,"set");return _classApplyDescriptorSet(y,r,t),t}function _classApplyDescriptorSet(y,a,t){if(a.set)a.set.call(y,t);else{if(!a.writable)throw new TypeError("attempted to set read only private field");a.value=t}}function _classPrivateFieldGet(y,a){var t=_classExtractFieldDescriptor(y,a,"get");return _classApplyDescriptorGet(y,t)}function _classExtractFieldDescriptor(y,a,t){if(!a.has(y))throw new TypeError("attempted to "+t+" private field on non-instance");return a.get(y)}function _classApplyDescriptorGet(y,a){return a.get?a.get.call(y):a.value}function _toConsumableArray(y){return _arrayWithoutHoles(y)||_iterableToArray(y)||_unsupportedIterableToArray(y)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArray(y){if(typeof Symbol!="undefined"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}function _arrayWithoutHoles(y){if(Array.isArray(y))return _arrayLikeToArray(y)}function _createForOfIteratorHelper(y,a){var t=typeof Symbol!="undefined"&&y[Symbol.iterator]||y["@@iterator"];if(!t){if(Array.isArray(y)||(t=_unsupportedIterableToArray(y))||a&&y&&typeof y.length=="number"){t&&(y=t);var r=0,i=function(){};return{s:i,n:function(){return r>=y.length?{done:!0}:{done:!1,value:y[r++]}},e:function(L){throw L},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,m=!1,_;return{s:function(){t=t.call(y)},n:function(){var L=t.next();return f=L.done,L},e:function(L){m=!0,_=L},f:function(){try{!f&&t.return!=null&&t.return()}finally{if(m)throw _}}}}function _classCallCheck(y,a){if(!(y instanceof a))throw new TypeError("Cannot call a class as a function")}function _defineProperties(y,a){for(var t=0;ty.length)&&(a=y.length);for(var t=0,r=new Array(a);t2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;_classCallCheck(this,y),this.length=a,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}return _createClass(y,[{key:"addRangeListener",value:function(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function(t,r){var i=_createForOfIteratorHelper(this._rangeListeners),f;try{for(i.s();!(f=i.n()).done;){var m=f.value;m(t,r)}}catch(_){i.e(_)}finally{i.f()}}},{key:"onDataProgress",value:function(t,r){var i=this;this._readyCapability.promise.then(function(){var f=_createForOfIteratorHelper(i._progressListeners),m;try{for(f.s();!(m=f.n()).done;){var _=m.value;_(t,r)}}catch(D){f.e(D)}finally{f.f()}})}},{key:"onDataProgressiveRead",value:function(t){var r=this;this._readyCapability.promise.then(function(){var i=_createForOfIteratorHelper(r._progressiveReadListeners),f;try{for(i.s();!(f=i.n()).done;){var m=f.value;m(t)}}catch(_){i.e(_)}finally{i.f()}})}},{key:"onDataProgressiveDone",value:function(){var t=this;this._readyCapability.promise.then(function(){var r=_createForOfIteratorHelper(t._progressiveDoneListeners),i;try{for(r.s();!(i=r.n()).done;){var f=i.value;f()}}catch(m){r.e(m)}finally{r.f()}})}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(t,r){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}]),y}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function y(a,t){var r=this;_classCallCheck(this,y),this._pdfInfo=a,this._transport=t,Object.defineProperty(this,"fingerprint",{get:function(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:function(){var i=_asyncToGenerator(_regenerator.default.mark(function m(){return _regenerator.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),D.abrupt("return",r.stats||{streamTypes:{},fontTypes:{}});case 2:case"end":return D.stop()}},m)}));function f(){return i.apply(this,arguments)}return f}()})}return _createClass(y,[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"stats",get:function(){return this._transport.stats}},{key:"isPureXfa",get:function(){return!!this._transport._htmlForXfa}},{key:"allXfaHtml",get:function(){return this._transport._htmlForXfa}},{key:"getPage",value:function(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function(){return this._transport.getDestinations()}},{key:"getDestination",value:function(t){return this._transport.getDestination(t)}},{key:"getPageLabels",value:function(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function(){return this._transport.getAttachments()}},{key:"getJavaScript",value:function(){return this._transport.getJavaScript()}},{key:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function(){return this._transport.getPermissions()}},{key:"getMetadata",value:function(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function(){return this._transport.getMarkInfo()}},{key:"getData",value:function(){return this._transport.getData()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"saveDocument",value:function(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}]),y}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function y(a,t,r,i){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;_classCallCheck(this,y),this._pageIndex=a,this._pageInfo=t,this._ownerDocument=i,this._transport=r,this._stats=f?new _display_utils.StatTimer:null,this._pdfBug=f,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}return _createClass(y,[{key:"pageNumber",get:function(){return this._pageIndex+1}},{key:"rotate",get:function(){return this._pageInfo.rotate}},{key:"ref",get:function(){return this._pageInfo.ref}},{key:"userUnit",get:function(){return this._pageInfo.userUnit}},{key:"view",get:function(){return this._pageInfo.view}},{key:"getViewport",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.scale,i=t.rotation,f=i===void 0?this.rotate:i,m=t.offsetX,_=m===void 0?0:m,D=t.offsetY,L=D===void 0?0:D,$=t.dontFlip,j=$===void 0?!1:$;return new _display_utils.PageViewport({viewBox:this.view,scale:r,rotation:f,offsetX:_,offsetY:L,dontFlip:j})}},{key:"getAnnotations",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.intent,i=r===void 0?"display":r,f=this._transport.getRenderingIntent(i),m=this._annotationPromises.get(f.cacheKey);return m||(m=this._transport.getAnnotations(this._pageIndex,f.renderingIntent),this._annotationPromises.set(f.cacheKey,m),m=m.then(function(_){var D=_createForOfIteratorHelper(_),L;try{var $=function(){var V=L.value;V.titleObj!==void 0&&Object.defineProperty(V,"title",{get:function(){return(0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),V.titleObj.str}}),V.contentsObj!==void 0&&Object.defineProperty(V,"contents",{get:function(){return(0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),V.contentsObj.str}})};for(D.s();!(L=D.n()).done;)$()}catch(j){D.e(j)}finally{D.f()}return _})),m}},{key:"getJSActions",value:function(){return this._jsActionsPromise||(this._jsActionsPromise=this._transport.getPageJSActions(this._pageIndex))}},{key:"getXfa",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){var i;return _regenerator.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",((i=this._transport._htmlForXfa)===null||i===void 0?void 0:i.children[this._pageIndex])||null);case 1:case"end":return m.stop()}},r,this)}));function t(){return a.apply(this,arguments)}return t}()},{key:"render",value:function(t){var r,i,f=this,m,_=t.canvasContext,D=t.viewport,L=t.intent,$=L===void 0?"display":L,j=t.annotationMode,V=j===void 0?_util.AnnotationMode.ENABLE:j,O=t.transform,P=O===void 0?null:O,F=t.imageLayer,x=F===void 0?null:F,I=t.canvasFactory,g=I===void 0?null:I,B=t.background,p=B===void 0?null:B,l=t.optionalContentConfigPromise,u=l===void 0?null:l,v=t.annotationCanvasMap,d=v===void 0?null:v;((r=arguments[0])===null||r===void 0?void 0:r.renderInteractiveForms)!==void 0&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),arguments[0].renderInteractiveForms===!0&&V===_util.AnnotationMode.ENABLE&&(V=_util.AnnotationMode.ENABLE_FORMS)),((i=arguments[0])===null||i===void 0?void 0:i.includeAnnotationStorage)!==void 0&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),arguments[0].includeAnnotationStorage===!0&&V===_util.AnnotationMode.ENABLE&&(V=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");var c=this._transport.getRenderingIntent($,V);this.pendingCleanup=!1,u||(u=this._transport.getOptionalContentConfig());var b=this._intentStates.get(c.cacheKey);b||(b=Object.create(null),this._intentStates.set(c.cacheKey,b)),b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);var T=g||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),U=!!(c.renderingIntent&_util.RenderingIntentFlag.PRINT);b.displayReadyCapability||(b.displayReadyCapability=(0,_util.createPromiseCapability)(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(c));var M=function(ie){b.renderTasks.delete(G),(f.cleanupAfterRender||U)&&(f.pendingCleanup=!0),f._tryCleanup(),ie?(G.capability.reject(ie),f._abortOperatorList({intentState:b,reason:ie instanceof Error?ie:new Error(ie)})):G.capability.resolve(),f._stats&&(f._stats.timeEnd("Rendering"),f._stats.timeEnd("Overall"))},G=new InternalRenderTask({callback:M,params:{canvasContext:_,viewport:D,transform:P,imageLayer:x,background:p},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:d,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:T,useRequestAnimationFrame:!U,pdfBug:this._pdfBug});((m=b).renderTasks||(m.renderTasks=new Set)).add(G);var Z=G.task;return Promise.all([b.displayReadyCapability.promise,u]).then(function(J){var ie=_slicedToArray(J,2),H=ie[0],q=ie[1];if(f.pendingCleanup){M();return}f._stats&&f._stats.time("Rendering"),G.initializeGraphics({transparency:H,optionalContentConfig:q}),G.operatorListChanged()}).catch(M),Z}},{key:"getOperatorList",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.intent,i=r===void 0?"display":r,f=t.annotationMode,m=f===void 0?_util.AnnotationMode.ENABLE:f;function _(){L.operatorList.lastChunk&&(L.opListReadCapability.resolve(L.operatorList),L.renderTasks.delete($))}var D=this._transport.getRenderingIntent(i,m,!0),L=this._intentStates.get(D.cacheKey);L||(L=Object.create(null),this._intentStates.set(D.cacheKey,L));var $;if(!L.opListReadCapability){var j;$=Object.create(null),$.operatorListChanged=_,L.opListReadCapability=(0,_util.createPromiseCapability)(),((j=L).renderTasks||(j.renderTasks=new Set)).add($),L.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(D)}return L.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.normalizeWhitespace,i=r===void 0?!1:r,f=t.disableCombineTextItems,m=f===void 0?!1:f,_=t.includeMarkedContent,D=_===void 0?!1:_,L=100;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:i===!0,combineTextItems:m!==!0,includeMarkedContent:D===!0},{highWaterMark:L,size:function(j){return j.items.length}})}},{key:"getTextContent",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(function(i){return _xfa_text.XfaText.textContent(i)});var r=this.streamTextContent(t);return new Promise(function(i,f){function m(){_.read().then(function(L){var $,j=L.value,V=L.done;if(V){i(D);return}Object.assign(D.styles,j.styles),($=D.items).push.apply($,_toConsumableArray(j.items)),m()},f)}var _=r.getReader(),D={items:[],styles:Object.create(null)};m()})}},{key:"getStructTree",value:function(){return this._structTreePromise||(this._structTreePromise=this._transport.getStructTree(this._pageIndex))}},{key:"_destroy",value:function(){this.destroyed=!0;var t=[],r=_createForOfIteratorHelper(this._intentStates.values()),i;try{for(r.s();!(i=r.n()).done;){var f=i.value;if(this._abortOperatorList({intentState:f,reason:new Error("Page was destroyed."),force:!0}),!f.opListReadCapability){var m=_createForOfIteratorHelper(f.renderTasks),_;try{for(m.s();!(_=m.n()).done;){var D=_.value;t.push(D.completed),D.cancel()}}catch(L){m.e(L)}finally{m.f()}}}}catch(L){r.e(L)}finally{r.f()}return this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(t)}},{key:"cleanup",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return this.pendingCleanup=!0,this._tryCleanup(t)}},{key:"_tryCleanup",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.pendingCleanup)return!1;var r=_createForOfIteratorHelper(this._intentStates.values()),i;try{for(r.s();!(i=r.n()).done;){var f=i.value,m=f.renderTasks,_=f.operatorList;if(m.size>0||!_.lastChunk)return!1}}catch(D){r.e(D)}finally{r.f()}return this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}},{key:"_startRenderPage",value:function(t,r){var i=this._intentStates.get(r);!i||(this._stats&&this._stats.timeEnd("Page Request"),i.displayReadyCapability&&i.displayReadyCapability.resolve(t))}},{key:"_renderPageChunk",value:function(t,r){for(var i=0,f=t.length;i0)return;if(f instanceof _display_utils.RenderingCancelledException){i.streamReaderCancelTimeout=setTimeout(function(){r._abortOperatorList({intentState:i,reason:f,force:!0}),i.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT);return}}if(i.streamReader.cancel(new _util.AbortException(f.message)).catch(function(){}),i.streamReader=null,!this._transport.destroyed){var D=_createForOfIteratorHelper(this._intentStates),L;try{for(D.s();!(L=D.n()).done;){var $=_slicedToArray(L.value,2),j=$[0],V=$[1];if(V===i){this._intentStates.delete(j);break}}}catch(O){D.e(O)}finally{D.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]),y}();exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function y(){_classCallCheck(this,y),this._listeners=[],this._deferred=Promise.resolve()}return _createClass(y,[{key:"postMessage",value:function(t,r){var i=this;function f(_){if(globalThis.structuredClone)return globalThis.structuredClone(_,r);function D($){if(typeof $=="function"||_typeof($)==="symbol"||$ instanceof URL)throw new Error("LoopbackPort.postMessage - cannot clone: ".concat($==null?void 0:$.toString()));if(_typeof($)!=="object"||$===null)return $;if(L.has($))return L.get($);var j,V;if((j=$.buffer)&&(0,_util.isArrayBuffer)(j))return r!=null&&r.includes(j)?V=new $.constructor(j,$.byteOffset,$.byteLength):V=new $.constructor($),L.set($,V),V;if($ instanceof Map){V=new Map,L.set($,V);var O=_createForOfIteratorHelper($),P;try{for(O.s();!(P=O.n()).done;){var F=_slicedToArray(P.value,2),x=F[0],I=F[1];V.set(x,D(I))}}catch(c){O.e(c)}finally{O.f()}return V}if($ instanceof Set){V=new Set,L.set($,V);var g=_createForOfIteratorHelper($),B;try{for(g.s();!(B=g.n()).done;){var p=B.value;V.add(D(p))}}catch(c){g.e(c)}finally{g.f()}return V}V=Array.isArray($)?[]:Object.create(null),L.set($,V);for(var l in $){for(var u,v=void 0,d=$;!(v=Object.getOwnPropertyDescriptor(d,l));)d=Object.getPrototypeOf(d);typeof v.value!="undefined"&&(typeof v.value=="function"&&!((u=$.hasOwnProperty)!==null&&u!==void 0&&u.call($,l))||(V[l]=D(v.value)))}return V}var L=new WeakMap;return D(_)}var m={data:f(t)};this._deferred.then(function(){var _=_createForOfIteratorHelper(i._listeners),D;try{for(_.s();!(D=_.n()).done;){var L=D.value;L.call(i,m)}}catch($){_.e($)}finally{_.f()}})}},{key:"addEventListener",value:function(t,r){this._listeners.push(r)}},{key:"removeEventListener",value:function(t,r){var i=this._listeners.indexOf(r);this._listeners.splice(i,1)}},{key:"terminate",value:function(){this._listeners.length=0}}]),y}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};{if(_is_node.isNodeJS&&typeof require=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="pdfjs/build/pdf.worker.js";else if((typeof document=="undefined"?"undefined":_typeof(document))==="object"){var _document,_document$currentScri,pdfjsFilePath=(_document=document)===null||_document===void 0||(_document$currentScri=_document.currentScript)===null||_document$currentScri===void 0?void 0:_document$currentScri.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.createCDNWrapper=function(y){var a='importScripts("'.concat(y,'");');return URL.createObjectURL(new Blob([a]))}}var PDFWorker=function(){function PDFWorker(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=y.name,t=a===void 0?null:a,r=y.port,i=r===void 0?null:r,f=y.verbosity,m=f===void 0?(0,_util.getVerbosityLevel)():f;if(_classCallCheck(this,PDFWorker),i&&PDFWorker._workerPorts.has(i))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=t,this.destroyed=!1,this.verbosity=m,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,i){PDFWorker._workerPorts.set(i,this),this._initializeFromPort(i);return}this._initialize()}return _createClass(PDFWorker,[{key:"promise",get:function(){return this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(a){this._port=a,this._messageHandler=new _message_handler.MessageHandler("main","worker",a),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}},{key:"_initialize",value:function(){var a=this;if(typeof Worker!="undefined"&&!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var t=PDFWorker.workerSrc;try{(0,_util.isSameOrigin)(window.location.href,t)||(t=PDFWorkerUtil.createCDNWrapper(new URL(t,window.location).href));var r=new Worker(t),i=new _message_handler.MessageHandler("main","worker",r),f=function(){r.removeEventListener("error",m),i.destroy(),r.terminate(),a.destroyed?a._readyCapability.reject(new Error("Worker was destroyed")):a._setupFakeWorker()},m=function(){a._webWorker||f()};r.addEventListener("error",m),i.on("test",function(D){if(r.removeEventListener("error",m),a.destroyed){f();return}D?(a._messageHandler=i,a._port=r,a._webWorker=r,a._readyCapability.resolve(),i.send("configure",{verbosity:a.verbosity})):(a._setupFakeWorker(),i.destroy(),r.terminate())}),i.on("ready",function(D){if(r.removeEventListener("error",m),a.destroyed){f();return}try{_()}catch(L){a._setupFakeWorker()}});var _=function(){var L=new Uint8Array([255]);try{i.send("test",L,[L.buffer])}catch($){(0,_util.warn)("Cannot use postMessage transfers."),L[0]=0,i.send("test",L)}};_();return}catch(D){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function(){var a=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(function(t){if(a.destroyed){a._readyCapability.reject(new Error("Worker was destroyed"));return}var r=new LoopbackPort;a._port=r;var i="fake".concat(PDFWorkerUtil.fakeWorkerId++),f=new _message_handler.MessageHandler(i+"_worker",i,r);t.setup(f,r);var m=new _message_handler.MessageHandler(i,i+"_worker",r);a._messageHandler=m,a._readyCapability.resolve(),m.send("configure",{verbosity:a.verbosity})}).catch(function(t){a._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))})}},{key:"destroy",value:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker._workerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"_workerPorts",get:function(){return(0,_util.shadow)(this,"_workerPorts",new WeakMap)}},{key:"fromPort",value:function(a){if(!(a!=null&&a.port))throw new Error("PDFWorker.fromPort - invalid method signature.");return this._workerPorts.has(a.port)?this._workerPorts.get(a.port):new PDFWorker(a)}},{key:"workerSrc",get:function(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function(){try{var a;return((a=globalThis.pdfjsWorker)===null||a===void 0?void 0:a.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regenerator.default.mark(function _callee4(){var mainWorkerMessageHandler,worker;return _regenerator.default.wrap(function(_context4){for(;;)switch(_context4.prev=_context4.next){case 0:if(mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler,!mainWorkerMessageHandler){_context4.next=3;break}return _context4.abrupt("return",mainWorkerMessageHandler);case 3:if(!(_is_node.isNodeJS&&typeof require=="function")){_context4.next=6;break}return worker=eval("require")(_this11.workerSrc),_context4.abrupt("return",worker.WorkerMessageHandler);case 6:return _context4.next=8,(0,_display_utils.loadScript)(_this11.workerSrc);case 8:return _context4.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context4.stop()}},_callee4)}));return function(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]),PDFWorker}();exports.PDFWorker=PDFWorker,PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};var _docStats=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_metadataPromise=new WeakMap,WorkerTransport=function(){function y(a,t,r,i){_classCallCheck(this,y),_classPrivateFieldInitSpec(this,_docStats,{writable:!0,value:null}),_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map}),_classPrivateFieldInitSpec(this,_metadataPromise,{writable:!0,value:null}),this.messageHandler=a,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:t.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this._params=i,i.useWorkerFetch||(this.CMapReaderFactory=new i.CMapReaderFactory({baseUrl:i.cMapUrl,isCompressed:i.cMapPacked}),this.StandardFontDataFactory=new i.StandardFontDataFactory({baseUrl:i.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}return _createClass(y,[{key:"annotationStorage",get:function(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"stats",get:function(){return _classPrivateFieldGet(this,_docStats)}},{key:"getRenderingIntent",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_util.AnnotationMode.ENABLE,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=_util.RenderingIntentFlag.DISPLAY,m="";switch(t){case"any":f=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":f=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(t))}switch(r){case _util.AnnotationMode.DISABLE:f+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:f+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:f+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,m=this.annotationStorage.lastModified;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(r))}return i&&(f+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:f,cacheKey:"".concat(f,"_").concat(m)}}},{key:"destroy",value:function(){var t=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var r=[],i=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),f;try{for(i.s();!(f=i.n()).done;){var m=f.value;r.push(m._destroy())}}catch(D){i.e(D)}finally{i.f()}_classPrivateFieldGet(this,_pageCache).clear(),_classPrivateFieldGet(this,_pagePromises).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var _=this.messageHandler.sendWithPromise("Terminate",null);return r.push(_),Promise.all(r).then(function(){t.commonObjs.clear(),t.fontLoader.clear(),_classPrivateFieldSet(t,_metadataPromise,null),t._getFieldObjectsPromise=null,t._hasJSActionsPromise=null,t._networkStream&&t._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),t.messageHandler&&(t.messageHandler.destroy(),t.messageHandler=null),t.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var t=this,r=this.messageHandler,i=this.loadingTask;r.on("GetReader",function(f,m){(0,_util.assert)(t._networkStream,"GetReader - no `IPDFStream` instance available."),t._fullReader=t._networkStream.getFullReader(),t._fullReader.onProgress=function(_){t._lastProgress={loaded:_.loaded,total:_.total}},m.onPull=function(){t._fullReader.read().then(function(_){var D=_.value,L=_.done;if(L){m.close();return}(0,_util.assert)((0,_util.isArrayBuffer)(D),"GetReader - expected an ArrayBuffer."),m.enqueue(new Uint8Array(D),1,[D])}).catch(function(_){m.error(_)})},m.onCancel=function(_){t._fullReader.cancel(_),m.ready.catch(function(D){if(!t.destroyed)throw D})}}),r.on("ReaderHeadersReady",function(f){var m=(0,_util.createPromiseCapability)(),_=t._fullReader;return _.headersReady.then(function(){if(!_.isStreamingSupported||!_.isRangeSupported){if(t._lastProgress){var D;(D=i.onProgress)===null||D===void 0||D.call(i,t._lastProgress)}_.onProgress=function(L){var $;($=i.onProgress)===null||$===void 0||$.call(i,{loaded:L.loaded,total:L.total})}}m.resolve({isStreamingSupported:_.isStreamingSupported,isRangeSupported:_.isRangeSupported,contentLength:_.contentLength})},m.reject),m.promise}),r.on("GetRangeReader",function(f,m){(0,_util.assert)(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var _=t._networkStream.getRangeReader(f.begin,f.end);if(!_){m.close();return}m.onPull=function(){_.read().then(function(D){var L=D.value,$=D.done;if($){m.close();return}(0,_util.assert)((0,_util.isArrayBuffer)(L),"GetRangeReader - expected an ArrayBuffer."),m.enqueue(new Uint8Array(L),1,[L])}).catch(function(D){m.error(D)})},m.onCancel=function(D){_.cancel(D),m.ready.catch(function(L){if(!t.destroyed)throw L})}}),r.on("GetDoc",function(f){var m=f.pdfInfo;t._numPages=m.numPages,t._htmlForXfa=m.htmlForXfa,delete m.htmlForXfa,i._capability.resolve(new PDFDocumentProxy(m,t))}),r.on("DocException",function(f){var m;switch(f.name){case"PasswordException":m=new _util.PasswordException(f.message,f.code);break;case"InvalidPDFException":m=new _util.InvalidPDFException(f.message);break;case"MissingPDFException":m=new _util.MissingPDFException(f.message);break;case"UnexpectedResponseException":m=new _util.UnexpectedResponseException(f.message,f.status);break;case"UnknownErrorException":m=new _util.UnknownErrorException(f.message,f.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}i._capability.reject(m)}),r.on("PasswordRequest",function(f){if(t._passwordCapability=(0,_util.createPromiseCapability)(),i.onPassword){var m=function(D){t._passwordCapability.resolve({password:D})};try{i.onPassword(m,f.code)}catch(_){t._passwordCapability.reject(_)}}else t._passwordCapability.reject(new _util.PasswordException(f.message,f.code));return t._passwordCapability.promise}),r.on("DataLoaded",function(f){var m;(m=i.onProgress)===null||m===void 0||m.call(i,{loaded:f.length,total:f.length}),t.downloadInfoCapability.resolve(f)}),r.on("StartRenderPage",function(f){if(!t.destroyed){var m=_classPrivateFieldGet(t,_pageCache).get(f.pageIndex);m._startRenderPage(f.transparency,f.cacheKey)}}),r.on("commonobj",function(f){var m,_=_slicedToArray(f,3),D=_[0],L=_[1],$=_[2];if(!t.destroyed&&!t.commonObjs.has(D))switch(L){case"Font":var j=t._params;if("error"in $){var V=$.error;(0,_util.warn)("Error during font loading: ".concat(V)),t.commonObjs.resolve(D,V);break}var O=null;j.pdfBug&&(m=globalThis.FontInspector)!==null&&m!==void 0&&m.enabled&&(O={registerFont:function(x,I){globalThis.FontInspector.fontAdded(x,I)}});var P=new _font_loader.FontFaceObject($,{isEvalSupported:j.isEvalSupported,disableFontFace:j.disableFontFace,ignoreErrors:j.ignoreErrors,onUnsupportedFeature:t._onUnsupportedFeature.bind(t),fontRegistry:O});t.fontLoader.bind(P).catch(function(F){return r.sendWithPromise("FontFallback",{id:D})}).finally(function(){!j.fontExtraProperties&&P.data&&(P.data=null),t.commonObjs.resolve(D,P)});break;case"FontPath":case"Image":t.commonObjs.resolve(D,$);break;default:throw new Error("Got unknown common object type ".concat(L))}}),r.on("obj",function(f){var m,_=_slicedToArray(f,4),D=_[0],L=_[1],$=_[2],j=_[3];if(!t.destroyed){var V=_classPrivateFieldGet(t,_pageCache).get(L);if(!V.objs.has(D))switch($){case"Image":V.objs.resolve(D,j);var O=8e6;(j==null||(m=j.data)===null||m===void 0?void 0:m.length)>O&&(V.cleanupAfterRender=!0);break;case"Pattern":V.objs.resolve(D,j);break;default:throw new Error("Got unknown object type ".concat($))}}}),r.on("DocProgress",function(f){var m;t.destroyed||(m=i.onProgress)===null||m===void 0||m.call(i,{loaded:f.loaded,total:f.total})}),r.on("DocStats",function(f){t.destroyed||_classPrivateFieldSet(t,_docStats,Object.freeze({streamTypes:Object.freeze(f.streamTypes),fontTypes:Object.freeze(f.fontTypes)}))}),r.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),r.on("FetchBuiltInCMap",function(f){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.CMapReaderFactory?t.CMapReaderFactory.fetch(f):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}),r.on("FetchStandardFontData",function(f){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.StandardFontDataFactory?t.StandardFontDataFactory.fetch(f):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))})}},{key:"_onUnsupportedFeature",value:function(t){var r,i,f=t.featureId;this.destroyed||(r=(i=this.loadingTask).onUnsupportedFeature)===null||r===void 0||r.call(i,f)}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"getPage",value:function(t){var r=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request"));var i=t-1,f=_classPrivateFieldGet(this,_pagePromises).get(i);if(f)return f;var m=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then(function(_){if(r.destroyed)throw new Error("Transport destroyed");var D=new PDFPageProxy(i,_,r,r._params.ownerDocument,r._params.pdfBug);return _classPrivateFieldGet(r,_pageCache).set(i,D),D});return _classPrivateFieldGet(this,_pagePromises).set(i,m),m}},{key:"getPageIndex",value:function(t){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:t})}},{key:"getAnnotations",value:function(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"saveDocument",value:function(){var t,r,i=this;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:(t=(r=this._fullReader)===null||r===void 0?void 0:r.filename)!==null&&t!==void 0?t:null}).finally(function(){i.annotationStorage.resetModified()})}},{key:"getFieldObjects",value:function(){return this._getFieldObjectsPromise||(this._getFieldObjectsPromise=this.messageHandler.sendWithPromise("GetFieldObjects",null))}},{key:"hasJSActions",value:function(){return this._hasJSActionsPromise||(this._hasJSActionsPromise=this.messageHandler.sendWithPromise("HasJSActions",null))}},{key:"getCalculationOrderIds",value:function(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{key:"getPageLabels",value:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getJavaScript",value:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}},{key:"getDocJSActions",value:function(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}},{key:"getPageJSActions",value:function(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(function(t){return new _optional_content_config.OptionalContentConfig(t)})}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var t=this;return _classPrivateFieldGet(this,_metadataPromise)||_classPrivateFieldSet(this,_metadataPromise,this.messageHandler.sendWithPromise("GetMetadata",null).then(function(r){var i,f,m,_;return{info:r[0],metadata:r[1]?new _metadata.Metadata(r[1]):null,contentDispositionFilename:(i=(f=t._fullReader)===null||f===void 0?void 0:f.filename)!==null&&i!==void 0?i:null,contentLength:(m=(_=t._fullReader)===null||_===void 0?void 0:_.contentLength)!==null&&m!==void 0?m:null}}))}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){var i,f,m,_,D,L=arguments;return _regenerator.default.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return i=L.length>0&&L[0]!==void 0?L[0]:!1,j.next=3,this.messageHandler.sendWithPromise("Cleanup",null);case 3:if(!this.destroyed){j.next=5;break}return j.abrupt("return");case 5:f=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values()),j.prev=6,f.s();case 8:if((m=f.n()).done){j.next=15;break}if(_=m.value,D=_.cleanup(),D){j.next=13;break}throw new Error("startCleanup: Page ".concat(_.pageNumber," is currently rendering."));case 13:j.next=8;break;case 15:j.next=20;break;case 17:j.prev=17,j.t0=j.catch(6),f.e(j.t0);case 20:return j.prev=20,f.f(),j.finish(20);case 23:this.commonObjs.clear(),i||this.fontLoader.clear(),_classPrivateFieldSet(this,_metadataPromise,null),this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null;case 28:case"end":return j.stop()}},r,this,[[6,17,20,23]])}));function t(){return a.apply(this,arguments)}return t}()},{key:"loadingParams",get:function(){var t=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,enableXfa:t.enableXfa})}}]),y}(),PDFObjects=function(){function y(){_classCallCheck(this,y),this._objs=Object.create(null)}return _createClass(y,[{key:"_ensureObj",value:function(t){return this._objs[t]?this._objs[t]:this._objs[t]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}},{key:"get",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(r)return this._ensureObj(t).capability.promise.then(r),null;var i=this._objs[t];if(!i||!i.resolved)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return i.data}},{key:"has",value:function(t){var r=this._objs[t];return(r==null?void 0:r.resolved)||!1}},{key:"resolve",value:function(t,r){var i=this._ensureObj(t);i.resolved=!0,i.data=r,i.capability.resolve(r)}},{key:"clear",value:function(){this._objs=Object.create(null)}}]),y}(),RenderTask=function(){function y(a){_classCallCheck(this,y),this._internalRenderTask=a,this.onContinue=null}return _createClass(y,[{key:"promise",get:function(){return this._internalRenderTask.capability.promise}},{key:"cancel",value:function(){this._internalRenderTask.cancel()}}]),y}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function y(a){var t=a.callback,r=a.params,i=a.objs,f=a.commonObjs,m=a.annotationCanvasMap,_=a.operatorList,D=a.pageIndex,L=a.canvasFactory,$=a.useRequestAnimationFrame,j=$===void 0?!1:$,V=a.pdfBug,O=V===void 0?!1:V;_classCallCheck(this,y),this.callback=t,this.params=r,this.objs=i,this.commonObjs=f,this.annotationCanvasMap=m,this.operatorListIdx=null,this.operatorList=_,this._pageIndex=D,this.canvasFactory=L,this._pdfBug=O,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=j===!0&&typeof window!="undefined",this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=r.canvasContext.canvas}return _createClass(y,[{key:"completed",get:function(){return this.capability.promise.catch(function(){})}},{key:"initializeGraphics",value:function(t){var r,i=t.transparency,f=i===void 0?!1:i,m=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(y.canvasInUse.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");y.canvasInUse.add(this._canvas)}this._pdfBug&&(r=globalThis.StepperManager)!==null&&r!==void 0&&r.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var _=this.params,D=_.canvasContext,L=_.viewport,$=_.transform,j=_.imageLayer,V=_.background;this.gfx=new _canvas.CanvasGraphics(D,this.commonObjs,this.objs,this.canvasFactory,j,m,this.annotationCanvasMap),this.gfx.beginDrawing({transform:$,viewport:L,transparency:f,background:V}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}}},{key:"cancel",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&y.canvasInUse.delete(this._canvas),this.callback(t||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),"canvas"))}},{key:"operatorListChanged",value:function(){if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}this.stepper&&this.stepper.updateOperatorList(this.operatorList),!this.running&&this._continue()}},{key:"_continue",value:function(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function(){var t=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){t._nextBound().catch(t._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:function(){var a=_asyncToGenerator(_regenerator.default.mark(function r(){return _regenerator.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!this.cancelled){f.next=2;break}return f.abrupt("return");case 2: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._canvas&&y.canvasInUse.delete(this._canvas),this.callback()));case 4:case"end":return f.stop()}},r,this)}));function t(){return a.apply(this,arguments)}return t}()}],[{key:"canvasInUse",get:function(){return(0,_util.shadow)(this,"canvasInUse",new WeakSet)}}]),y}(),version="2.12.313";exports.version=version;var build="a2ae56f39";exports.build=build},(y,a,t)=>{"use strict";function r(c){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(T){return typeof T}:r=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},r(c)}Object.defineProperty(a,"__esModule",{value:!0}),a.FontLoader=a.FontFaceObject=void 0;var i=m(t(2)),f=t(4);function m(c){return c&&c.__esModule?c:{default:c}}function _(c,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(b&&b.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),b&&D(c,b)}function D(c,b){return D=Object.setPrototypeOf||function(U,M){return U.__proto__=M,U},D(c,b)}function L(c){var b=V();return function(){var U=O(c),M;if(b){var G=O(this).constructor;M=Reflect.construct(U,arguments,G)}else M=U.apply(this,arguments);return $(this,M)}}function $(c,b){if(b&&(r(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(c)}function j(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function V(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function O(c){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},O(c)}function P(c,b,T,U,M,G,Z){try{var J=c[G](Z),ie=J.value}catch(H){T(H);return}J.done?b(ie):Promise.resolve(ie).then(U,M)}function F(c){return function(){var b=this,T=arguments;return new Promise(function(U,M){var G=c.apply(b,T);function Z(ie){P(G,U,M,Z,J,"next",ie)}function J(ie){P(G,U,M,Z,J,"throw",ie)}Z(void 0)})}}function x(c,b){var T=typeof Symbol!="undefined"&&c[Symbol.iterator]||c["@@iterator"];if(!T){if(Array.isArray(c)||(T=I(c))||b&&c&&typeof c.length=="number"){T&&(c=T);var U=0,M=function(){};return{s:M,n:function(){return U>=c.length?{done:!0}:{done:!1,value:c[U++]}},e:function(H){throw H},f:M}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var G=!0,Z=!1,J;return{s:function(){T=T.call(c)},n:function(){var H=T.next();return G=H.done,H},e:function(H){Z=!0,J=H},f:function(){try{!G&&T.return!=null&&T.return()}finally{if(Z)throw J}}}}function I(c,b){if(!!c){if(typeof c=="string")return g(c,b);var T=Object.prototype.toString.call(c).slice(8,-1);if(T==="Object"&&c.constructor&&(T=c.constructor.name),T==="Map"||T==="Set")return Array.from(c);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return g(c,b)}}function g(c,b){(b==null||b>c.length)&&(b=c.length);for(var T=0,U=new Array(b);T=14&&(M=!0)}return(0,f.shadow)(this,"isSyncFontLoadingSupported",M)}},{key:"_queueLoadingCallback",value:function(M){function G(){for((0,f.assert)(!J.done,"completeRequest() cannot be called twice."),J.done=!0;Z.requests.length>0&&Z.requests[0].done;){var ie=Z.requests.shift();setTimeout(ie.callback,0)}}var Z=this.loadingContext,J={id:"pdfjs-font-loading-".concat(Z.nextRequestId++),done:!1,complete:G,callback:M};return Z.requests.push(J),J}},{key:"_loadTestFont",get:function(){var M=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};return(0,f.shadow)(this,"_loadTestFont",M())}},{key:"_prepareFontLoadEvent",value:function(M,G,Z){function J(me,pe){return me.charCodeAt(pe)<<24|me.charCodeAt(pe+1)<<16|me.charCodeAt(pe+2)<<8|me.charCodeAt(pe+3)&255}function ie(me,pe,Ae,Pe){var _e=me.substring(0,pe),We=me.substring(pe+Ae);return _e+Pe+We}var H,q,R=this._document.createElement("canvas");R.width=1,R.height=1;var h=R.getContext("2d"),A=0;function E(me,pe){if(A++,A>30){(0,f.warn)("Load test font never loaded."),pe();return}h.font="30px "+me,h.fillText(".",0,20);var Ae=h.getImageData(0,0,1,1);if(Ae.data[3]>0){pe();return}setTimeout(E.bind(null,me,pe))}var K="lt".concat(Date.now()).concat(this.loadTestFontId++),te=this._loadTestFont,Y=976;te=ie(te,Y,K.length,K);var be=16,Ce=1482184792,we=J(te,be);for(H=0,q=K.length-3;H{"use strict";function r(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(v){return typeof v}:r=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},r(l)}Object.defineProperty(a,"__esModule",{value:!0}),a.NodeStandardFontDataFactory=a.NodeCanvasFactory=a.NodeCMapReaderFactory=void 0;var i=t(135),f=t(6),m=t(4);function _(l,u){for(var v=0;v{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.AnnotationStorage=void 0;var r=t(4);function i(P,F){return L(P)||D(P,F)||m(P,F)||f()}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(P,F){if(!!P){if(typeof P=="string")return _(P,F);var x=Object.prototype.toString.call(P).slice(8,-1);if(x==="Object"&&P.constructor&&(x=P.constructor.name),x==="Map"||x==="Set")return Array.from(P);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return _(P,F)}}function _(P,F){(F==null||F>P.length)&&(F=P.length);for(var x=0,I=new Array(F);x0?(0,r.objectFromMap)(this._storage):null}},{key:"size",get:function(){return this._storage.size}},{key:"_setModified",value:function(){this._modified||(this._modified=!0,typeof this.onSetModified=="function"&&this.onSetModified())}},{key:"resetModified",value:function(){this._modified&&(this._modified=!1,typeof this.onResetModified=="function"&&this.onResetModified())}},{key:"serializable",get:function(){return this._storage.size>0?this._storage:null}},{key:"lastModified",get:function(){return this._timeStamp.toString()}}]),P}();a.AnnotationStorage=O},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CanvasGraphics=void 0;var r=t(4),i=t(141),f=t(1);function m(S){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(s){return typeof s}:m=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},m(S)}function _(S,w){var s=typeof Symbol!="undefined"&&S[Symbol.iterator]||S["@@iterator"];if(!s){if(Array.isArray(S)||(s=O(S))||w&&S&&typeof S.length=="number"){s&&(S=s);var o=0,k=function(){};return{s:k,n:function(){return o>=S.length?{done:!0}:{done:!1,value:S[o++]}},e:function(ve){throw ve},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,W=!1,re;return{s:function(){s=s.call(S)},n:function(){var ve=s.next();return N=ve.done,ve},e:function(ve){W=!0,re=ve},f:function(){try{!N&&s.return!=null&&s.return()}finally{if(W)throw re}}}}function D(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function L(S,w){for(var s=0;sS.length)&&(w=S.length);for(var s=0,o=new Array(w);s0;)Pe[_e++]=We&Le?0:255,Le>>=1;var je=0;for(_e=0,Pe[_e]!==0&&(me[0]=1,++je),fe=1;fe>2)+(Pe[_e+1]?4:0)+(Pe[_e-pe+1]?8:0),s[le]&&(me[ve+fe]=s[le],++je),_e++;if(Pe[_e-pe]!==Pe[_e]&&(me[ve+fe]=Pe[_e]?2:4,++je),je>w)return null}for(_e=pe*(k-1),ve=W*N,Pe[_e]!==0&&(me[ve]=8,++je),fe=1;few)return null;var he=new Int32Array([0,N,-1,0,-N,0,0,0,1]),z=[];for(W=0;je&&W<=k;W++){for(var ee=W*N,X=ee+o;ee>4,me[ee]&=Q>>2|Q<<2),oe.push(ee%N,ee/N|0),me[ee]||--je}while(ne!==ee);z.push(oe),--W}}var Se=function(Fe){Fe.save(),Fe.scale(1/o,-1/k),Fe.translate(0,-k),Fe.beginPath();for(var De=0,Re=z.length;De0&&arguments[0]!==void 0?arguments[0]:i.PathType.FILL,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,k=[this.minX,this.minY,this.maxX,this.maxY];if(s===i.PathType.STROKE){o||(0,r.unreachable)("Stroke bounding box must include transform.");var N=r.Util.singularValueDecompose2dScale(o),W=N[0]*this.lineWidth/2,re=N[1]*this.lineWidth/2;k[0]-=W,k[1]-=re,k[2]+=W,k[3]+=re}return k}},{key:"updateClipFromPath",value:function(){var s=r.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(s||[0,0,0,0])}},{key:"startNewPathAndClipBox",value:function(s){this.clipBox=s,this.minX=Infinity,this.minY=Infinity,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.PathType.FILL,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.Util.intersect(this.clipBox,this.getPathBoundingBox(s,o))}}]),S}();function Z(S,w){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof ImageData!="undefined"&&w instanceof ImageData){S.putImageData(w,0,0);return}var o=w.height,k=w.width,N=o%d,W=(o-N)/d,re=N===0?W:W+1,fe=S.createImageData(k,d),ve=0,me,pe=w.data,Ae=fe.data,Pe,_e,We,Le,je,le,he,z;if(s)switch(s.length){case 1:je=s[0],le=s[0],he=s[0],z=s[0];break;case 4:je=s[0],le=s[1],he=s[2],z=s[3];break}if(w.kind===r.ImageKind.GRAYSCALE_1BPP){var ee=pe.byteLength,X=new Uint32Array(Ae.buffer,0,Ae.byteLength>>2),oe=X.length,ne=k+7>>3,Q=4294967295,de=r.IsLittleEndianCached.value?4278190080:255;if(z&&z[0]===255&&z[255]===0){var ce=[de,Q];Q=ce[0],de=ce[1]}for(Pe=0;Pene?k:Se*8-7,De=Fe&~7,Re=0,Ne=0;Ee>=1}for(;me=W&&(We=N,Le=k*We),me=0,_e=Le;_e--;)Ae[me++]=pe[ve++],Ae[me++]=pe[ve++],Ae[me++]=pe[ve++],Ae[me++]=255;if(Ue)for(var He=0;He>=1;S.putImageData(re,0,pe*d)}}function ie(S,w){for(var s=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],o=0,k=s.length;o>8,S[N-2]=S[N-2]*W+s*re>>8,S[N-1]=S[N-1]*W+o*re>>8}}}function R(S,w,s){for(var o=S.length,k=1/255,N=3;N>8]>>8:w[k]*N>>16}}function A(S,w,s,o,k,N,W,re,fe,ve,me){var pe=!!N,Ae=pe?N[0]:0,Pe=pe?N[1]:0,_e=pe?N[2]:0,We;k==="Luminosity"?We=h:We=R;for(var Le=1048576,je=Math.min(o,Math.ceil(Le/s)),le=0;lel&&typeof k=="function",pe=me?Date.now()+p:0,Ae=0,Pe=this.commonObjs,_e=this.objs,We;;){if(N!==void 0&&fe===N.nextBreakPoint)return N.breakIt(fe,k),fe;if(We=re[fe],We!==r.OPS.dependency)this[We].apply(this,W[fe]);else{var Le=_(W[fe]),je;try{for(Le.s();!(je=Le.n()).done;){var le=je.value,he=le.startsWith("g_")?Pe:_e;if(!he.has(le))return he.get(le,k),fe}}catch(z){Le.e(z)}finally{Le.f()}}if(fe++,fe===ve)return fe;if(me&&++Ae>l){if(Date.now()>pe)return k(),fe;Ae=0}}}},{key:"endDrawing",value:function(){for(;this.stateStack.length||this.current.activeSMask!==null;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.cachedPatterns.clear(),this.imageLayer&&this.imageLayer.endLayout()}},{key:"_scaleImage",value:function(s,o){for(var k=s.width,N=s.height,W=Math.max(Math.hypot(o[0],o[1]),1),re=Math.max(Math.hypot(o[2],o[3]),1),fe=k,ve=N,me="prescale1",pe,Ae;W>2&&fe>1||re>2&&ve>1;){var Pe=fe,_e=ve;W>2&&fe>1&&(Pe=Math.ceil(fe/2),W/=fe/Pe),re>2&&ve>1&&(_e=Math.ceil(ve/2),re/=ve/_e),pe=this.cachedCanvases.getCanvas(me,Pe,_e),Ae=pe.context,Ae.clearRect(0,0,Pe,_e),Ae.drawImage(s,0,0,fe,ve,0,0,Pe,_e),s=pe.canvas,fe=Pe,ve=_e,me=me==="prescale1"?"prescale2":"prescale1"}return{img:s,paintWidth:fe,paintHeight:ve}}},{key:"_createMaskCanvas",value:function(s){var o=this.ctx,k=s.width,N=s.height,W=this.current.fillColor,re=this.current.patternFill,fe=this.cachedCanvases.getCanvas("maskCanvas",k,N),ve=fe.context;J(ve,s);var me=o.mozCurrentTransform,pe=r.Util.transform(me,[1/k,0,0,-1/N,0,0]);pe=r.Util.transform(pe,[1,0,0,1,0,-N]);var Ae=r.Util.applyTransform([0,0],pe),Pe=r.Util.applyTransform([k,N],pe),_e=r.Util.normalizeRect([Ae[0],Ae[1],Pe[0],Pe[1]]),We=Math.ceil(_e[2]-_e[0]),Le=Math.ceil(_e[3]-_e[1]),je=this.cachedCanvases.getCanvas("fillCanvas",We,Le,!0),le=je.context,he=Math.min(Ae[0],Pe[0]),z=Math.min(Ae[1],Pe[1]);le.translate(-he,-z),le.transform.apply(le,pe);var ee=this._scaleImage(fe.canvas,le.mozCurrentTransformInverse);le.imageSmoothingEnabled=K(le.mozCurrentTransform,s.interpolate),le.drawImage(ee.img,0,0,ee.img.width,ee.img.height,0,0,k,N),le.globalCompositeOperation="source-in";var X=r.Util.transform(le.mozCurrentTransformInverse,[1,0,0,1,-he,-z]);return le.fillStyle=re?W.getPattern(o,this,X,i.PathType.FILL):W,le.fillRect(0,0,k,N),{canvas:je.canvas,offsetX:Math.round(he),offsetY:Math.round(z)}}},{key:"setLineWidth",value:function(s){this.current.lineWidth=s,this.ctx.lineWidth=s}},{key:"setLineCap",value:function(s){this.ctx.lineCap=te[s]}},{key:"setLineJoin",value:function(s){this.ctx.lineJoin=Y[s]}},{key:"setMiterLimit",value:function(s){this.ctx.miterLimit=s}},{key:"setDash",value:function(s,o){var k=this.ctx;k.setLineDash!==void 0&&(k.setLineDash(s),k.lineDashOffset=o)}},{key:"setRenderingIntent",value:function(s){}},{key:"setFlatness",value:function(s){}},{key:"setGState",value:function(s){for(var o=0,k=s.length;o=this.current.lineWidth?(o.save(),o.resetTransform(),o.lineWidth=Math.round(this._combinedScaleFactor),o.stroke(),o.restore()):(o.lineWidth=Math.max(W,this.current.lineWidth),o.stroke())}s&&this.consumePath(this.current.getClippedPathBoundingBox()),o.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(s){s=typeof s!="undefined"?s:!0;var o=this.ctx,k=this.current.fillColor,N=this.current.patternFill,W=!1;N&&(o.save(),o.fillStyle=k.getPattern(o,this,o.mozCurrentTransformInverse,i.PathType.FILL),W=!0);var re=this.current.getClippedPathBoundingBox();this.contentVisible&&re!==null&&(this.pendingEOFill?(o.fill("evenodd"),this.pendingEOFill=!1):o.fill()),W&&o.restore(),s&&this.consumePath(re)}},{key:"eoFill",value:function(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function(){this.consumePath()}},{key:"clip",value:function(){this.pendingClip=be}},{key:"eoClip",value:function(){this.pendingClip=Ce}},{key:"beginText",value:function(){this.current.textMatrix=r.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var s=this.pendingTextPaths,o=this.ctx;if(s===void 0){o.beginPath();return}o.save(),o.beginPath();for(var k=0;kg&&(me=g),this.current.fontSizeScale=o/me,this.ctx.font="".concat(fe," ").concat(re," ").concat(me,"px ").concat(ve)}}},{key:"setTextRenderingMode",value:function(s){this.current.textRenderingMode=s}},{key:"setTextRise",value:function(s){this.current.textRise=s}},{key:"moveText",value:function(s,o){this.current.x=this.current.lineX+=s,this.current.y=this.current.lineY+=o}},{key:"setLeadingMoveText",value:function(s,o){this.setLeading(-o),this.moveText(s,o)}},{key:"setTextMatrix",value:function(s,o,k,N,W,re){this.current.textMatrix=[s,o,k,N,W,re],this.current.textMatrixScale=Math.hypot(s,o),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function(s,o,k,N,W){var re=this.ctx,fe=this.current,ve=fe.font,me=fe.textRenderingMode,pe=fe.fontSize/fe.fontSizeScale,Ae=me&r.TextRenderingMode.FILL_STROKE_MASK,Pe=!!(me&r.TextRenderingMode.ADD_TO_PATH_FLAG),_e=fe.patternFill&&!ve.missingFile,We;if((ve.disableFontFace||Pe||_e)&&(We=ve.getPathGenerator(this.commonObjs,s)),ve.disableFontFace||_e?(re.save(),re.translate(o,k),re.beginPath(),We(re,pe),N&&re.setTransform.apply(re,N),(Ae===r.TextRenderingMode.FILL||Ae===r.TextRenderingMode.FILL_STROKE)&&re.fill(),(Ae===r.TextRenderingMode.STROKE||Ae===r.TextRenderingMode.FILL_STROKE)&&(W&&(re.resetTransform(),re.lineWidth=Math.round(this._combinedScaleFactor)),re.stroke()),re.restore()):((Ae===r.TextRenderingMode.FILL||Ae===r.TextRenderingMode.FILL_STROKE)&&re.fillText(s,o,k),(Ae===r.TextRenderingMode.STROKE||Ae===r.TextRenderingMode.FILL_STROKE)&&(W?(re.save(),re.moveTo(o,k),re.resetTransform(),re.lineWidth=Math.round(this._combinedScaleFactor),re.strokeText(s,0,0),re.restore()):re.strokeText(s,o,k))),Pe){var Le=this.pendingTextPaths||(this.pendingTextPaths=[]);Le.push({transform:re.mozCurrentTransform,x:o,y:k,fontSize:pe,addToPath:We})}}},{key:"isFontSubpixelAAEnabled",get:function(){var s=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10),o=s.context;o.scale(1.5,1),o.fillText("I",0,10);for(var k=o.getImageData(0,0,10,10).data,N=!1,W=3;W0&&k[W]<255){N=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",N)}},{key:"showText",value:function(s){var o=this.current,k=o.font;if(k.isType3Font)return this.showType3Text(s);var N=o.fontSize;if(N!==0){var W=this.ctx,re=o.fontSizeScale,fe=o.charSpacing,ve=o.wordSpacing,me=o.fontDirection,pe=o.textHScale*me,Ae=s.length,Pe=k.vertical,_e=Pe?1:-1,We=k.defaultVMetrics,Le=N*o.fontMatrix[0],je=o.textRenderingMode===r.TextRenderingMode.FILL&&!k.disableFontFace&&!o.patternFill;W.save(),W.transform.apply(W,o.textMatrix),W.translate(o.x,o.y+o.textRise),me>0?W.scale(pe,-1):W.scale(pe,1);var le;if(o.patternFill){W.save();var he=o.fillColor.getPattern(W,this,W.mozCurrentTransformInverse,i.PathType.FILL);le=W.mozCurrentTransform,W.restore(),W.fillStyle=he}var z=o.lineWidth,ee=!1,X=o.textMatrixScale;if(X===0||z===0){var oe=o.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;(oe===r.TextRenderingMode.STROKE||oe===r.TextRenderingMode.FILL_STROKE)&&(this._cachedGetSinglePixelWidth=null,z=this.getSinglePixelWidth(),ee=z<0)}else z/=X;re!==1&&(W.scale(re,re),z/=re),W.lineWidth=z;var ne=0,Q;for(Q=0;Q0){var Ue=W.measureText(Ee).width*1e3/N*re;if(Ne1&&arguments[1]!==void 0?arguments[1]:null,k;return this.cachedPatterns.has(s)?k=this.cachedPatterns.get(s):(k=(0,i.getShadingPattern)(this.objs.get(s)),this.cachedPatterns.set(s,k)),o&&(k.matrix=o),k}},{key:"shadingFill",value:function(s){if(!!this.contentVisible){var o=this.ctx;this.save();var k=this._getPattern(s);o.fillStyle=k.getPattern(o,this,o.mozCurrentTransformInverse,i.PathType.SHADING);var N=o.mozCurrentTransformInverse;if(N){var W=o.canvas,re=W.width,fe=W.height,ve=r.Util.applyTransform([0,0],N),me=r.Util.applyTransform([0,fe],N),pe=r.Util.applyTransform([re,0],N),Ae=r.Util.applyTransform([re,fe],N),Pe=Math.min(ve[0],me[0],pe[0],Ae[0]),_e=Math.min(ve[1],me[1],pe[1],Ae[1]),We=Math.max(ve[0],me[0],pe[0],Ae[0]),Le=Math.max(ve[1],me[1],pe[1],Ae[1]);this.ctx.fillRect(Pe,_e,We-Pe,Le-_e)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){(0,r.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){(0,r.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(s,o){if(!!this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(s)&&s.length===6&&this.transform.apply(this,s),this.baseTransform=this.ctx.mozCurrentTransform,o)){var k=o[2]-o[0],N=o[3]-o[1];this.ctx.rect(o[0],o[1],k,N),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,o[0],o[1]),this.current.updatePathMinMax(this.ctx.mozCurrentTransform,o[2],o[3]),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){!this.contentVisible||(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(s){if(!!this.contentVisible){this.save();var o=this.suspendedCtx;this.current.activeSMask&&(this.suspendedCtx=null,this.current.activeSMask=null);var k=this.ctx;s.isolated||(0,r.info)("TODO: Support non-isolated groups."),s.knockout&&(0,r.warn)("Knockout groups not supported.");var N=k.mozCurrentTransform;if(s.matrix&&k.transform.apply(k,s.matrix),!s.bbox)throw new Error("Bounding box is required.");var W=r.Util.getAxialAlignedBoundingBox(s.bbox,k.mozCurrentTransform),re=[0,0,k.canvas.width,k.canvas.height];W=r.Util.intersect(W,re)||[0,0,0,0];var fe=Math.floor(W[0]),ve=Math.floor(W[1]),me=Math.max(Math.ceil(W[2])-fe,1),pe=Math.max(Math.ceil(W[3])-ve,1),Ae=1,Pe=1;me>B&&(Ae=me/B,me=B),pe>B&&(Pe=pe/B,pe=B),this.current.startNewPathAndClipBox([0,0,me,pe]);var _e="groupAt"+this.groupLevel;s.smask&&(_e+="_smask_"+this.smaskCounter++%2);var We=this.cachedCanvases.getCanvas(_e,me,pe,!0),Le=We.context;Le.scale(1/Ae,1/Pe),Le.translate(-fe,-ve),Le.transform.apply(Le,N),s.smask?this.smaskStack.push({canvas:We.canvas,context:Le,offsetX:fe,offsetY:ve,scaleX:Ae,scaleY:Pe,subtype:s.smask.subtype,backdrop:s.smask.backdrop,transferMap:s.smask.transferMap||null,startTransformInverse:null}):(k.setTransform(1,0,0,1,0,0),k.translate(fe,ve),k.scale(Ae,Pe),k.save()),ie(k,Le),this.ctx=Le,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push({ctx:k,suspendedCtx:o}),this.groupLevel++}}},{key:"endGroup",value:function(s){if(!!this.contentVisible){this.groupLevel--;var o=this.ctx,k=this.groupStack.pop(),N=k.ctx,W=k.suspendedCtx;if(this.ctx=N,this.ctx.imageSmoothingEnabled=!1,W&&(this.suspendedCtx=W),s.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();var re=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,re);var fe=r.Util.getAxialAlignedBoundingBox([0,0,o.canvas.width,o.canvas.height],re);this.ctx.drawImage(o.canvas,0,0),this.ctx.restore(),this.compose(fe)}}}},{key:"beginAnnotations",value:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}},{key:"endAnnotations",value:function(){this.restore()}},{key:"beginAnnotation",value:function(s,o,k,N,W){if(this.save(),Array.isArray(o)&&o.length===4){var re=o[2]-o[0],fe=o[3]-o[1];if(W&&this.annotationCanvasMap){k=k.slice(),k[4]-=o[0],k[5]-=o[1],o=o.slice(),o[0]=o[1]=0,o[2]=re,o[3]=fe;var ve=r.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),me=j(ve,2),pe=me[0],Ae=me[1],Pe=this.viewportScale,_e=Math.ceil(re*this.outputScaleX*Pe),We=Math.ceil(fe*this.outputScaleY*Pe);this.annotationCanvas=this.canvasFactory.create(_e,We);var Le=this.annotationCanvas,je=Le.canvas,le=Le.context;je.style.width="calc(".concat(re,"px * var(--viewport-scale-factor))"),je.style.height="calc(".concat(fe,"px * var(--viewport-scale-factor))"),this.annotationCanvasMap.set(s,je),this.annotationCanvas.savedCtx=this.ctx,this.ctx=le,this.ctx.setTransform(pe,0,0,-Ae,0,fe*Ae),T(this.ctx),H(this.ctx)}else H(this.ctx),this.ctx.rect(o[0],o[1],re,fe),this.clip(),this.endPath()}this.current=new G(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,k),this.transform.apply(this,N)}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore()}},{key:"paintImageMaskXObject",value:function(s){if(!!this.contentVisible){var o=this.ctx,k=s.width,N=s.height,W=this.processingType3;if(u&&W&&W.compiled===void 0&&(k<=v&&N<=v?W.compiled=M({data:s.data,width:k,height:N}):W.compiled=null),W!=null&&W.compiled){W.compiled(o);return}var re=this._createMaskCanvas(s),fe=re.canvas;o.save(),o.setTransform(1,0,0,1,0,0),o.drawImage(fe,re.offsetX,re.offsetY),o.restore(),this.compose()}}},{key:"paintImageMaskXObjectRepeat",value:function(s,o){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,W=arguments.length>4?arguments[4]:void 0,re=arguments.length>5?arguments[5]:void 0;if(!!this.contentVisible){var fe=this.ctx;fe.save();var ve=fe.mozCurrentTransform;fe.transform(o,k,N,W,0,0);var me=this._createMaskCanvas(s);fe.setTransform(1,0,0,1,0,0);for(var pe=0,Ae=re.length;pe1?this._cachedGetSinglePixelWidth=-(this._combinedScaleFactor*W):o>Number.EPSILON?this._cachedGetSinglePixelWidth=W:this._cachedGetSinglePixelWidth=1}return this._cachedGetSinglePixelWidth}},{key:"getCanvasPosition",value:function(s,o){var k=this.ctx.mozCurrentTransform;return[k[0]*s+k[2]*o+k[4],k[1]*s+k[3]*o+k[5]]}},{key:"isContentVisible",value:function(){for(var s=this.markedContentStack.length-1;s>=0;s--)if(!this.markedContentStack[s].visible)return!1;return!0}}]),S}();a.CanvasGraphics=we;for(var Me in r.OPS)we.prototype[Me]!==void 0&&(we.prototype[r.OPS[Me]]=we.prototype[Me])},(y,a,t)=>{"use strict";function r(M){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(Z){return typeof Z}:r=function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},r(M)}Object.defineProperty(a,"__esModule",{value:!0}),a.TilingPattern=a.PathType=void 0,a.getShadingPattern=b;var i=t(4);function f(M,G){var Z=typeof Symbol!="undefined"&&M[Symbol.iterator]||M["@@iterator"];if(!Z){if(Array.isArray(M)||(Z=m(M))||G&&M&&typeof M.length=="number"){Z&&(M=Z);var J=0,ie=function(){};return{s:ie,n:function(){return J>=M.length?{done:!0}:{done:!1,value:M[J++]}},e:function(A){throw A},f:ie}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var H=!0,q=!1,R;return{s:function(){Z=Z.call(M)},n:function(){var A=Z.next();return H=A.done,A},e:function(A){q=!0,R=A},f:function(){try{!H&&Z.return!=null&&Z.return()}finally{if(q)throw R}}}}function m(M,G){if(!!M){if(typeof M=="string")return _(M,G);var Z=Object.prototype.toString.call(M).slice(8,-1);if(Z==="Object"&&M.constructor&&(Z=M.constructor.name),Z==="Map"||Z==="Set")return Array.from(M);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return _(M,G)}}function _(M,G){(G==null||G>M.length)&&(G=M.length);for(var Z=0,J=new Array(G);Zh[J+1]&&(te=Z,Z=J,J=te,te=H,H=q,q=te),h[J+1]>h[ie+1]&&(te=J,J=ie,ie=te,te=q,q=R,R=te),h[Z+1]>h[J+1]&&(te=Z,Z=J,J=te,te=H,H=q,q=te);var Y=(h[Z]+G.offsetX)*G.scaleX,be=(h[Z+1]+G.offsetY)*G.scaleY,Ce=(h[J]+G.offsetX)*G.scaleX,we=(h[J+1]+G.offsetY)*G.scaleY,Me=(h[ie]+G.offsetX)*G.scaleX,S=(h[ie+1]+G.offsetY)*G.scaleY;if(!(be>=S))for(var w=A[H],s=A[H+1],o=A[H+2],k=A[q],N=A[q+1],W=A[q+2],re=A[R],fe=A[R+1],ve=A[R+2],me=Math.round(be),pe=Math.round(S),Ae,Pe,_e,We,Le,je,le,he,z=me;z<=pe;z++){if(zS?X=1:we===S?X=0:X=(we-z)/(we-S),Ae=Ce-(Ce-Me)*X,Pe=k-(k-re)*X,_e=N-(N-fe)*X,We=W-(W-ve)*X}var oe=void 0;zS?oe=1:oe=(be-z)/(be-S),Le=Y-(Y-Me)*oe,je=w-(w-re)*oe,le=s-(s-fe)*oe,he=o-(o-ve)*oe;for(var ne=Math.round(Math.min(Ae,Le)),Q=Math.round(Math.max(Ae,Le)),de=K*z+ne*4,ce=ne;ce<=Q;ce++)oe=(Ae-ce)/(Ae-Le),oe<0?oe=0:oe>1&&(oe=1),E[de++]=Pe-(Pe-je)*oe|0,E[de++]=_e-(_e-le)*oe|0,E[de++]=We-(We-he)*oe|0,E[de++]=255}}function v(M,G,Z){var J=G.coords,ie=G.colors,H,q;switch(G.type){case"lattice":var R=G.verticesPerRow,h=Math.floor(J.length/R)-1,A=R-1;for(H=0;H=H?q=H:ie=q/Z,{scale:ie,size:q}}},{key:"clipBbox",value:function(Z,J,ie,H,q){var R=H-J,h=q-ie;Z.ctx.rect(J,ie,R,h),Z.clip(),Z.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(Z,J,ie){var H=Z.ctx,q=Z.current;switch(J){case T.COLORED:var R=this.ctx;H.fillStyle=R.fillStyle,H.strokeStyle=R.strokeStyle,q.fillColor=R.fillStyle,q.strokeColor=R.strokeStyle;break;case T.UNCOLORED:var h=i.Util.makeHexColor(ie[0],ie[1],ie[2]);H.fillStyle=h,H.strokeStyle=h,q.fillColor=h,q.strokeColor=h;break;default:throw new i.FormatError("Unsupported paint type: ".concat(J))}}},{key:"getPattern",value:function(Z,J,ie,H){var q=ie;H!==g.SHADING&&(q=i.Util.transform(q,J.baseTransform),this.matrix&&(q=i.Util.transform(q,this.matrix)));var R=this.createPatternCanvas(J),h=new DOMMatrix(q);h=h.translate(R.offsetX,R.offsetY),h=h.scale(1/R.scaleX,1/R.scaleY);var A=Z.createPattern(R.canvas,"repeat");try{A.setTransform(h)}catch(E){(0,i.warn)('TilingPattern.getPattern: "'.concat(E==null?void 0:E.message,'".'))}return A}}],[{key:"MAX_PATTERN_SIZE",get:function(){return(0,i.shadow)(this,"MAX_PATTERN_SIZE",3e3)}}]),M}();a.TilingPattern=U},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.GlobalWorkerOptions=void 0;var t=Object.create(null);a.GlobalWorkerOptions=t,t.workerPort=t.workerPort===void 0?null:t.workerPort,t.workerSrc=t.workerSrc===void 0?"":t.workerSrc},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MessageHandler=void 0;var r=f(t(2)),i=t(4);function f(x){return x&&x.__esModule?x:{default:x}}function m(x,I,g,B,p,l,u){try{var v=x[l](u),d=v.value}catch(c){g(c);return}v.done?I(d):Promise.resolve(d).then(B,p)}function _(x){return function(){var I=this,g=arguments;return new Promise(function(B,p){var l=x.apply(I,g);function u(d){m(l,B,p,u,v,"next",d)}function v(d){m(l,B,p,u,v,"throw",d)}u(void 0)})}}function D(x,I){if(!(x instanceof I))throw new TypeError("Cannot call a class as a function")}function L(x,I){for(var g=0;g1&&arguments[1]!==void 0?arguments[1]:1,M=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var G=this.desiredSize;this.desiredSize-=U,G>0&&this.desiredSize<=0&&(this.sinkCapability=(0,i.createPromiseCapability)(),this.ready=this.sinkCapability.promise),u.postMessage({sourceName:p,targetName:l,stream:O.ENQUEUE,streamId:B,chunk:T},M)}},close:function(){this.isCancelled||(this.isCancelled=!0,u.postMessage({sourceName:p,targetName:l,stream:O.CLOSE,streamId:B}),delete v.streamSinks[B])},error:function(T){(0,i.assert)(T instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,u.postMessage({sourceName:p,targetName:l,stream:O.ERROR,streamId:B,reason:P(T)}))},sinkCapability:(0,i.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:g.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[B]=c,new Promise(function(b){b(d(g.data,c))}).then(function(){u.postMessage({sourceName:p,targetName:l,stream:O.START_COMPLETE,streamId:B,success:!0})},function(b){u.postMessage({sourceName:p,targetName:l,stream:O.START_COMPLETE,streamId:B,reason:P(b)})})}},{key:"_processStreamMessage",value:function(g){var B=g.streamId,p=this.sourceName,l=g.sourceName,u=this.comObj,v=this.streamControllers[B],d=this.streamSinks[B];switch(g.stream){case O.START_COMPLETE:g.success?v.startCall.resolve():v.startCall.reject(P(g.reason));break;case O.PULL_COMPLETE:g.success?v.pullCall.resolve():v.pullCall.reject(P(g.reason));break;case O.PULL:if(!d){u.postMessage({sourceName:p,targetName:l,stream:O.PULL_COMPLETE,streamId:B,success:!0});break}d.desiredSize<=0&&g.desiredSize>0&&d.sinkCapability.resolve(),d.desiredSize=g.desiredSize,new Promise(function(c){c(d.onPull&&d.onPull())}).then(function(){u.postMessage({sourceName:p,targetName:l,stream:O.PULL_COMPLETE,streamId:B,success:!0})},function(c){u.postMessage({sourceName:p,targetName:l,stream:O.PULL_COMPLETE,streamId:B,reason:P(c)})});break;case O.ENQUEUE:if((0,i.assert)(v,"enqueue should have stream controller"),v.isClosed)break;v.controller.enqueue(g.chunk);break;case O.CLOSE:if((0,i.assert)(v,"close should have stream controller"),v.isClosed)break;v.isClosed=!0,v.controller.close(),this._deleteStreamController(v,B);break;case O.ERROR:(0,i.assert)(v,"error should have stream controller"),v.controller.error(P(g.reason)),this._deleteStreamController(v,B);break;case O.CANCEL_COMPLETE:g.success?v.cancelCall.resolve():v.cancelCall.reject(P(g.reason)),this._deleteStreamController(v,B);break;case O.CANCEL:if(!d)break;new Promise(function(c){c(d.onCancel&&d.onCancel(P(g.reason)))}).then(function(){u.postMessage({sourceName:p,targetName:l,stream:O.CANCEL_COMPLETE,streamId:B,success:!0})},function(c){u.postMessage({sourceName:p,targetName:l,stream:O.CANCEL_COMPLETE,streamId:B,reason:P(c)})}),d.sinkCapability.reject(P(g.reason)),d.isCancelled=!0,delete this.streamSinks[B];break;default:throw new Error("Unexpected stream case")}}},{key:"_deleteStreamController",value:function(){var I=_(r.default.mark(function B(p,l){return r.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,Promise.allSettled([p.startCall&&p.startCall.promise,p.pullCall&&p.pullCall.promise,p.cancelCall&&p.cancelCall.promise]);case 2:delete this.streamControllers[l];case 3:case"end":return v.stop()}},B,this)}));function g(B,p){return I.apply(this,arguments)}return g}()},{key:"destroy",value:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]),x}();a.MessageHandler=F},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Metadata=void 0;var r=t(4);function i(I,g){if(!(I instanceof g))throw new TypeError("Cannot call a class as a function")}function f(I,g){for(var B=0;B{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.OptionalContentConfig=void 0;var r=t(4);function i(V,O){var P=typeof Symbol!="undefined"&&V[Symbol.iterator]||V["@@iterator"];if(!P){if(Array.isArray(V)||(P=f(V))||O&&V&&typeof V.length=="number"){P&&(V=P);var F=0,x=function(){};return{s:x,n:function(){return F>=V.length?{done:!0}:{done:!1,value:V[F++]}},e:function(l){throw l},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I=!0,g=!1,B;return{s:function(){P=P.call(V)},n:function(){var l=P.next();return I=l.done,l},e:function(l){g=!0,B=l},f:function(){try{!I&&P.return!=null&&P.return()}finally{if(g)throw B}}}}function f(V,O){if(!!V){if(typeof V=="string")return m(V,O);var P=Object.prototype.toString.call(V).slice(8,-1);if(P==="Object"&&V.constructor&&(P=V.constructor.name),P==="Map"||P==="Set")return Array.from(V);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return m(V,O)}}function m(V,O){(O==null||O>V.length)&&(O=V.length);for(var P=0,F=new Array(O);P1&&arguments[1]!==void 0?arguments[1]:!0;if(!this._groups.has(P)){(0,r.warn)("Optional content group not found: ".concat(P));return}this._groups.get(P).visible=!!F}},{key:"getOrder",value:function(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}},{key:"getGroups",value:function(){return this._groups.size>0?(0,r.objectFromMap)(this._groups):null}},{key:"getGroup",value:function(P){return this._groups.get(P)||null}}]),V}();a.OptionalContentConfig=j},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PDFDataTransportStream=void 0;var r=m(t(2)),i=t(4),f=t(1);function m(g){return g&&g.__esModule?g:{default:g}}function _(g,B,p,l,u,v,d){try{var c=g[v](d),b=c.value}catch(T){p(T);return}c.done?B(b):Promise.resolve(b).then(l,u)}function D(g){return function(){var B=this,p=arguments;return new Promise(function(l,u){var v=g.apply(B,p);function d(b){_(v,l,u,d,c,"next",b)}function c(b){_(v,l,u,d,c,"throw",b)}d(void 0)})}}function L(g,B){var p=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(!p){if(Array.isArray(g)||(p=$(g))||B&&g&&typeof g.length=="number"){p&&(g=p);var l=0,u=function(){};return{s:u,n:function(){return l>=g.length?{done:!0}:{done:!1,value:g[l++]}},e:function(T){throw T},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var v=!0,d=!1,c;return{s:function(){p=p.call(g)},n:function(){var T=p.next();return v=T.done,T},e:function(T){d=!0,c=T},f:function(){try{!v&&p.return!=null&&p.return()}finally{if(d)throw c}}}}function $(g,B){if(!!g){if(typeof g=="string")return j(g,B);var p=Object.prototype.toString.call(g).slice(8,-1);if(p==="Object"&&g.constructor&&(p=g.constructor.name),p==="Map"||p==="Set")return Array.from(g);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return j(g,B)}}function j(g,B){(B==null||B>g.length)&&(B=g.length);for(var p=0,l=new Array(B);p0){var v=new Uint8Array(u).buffer;this._queuedChunks.push(v)}this._pdfDataRangeTransport=p,this._isStreamingSupported=!B.disableStream,this._isRangeSupported=!B.disableRange,this._contentLength=B.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(d,c){l._onReceiveData({begin:d,chunk:c})}),this._pdfDataRangeTransport.addProgressListener(function(d,c){l._onProgress({loaded:d,total:c})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(d){l._onReceiveData({chunk:d})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){l._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}return P(g,[{key:"_onReceiveData",value:function(p){var l=new Uint8Array(p.chunk).buffer;if(p.begin===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(l):this._queuedChunks.push(l);else{var u=this._rangeReaders.some(function(v){return v._begin!==p.begin?!1:(v._enqueue(l),!0)});(0,i.assert)(u,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function(){var p,l;return(p=(l=this._fullRequestReader)===null||l===void 0?void 0:l._loaded)!==null&&p!==void 0?p:0}},{key:"_onProgress",value:function(p){if(p.total===void 0){var l=this._rangeReaders[0];l!=null&&l.onProgress&&l.onProgress({loaded:p.loaded})}else{var u=this._fullRequestReader;u!=null&&u.onProgress&&u.onProgress({loaded:p.loaded,total:p.total})}}},{key:"_onProgressiveDone",value:function(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(p){var l=this._rangeReaders.indexOf(p);l>=0&&this._rangeReaders.splice(l,1)}},{key:"getFullReader",value:function(){(0,i.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var p=this._queuedChunks;return this._queuedChunks=null,new x(this,p,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(p,l){if(l<=this._progressiveDataLength)return null;var u=new I(this,p,l);return this._pdfDataRangeTransport.requestDataRange(p,l),this._rangeReaders.push(u),u}},{key:"cancelAllRequests",value:function(p){this._fullRequestReader&&this._fullRequestReader.cancel(p);var l=L(this._rangeReaders.slice(0)),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;v.cancel(p)}}catch(d){l.e(d)}finally{l.f()}this._pdfDataRangeTransport.abort()}}]),g}();a.PDFDataTransportStream=F;var x=function(){function g(B,p){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;V(this,g),this._stream=B,this._done=l||!1,this._filename=(0,f.isPdfFile)(u)?u:null,this._queuedChunks=p||[],this._loaded=0;var v=L(this._queuedChunks),d;try{for(v.s();!(d=v.n()).done;){var c=d.value;this._loaded+=c.byteLength}}catch(b){v.e(b)}finally{v.f()}this._requests=[],this._headersReady=Promise.resolve(),B._fullRequestReader=this,this.onProgress=null}return P(g,[{key:"_enqueue",value:function(p){if(!this._done){if(this._requests.length>0){var l=this._requests.shift();l.resolve({value:p,done:!1})}else this._queuedChunks.push(p);this._loaded+=p.byteLength}}},{key:"headersReady",get:function(){return this._headersReady}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function(){return this._stream._contentLength}},{key:"read",value:function(){var B=D(r.default.mark(function l(){var u,v;return r.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!(this._queuedChunks.length>0)){c.next=3;break}return u=this._queuedChunks.shift(),c.abrupt("return",{value:u,done:!1});case 3:if(!this._done){c.next=5;break}return c.abrupt("return",{value:void 0,done:!0});case 5:return v=(0,i.createPromiseCapability)(),this._requests.push(v),c.abrupt("return",v.promise);case 8:case"end":return c.stop()}},l,this)}));function p(){return B.apply(this,arguments)}return p}()},{key:"cancel",value:function(p){this._done=!0;var l=L(this._requests),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;v.resolve({value:void 0,done:!0})}}catch(d){l.e(d)}finally{l.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]),g}(),I=function(){function g(B,p,l){V(this,g),this._stream=B,this._begin=p,this._end=l,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return P(g,[{key:"_enqueue",value:function(p){if(!this._done){if(this._requests.length===0)this._queuedChunk=p;else{var l=this._requests.shift();l.resolve({value:p,done:!1});var u=L(this._requests),v;try{for(u.s();!(v=u.n()).done;){var d=v.value;d.resolve({value:void 0,done:!0})}}catch(c){u.e(c)}finally{u.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var B=D(r.default.mark(function l(){var u,v;return r.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!this._queuedChunk){c.next=4;break}return u=this._queuedChunk,this._queuedChunk=null,c.abrupt("return",{value:u,done:!1});case 4:if(!this._done){c.next=6;break}return c.abrupt("return",{value:void 0,done:!0});case 6:return v=(0,i.createPromiseCapability)(),this._requests.push(v),c.abrupt("return",v.promise);case 9:case"end":return c.stop()}},l,this)}));function p(){return B.apply(this,arguments)}return p}()},{key:"cancel",value:function(p){this._done=!0;var l=L(this._requests),u;try{for(l.s();!(u=l.n()).done;){var v=u.value;v.resolve({value:void 0,done:!0})}}catch(d){l.e(d)}finally{l.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]),g}()},(y,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.XfaText=void 0;function t(L,$){var j=typeof Symbol!="undefined"&&L[Symbol.iterator]||L["@@iterator"];if(!j){if(Array.isArray(L)||(j=r(L))||$&&L&&typeof L.length=="number"){j&&(L=j);var V=0,O=function(){};return{s:O,n:function(){return V>=L.length?{done:!0}:{done:!1,value:L[V++]}},e:function(g){throw g},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var P=!0,F=!1,x;return{s:function(){j=j.call(L)},n:function(){var g=j.next();return P=g.done,g},e:function(g){F=!0,x=g},f:function(){try{!P&&j.return!=null&&j.return()}finally{if(F)throw x}}}}function r(L,$){if(!!L){if(typeof L=="string")return i(L,$);var j=Object.prototype.toString.call(L).slice(8,-1);if(j==="Object"&&L.constructor&&(j=L.constructor.name),j==="Map"||j==="Set")return Array.from(L);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return i(L,$)}}function i(L,$){($==null||$>L.length)&&($=L.length);for(var j=0,V=new Array($);j<$;j++)V[j]=L[j];return V}function f(L,$){if(!(L instanceof $))throw new TypeError("Cannot call a class as a function")}function m(L,$){for(var j=0;j<$.length;j++){var V=$[j];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(L,V.key,V)}}function _(L,$,j){return $&&m(L.prototype,$),j&&m(L,j),L}var D=function(){function L(){f(this,L)}return _(L,null,[{key:"textContent",value:function(j){var V=[],O={items:V,styles:Object.create(null)};function P(F){var x;if(!!F){var I=null,g=F.name;if(g==="#text")I=F.value;else if(L.shouldBuildText(g))F!=null&&(x=F.attributes)!==null&&x!==void 0&&x.textContent?I=F.attributes.textContent:F.value&&(I=F.value);else return;if(I!==null&&V.push({str:I}),!!F.children){var B=t(F.children),p;try{for(B.s();!(p=B.n()).done;){var l=p.value;P(l)}}catch(u){B.e(u)}finally{B.f()}}}}return P(j),O}},{key:"shouldBuildText",value:function(j){return!(j==="textarea"||j==="input"||j==="option"||j==="select")}}]),L}();a.XfaText=D},(y,a,t)=>{"use strict";function r(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(z){return typeof z}:r=function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},r(le)}Object.defineProperty(a,"__esModule",{value:!0}),a.AnnotationLayer=void 0;var i=t(4),f=t(1),m=t(139),_=t(149),D=t(150);function L(le,he,z){return $(le,he),z}function $(le,he){if(le!==he)throw new TypeError("Private static access of wrong provenance")}function j(le,he,z){return typeof Reflect!="undefined"&&Reflect.get?j=Reflect.get:j=function(X,oe,ne){var Q=V(X,oe);if(!!Q){var de=Object.getOwnPropertyDescriptor(Q,oe);return de.get?de.get.call(ne):de.value}},j(le,he,z||le)}function V(le,he){for(;!Object.prototype.hasOwnProperty.call(le,he)&&(le=d(le),le!==null););return le}function O(le,he,z){return he in le?Object.defineProperty(le,he,{value:z,enumerable:!0,configurable:!0,writable:!0}):le[he]=z,le}function P(le){return I(le)||x(le)||U(le)||F()}function F(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(le){if(typeof Symbol!="undefined"&&le[Symbol.iterator]!=null||le["@@iterator"]!=null)return Array.from(le)}function I(le){if(Array.isArray(le))return M(le)}function g(le,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(he&&he.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),he&&B(le,he)}function B(le,he){return B=Object.setPrototypeOf||function(ee,X){return ee.__proto__=X,ee},B(le,he)}function p(le){var he=v();return function(){var ee=d(le),X;if(he){var oe=d(this).constructor;X=Reflect.construct(ee,arguments,oe)}else X=ee.apply(this,arguments);return l(this,X)}}function l(le,he){if(he&&(r(he)==="object"||typeof he=="function"))return he;if(he!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(le)}function u(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function v(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(le){return!1}}function d(le){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(z){return z.__proto__||Object.getPrototypeOf(z)},d(le)}function c(le,he){var z=typeof Symbol!="undefined"&&le[Symbol.iterator]||le["@@iterator"];if(!z){if(Array.isArray(le)||(z=U(le))||he&&le&&typeof le.length=="number"){z&&(le=z);var ee=0,X=function(){};return{s:X,n:function(){return ee>=le.length?{done:!0}:{done:!1,value:le[ee++]}},e:function(ce){throw ce},f:X}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var oe=!0,ne=!1,Q;return{s:function(){z=z.call(le)},n:function(){var ce=z.next();return oe=ce.done,ce},e:function(ce){ne=!0,Q=ce},f:function(){try{!oe&&z.return!=null&&z.return()}finally{if(ne)throw Q}}}}function b(le,he){return Z(le)||G(le,he)||U(le,he)||T()}function T(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U(le,he){if(!!le){if(typeof le=="string")return M(le,he);var z=Object.prototype.toString.call(le).slice(8,-1);if(z==="Object"&&le.constructor&&(z=le.constructor.name),z==="Map"||z==="Set")return Array.from(le);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return M(le,he)}}function M(le,he){(he==null||he>le.length)&&(he=le.length);for(var z=0,ee=new Array(he);z1&&arguments[1]!==void 0?arguments[1]:{},ee=z.isRenderable,X=ee===void 0?!1:ee,oe=z.ignoreBorder,ne=oe===void 0?!1:oe,Q=z.createQuadrilaterals,de=Q===void 0?!1:Q;J(this,le),this.isRenderable=X,this.data=he.data,this.layer=he.layer,this.page=he.page,this.viewport=he.viewport,this.linkService=he.linkService,this.downloadManager=he.downloadManager,this.imageResourcesPath=he.imageResourcesPath,this.renderForms=he.renderForms,this.svgFactory=he.svgFactory,this.annotationStorage=he.annotationStorage,this.enableScripting=he.enableScripting,this.hasJSActions=he.hasJSActions,this._fieldObjects=he.fieldObjects,this._mouseState=he.mouseState,X&&(this.container=this._createContainer(ne)),de&&(this.quadrilaterals=this._createQuadrilaterals(ne))}return H(le,[{key:"_createContainer",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,ee=this.data,X=this.page,oe=this.viewport,ne=document.createElement("section"),Q=ee.rect[2]-ee.rect[0],de=ee.rect[3]-ee.rect[1];ne.setAttribute("data-annotation-id",ee.id);var ce=i.Util.normalizeRect([ee.rect[0],X.view[3]-ee.rect[1]+X.view[1],ee.rect[2],X.view[3]-ee.rect[3]+X.view[1]]);if(ee.hasOwnCanvas){var Se=oe.transform.slice(),Ee=i.Util.singularValueDecompose2dScale(Se),Fe=b(Ee,2),De=Fe[0],Re=Fe[1];Q=Math.ceil(Q*De),de=Math.ceil(de*Re),ce[0]*=De,ce[1]*=Re;for(var Ne=0;Ne<4;Ne++)Se[Ne]=Math.sign(Se[Ne]);ne.style.transform="matrix(".concat(Se.join(","),")")}else ne.style.transform="matrix(".concat(oe.transform.join(","),")");if(ne.style.transformOrigin="".concat(-ce[0],"px ").concat(-ce[1],"px"),!z&&ee.borderStyle.width>0){ne.style.borderWidth="".concat(ee.borderStyle.width,"px"),ee.borderStyle.style!==i.AnnotationBorderStyleType.UNDERLINE&&(Q-=2*ee.borderStyle.width,de-=2*ee.borderStyle.width);var Oe=ee.borderStyle.horizontalCornerRadius,xe=ee.borderStyle.verticalCornerRadius;if(Oe>0||xe>0){var Be="".concat(Oe,"px / ").concat(xe,"px");ne.style.borderRadius=Be}switch(ee.borderStyle.style){case i.AnnotationBorderStyleType.SOLID:ne.style.borderStyle="solid";break;case i.AnnotationBorderStyleType.DASHED:ne.style.borderStyle="dashed";break;case i.AnnotationBorderStyleType.BEVELED:(0,i.warn)("Unimplemented border style: beveled");break;case i.AnnotationBorderStyleType.INSET:(0,i.warn)("Unimplemented border style: inset");break;case i.AnnotationBorderStyleType.UNDERLINE:ne.style.borderBottomStyle="solid";break;default:break}var Ue=ee.borderColor||ee.color||null;Ue?ne.style.borderColor=i.Util.makeHexColor(ee.color[0]|0,ee.color[1]|0,ee.color[2]|0):ne.style.borderWidth=0}return ne.style.left="".concat(ce[0],"px"),ne.style.top="".concat(ce[1],"px"),ee.hasOwnCanvas?ne.style.width=ne.style.height="auto":(ne.style.width="".concat(Q,"px"),ne.style.height="".concat(de,"px")),ne}},{key:"_createQuadrilaterals",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.data.quadPoints)return null;var ee=[],X=this.data.rect,oe=c(this.data.quadPoints),ne;try{for(oe.s();!(ne=oe.n()).done;){var Q=ne.value;this.data.rect=[Q[2].x,Q[2].y,Q[1].x,Q[1].y],ee.push(this._createContainer(z))}}catch(de){oe.e(de)}finally{oe.f()}return this.data.rect=X,ee}},{key:"_createPopup",value:function(z,ee){var X=this.container;this.quadrilaterals&&(z=z||this.quadrilaterals,X=this.quadrilaterals[0]),z||(z=document.createElement("div"),z.style.height=X.style.height,z.style.width=X.style.width,X.appendChild(z));var oe=new w({container:X,trigger:z,color:ee.color,titleObj:ee.titleObj,modificationDate:ee.modificationDate,contentsObj:ee.contentsObj,richText:ee.richText,hideWrapper:!0}),ne=oe.render();ne.style.left=X.style.width,X.appendChild(ne)}},{key:"_renderQuadrilaterals",value:function(z){var ee=c(this.quadrilaterals),X;try{for(ee.s();!(X=ee.n()).done;){var oe=X.value;oe.className=z}}catch(ne){ee.e(ne)}finally{ee.f()}return this.quadrilaterals}},{key:"render",value:function(){(0,i.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function(z){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=[];if(this._fieldObjects){var oe=this._fieldObjects[z];if(oe){var ne=c(oe),Q;try{for(ne.s();!(Q=ne.n()).done;){var de=Q.value,ce=de.page,Se=de.id,Ee=de.exportValues;if(ce!==-1&&Se!==ee){var Fe=typeof Ee=="string"?Ee:null,De=document.getElementById(Se);if(De&&!R.has(De)){(0,i.warn)("_getElementsByName - element not allowed: ".concat(Se));continue}X.push({id:Se,exportValue:Fe,domElement:De})}}}catch(Ue){ne.e(Ue)}finally{ne.f()}}return X}var Re=c(document.getElementsByName(z)),Ne;try{for(Re.s();!(Ne=Re.n()).done;){var Oe=Ne.value,xe=Oe.id,Be=Oe.exportValue;xe!==ee&&(!R.has(Oe)||X.push({id:xe,exportValue:Be,domElement:Oe}))}}catch(Ue){Re.e(Ue)}finally{Re.f()}return X}}],[{key:"platform",get:function(){var z=typeof navigator!="undefined"?navigator.platform:"";return(0,i.shadow)(this,"platform",{isWin:z.includes("Win"),isMac:z.includes("Mac")})}}]),le}(),E=function(le){g(z,le);var he=p(z);function z(ee){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;J(this,z);var oe=!!(ee.data.url||ee.data.dest||ee.data.action||ee.data.isTooltipOnly||ee.data.resetForm||ee.data.actions&&(ee.data.actions.Action||ee.data.actions["Mouse Up"]||ee.data.actions["Mouse Down"]));return he.call(this,ee,{isRenderable:oe,ignoreBorder:!!(X!=null&&X.ignoreBorder),createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){var X=this.data,oe=this.linkService,ne=document.createElement("a");if(X.url){var Q;oe.addLinkAttributes||(0,i.warn)("LinkAnnotationElement.render - missing `addLinkAttributes`-method on the `linkService`-instance."),(Q=oe.addLinkAttributes)===null||Q===void 0||Q.call(oe,ne,X.url,X.newWindow)}else if(X.action)this._bindNamedAction(ne,X.action);else if(X.dest)this._bindLink(ne,X.dest);else{var de=!1;X.actions&&(X.actions.Action||X.actions["Mouse Up"]||X.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(de=!0,this._bindJSAction(ne,X)),X.resetForm?this._bindResetFormAction(ne,X.resetForm):de||this._bindLink(ne,"")}return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(function(ce,Se){var Ee=Se===0?ne:ne.cloneNode();return ce.appendChild(Ee),ce}):(this.container.className="linkAnnotation",this.container.appendChild(ne),this.container)}},{key:"_bindLink",value:function(X,oe){var ne=this;X.href=this.linkService.getDestinationHash(oe),X.onclick=function(){return oe&&ne.linkService.goToDestination(oe),!1},(oe||oe==="")&&(X.className="internalLink")}},{key:"_bindNamedAction",value:function(X,oe){var ne=this;X.href=this.linkService.getAnchorUrl(""),X.onclick=function(){return ne.linkService.executeNamedAction(oe),!1},X.className="internalLink"}},{key:"_bindJSAction",value:function(X,oe){var ne=this;X.href=this.linkService.getAnchorUrl("");for(var Q=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),de=function(){var De=Se[ce],Re=Q.get(De);if(!Re)return"continue";X[Re]=function(){var Ne;return(Ne=ne.linkService.eventBus)===null||Ne===void 0||Ne.dispatch("dispatcheventinsandbox",{source:ne,detail:{id:oe.id,name:De}}),!1}},ce=0,Se=Object.keys(oe.actions);ce=0&&Ze0?this.data.fieldValue[0]:void 0});var Q=this.data.defaultAppearanceData.fontSize;Q||(Q=9);var de="calc(".concat(Q,"px * var(--zoom-factor))"),ce=document.createElement("select");R.add(ce),ce.disabled=this.data.readOnly,ce.name=this.data.fieldName,ce.setAttribute("id",ne),ce.tabIndex=q,ce.style.fontSize="".concat(Q,"px"),this.data.combo||(ce.size=this.data.options.length,this.data.multiSelect&&(ce.multiple=!0)),ce.addEventListener("resetform",function(Oe){var xe=X.data.defaultFieldValue,Be=c(ce.options),Ue;try{for(Be.s();!(Ue=Be.n()).done;){var He=Ue.value;He.selected=He.value===xe}}catch(Ye){Be.e(Ye)}finally{Be.f()}});var Se=c(this.data.options),Ee;try{for(Se.s();!(Ee=Se.n()).done;){var Fe=Ee.value,De=document.createElement("option");De.textContent=Fe.displayValue,De.value=Fe.exportValue,this.data.combo&&(De.style.fontSize=de),this.data.fieldValue.includes(Fe.exportValue)&&De.setAttribute("selected",!0),ce.appendChild(De)}}catch(Oe){Se.e(Oe)}finally{Se.f()}var Re=function(xe,Be){var Ue=Be?"value":"textContent",He=xe.target.options;return xe.target.multiple?Array.prototype.filter.call(He,function(Ye){return Ye.selected}).map(function(Ye){return Ye[Ue]}):He.selectedIndex===-1?null:He[He.selectedIndex][Ue]},Ne=function(xe){var Be=xe.target.options;return Array.prototype.map.call(Be,function(Ue){return{displayValue:Ue.textContent,exportValue:Ue.value}})};return this.enableScripting&&this.hasJSActions?(ce.addEventListener("updatefromsandbox",function(Oe){var xe={value:function(Ue){var He=Ue.detail.value,Ye=new Set(Array.isArray(He)?He:[He]),Ze=c(ce.options),rt;try{for(Ze.s();!(rt=Ze.n()).done;){var it=rt.value;it.selected=Ye.has(it.value)}}catch(yt){Ze.e(yt)}finally{Ze.f()}oe.setValue(ne,{value:Re(Ue,!0)})},multipleSelection:function(Ue){ce.multiple=!0},remove:function(Ue){var He=ce.options,Ye=Ue.detail.remove;if(He[Ye].selected=!1,ce.remove(Ye),He.length>0){var Ze=Array.prototype.findIndex.call(He,function(rt){return rt.selected});Ze===-1&&(He[0].selected=!0)}oe.setValue(ne,{value:Re(Ue,!0),items:Ne(Ue)})},clear:function(Ue){for(;ce.length!==0;)ce.remove(0);oe.setValue(ne,{value:null,items:[]})},insert:function(Ue){var He=Ue.detail.insert,Ye=He.index,Ze=He.displayValue,rt=He.exportValue,it=document.createElement("option");it.textContent=Ze,it.value=rt,ce.insertBefore(it,ce.children[Ye]),oe.setValue(ne,{value:Re(Ue,!0),items:Ne(Ue)})},items:function(Ue){for(var He=Ue.detail.items;ce.length!==0;)ce.remove(0);var Ye=c(He),Ze;try{for(Ye.s();!(Ze=Ye.n()).done;){var rt=Ze.value,it=rt.displayValue,yt=rt.exportValue,ht=document.createElement("option");ht.textContent=it,ht.value=yt,ce.appendChild(ht)}}catch(Pt){Ye.e(Pt)}finally{Ye.f()}ce.options.length>0&&(ce.options[0].selected=!0),oe.setValue(ne,{value:Re(Ue,!0),items:Ne(Ue)})},indices:function(Ue){var He=new Set(Ue.detail.indices),Ye=c(Ue.target.options),Ze;try{for(Ye.s();!(Ze=Ye.n()).done;){var rt=Ze.value;rt.selected=He.has(rt.index)}}catch(it){Ye.e(it)}finally{Ye.f()}oe.setValue(ne,{value:Re(Ue,!0)})},editable:function(Ue){Ue.target.disabled=!Ue.detail.editable}};X._dispatchEventFromSandbox(xe,Oe)}),ce.addEventListener("input",function(Oe){var xe,Be=Re(Oe,!0),Ue=Re(Oe,!1);oe.setValue(ne,{value:Be}),(xe=X.linkService.eventBus)===null||xe===void 0||xe.dispatch("dispatcheventinsandbox",{source:X,detail:{id:ne,name:"Keystroke",value:Ue,changeEx:Be,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(ce,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],function(Oe){return Oe.target.checked})):ce.addEventListener("input",function(Oe){oe.setValue(ne,{value:Re(Oe)})}),this._setBackgroundColor(ce),this.container.appendChild(ce),this.container}}]),z}(te),S=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!((X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q})}return H(z,[{key:"render",value:function(){var X=["Line","Square","Circle","PolyLine","Polygon","Ink"];if(this.container.className="popupAnnotation",X.includes(this.data.parentType))return this.container;var oe='[data-annotation-id="'.concat(this.data.parentId,'"]'),ne=this.layer.querySelectorAll(oe);if(ne.length===0)return this.container;var Q=new w({container:this.container,trigger:Array.from(ne),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),de=this.page,ce=i.Util.normalizeRect([this.data.parentRect[0],de.view[3]-this.data.parentRect[1]+de.view[1],this.data.parentRect[2],de.view[3]-this.data.parentRect[3]+de.view[1]]),Se=ce[0]+this.data.parentRect[2]-this.data.parentRect[0],Ee=ce[1];return this.container.style.transformOrigin="".concat(-Se,"px ").concat(-Ee,"px"),this.container.style.left="".concat(Se,"px"),this.container.style.top="".concat(Ee,"px"),this.container.appendChild(Q.render()),this.container}}]),z}(A),w=function(){function le(he){J(this,le),this.container=he.container,this.trigger=he.trigger,this.color=he.color,this.titleObj=he.titleObj,this.modificationDate=he.modificationDate,this.contentsObj=he.contentsObj,this.richText=he.richText,this.hideWrapper=he.hideWrapper||!1,this.pinned=!1}return H(le,[{key:"render",value:function(){var z,ee,X=.7,oe=document.createElement("div");oe.className="popupWrapper",this.hideElement=this.hideWrapper?oe:this.container,this.hideElement.hidden=!0;var ne=document.createElement("div");ne.className="popup";var Q=this.color;if(Q){var de=X*(255-Q[0])+Q[0],ce=X*(255-Q[1])+Q[1],Se=X*(255-Q[2])+Q[2];ne.style.backgroundColor=i.Util.makeHexColor(de|0,ce|0,Se|0)}var Ee=document.createElement("h1");Ee.dir=this.titleObj.dir,Ee.textContent=this.titleObj.str,ne.appendChild(Ee);var Fe=f.PDFDateString.toDateObject(this.modificationDate);if(Fe){var De=document.createElement("span");De.className="popupDate",De.textContent="{{date}}, {{time}}",De.dataset.l10nId="annotation_date_string",De.dataset.l10nArgs=JSON.stringify({date:Fe.toLocaleDateString(),time:Fe.toLocaleTimeString()}),ne.appendChild(De)}if((z=this.richText)!==null&&z!==void 0&&z.str&&(!((ee=this.contentsObj)!==null&&ee!==void 0&&ee.str)||this.contentsObj.str===this.richText.str))D.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:ne}),ne.lastChild.className="richText popupContent";else{var Re=this._formatContents(this.contentsObj);ne.appendChild(Re)}Array.isArray(this.trigger)||(this.trigger=[this.trigger]);var Ne=c(this.trigger),Oe;try{for(Ne.s();!(Oe=Ne.n()).done;){var xe=Oe.value;xe.addEventListener("click",this._toggle.bind(this)),xe.addEventListener("mouseover",this._show.bind(this,!1)),xe.addEventListener("mouseout",this._hide.bind(this,!1))}}catch(Be){Ne.e(Be)}finally{Ne.f()}return ne.addEventListener("click",this._hide.bind(this,!0)),oe.appendChild(ne),oe}},{key:"_formatContents",value:function(z){var ee=z.str,X=z.dir,oe=document.createElement("p");oe.className="popupContent",oe.dir=X;for(var ne=ee.split(/(?:\r\n?|\n)/),Q=0,de=ne.length;Q0&&arguments[0]!==void 0?arguments[0]:!1;z&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}},{key:"_hide",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;z&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}]),le}(),s=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),z}(A),o=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){this.container.className="lineAnnotation";var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=this.svgFactory.createElement("svg:line");return de.setAttribute("x1",X.rect[2]-X.lineCoordinates[0]),de.setAttribute("y1",X.rect[3]-X.lineCoordinates[1]),de.setAttribute("x2",X.rect[2]-X.lineCoordinates[2]),de.setAttribute("y2",X.rect[3]-X.lineCoordinates[3]),de.setAttribute("stroke-width",X.borderStyle.width||1),de.setAttribute("stroke","transparent"),de.setAttribute("fill","transparent"),Q.appendChild(de),this.container.append(Q),this._createPopup(de,X),this.container}}]),z}(A),k=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){this.container.className="squareAnnotation";var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=X.borderStyle.width,ce=this.svgFactory.createElement("svg:rect");return ce.setAttribute("x",de/2),ce.setAttribute("y",de/2),ce.setAttribute("width",oe-de),ce.setAttribute("height",ne-de),ce.setAttribute("stroke-width",de||1),ce.setAttribute("stroke","transparent"),ce.setAttribute("fill","transparent"),Q.appendChild(ce),this.container.append(Q),this._createPopup(ce,X),this.container}}]),z}(A),N=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){this.container.className="circleAnnotation";var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=X.borderStyle.width,ce=this.svgFactory.createElement("svg:ellipse");return ce.setAttribute("cx",oe/2),ce.setAttribute("cy",ne/2),ce.setAttribute("rx",oe/2-de/2),ce.setAttribute("ry",ne/2-de/2),ce.setAttribute("stroke-width",de||1),ce.setAttribute("stroke","transparent"),ce.setAttribute("fill","transparent"),Q.appendChild(ce),this.container.append(Q),this._createPopup(ce,X),this.container}}]),z}(A),W=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne,Q;J(this,z);var de=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return Q=he.call(this,ee,{isRenderable:de,ignoreBorder:!0}),Q.containerClassName="polylineAnnotation",Q.svgElementName="svg:polyline",Q}return H(z,[{key:"render",value:function(){this.container.className=this.containerClassName;var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=[],ce=c(X.vertices),Se;try{for(ce.s();!(Se=ce.n()).done;){var Ee=Se.value,Fe=Ee.x-X.rect[0],De=X.rect[3]-Ee.y;de.push(Fe+","+De)}}catch(Ne){ce.e(Ne)}finally{ce.f()}de=de.join(" ");var Re=this.svgFactory.createElement(this.svgElementName);return Re.setAttribute("points",de),Re.setAttribute("stroke-width",X.borderStyle.width||1),Re.setAttribute("stroke","transparent"),Re.setAttribute("fill","transparent"),Q.appendChild(Re),this.container.append(Q),this._createPopup(Re,X),this.container}}]),z}(A),re=function(le){g(z,le);var he=p(z);function z(ee){var X;return J(this,z),X=he.call(this,ee),X.containerClassName="polygonAnnotation",X.svgElementName="svg:polygon",X}return z}(W),fe=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),z}(A),ve=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne,Q;J(this,z);var de=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return Q=he.call(this,ee,{isRenderable:de,ignoreBorder:!0}),Q.containerClassName="inkAnnotation",Q.svgElementName="svg:polyline",Q}return H(z,[{key:"render",value:function(){this.container.className=this.containerClassName;var X=this.data,oe=X.rect[2]-X.rect[0],ne=X.rect[3]-X.rect[1],Q=this.svgFactory.create(oe,ne),de=c(X.inkLists),ce;try{for(de.s();!(ce=de.n()).done;){var Se=ce.value,Ee=[],Fe=c(Se),De;try{for(Fe.s();!(De=Fe.n()).done;){var Re=De.value,Ne=Re.x-X.rect[0],Oe=X.rect[3]-Re.y;Ee.push("".concat(Ne,",").concat(Oe))}}catch(Be){Fe.e(Be)}finally{Fe.f()}Ee=Ee.join(" ");var xe=this.svgFactory.createElement(this.svgElementName);xe.setAttribute("points",Ee),xe.setAttribute("stroke-width",X.borderStyle.width||1),xe.setAttribute("stroke","transparent"),xe.setAttribute("fill","transparent"),this._createPopup(xe,X),Q.appendChild(xe)}}catch(Be){de.e(Be)}finally{de.f()}return this.container.append(Q),this.container}}]),z}(A),me=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}]),z}(A),pe=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}]),z}(A),Ae=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}]),z}(A),Pe=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0,createQuadrilaterals:!0})}return H(z,[{key:"render",value:function(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}]),z}(A),_e=function(le){g(z,le);var he=p(z);function z(ee){var X,oe,ne;J(this,z);var Q=!!(ee.data.hasPopup||(X=ee.data.titleObj)!==null&&X!==void 0&&X.str||(oe=ee.data.contentsObj)!==null&&oe!==void 0&&oe.str||(ne=ee.data.richText)!==null&&ne!==void 0&&ne.str);return he.call(this,ee,{isRenderable:Q,ignoreBorder:!0})}return H(z,[{key:"render",value:function(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}]),z}(A),We=function(le){g(z,le);var he=p(z);function z(ee){var X,oe;J(this,z),oe=he.call(this,ee,{isRenderable:!0});var ne=oe.data.file,Q=ne.filename,de=ne.content;return oe.filename=(0,f.getFilenameFromUrl)(Q),oe.content=de,(X=oe.linkService.eventBus)===null||X===void 0||X.dispatch("fileattachmentannotation",{source:u(oe),id:(0,i.stringToPDFString)(Q),filename:Q,content:de}),oe}return H(z,[{key:"render",value:function(){var X,oe;this.container.className="fileAttachmentAnnotation";var ne=document.createElement("div");return ne.style.height=this.container.style.height,ne.style.width=this.container.style.width,ne.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&((X=this.data.titleObj)!==null&&X!==void 0&&X.str||(oe=this.data.contentsObj)!==null&&oe!==void 0&&oe.str||this.data.richText)&&this._createPopup(ne,this.data),this.container.appendChild(ne),this.container}},{key:"_download",value:function(){var X;(X=this.downloadManager)===null||X===void 0||X.openOrDownloadData(this.container,this.content,this.filename)}}]),z}(A),Le=function(){function le(){J(this,le)}return H(le,null,[{key:"render",value:function(z){var ee=[],X=[],oe=c(z.annotations),ne;try{for(oe.s();!(ne=oe.n()).done;){var Q=ne.value;if(!!Q){if(Q.annotationType===i.AnnotationType.POPUP){X.push(Q);continue}ee.push(Q)}}}catch(xe){oe.e(xe)}finally{oe.f()}X.length&&ee.push.apply(ee,X);for(var de=z.div,ce=0,Se=ee;ce{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ColorConverters=void 0;function t(O,P){return _(O)||m(O,P)||i(O,P)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(O,P){if(!!O){if(typeof O=="string")return f(O,P);var F=Object.prototype.toString.call(O).slice(8,-1);if(F==="Object"&&O.constructor&&(F=O.constructor.name),F==="Map"||F==="Set")return Array.from(O);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return f(O,P)}}function f(O,P){(P==null||P>O.length)&&(P=O.length);for(var F=0,x=new Array(P);F{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.XfaLayer=void 0;var r=t(4),i=t(147);function f(x,I){return D(x)||_(x,I)||$(x,I)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(x,I){var g=x==null?null:typeof Symbol!="undefined"&&x[Symbol.iterator]||x["@@iterator"];if(g!=null){var B=[],p=!0,l=!1,u,v;try{for(g=g.call(x);!(p=(u=g.next()).done)&&(B.push(u.value),!(I&&B.length===I));p=!0);}catch(d){l=!0,v=d}finally{try{!p&&g.return!=null&&g.return()}finally{if(l)throw v}}return B}}function D(x){if(Array.isArray(x))return x}function L(x,I){var g=typeof Symbol!="undefined"&&x[Symbol.iterator]||x["@@iterator"];if(!g){if(Array.isArray(x)||(g=$(x))||I&&x&&typeof x.length=="number"){g&&(x=g);var B=0,p=function(){};return{s:p,n:function(){return B>=x.length?{done:!0}:{done:!1,value:x[B++]}},e:function(c){throw c},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l=!0,u=!1,v;return{s:function(){g=g.call(x)},n:function(){var c=g.next();return l=c.done,c},e:function(c){u=!0,v=c},f:function(){try{!l&&g.return!=null&&g.return()}finally{if(u)throw v}}}}function $(x,I){if(!!x){if(typeof x=="string")return j(x,I);var g=Object.prototype.toString.call(x).slice(8,-1);if(g==="Object"&&x.constructor&&(g=x.constructor.name),g==="Map"||g==="Set")return Array.from(x);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return j(x,I)}}function j(x,I){(I==null||I>x.length)&&(I=x.length);for(var g=0,B=new Array(I);g0;){var U,M=f(d[d.length-1],3),G=M[0],Z=M[1],J=M[2];if(Z+1===G.children.length){d.pop();continue}var ie=G.children[++d[d.length-1][1]];if(ie!==null){var H=ie.name;if(H==="#text"){var q=document.createTextNode(ie.value);T.push(q),J.appendChild(q);continue}var R=void 0;if(ie!=null&&(U=ie.attributes)!==null&&U!==void 0&&U.xmlns?R=document.createElementNS(ie.attributes.xmlns,H):R=document.createElement(H),J.appendChild(R),ie.attributes&&this.setAttributes({html:R,element:ie,storage:B,intent:u,linkService:p}),ie.children&&ie.children.length>0)d.push([ie,-1,R]);else if(ie.value){var h=document.createTextNode(ie.value);i.XfaText.shouldBuildText(H)&&T.push(h),R.appendChild(h)}}}var A=L(c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea")),E;try{for(A.s();!(E=A.n()).done;){var K=E.value;K.setAttribute("readOnly",!0)}}catch(te){A.e(te)}finally{A.f()}return{textDivs:T}}},{key:"update",value:function(g){var B="matrix(".concat(g.viewport.transform.join(","),")");g.div.style.transform=B,g.div.hidden=!1}}]),x}();a.XfaLayer=F},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.renderTextLayer=v;var r=t(4);function i(d,c){if(!(d instanceof c))throw new TypeError("Cannot call a class as a function")}function f(d,c){for(var b=0;b=d.length?{done:!0}:{done:!1,value:d[T++]}},e:function(ie){throw ie},f:U}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M=!0,G=!1,Z;return{s:function(){b=b.call(d)},n:function(){var ie=b.next();return M=ie.done,ie},e:function(ie){G=!0,Z=ie},f:function(){try{!M&&b.return!=null&&b.return()}finally{if(G)throw Z}}}}function D(d,c){if(!!d){if(typeof d=="string")return L(d,c);var b=Object.prototype.toString.call(d).slice(8,-1);if(b==="Object"&&d.constructor&&(b=d.constructor.name),b==="Map"||b==="Set")return Array.from(d);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return L(d,c)}}function L(d,c){(c==null||c>d.length)&&(c=d.length);for(var b=0,T=new Array(c);b=0;J-=4)if(Z[J]>0){M=Math.ceil(J/4/j);break}c.clearRect(0,0,j,j),c.strokeText("A",0,j),Z=c.getImageData(0,0,j,j).data,U=0;for(var ie=0,H=Z.length;ie0){U=j-Math.floor(ie/4/j);break}if(c.restore(),U){var q=U/(U+M);return O.set(d,q),q}return O.set(d,V),V}function x(d,c,b,T){var U=document.createElement("span"),M=d._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:c.str!=="",hasEOL:c.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:c.str!=="",hasEOL:c.hasEOL};d._textDivs.push(U);var G=r.Util.transform(d._viewport.transform,c.transform),Z=Math.atan2(G[1],G[0]),J=b[c.fontName];J.vertical&&(Z+=Math.PI/2);var ie=Math.hypot(G[2],G[3]),H=ie*F(J.fontFamily,T),q,R;Z===0?(q=G[4],R=G[5]-H):(q=G[4]+H*Math.sin(Z),R=G[5]-H*Math.cos(Z)),U.style.left="".concat(q,"px"),U.style.top="".concat(R,"px"),U.style.fontSize="".concat(ie,"px"),U.style.fontFamily=J.fontFamily,U.setAttribute("role","presentation"),U.textContent=c.str,U.dir=c.dir,d._fontInspectorEnabled&&(U.dataset.fontName=c.fontName),Z!==0&&(M.angle=Z*(180/Math.PI));var h=!1;if(c.str.length>1||d._enhanceTextSelection&&P.test(c.str))h=!0;else if(c.str!==" "&&c.transform[0]!==c.transform[3]){var A=Math.abs(c.transform[0]),E=Math.abs(c.transform[3]);A!==E&&Math.max(A,E)/Math.min(A,E)>1.5&&(h=!0)}if(h&&(J.vertical?M.canvasWidth=c.height*d._viewport.scale:M.canvasWidth=c.width*d._viewport.scale),d._textDivProperties.set(U,M),d._textContentStream&&d._layoutText(U),d._enhanceTextSelection&&M.hasText){var K=1,te=0;Z!==0&&(K=Math.cos(Z),te=Math.sin(Z));var Y=(J.vertical?c.height:c.width)*d._viewport.scale,be=ie,Ce,we;Z!==0?(Ce=[K,te,-te,K,q,R],we=r.Util.getAxialAlignedBoundingBox([0,0,Y,be],Ce)):we=[q,R,q+Y,R+be],d._bounds.push({left:we[0],top:we[1],right:we[2],bottom:we[3],div:U,size:[Y,be],m:Ce})}}function I(d){if(!d._canceled){var c=d._textDivs,b=d._capability,T=c.length;if(T>$){d._renderingDone=!0,b.resolve();return}if(!d._textContentStream)for(var U=0;U0&&(T=T?Math.min(M,T):M)}return T}function B(d){for(var c=d._bounds,b=d._viewport,T=p(b.width,b.height,c),U=0;U=0&&T[J].start>=G.y2;)J--;var ie=void 0,H=void 0,q=void 0,R=void 0,h=-Infinity;for(q=Z;q<=J;q++){ie=T[q],H=ie.boundary;var A=void 0;H.x2>G.x1?A=H.index>G.index?H.x1New:G.x1:H.x2New===void 0?A=(H.x2+G.x1)/2:A=H.x2New,A>h&&(h=A)}for(G.x1New=h,q=Z;q<=J;q++)ie=T[q],H=ie.boundary,H.x2New===void 0?H.x2>G.x1?H.index>G.index&&(H.x2New=H.x2):H.x2New=h:H.x2New>h&&(H.x2New=Math.max(h,H.x2));var E=[],K=null;for(q=Z;q<=J;q++){ie=T[q],H=ie.boundary;var te=H.x2>G.x2?H:G;K===te?E[E.length-1].end=ie.end:(E.push({start:ie.start,end:ie.end,boundary:te}),K=te)}for(T[Z].start=0&&T[R].start>=H.y1;R--)Y=T[R].boundary===H;for(R=J+1;!Y&&R0){var H=T.canvasWidth/ie;this._enhanceTextSelection&&(T.scale=H),U="scaleX(".concat(H,")")}}if(T.angle!==0&&(U="rotate(".concat(T.angle,"deg) ").concat(U)),U.length>0&&(this._enhanceTextSelection&&(T.originalTransform=U),b.style.transform=U),T.hasText&&this._container.appendChild(b),T.hasEOL){var q=document.createElement("br");q.setAttribute("role","presentation"),this._container.appendChild(q)}}},{key:"_render",value:function(){var b=this,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=(0,r.createPromiseCapability)(),M=Object.create(null),G=this._document.createElement("canvas");if(G.height=G.width=j,G.mozOpaque=!0,this._layoutTextCtx=G.getContext("2d",{alpha:!1}),this._textContent){var Z=this._textContent.items,J=this._textContent.styles;this._processItems(Z,J),U.resolve()}else if(this._textContentStream){var ie=function H(){b._reader.read().then(function(q){var R=q.value,h=q.done;if(h){U.resolve();return}Object.assign(M,R.styles),b._processItems(R.items,M),H()},U.reject)};this._reader=this._textContentStream.getReader(),ie()}else throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');U.promise.then(function(){M=null,T?b._renderTimer=setTimeout(function(){I(b),b._renderTimer=null},T):I(b)},this._capability.reject)}},{key:"expandTextDivs",value:function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!this._enhanceTextSelection||!this._renderingDone)){this._bounds!==null&&(B(this),this._bounds=null);for(var T=[],U=[],M=0,G=this._textDivs.length;M0?(U.push("".concat(J.paddingTop,"px")),T.push("translateY(".concat(-J.paddingTop,"px)"))):U.push(0),J.paddingRight>0?U.push("".concat(J.paddingRight/J.scale,"px")):U.push(0),J.paddingBottom>0?U.push("".concat(J.paddingBottom,"px")):U.push(0),J.paddingLeft>0?(U.push("".concat(J.paddingLeft/J.scale,"px")),T.push("translateX(".concat(-J.paddingLeft/J.scale,"px)"))):U.push(0),Z.style.padding=U.join(" "),T.length&&(Z.style.transform=T.join(" "))):(Z.style.padding=null,Z.style.transform=J.originalTransform))}}}}]),d}();function v(d){var c=new u({textContent:d.textContent,textContentStream:d.textContentStream,container:d.container,viewport:d.viewport,textDivs:d.textDivs,textContentItemsStr:d.textContentItemsStr,enhanceTextSelection:d.enhanceTextSelection});return c._render(d.timeout),c}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SVGGraphics=void 0;var r=t(4),i=t(1),f=t(6);function m(H){return L(H)||D(H)||F(H)||_()}function _(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D(H){if(typeof Symbol!="undefined"&&H[Symbol.iterator]!=null||H["@@iterator"]!=null)return Array.from(H)}function L(H){if(Array.isArray(H))return x(H)}function $(H,q){return O(H)||V(H,q)||F(H,q)||j()}function j(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V(H,q){var R=H==null?null:typeof Symbol!="undefined"&&H[Symbol.iterator]||H["@@iterator"];if(R!=null){var h=[],A=!0,E=!1,K,te;try{for(R=R.call(H);!(A=(K=R.next()).done)&&(h.push(K.value),!(q&&h.length===q));A=!0);}catch(Y){E=!0,te=Y}finally{try{!A&&R.return!=null&&R.return()}finally{if(E)throw te}}return h}}function O(H){if(Array.isArray(H))return H}function P(H,q){var R=typeof Symbol!="undefined"&&H[Symbol.iterator]||H["@@iterator"];if(!R){if(Array.isArray(H)||(R=F(H))||q&&H&&typeof H.length=="number"){R&&(H=R);var h=0,A=function(){};return{s:A,n:function(){return h>=H.length?{done:!0}:{done:!1,value:H[h++]}},e:function(be){throw be},f:A}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E=!0,K=!1,te;return{s:function(){R=R.call(H)},n:function(){var be=R.next();return E=be.done,be},e:function(be){K=!0,te=be},f:function(){try{!E&&R.return!=null&&R.return()}finally{if(K)throw te}}}}function F(H,q){if(!!H){if(typeof H=="string")return x(H,q);var R=Object.prototype.toString.call(H).slice(8,-1);if(R==="Object"&&H.constructor&&(R=H.constructor.name),R==="Map"||R==="Set")return Array.from(H);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return x(H,q)}}function x(H,q){(q==null||q>H.length)&&(q=H.length);for(var R=0,h=new Array(q);R>1&2147483647:A=A>>1&2147483647;R[h]=A}function K(Me,S,w){for(var s=-1,o=S;o>>8^N}return s^-1}function te(Me,S,w,s){var o=s,k=S.length;w[o]=k>>24&255,w[o+1]=k>>16&255,w[o+2]=k>>8&255,w[o+3]=k&255,o+=4,w[o]=Me.charCodeAt(0)&255,w[o+1]=Me.charCodeAt(1)&255,w[o+2]=Me.charCodeAt(2)&255,w[o+3]=Me.charCodeAt(3)&255,o+=4,w.set(S,o),o+=S.length;var N=K(w,s+4,o);w[o]=N>>24&255,w[o+1]=N>>16&255,w[o+2]=N>>8&255,w[o+3]=N&255}function Y(Me,S,w){for(var s=1,o=0,k=S;k=8?S=Me:S=Buffer.from(Me);var w=require("zlib").deflateSync(S,{level:9});return w instanceof Uint8Array?w:new Uint8Array(w)}catch(s){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+s)}return Ce(Me)}function Ce(Me){var S=Me.length,w=65535,s=Math.ceil(S/w),o=new Uint8Array(2+S+s*5+4),k=0;o[k++]=120,o[k++]=156;for(var N=0;S>w;)o[k++]=0,o[k++]=255,o[k++]=255,o[k++]=0,o[k++]=0,o.set(Me.subarray(N,N+w),k),k+=w,N+=w,S-=w;o[k++]=1,o[k++]=S&255,o[k++]=S>>8&255,o[k++]=~S&65535&255,o[k++]=(~S&65535)>>8&255,o.set(Me.subarray(N),k),k+=Me.length-N;var W=Y(Me,0,Me.length);return o[k++]=W>>24&255,o[k++]=W>>16&255,o[k++]=W>>8&255,o[k++]=W&255,o}function we(Me,S,w,s){var o=Me.width,k=Me.height,N,W,re,fe=Me.data;switch(S){case r.ImageKind.GRAYSCALE_1BPP:W=0,N=1,re=o+7>>3;break;case r.ImageKind.RGB_24BPP:W=2,N=8,re=o*3;break;case r.ImageKind.RGBA_32BPP:W=6,N=8,re=o*4;break;default:throw new Error("invalid format")}for(var ve=new Uint8Array((1+re)*k),me=0,pe=0,Ae=0;Ae>24&255,o>>16&255,o>>8&255,o&255,k>>24&255,k>>16&255,k>>8&255,k&255,N,W,0,0,0]),Le=be(ve),je=H.length+q*3+We.length+Le.length,le=new Uint8Array(je),he=0;return le.set(H,he),he+=H.length,te("IHDR",We,le,he),he+=q+We.length,te("IDATA",Le,le,he),he+=q+Le.length,te("IEND",new Uint8Array(0),le,he),(0,r.createObjectURL)(le,"image/png",w)}return function(S,w,s){var o=S.kind===void 0?r.ImageKind.GRAYSCALE_1BPP:S.kind;return we(S,o,w,s)}}(),G=function(){function H(){B(this,H),this.fontSizeScale=1,this.fontWeight=d.fontWeight,this.fontSize=0,this.textMatrix=r.IDENTITY_MATRIX,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=r.TextRenderingMode.FILL,this.textMatrixScale=1,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=d.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}return g(H,[{key:"clone",value:function(){return Object.create(this)}},{key:"setCurrentPoint",value:function(R,h){this.x=R,this.y=h}}]),H}(),Z=0,J=0,ie=0;a.SVGGraphics=p=function(){function H(q,R){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;B(this,H),this.svgFactory=new i.DOMSVGFactory,this.current=new G,this.transformMatrix=r.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=q,this.objs=R,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!h,this._operatorIdMapping=[];for(var A in r.OPS)this._operatorIdMapping[r.OPS[A]]=A}return g(H,[{key:"save",value:function(){this.transformStack.push(this.transformMatrix);var R=this.current;this.extraStack.push(R),this.current=R.clone()}},{key:"restore",value:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function(R){this.save(),this.executeOpTree(R),this.restore()}},{key:"loadDependencies",value:function(R){for(var h=this,A=R.fnArray,E=R.argsArray,K=0,te=A.length;K0&&(this.current.lineWidth=R)}},{key:"setLineCap",value:function(R){this.current.lineCap=T[R]}},{key:"setLineJoin",value:function(R){this.current.lineJoin=U[R]}},{key:"setMiterLimit",value:function(R){this.current.miterLimit=R}},{key:"setStrokeAlpha",value:function(R){this.current.strokeAlpha=R}},{key:"setStrokeRGBColor",value:function(R,h,A){this.current.strokeColor=r.Util.makeHexColor(R,h,A)}},{key:"setFillAlpha",value:function(R){this.current.fillAlpha=R}},{key:"setFillRGBColor",value:function(R,h,A){this.current.fillColor=r.Util.makeHexColor(R,h,A),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function(R){this.current.strokeColor=this._makeColorN_Pattern(R)}},{key:"setFillColorN",value:function(R){this.current.fillColor=this._makeColorN_Pattern(R)}},{key:"shadingFill",value:function(R){var h=this.viewport.width,A=this.viewport.height,E=r.Util.inverseTransform(this.transformMatrix),K=r.Util.applyTransform([0,0],E),te=r.Util.applyTransform([0,A],E),Y=r.Util.applyTransform([h,0],E),be=r.Util.applyTransform([h,A],E),Ce=Math.min(K[0],te[0],Y[0],be[0]),we=Math.min(K[1],te[1],Y[1],be[1]),Me=Math.max(K[0],te[0],Y[0],be[0]),S=Math.max(K[1],te[1],Y[1],be[1]),w=this.svgFactory.createElement("svg:rect");w.setAttributeNS(null,"x",Ce),w.setAttributeNS(null,"y",we),w.setAttributeNS(null,"width",Me-Ce),w.setAttributeNS(null,"height",S-we),w.setAttributeNS(null,"fill",this._makeShadingPattern(R)),this.current.fillAlpha<1&&w.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(w)}},{key:"_makeColorN_Pattern",value:function(R){return R[0]==="TilingPattern"?this._makeTilingPattern(R):this._makeShadingPattern(R)}},{key:"_makeTilingPattern",value:function(R){var h=R[1],A=R[2],E=R[3]||r.IDENTITY_MATRIX,K=$(R[4],4),te=K[0],Y=K[1],be=K[2],Ce=K[3],we=R[5],Me=R[6],S=R[7],w="shading".concat(ie++),s=r.Util.normalizeRect([].concat(m(r.Util.applyTransform([te,Y],E)),m(r.Util.applyTransform([be,Ce],E)))),o=$(s,4),k=o[0],N=o[1],W=o[2],re=o[3],fe=r.Util.singularValueDecompose2dScale(E),ve=$(fe,2),me=ve[0],pe=ve[1],Ae=we*me,Pe=Me*pe,_e=this.svgFactory.createElement("svg:pattern");_e.setAttributeNS(null,"id",w),_e.setAttributeNS(null,"patternUnits","userSpaceOnUse"),_e.setAttributeNS(null,"width",Ae),_e.setAttributeNS(null,"height",Pe),_e.setAttributeNS(null,"x","".concat(k)),_e.setAttributeNS(null,"y","".concat(N));var We=this.svg,Le=this.transformMatrix,je=this.current.fillColor,le=this.current.strokeColor,he=this.svgFactory.create(W-k,re-N);if(this.svg=he,this.transformMatrix=E,S===2){var z=r.Util.makeHexColor.apply(r.Util,m(h));this.current.fillColor=z,this.current.strokeColor=z}return this.executeOpTree(this.convertOpList(A)),this.svg=We,this.transformMatrix=Le,this.current.fillColor=je,this.current.strokeColor=le,_e.appendChild(he.childNodes[0]),this.defs.appendChild(_e),"url(#".concat(w,")")}},{key:"_makeShadingPattern",value:function(R){switch(typeof R=="string"&&(R=this.objs.get(R)),R[0]){case"RadialAxial":var h="shading".concat(ie++),A=R[3],E;switch(R[1]){case"axial":var K=R[4],te=R[5];E=this.svgFactory.createElement("svg:linearGradient"),E.setAttributeNS(null,"id",h),E.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),E.setAttributeNS(null,"x1",K[0]),E.setAttributeNS(null,"y1",K[1]),E.setAttributeNS(null,"x2",te[0]),E.setAttributeNS(null,"y2",te[1]);break;case"radial":var Y=R[4],be=R[5],Ce=R[6],we=R[7];E=this.svgFactory.createElement("svg:radialGradient"),E.setAttributeNS(null,"id",h),E.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),E.setAttributeNS(null,"cx",be[0]),E.setAttributeNS(null,"cy",be[1]),E.setAttributeNS(null,"r",we),E.setAttributeNS(null,"fx",Y[0]),E.setAttributeNS(null,"fy",Y[1]),E.setAttributeNS(null,"fr",Ce);break;default:throw new Error("Unknown RadialAxial type: ".concat(R[1]))}var Me=P(A),S;try{for(Me.s();!(S=Me.n()).done;){var w=S.value,s=this.svgFactory.createElement("svg:stop");s.setAttributeNS(null,"offset",w[0]),s.setAttributeNS(null,"stop-color",w[1]),E.appendChild(s)}}catch(o){Me.e(o)}finally{Me.f()}return this.defs.appendChild(E),"url(#".concat(h,")");case"Mesh":return(0,r.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(R[0]))}}},{key:"setDash",value:function(R,h){this.current.dashArray=R,this.current.dashPhase=h}},{key:"constructPath",value:function(R,h){var A=this.current,E=A.x,K=A.y,te=[],Y=0,be=P(R),Ce;try{for(be.s();!(Ce=be.n()).done;){var we=Ce.value;switch(we|0){case r.OPS.rectangle:E=h[Y++],K=h[Y++];var Me=h[Y++],S=h[Y++],w=E+Me,s=K+S;te.push("M",u(E),u(K),"L",u(w),u(K),"L",u(w),u(s),"L",u(E),u(s),"Z");break;case r.OPS.moveTo:E=h[Y++],K=h[Y++],te.push("M",u(E),u(K));break;case r.OPS.lineTo:E=h[Y++],K=h[Y++],te.push("L",u(E),u(K));break;case r.OPS.curveTo:E=h[Y+4],K=h[Y+5],te.push("C",u(h[Y]),u(h[Y+1]),u(h[Y+2]),u(h[Y+3]),u(E),u(K)),Y+=6;break;case r.OPS.curveTo2:te.push("C",u(E),u(K),u(h[Y]),u(h[Y+1]),u(h[Y+2]),u(h[Y+3])),E=h[Y+2],K=h[Y+3],Y+=4;break;case r.OPS.curveTo3:E=h[Y+2],K=h[Y+3],te.push("C",u(h[Y]),u(h[Y+1]),u(E),u(K),u(E),u(K)),Y+=4;break;case r.OPS.closePath:te.push("Z");break}}}catch(o){be.e(o)}finally{be.f()}te=te.join(" "),A.path&&R.length>0&&R[0]!==r.OPS.rectangle&&R[0]!==r.OPS.moveTo?te=A.path.getAttributeNS(null,"d")+te:(A.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(A.path)),A.path.setAttributeNS(null,"d",te),A.path.setAttributeNS(null,"fill","none"),A.element=A.path,A.setCurrentPoint(E,K)}},{key:"endPath",value:function(){var R=this.current;if(R.path=null,!!this.pendingClip){if(!R.element){this.pendingClip=null;return}var h="clippath".concat(Z++),A=this.svgFactory.createElement("svg:clipPath");A.setAttributeNS(null,"id",h),A.setAttributeNS(null,"transform",v(this.transformMatrix));var E=R.element.cloneNode(!0);if(this.pendingClip==="evenodd"?E.setAttributeNS(null,"clip-rule","evenodd"):E.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,A.appendChild(E),this.defs.appendChild(A),R.activeClipUrl){R.clipGroup=null;var K=P(this.extraStack),te;try{for(K.s();!(te=K.n()).done;){var Y=te.value;Y.clipGroup=null}}catch(be){K.e(be)}finally{K.f()}A.setAttributeNS(null,"clip-path",R.activeClipUrl)}R.activeClipUrl="url(#".concat(h,")"),this.tgrp=null}}},{key:"clip",value:function(R){this.pendingClip=R}},{key:"closePath",value:function(){var R=this.current;if(R.path){var h="".concat(R.path.getAttributeNS(null,"d"),"Z");R.path.setAttributeNS(null,"d",h)}}},{key:"setLeading",value:function(R){this.current.leading=-R}},{key:"setTextRise",value:function(R){this.current.textRise=R}},{key:"setTextRenderingMode",value:function(R){this.current.textRenderingMode=R}},{key:"setHScale",value:function(R){this.current.textHScale=R/100}},{key:"setRenderingIntent",value:function(R){}},{key:"setFlatness",value:function(R){}},{key:"setGState",value:function(R){var h=P(R),A;try{for(h.s();!(A=h.n()).done;){var E=$(A.value,2),K=E[0],te=E[1];switch(K){case"LW":this.setLineWidth(te);break;case"LC":this.setLineCap(te);break;case"LJ":this.setLineJoin(te);break;case"ML":this.setMiterLimit(te);break;case"D":this.setDash(te[0],te[1]);break;case"RI":this.setRenderingIntent(te);break;case"FL":this.setFlatness(te);break;case"Font":this.setFont(te);break;case"CA":this.setStrokeAlpha(te);break;case"ca":this.setFillAlpha(te);break;default:(0,r.warn)("Unimplemented graphic state operator ".concat(K));break}}}catch(Y){h.e(Y)}finally{h.f()}}},{key:"fill",value:function(){var R=this.current;R.element&&(R.element.setAttributeNS(null,"fill",R.fillColor),R.element.setAttributeNS(null,"fill-opacity",R.fillAlpha),this.endPath())}},{key:"stroke",value:function(){var R=this.current;R.element&&(this._setStrokeAttributes(R.element),R.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function(R){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,A=this.current,E=A.dashArray;h!==1&&E.length>0&&(E=E.map(function(K){return h*K})),R.setAttributeNS(null,"stroke",A.strokeColor),R.setAttributeNS(null,"stroke-opacity",A.strokeAlpha),R.setAttributeNS(null,"stroke-miterlimit",u(A.miterLimit)),R.setAttributeNS(null,"stroke-linecap",A.lineCap),R.setAttributeNS(null,"stroke-linejoin",A.lineJoin),R.setAttributeNS(null,"stroke-width",u(h*A.lineWidth)+"px"),R.setAttributeNS(null,"stroke-dasharray",E.map(u).join(" ")),R.setAttributeNS(null,"stroke-dashoffset",u(h*A.dashPhase)+"px")}},{key:"eoFill",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function(){var R=this.svgFactory.createElement("svg:rect");R.setAttributeNS(null,"x","0"),R.setAttributeNS(null,"y","0"),R.setAttributeNS(null,"width","1px"),R.setAttributeNS(null,"height","1px"),R.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(R)}},{key:"paintImageXObject",value:function(R){var h=R.startsWith("g_")?this.commonObjs.get(R):this.objs.get(R);if(!h){(0,r.warn)("Dependent image with object ID ".concat(R," is not ready yet"));return}this.paintInlineImageXObject(h)}},{key:"paintInlineImageXObject",value:function(R,h){var A=R.width,E=R.height,K=M(R,this.forceDataSchema,!!h),te=this.svgFactory.createElement("svg:rect");te.setAttributeNS(null,"x","0"),te.setAttributeNS(null,"y","0"),te.setAttributeNS(null,"width",u(A)),te.setAttributeNS(null,"height",u(E)),this.current.element=te,this.clip("nonzero");var Y=this.svgFactory.createElement("svg:image");Y.setAttributeNS(b,"xlink:href",K),Y.setAttributeNS(null,"x","0"),Y.setAttributeNS(null,"y",u(-E)),Y.setAttributeNS(null,"width",u(A)+"px"),Y.setAttributeNS(null,"height",u(E)+"px"),Y.setAttributeNS(null,"transform","scale(".concat(u(1/A)," ").concat(u(-1/E),")")),h?h.appendChild(Y):this._ensureTransformGroup().appendChild(Y)}},{key:"paintImageMaskXObject",value:function(R){var h=this.current,A=R.width,E=R.height,K=h.fillColor;h.maskId="mask".concat(J++);var te=this.svgFactory.createElement("svg:mask");te.setAttributeNS(null,"id",h.maskId);var Y=this.svgFactory.createElement("svg:rect");Y.setAttributeNS(null,"x","0"),Y.setAttributeNS(null,"y","0"),Y.setAttributeNS(null,"width",u(A)),Y.setAttributeNS(null,"height",u(E)),Y.setAttributeNS(null,"fill",K),Y.setAttributeNS(null,"mask","url(#".concat(h.maskId,")")),this.defs.appendChild(te),this._ensureTransformGroup().appendChild(Y),this.paintInlineImageXObject(R,te)}},{key:"paintFormXObjectBegin",value:function(R,h){if(Array.isArray(R)&&R.length===6&&this.transform(R[0],R[1],R[2],R[3],R[4],R[5]),h){var A=h[2]-h[0],E=h[3]-h[1],K=this.svgFactory.createElement("svg:rect");K.setAttributeNS(null,"x",h[0]),K.setAttributeNS(null,"y",h[1]),K.setAttributeNS(null,"width",u(A)),K.setAttributeNS(null,"height",u(E)),this.current.element=K,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){}},{key:"_initialize",value:function(R){var h=this.svgFactory.create(R.width,R.height),A=this.svgFactory.createElement("svg:defs");h.appendChild(A),this.defs=A;var E=this.svgFactory.createElement("svg:g");return E.setAttributeNS(null,"transform",v(R.transform)),h.appendChild(E),this.svg=E,h}},{key:"_ensureClipGroup",value:function(){if(!this.current.clipGroup){var R=this.svgFactory.createElement("svg:g");R.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(R),this.current.clipGroup=R}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",v(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}]),H}()}},(y,a,t)=>{"use strict";function r(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(E){return typeof E}:r=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},r(h)}Object.defineProperty(a,"__esModule",{value:!0}),a.PDFNodeStream=void 0;var i=_(t(2)),f=t(4),m=t(154);function _(h){return h&&h.__esModule?h:{default:h}}function D(h,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(A&&A.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),A&&L(h,A)}function L(h,A){return L=Object.setPrototypeOf||function(K,te){return K.__proto__=te,K},L(h,A)}function $(h){var A=O();return function(){var K=P(h),te;if(A){var Y=P(this).constructor;te=Reflect.construct(K,arguments,Y)}else te=K.apply(this,arguments);return j(this,te)}}function j(h,A){if(A&&(r(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V(h)}function V(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(h){return!1}}function P(h){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},P(h)}function F(h,A,E,K,te,Y,be){try{var Ce=h[Y](be),we=Ce.value}catch(Me){E(Me);return}Ce.done?A(we):Promise.resolve(we).then(K,te)}function x(h){return function(){var A=this,E=arguments;return new Promise(function(K,te){var Y=h.apply(A,E);function be(we){F(Y,K,te,be,Ce,"next",we)}function Ce(we){F(Y,K,te,be,Ce,"throw",we)}be(void 0)})}}function I(h,A){var E=typeof Symbol!="undefined"&&h[Symbol.iterator]||h["@@iterator"];if(!E){if(Array.isArray(h)||(E=g(h))||A&&h&&typeof h.length=="number"){E&&(h=E);var K=0,te=function(){};return{s:te,n:function(){return K>=h.length?{done:!0}:{done:!1,value:h[K++]}},e:function(Me){throw Me},f:te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Y=!0,be=!1,Ce;return{s:function(){E=E.call(h)},n:function(){var Me=E.next();return Y=Me.done,Me},e:function(Me){be=!0,Ce=Me},f:function(){try{!Y&&E.return!=null&&E.return()}finally{if(be)throw Ce}}}}function g(h,A){if(!!h){if(typeof h=="string")return B(h,A);var E=Object.prototype.toString.call(h).slice(8,-1);if(E==="Object"&&h.constructor&&(E=h.constructor.name),E==="Map"||E==="Set")return Array.from(h);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return B(h,A)}}function B(h,A){(A==null||A>h.length)&&(A=h.length);for(var E=0,K=new Array(A);E{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createResponseStatusError=D,a.extractFilenameFromHeader=_,a.validateRangeRequestCapabilities=m,a.validateResponseStatus=L;var r=t(4),i=t(155),f=t(1);function m($){var j=$.getResponseHeader,V=$.isHttp,O=$.rangeChunkSize,P=$.disableRange;(0,r.assert)(O>0,"Range chunk size must be larger than zero");var F={allowRangeRequests:!1,suggestedLength:void 0},x=parseInt(j("Content-Length"),10);if(!Number.isInteger(x)||(F.suggestedLength=x,x<=2*O)||P||!V)return F;var I=j("Content-Encoding")||"identity";return I!=="identity"||(F.allowRangeRequests=!0),F}function _($){var j=$("Content-Disposition");if(j){var V=(0,i.getFilenameFromContentDispositionHeader)(j);if(V.includes("%"))try{V=decodeURIComponent(V)}catch(O){}if((0,f.isPdfFile)(V))return V}return null}function D($,j){return $===404||$===0&&j.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+j+'".'):new r.UnexpectedResponseException("Unexpected server response (".concat($,') while retrieving PDF "').concat(j,'".'),$)}function L($){return $===200||$===206}},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getFilenameFromContentDispositionHeader=$;var r=t(4);function i(j,V){return L(j)||D(j,V)||m(j,V)||f()}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(j,V){if(!!j){if(typeof j=="string")return _(j,V);var O=Object.prototype.toString.call(j).slice(8,-1);if(O==="Object"&&j.constructor&&(O=j.constructor.name),O==="Map"||O==="Set")return Array.from(j);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return _(j,V)}}function _(j,V){(V==null||V>j.length)&&(V=j.length);for(var O=0,P=new Array(V);O{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PDFNetworkStream=void 0;var r=m(t(2)),i=t(4),f=t(154);function m(u){return u&&u.__esModule?u:{default:u}}function _(u,v,d,c,b,T,U){try{var M=u[T](U),G=M.value}catch(Z){d(Z);return}M.done?v(G):Promise.resolve(G).then(c,b)}function D(u){return function(){var v=this,d=arguments;return new Promise(function(c,b){var T=u.apply(v,d);function U(G){_(T,c,b,U,M,"next",G)}function M(G){_(T,c,b,U,M,"throw",G)}U(void 0)})}}function L(u,v){var d=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(!d){if(Array.isArray(u)||(d=$(u))||v&&u&&typeof u.length=="number"){d&&(u=d);var c=0,b=function(){};return{s:b,n:function(){return c>=u.length?{done:!0}:{done:!1,value:u[c++]}},e:function(Z){throw Z},f:b}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,U=!1,M;return{s:function(){d=d.call(u)},n:function(){var Z=d.next();return T=Z.done,Z},e:function(Z){U=!0,M=Z},f:function(){try{!T&&d.return!=null&&d.return()}finally{if(U)throw M}}}}function $(u,v){if(!!u){if(typeof u=="string")return j(u,v);var d=Object.prototype.toString.call(u).slice(8,-1);if(d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set")return Array.from(u);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return j(u,v)}}function j(u,v){(v==null||v>u.length)&&(v=u.length);for(var d=0,c=new Array(v);d1&&arguments[1]!==void 0?arguments[1]:{};V(this,u),this.url=v,this.isHttp=/^https?:/i.test(v),this.httpHeaders=this.isHttp&&d.httpHeaders||Object.create(null),this.withCredentials=d.withCredentials||!1,this.getXhr=d.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}return P(u,[{key:"requestRange",value:function(d,c,b){var T={begin:d,end:c};for(var U in b)T[U]=b[U];return this.request(T)}},{key:"requestFull",value:function(d){return this.request(d)}},{key:"request",value:function(d){var c=this.getXhr(),b=this.currXhrId++,T=this.pendingRequests[b]={xhr:c};c.open("GET",this.url),c.withCredentials=this.withCredentials;for(var U in this.httpHeaders){var M=this.httpHeaders[U];typeof M!="undefined"&&c.setRequestHeader(U,M)}return this.isHttp&&"begin"in d&&"end"in d?(c.setRequestHeader("Range","bytes=".concat(d.begin,"-").concat(d.end-1)),T.expectedStatus=x):T.expectedStatus=F,c.responseType="arraybuffer",d.onError&&(c.onerror=function(G){d.onError(c.status)}),c.onreadystatechange=this.onStateChange.bind(this,b),c.onprogress=this.onProgress.bind(this,b),T.onHeadersReceived=d.onHeadersReceived,T.onDone=d.onDone,T.onError=d.onError,T.onProgress=d.onProgress,c.send(null),b}},{key:"onProgress",value:function(d,c){var b,T=this.pendingRequests[d];!T||(b=T.onProgress)===null||b===void 0||b.call(T,c)}},{key:"onStateChange",value:function(d,c){var b=this.pendingRequests[d];if(!!b){var T=b.xhr;if(T.readyState>=2&&b.onHeadersReceived&&(b.onHeadersReceived(),delete b.onHeadersReceived),T.readyState===4&&d in this.pendingRequests){if(delete this.pendingRequests[d],T.status===0&&this.isHttp){var U;(U=b.onError)===null||U===void 0||U.call(b,T.status);return}var M=T.status||F,G=M===F&&b.expectedStatus===x;if(!G&&M!==b.expectedStatus){var Z;(Z=b.onError)===null||Z===void 0||Z.call(b,T.status);return}var J=I(T);if(M===x){var ie=T.getResponseHeader("Content-Range"),H=/bytes (\d+)-(\d+)\/(\d+)/.exec(ie);b.onDone({begin:parseInt(H[1],10),chunk:J})}else if(J)b.onDone({begin:0,chunk:J});else{var q;(q=b.onError)===null||q===void 0||q.call(b,T.status)}}}}},{key:"getRequestXhr",value:function(d){return this.pendingRequests[d].xhr}},{key:"isPendingRequest",value:function(d){return d in this.pendingRequests}},{key:"abortRequest",value:function(d){var c=this.pendingRequests[d].xhr;delete this.pendingRequests[d],c.abort()}}]),u}(),B=function(){function u(v){V(this,u),this._source=v,this._manager=new g(v.url,{httpHeaders:v.httpHeaders,withCredentials:v.withCredentials}),this._rangeChunkSize=v.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}return P(u,[{key:"_onRangeRequestReaderClosed",value:function(d){var c=this._rangeRequestReaders.indexOf(d);c>=0&&this._rangeRequestReaders.splice(c,1)}},{key:"getFullReader",value:function(){return(0,i.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new p(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(d,c){var b=new l(this._manager,d,c);return b.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(b),b}},{key:"cancelAllRequests",value:function(d){var c;(c=this._fullRequestReader)===null||c===void 0||c.cancel(d);var b=L(this._rangeRequestReaders.slice(0)),T;try{for(b.s();!(T=b.n()).done;){var U=T.value;U.cancel(d)}}catch(M){b.e(M)}finally{b.f()}}}]),u}();a.PDFNetworkStream=B;var p=function(){function u(v,d){V(this,u),this._manager=v;var c={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=d.url,this._fullRequestId=v.requestFull(c),this._headersReceivedCapability=(0,i.createPromiseCapability)(),this._disableRange=d.disableRange||!1,this._contentLength=d.length,this._rangeChunkSize=d.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}return P(u,[{key:"_onHeadersReceived",value:function(){var d=this._fullRequestId,c=this._manager.getRequestXhr(d),b=function(Z){return c.getResponseHeader(Z)},T=(0,f.validateRangeRequestCapabilities)({getResponseHeader:b,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),U=T.allowRangeRequests,M=T.suggestedLength;U&&(this._isRangeSupported=!0),this._contentLength=M||this._contentLength,this._filename=(0,f.extractFilenameFromHeader)(b),this._isRangeSupported&&this._manager.abortRequest(d),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function(d){if(d)if(this._requests.length>0){var c=this._requests.shift();c.resolve({value:d.chunk,done:!1})}else this._cachedChunks.push(d.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){var b=L(this._requests),T;try{for(b.s();!(T=b.n()).done;){var U=T.value;U.resolve({value:void 0,done:!0})}}catch(M){b.e(M)}finally{b.f()}this._requests.length=0}}},{key:"_onError",value:function(d){this._storedError=(0,f.createResponseStatusError)(d,this._url),this._headersReceivedCapability.reject(this._storedError);var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.reject(this._storedError)}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(d){var c;(c=this.onProgress)===null||c===void 0||c.call(this,{loaded:d.loaded,total:d.lengthComputable?d.total:this._contentLength})}},{key:"filename",get:function(){return this._filename}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"contentLength",get:function(){return this._contentLength}},{key:"headersReady",get:function(){return this._headersReceivedCapability.promise}},{key:"read",value:function(){var v=D(r.default.mark(function c(){var b,T;return r.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!this._storedError){M.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){M.next=5;break}return b=this._cachedChunks.shift(),M.abrupt("return",{value:b,done:!1});case 5:if(!this._done){M.next=7;break}return M.abrupt("return",{value:void 0,done:!0});case 7:return T=(0,i.createPromiseCapability)(),this._requests.push(T),M.abrupt("return",T.promise);case 10:case"end":return M.stop()}},c,this)}));function d(){return v.apply(this,arguments)}return d}()},{key:"cancel",value:function(d){this._done=!0,this._headersReceivedCapability.reject(d);var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.resolve({value:void 0,done:!0})}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]),u}(),l=function(){function u(v,d,c){V(this,u),this._manager=v;var b={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=v.url,this._requestId=v.requestRange(d,c,b),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}return P(u,[{key:"_close",value:function(){var d;(d=this.onClosed)===null||d===void 0||d.call(this,this)}},{key:"_onDone",value:function(d){var c=d.chunk;if(this._requests.length>0){var b=this._requests.shift();b.resolve({value:c,done:!1})}else this._queuedChunk=c;this._done=!0;var T=L(this._requests),U;try{for(T.s();!(U=T.n()).done;){var M=U.value;M.resolve({value:void 0,done:!0})}}catch(G){T.e(G)}finally{T.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(d){this._storedError=(0,f.createResponseStatusError)(d,this._url);var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.reject(this._storedError)}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(d){if(!this.isStreamingSupported){var c;(c=this.onProgress)===null||c===void 0||c.call(this,{loaded:d.loaded})}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:function(){var v=D(r.default.mark(function c(){var b,T;return r.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(!this._storedError){M.next=2;break}throw this._storedError;case 2:if(this._queuedChunk===null){M.next=6;break}return b=this._queuedChunk,this._queuedChunk=null,M.abrupt("return",{value:b,done:!1});case 6:if(!this._done){M.next=8;break}return M.abrupt("return",{value:void 0,done:!0});case 8:return T=(0,i.createPromiseCapability)(),this._requests.push(T),M.abrupt("return",T.promise);case 11:case"end":return M.stop()}},c,this)}));function d(){return v.apply(this,arguments)}return d}()},{key:"cancel",value:function(d){this._done=!0;var c=L(this._requests),b;try{for(c.s();!(b=c.n()).done;){var T=b.value;T.resolve({value:void 0,done:!0})}}catch(U){c.e(U)}finally{c.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]),u}()},(y,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PDFFetchStream=void 0;var r=m(t(2)),i=t(4),f=t(154);function m(l){return l&&l.__esModule?l:{default:l}}function _(l,u,v,d,c,b,T){try{var U=l[b](T),M=U.value}catch(G){v(G);return}U.done?u(M):Promise.resolve(M).then(d,c)}function D(l){return function(){var u=this,v=arguments;return new Promise(function(d,c){var b=l.apply(u,v);function T(M){_(b,d,c,T,U,"next",M)}function U(M){_(b,d,c,T,U,"throw",M)}T(void 0)})}}function L(l,u){var v=typeof Symbol!="undefined"&&l[Symbol.iterator]||l["@@iterator"];if(!v){if(Array.isArray(l)||(v=$(l))||u&&l&&typeof l.length=="number"){v&&(l=v);var d=0,c=function(){};return{s:c,n:function(){return d>=l.length?{done:!0}:{done:!1,value:l[d++]}},e:function(G){throw G},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var b=!0,T=!1,U;return{s:function(){v=v.call(l)},n:function(){var G=v.next();return b=G.done,G},e:function(G){T=!0,U=G},f:function(){try{!b&&v.return!=null&&v.return()}finally{if(T)throw U}}}}function $(l,u){if(!!l){if(typeof l=="string")return j(l,u);var v=Object.prototype.toString.call(l).slice(8,-1);if(v==="Object"&&l.constructor&&(v=l.constructor.name),v==="Map"||v==="Set")return Array.from(l);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return j(l,u)}}function j(l,u){(u==null||u>l.length)&&(u=l.length);for(var v=0,d=new Array(u);v{__w_pdfjs_require__.nmd=y=>(y.paths=[],y.children||(y.children=[]),y)})();var __webpack_exports__={};return(()=>{"use strict";var y=__webpack_exports__;Object.defineProperty(y,"__esModule",{value:!0}),Object.defineProperty(y,"AnnotationLayer",{enumerable:!0,get:function(){return i.AnnotationLayer}}),Object.defineProperty(y,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(y,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(y,"GlobalWorkerOptions",{enumerable:!0,get:function(){return f.GlobalWorkerOptions}}),Object.defineProperty(y,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(y,"LinkTarget",{enumerable:!0,get:function(){return a.LinkTarget}}),Object.defineProperty(y,"LoopbackPort",{enumerable:!0,get:function(){return r.LoopbackPort}}),Object.defineProperty(y,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(y,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(y,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(y,"PDFDateString",{enumerable:!0,get:function(){return a.PDFDateString}}),Object.defineProperty(y,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(y,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(y,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(y,"PixelsPerInch",{enumerable:!0,get:function(){return a.PixelsPerInch}}),Object.defineProperty(y,"RenderingCancelledException",{enumerable:!0,get:function(){return a.RenderingCancelledException}}),Object.defineProperty(y,"SVGGraphics",{enumerable:!0,get:function(){return D.SVGGraphics}}),Object.defineProperty(y,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(y,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(y,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(y,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(y,"XfaLayer",{enumerable:!0,get:function(){return L.XfaLayer}}),Object.defineProperty(y,"addLinkAttributes",{enumerable:!0,get:function(){return a.addLinkAttributes}}),Object.defineProperty(y,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(y,"createObjectURL",{enumerable:!0,get:function(){return t.createObjectURL}}),Object.defineProperty(y,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(y,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(y,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(y,"getFilenameFromUrl",{enumerable:!0,get:function(){return a.getFilenameFromUrl}}),Object.defineProperty(y,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return a.getPdfFilenameFromUrl}}),Object.defineProperty(y,"getXfaPageViewport",{enumerable:!0,get:function(){return a.getXfaPageViewport}}),Object.defineProperty(y,"isPdfFile",{enumerable:!0,get:function(){return a.isPdfFile}}),Object.defineProperty(y,"loadScript",{enumerable:!0,get:function(){return a.loadScript}}),Object.defineProperty(y,"removeNullCharacters",{enumerable:!0,get:function(){return t.removeNullCharacters}}),Object.defineProperty(y,"renderTextLayer",{enumerable:!0,get:function(){return _.renderTextLayer}}),Object.defineProperty(y,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(y,"version",{enumerable:!0,get:function(){return r.version}});var a=__w_pdfjs_require__(1),t=__w_pdfjs_require__(4),r=__w_pdfjs_require__(136),i=__w_pdfjs_require__(148),f=__w_pdfjs_require__(142),m=__w_pdfjs_require__(6),_=__w_pdfjs_require__(151),D=__w_pdfjs_require__(152),L=__w_pdfjs_require__(150),$="2.12.313",j="a2ae56f39";if(m.isNodeJS){var V=__w_pdfjs_require__(153),O=V.PDFNodeStream;(0,r.setPDFNetworkStreamFactory)(function(g){return new O(g)})}else{var P=__w_pdfjs_require__(156),F=P.PDFNetworkStream,x=__w_pdfjs_require__(157),I=x.PDFFetchStream;(0,r.setPDFNetworkStreamFactory)(function(g){return(0,a.isValidFetchUrl)(g.url)?new I(g):new F(g)})}})(),__webpack_exports__})()});