diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..590782eb8852b6dca28de6617530b21c6c3bd2bc --- /dev/null +++ b/lib/index.js @@ -0,0 +1,5 @@ +(function(Q,k){typeof exports=="object"&&typeof module!="undefined"?module.exports=k(require("vue-demi"),require("vue")):typeof define=="function"&&define.amd?define(["vue-demi","vue"],k):(Q=typeof globalThis!="undefined"?globalThis:Q||self,Q["vue-office-pdf"]=k(Q.VueDemi,Q.Vue))})(this,function(Q,k){"use strict";var IC=Object.defineProperty;var Vn=Object.getOwnPropertySymbols;var pC=Object.prototype.hasOwnProperty,yC=Object.prototype.propertyIsEnumerable;var zn=(Q,k,R)=>k in Q?IC(Q,k,{enumerable:!0,configurable:!0,writable:!0,value:R}):Q[k]=R,$n=(Q,k)=>{for(var R in k||(k={}))pC.call(k,R)&&zn(Q,R,k[R]);if(Vn)for(var R of Vn(k))yC.call(k,R)&&zn(Q,R,k[R]);return Q};var ei=(Q,k,R)=>new Promise((_e,fe)=>{var He=J=>{try{oe(R.next(J))}catch(G){fe(G)}},je=J=>{try{oe(R.throw(J))}catch(G){fe(G)}},oe=J=>J.done?_e(J.value):Promise.resolve(J.value).then(He,je);oe((R=R.apply(Q,k)).next())});const R=`/*! For license information please see worker.js.LICENSE.txt */ +var e={4186:(e,t,r)=>{var A=r(3749),n=r(8055),i=TypeError;e.exports=function(e){if(A(e))return e;throw new i(n(e)+" is not a function")}},9052:(e,t,r)=>{var A=r(8413),n=r(8055),i=TypeError;e.exports=function(e){if(A(e))return e;throw new i(n(e)+" is not a constructor")}},7330:(e,t,r)=>{var A=r(4597),n=String,i=TypeError;e.exports=function(e){if(A(e))return e;throw new i("Can't set "+n(e)+" as a prototype")}},4376:(e,t,r)=>{var A=r(418).has;e.exports=function(e){return A(e),e}},1458:(e,t,r)=>{var A=r(5811),n=r(5304),i=r(1601).f,a=A("unscopables"),o=Array.prototype;void 0===o[a]&&i(o,a,{configurable:!0,value:n(null)}),e.exports=function(e){o[a][e]=!0}},8149:(e,t,r)=>{var A=r(6903).charAt;e.exports=function(e,t,r){return t+(r?A(e,t).length:1)}},3399:(e,t,r)=>{var A=r(6921),n=TypeError;e.exports=function(e,t){if(A(t,e))return e;throw new n("Incorrect invocation")}},7447:(e,t,r)=>{var A=r(2674),n=String,i=TypeError;e.exports=function(e){if(A(e))return e;throw new i(n(e)+" is not an object")}},387:e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},8242:(e,t,r)=>{var A=r(4032),n=r(5026),i=r(9872),a=A.ArrayBuffer,o=A.TypeError;e.exports=a&&n(a.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==i(e))throw new o("ArrayBuffer expected");return e.byteLength}},8102:(e,t,r)=>{var A=r(4032),n=r(2116),i=r(8242),a=A.ArrayBuffer,o=a&&a.prototype,s=o&&n(o.slice);e.exports=function(e){if(0!==i(e))return!1;if(!s)return!1;try{return s(e,0,0),!1}catch(e){return!0}}},7060:(e,t,r)=>{var A=r(3455);e.exports=A((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},6033:(e,t,r)=>{var A=r(8102),n=TypeError;e.exports=function(e){if(A(e))throw new n("ArrayBuffer is detached");return e}},4676:(e,t,r)=>{var A=r(4032),n=r(2608),i=r(5026),a=r(9088),o=r(6033),s=r(8242),c=r(7395),g=r(6572),u=A.structuredClone,l=A.ArrayBuffer,h=A.DataView,I=Math.min,f=l.prototype,C=h.prototype,B=n(f.slice),Q=i(f,"resizable","get"),E=i(f,"maxByteLength","get"),d=n(C.getInt8),y=n(C.setInt8);e.exports=(g||c)&&function(e,t,r){var A,n=s(e),i=void 0===t?n:a(t),f=!Q||!Q(e);if(o(e),g&&(e=u(e,{transfer:[e]}),n===i&&(r||f)))return e;if(n>=i&&(!r||f))A=B(e,0,i);else{var C=r&&!f&&E?{maxByteLength:E(e)}:void 0;A=new l(i,C);for(var p=new h(e),v=new h(A),m=I(i,n),w=0;w{var A,n,i,a=r(387),o=r(2444),s=r(4032),c=r(3749),g=r(2674),u=r(9649),l=r(1179),h=r(8055),I=r(139),f=r(8552),C=r(8986),B=r(6921),Q=r(2611),E=r(9415),d=r(5811),y=r(5936),p=r(8301),v=p.enforce,m=p.get,w=s.Int8Array,b=w&&w.prototype,k=s.Uint8ClampedArray,D=k&&k.prototype,S=w&&Q(w),F=b&&Q(b),x=Object.prototype,R=s.TypeError,G=d("toStringTag"),N=y("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",U=a&&!!E&&"Opera"!==l(s.opera),M=!1,J={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},H={BigInt64Array:8,BigUint64Array:8},Y=function(e){var t=Q(e);if(g(t)){var r=m(t);return r&&u(r,L)?r[L]:Y(t)}},P=function(e){if(!g(e))return!1;var t=l(e);return u(J,t)||u(H,t)};for(A in J)(i=(n=s[A])&&n.prototype)?v(i)[L]=n:U=!1;for(A in H)(i=(n=s[A])&&n.prototype)&&(v(i)[L]=n);if((!U||!c(S)||S===Function.prototype)&&(S=function(){throw new R("Incorrect invocation")},U))for(A in J)s[A]&&E(s[A],S);if((!U||!F||F===x)&&(F=S.prototype,U))for(A in J)s[A]&&E(s[A].prototype,F);if(U&&Q(D)!==F&&E(D,F),o&&!u(F,G))for(A in M=!0,C(F,G,{configurable:!0,get:function(){return g(this)?this[N]:void 0}}),J)s[A]&&I(s[A],N,A);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:U,TYPED_ARRAY_TAG:M&&N,aTypedArray:function(e){if(P(e))return e;throw new R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(c(e)&&(!E||B(S,e)))return e;throw new R(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,A){if(o){if(r)for(var n in J){var i=s[n];if(i&&u(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}F[e]&&!r||f(F,e,r?t:U&&b[e]||t,A)}},exportTypedArrayStaticMethod:function(e,t,r){var A,n;if(o){if(E){if(r)for(A in J)if((n=s[A])&&u(n,e))try{delete n[e]}catch(e){}if(S[e]&&!r)return;try{return f(S,e,r?t:U&&S[e]||t)}catch(e){}}for(A in J)!(n=s[A])||n[e]&&!r||f(n,e,t)}},getTypedArrayConstructor:Y,isView:function(e){if(!g(e))return!1;var t=l(e);return"DataView"===t||u(J,t)||u(H,t)},isTypedArray:P,TypedArray:S,TypedArrayPrototype:F}},7226:(e,t,r)=>{var A=r(4032),n=r(2608),i=r(2444),a=r(387),o=r(2542),s=r(139),c=r(8986),g=r(4183),u=r(3455),l=r(3399),h=r(1211),I=r(5806),f=r(9088),C=r(3505),B=r(1306),Q=r(2611),E=r(9415),d=r(9557),y=r(4224),p=r(3951),v=r(2924),m=r(6911),w=r(8301),b=o.PROPER,k=o.CONFIGURABLE,D="ArrayBuffer",S="DataView",F="prototype",x="Wrong index",R=w.getterFor(D),G=w.getterFor(S),N=w.set,L=A[D],U=L,M=U&&U[F],J=A[S],H=J&&J[F],Y=Object.prototype,P=A.Array,O=A.RangeError,K=n(d),T=n([].reverse),q=B.pack,j=B.unpack,W=function(e){return[255&e]},Z=function(e){return[255&e,e>>8&255]},_=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},X=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},V=function(e){return q(C(e),23,4)},z=function(e){return q(e,52,8)},$=function(e,t,r){c(e[F],t,{configurable:!0,get:function(){return r(this)[t]}})},ee=function(e,t,r,A){var n=G(e),i=f(r),a=!!A;if(i+t>n.byteLength)throw new O(x);var o=n.bytes,s=i+n.byteOffset,c=y(o,s,s+t);return a?c:T(c)},te=function(e,t,r,A,n,i){var a=G(e),o=f(r),s=A(+n),c=!!i;if(o+t>a.byteLength)throw new O(x);for(var g=a.bytes,u=o+a.byteOffset,l=0;l>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else M=(U=function(e){l(this,M);var t=f(e);N(this,{type:D,bytes:K(P(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)})[F],H=(J=function(e,t,r){l(this,H),l(e,M);var A=R(e),n=A.byteLength,a=h(t);if(a<0||a>n)throw new O("Wrong offset");if(a+(r=void 0===r?n-a:I(r))>n)throw new O("Wrong length");N(this,{type:S,buffer:e,byteLength:r,byteOffset:a,bytes:A.bytes}),i||(this.buffer=e,this.byteLength=r,this.byteOffset=a)})[F],i&&($(U,"byteLength",R),$(J,"buffer",G),$(J,"byteLength",G),$(J,"byteOffset",G)),g(H,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return X(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return j(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return j(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,W,t)},setUint8:function(e,t){te(this,1,e,W,t)},setInt16:function(e,t){te(this,2,e,Z,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,Z,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,_,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,_,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,V,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,z,t,arguments.length>2&&arguments[2])}});m(U,D),m(J,S),e.exports={ArrayBuffer:U,DataView:J}},6677:(e,t,r)=>{var A=r(4165),n=r(9002),i=r(7878),a=r(1870),o=Math.min;e.exports=[].copyWithin||function(e,t){var r=A(this),s=i(r),c=n(e,s),g=n(t,s),u=arguments.length>2?arguments[2]:void 0,l=o((void 0===u?s:n(u,s))-g,s-c),h=1;for(g0;)g in r?r[c]=r[g]:a(r,c),c+=h,g+=h;return r}},9557:(e,t,r)=>{var A=r(4165),n=r(9002),i=r(7878);e.exports=function(e){for(var t=A(this),r=i(t),a=arguments.length,o=n(a>1?arguments[1]:void 0,r),s=a>2?arguments[2]:void 0,c=void 0===s?r:n(s,r);c>o;)t[o++]=e;return t}},3147:(e,t,r)=>{var A=r(5645).forEach,n=r(1814)("forEach");e.exports=n?[].forEach:function(e){return A(this,e,arguments.length>1?arguments[1]:void 0)}},7434:(e,t,r)=>{var A=r(7878);e.exports=function(e,t,r){for(var n=0,i=arguments.length>2?r:A(t),a=new e(i);i>n;)a[n]=t[n++];return a}},3948:(e,t,r)=>{var A=r(4864),n=r(3453),i=r(4165),a=r(3535),o=r(993),s=r(8413),c=r(7878),g=r(3552),u=r(6961),l=r(7507),h=Array;e.exports=function(e){var t=i(e),r=s(this),I=arguments.length,f=I>1?arguments[1]:void 0,C=void 0!==f;C&&(f=A(f,I>2?arguments[2]:void 0));var B,Q,E,d,y,p,v=l(t),m=0;if(!v||this===h&&o(v))for(B=c(t),Q=r?new this(B):h(B);B>m;m++)p=C?f(t[m],m):t[m],g(Q,m,p);else for(Q=r?new this:[],y=(d=u(t,v)).next;!(E=n(y,d)).done;m++)p=C?a(d,f,[E.value,m],!0):E.value,g(Q,m,p);return Q.length=m,Q}},7921:(e,t,r)=>{var A=r(3637),n=r(9002),i=r(7878),a=function(e){return function(t,r,a){var o=A(t),s=i(o);if(0===s)return!e&&-1;var c,g=n(a,s);if(e&&r!=r){for(;s>g;)if((c=o[g++])!=c)return!0}else for(;s>g;g++)if((e||g in o)&&o[g]===r)return e||g||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},767:(e,t,r)=>{var A=r(4864),n=r(9455),i=r(4165),a=r(7878),o=function(e){var t=1===e;return function(r,o,s){for(var c,g=i(r),u=n(g),l=a(u),h=A(o,s);l-- >0;)if(h(c=u[l],l,g))switch(e){case 0:return c;case 1:return l}return t?-1:void 0}};e.exports={findLast:o(0),findLastIndex:o(1)}},5645:(e,t,r)=>{var A=r(4864),n=r(2608),i=r(9455),a=r(4165),o=r(7878),s=r(1453),c=n([].push),g=function(e){var t=1===e,r=2===e,n=3===e,g=4===e,u=6===e,l=7===e,h=5===e||u;return function(I,f,C,B){for(var Q,E,d=a(I),y=i(d),p=o(y),v=A(f,C),m=0,w=B||s,b=t?w(I,p):r||l?w(I,0):void 0;p>m;m++)if((h||m in y)&&(E=v(Q=y[m],m,d),e))if(t)b[m]=E;else if(E)switch(e){case 3:return!0;case 5:return Q;case 6:return m;case 2:c(b,Q)}else switch(e){case 4:return!1;case 7:c(b,Q)}return u?-1:n||g?g:b}};e.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6),filterReject:g(7)}},3499:(e,t,r)=>{var A=r(3881),n=r(3637),i=r(1211),a=r(7878),o=r(1814),s=Math.min,c=[].lastIndexOf,g=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o("lastIndexOf"),l=g||!u;e.exports=l?function(e){if(g)return A(c,this,arguments)||0;var t=n(this),r=a(t);if(0===r)return-1;var o=r-1;for(arguments.length>1&&(o=s(o,i(arguments[1]))),o<0&&(o=r+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}:c},9077:(e,t,r)=>{var A=r(3455),n=r(5811),i=r(6415),a=n("species");e.exports=function(e){return i>=51||!A((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},1814:(e,t,r)=>{var A=r(3455);e.exports=function(e,t){var r=[][e];return!!r&&A((function(){r.call(null,t||function(){return 1},1)}))}},4734:(e,t,r)=>{var A=r(4186),n=r(4165),i=r(9455),a=r(7878),o=TypeError,s="Reduce of empty array with no initial value",c=function(e){return function(t,r,c,g){var u=n(t),l=i(u),h=a(u);if(A(r),0===h&&c<2)throw new o(s);var I=e?h-1:0,f=e?-1:1;if(c<2)for(;;){if(I in l){g=l[I],I+=f;break}if(I+=f,e?I<0:h<=I)throw new o(s)}for(;e?I>=0:h>I;I+=f)I in l&&(g=r(g,l[I],I,u));return g}};e.exports={left:c(!1),right:c(!0)}},7375:(e,t,r)=>{var A=r(2444),n=r(5448),i=TypeError,a=Object.getOwnPropertyDescriptor,o=A&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=o?function(e,t){if(n(e)&&!a(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},4224:(e,t,r)=>{var A=r(2608);e.exports=A([].slice)},5272:(e,t,r)=>{var A=r(4224),n=Math.floor,i=function(e,t){var r=e.length;if(r<8)for(var a,o,s=1;s0;)e[o]=e[--o];o!==s++&&(e[o]=a)}else for(var c=n(r/2),g=i(A(e,0,c),t),u=i(A(e,c),t),l=g.length,h=u.length,I=0,f=0;I{var A=r(5448),n=r(8413),i=r(2674),a=r(5811)("species"),o=Array;e.exports=function(e){var t;return A(e)&&(t=e.constructor,(n(t)&&(t===o||A(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?o:t}},1453:(e,t,r)=>{var A=r(2329);e.exports=function(e,t){return new(A(e))(0===t?0:t)}},6444:(e,t,r)=>{var A=r(7878);e.exports=function(e,t){for(var r=A(e),n=new t(r),i=0;i{var A=r(7878),n=r(1211),i=RangeError;e.exports=function(e,t,r,a){var o=A(e),s=n(r),c=s<0?o+s:s;if(c>=o||c<0)throw new i("Incorrect index");for(var g=new t(o),u=0;u{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=t+"+/",A=t+"-_",n=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};e.exports={i2c:r,c2i:n(r),i2cUrl:A,c2iUrl:n(A)}},3535:(e,t,r)=>{var A=r(7447),n=r(5235);e.exports=function(e,t,r,i){try{return i?t(A(r)[0],r[1]):t(r)}catch(t){n(e,"throw",t)}}},4348:(e,t,r)=>{var A=r(5811)("iterator"),n=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){n=!0}};a[A]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!n)return!1}catch(e){return!1}var r=!1;try{var i={};i[A]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},9872:(e,t,r)=>{var A=r(2608),n=A({}.toString),i=A("".slice);e.exports=function(e){return i(n(e),8,-1)}},1179:(e,t,r)=>{var A=r(3724),n=r(3749),i=r(9872),a=r(5811)("toStringTag"),o=Object,s="Arguments"===i(function(){return arguments}());e.exports=A?i:function(e){var t,r,A;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=o(e),a))?r:s?i(t):"Object"===(A=i(t))&&n(t.callee)?"Arguments":A}},2042:(e,t,r)=>{var A=r(5304),n=r(8986),i=r(4183),a=r(4864),o=r(3399),s=r(6021),c=r(1804),g=r(656),u=r(9393),l=r(5409),h=r(2444),I=r(5227).fastKey,f=r(8301),C=f.set,B=f.getterFor;e.exports={getConstructor:function(e,t,r,g){var u=e((function(e,n){o(e,l),C(e,{type:t,index:A(null),first:null,last:null,size:0}),h||(e.size=0),s(n)||c(n,e[g],{that:e,AS_ENTRIES:r})})),l=u.prototype,f=B(t),Q=function(e,t,r){var A,n,i=f(e),a=E(e,t);return a?a.value=r:(i.last=a={index:n=I(t,!0),key:t,value:r,previous:A=i.last,next:null,removed:!1},i.first||(i.first=a),A&&(A.next=a),h?i.size++:e.size++,"F"!==n&&(i.index[n]=a)),e},E=function(e,t){var r,A=f(e),n=I(t);if("F"!==n)return A.index[n];for(r=A.first;r;r=r.next)if(r.key===t)return r};return i(l,{clear:function(){for(var e=f(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=A(null),h?e.size=0:this.size=0},delete:function(e){var t=this,r=f(t),A=E(t,e);if(A){var n=A.next,i=A.previous;delete r.index[A.index],A.removed=!0,i&&(i.next=n),n&&(n.previous=i),r.first===A&&(r.first=n),r.last===A&&(r.last=i),h?r.size--:t.size--}return!!A},forEach:function(e){for(var t,r=f(this),A=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(A(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!E(this,e)}}),i(l,r?{get:function(e){var t=E(this,e);return t&&t.value},set:function(e,t){return Q(this,0===e?0:e,t)}}:{add:function(e){return Q(this,e=0===e?0:e,e)}}),h&&n(l,"size",{configurable:!0,get:function(){return f(this).size}}),u},setStrong:function(e,t,r){var A=t+" Iterator",n=B(t),i=B(A);g(e,t,(function(e,t){C(this,{type:A,target:e,state:n(e),kind:t,last:null})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?u("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,u(void 0,!0))}),r?"entries":"values",!r,!0),l(t)}}},8153:(e,t,r)=>{var A=r(2608),n=r(4183),i=r(5227).getWeakData,a=r(3399),o=r(7447),s=r(6021),c=r(2674),g=r(1804),u=r(5645),l=r(9649),h=r(8301),I=h.set,f=h.getterFor,C=u.find,B=u.findIndex,Q=A([].splice),E=0,d=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},p=function(e,t){return C(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=p(this,e);if(t)return t[1]},has:function(e){return!!p(this,e)},set:function(e,t){var r=p(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=B(this.entries,(function(t){return t[0]===e}));return~t&&Q(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,r,A){var u=e((function(e,n){a(e,h),I(e,{type:t,id:E++,frozen:null}),s(n)||g(n,e[A],{that:e,AS_ENTRIES:r})})),h=u.prototype,C=f(t),B=function(e,t,r){var A=C(e),n=i(o(t),!0);return!0===n?d(A).set(t,r):n[A.id]=r,e};return n(h,{delete:function(e){var t=C(this);if(!c(e))return!1;var r=i(e);return!0===r?d(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=C(this);if(!c(e))return!1;var r=i(e);return!0===r?d(t).has(e):r&&l(r,t.id)}}),n(h,r?{get:function(e){var t=C(this);if(c(e)){var r=i(e);if(!0===r)return d(t).get(e);if(r)return r[t.id]}},set:function(e,t){return B(this,e,t)}}:{add:function(e){return B(this,e,!0)}}),u}}},9556:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(2608),a=r(5868),o=r(8552),s=r(5227),c=r(1804),g=r(3399),u=r(3749),l=r(6021),h=r(2674),I=r(3455),f=r(4348),C=r(6911),B=r(3951);e.exports=function(e,t,r){var Q=-1!==e.indexOf("Map"),E=-1!==e.indexOf("Weak"),d=Q?"set":"add",y=n[e],p=y&&y.prototype,v=y,m={},w=function(e){var t=i(p[e]);o(p,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(E&&!h(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return E&&!h(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(E&&!h(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(a(e,!u(y)||!(E||p.forEach&&!I((function(){(new y).entries().next()})))))v=r.getConstructor(t,e,Q,d),s.enable();else if(a(e,!0)){var b=new v,k=b[d](E?{}:-0,1)!==b,D=I((function(){b.has(1)})),S=f((function(e){new y(e)})),F=!E&&I((function(){for(var e=new y,t=5;t--;)e[d](t,t);return!e.has(-0)}));S||((v=t((function(e,t){g(e,p);var r=B(new y,e,v);return l(t)||c(t,r[d],{that:r,AS_ENTRIES:Q}),r}))).prototype=p,p.constructor=v),(D||F)&&(w("delete"),w("has"),Q&&w("get")),(F||k)&&w(d),E&&p.clear&&delete p.clear}return m[e]=v,A({global:!0,constructor:!0,forced:v!==y},m),C(v,e),E||r.setStrong(v,e,Q),v}},2924:(e,t,r)=>{var A=r(9649),n=r(2919),i=r(1139),a=r(1601);e.exports=function(e,t,r){for(var o=n(t),s=a.f,c=i.f,g=0;g{var A=r(5811)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[A]=!1,"/./"[e](t)}catch(e){}}return!1}},5139:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9393:e=>{e.exports=function(e,t){return{value:e,done:t}}},139:(e,t,r)=>{var A=r(2444),n=r(1601),i=r(4004);e.exports=A?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},4004:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},3552:(e,t,r)=>{var A=r(2444),n=r(1601),i=r(4004);e.exports=function(e,t,r){A?n.f(e,t,i(0,r)):e[t]=r}},952:(e,t,r)=>{var A=r(7447),n=r(3118),i=TypeError;e.exports=function(e){if(A(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new i("Incorrect hint");return n(this,e)}},8986:(e,t,r)=>{var A=r(1147),n=r(1601);e.exports=function(e,t,r){return r.get&&A(r.get,t,{getter:!0}),r.set&&A(r.set,t,{setter:!0}),n.f(e,t,r)}},8552:(e,t,r)=>{var A=r(3749),n=r(1601),i=r(1147),a=r(5801);e.exports=function(e,t,r,o){o||(o={});var s=o.enumerable,c=void 0!==o.name?o.name:t;if(A(r)&&i(r,c,o),o.global)s?e[t]=r:a(t,r);else{try{o.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=r:n.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},4183:(e,t,r)=>{var A=r(8552);e.exports=function(e,t,r){for(var n in t)A(e,n,t[n],r);return e}},5801:(e,t,r)=>{var A=r(4032),n=Object.defineProperty;e.exports=function(e,t){try{n(A,e,{value:t,configurable:!0,writable:!0})}catch(r){A[e]=t}return t}},1870:(e,t,r)=>{var A=r(8055),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+A(t)+" of "+A(e))}},2444:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7395:(e,t,r)=>{var A,n,i,a,o=r(4032),s=r(9685),c=r(6572),g=o.structuredClone,u=o.ArrayBuffer,l=o.MessageChannel,h=!1;if(c)h=function(e){g(e,{transfer:[e]})};else if(u)try{l||(A=s("worker_threads"))&&(l=A.MessageChannel),l&&(n=new l,i=new u(2),a=function(e){n.port1.postMessage(null,[e])},2===i.byteLength&&(a(i),0===i.byteLength&&(h=a)))}catch(e){}e.exports=h},5751:(e,t,r)=>{var A=r(4032),n=r(2674),i=A.document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},9573:e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},4090:e=>{e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},2760:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4784:(e,t,r)=>{var A=r(5751)("span").classList,n=A&&A.constructor&&A.constructor.prototype;e.exports=n===Object.prototype?void 0:n},5175:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7085:(e,t,r)=>{var A=r(7607).match(/firefox\\/(\\d+)/i);e.exports=!!A&&+A[1]},5123:(e,t,r)=>{var A=r(7607);e.exports=/MSIE|Trident/.test(A)},9081:(e,t,r)=>{var A=r(7607);e.exports=/ipad|iphone|ipod/i.test(A)&&"undefined"!=typeof Pebble},9352:(e,t,r)=>{var A=r(7607);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(A)},4529:(e,t,r)=>{var A=r(7351);e.exports="NODE"===A},628:(e,t,r)=>{var A=r(7607);e.exports=/web0s(?!.*chrome)/i.test(A)},7607:(e,t,r)=>{var A=r(4032).navigator,n=A&&A.userAgent;e.exports=n?String(n):""},6415:(e,t,r)=>{var A,n,i=r(4032),a=r(7607),o=i.process,s=i.Deno,c=o&&o.versions||s&&s.version,g=c&&c.v8;g&&(n=(A=g.split("."))[0]>0&&A[0]<4?1:+(A[0]+A[1])),!n&&a&&(!(A=a.match(/Edge\\/(\\d+)/))||A[1]>=74)&&(A=a.match(/Chrome\\/(\\d+)/))&&(n=+A[1]),e.exports=n},1911:(e,t,r)=>{var A=r(7607).match(/AppleWebKit\\/(\\d+)\\./);e.exports=!!A&&+A[1]},7351:(e,t,r)=>{var A=r(4032),n=r(7607),i=r(9872),a=function(e){return n.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":A.Bun&&"string"==typeof Bun.version?"BUN":A.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(A.process)?"NODE":A.window&&A.document?"BROWSER":"REST"},3633:(e,t,r)=>{var A=r(2608),n=Error,i=A("".replace),a=String(new n("zxcasd").stack),o=/\\n\\s*at [^:]*:[^\\n]*/,s=o.test(a);e.exports=function(e,t){if(s&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=i(e,o,"");return e}},4171:(e,t,r)=>{var A=r(139),n=r(3633),i=r(3427),a=Error.captureStackTrace;e.exports=function(e,t,r,o){i&&(a?a(e,t):A(e,"stack",n(r,o)))}},3427:(e,t,r)=>{var A=r(3455),n=r(4004);e.exports=!A((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},2912:(e,t,r)=>{var A=r(2444),n=r(3455),i=r(7447),a=r(8363),o=Error.prototype.toString,s=n((function(){if(A){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==o.call(e))return!0}return"2: 1"!==o.call({message:1,name:2})||"Error"!==o.call({})}));e.exports=s?function(){var e=i(this),t=a(e.name,"Error"),r=a(e.message);return t?r?t+": "+r:t:r}:o},5366:(e,t,r)=>{var A=r(4032),n=r(1139).f,i=r(139),a=r(8552),o=r(5801),s=r(2924),c=r(5868);e.exports=function(e,t){var r,g,u,l,h,I=e.target,f=e.global,C=e.stat;if(r=f?A:C?A[I]||o(I,{}):A[I]&&A[I].prototype)for(g in t){if(l=t[g],u=e.dontCallGetSet?(h=n(r,g))&&h.value:r[g],!c(f?g:I+(C?".":"#")+g,e.forced)&&void 0!==u){if(typeof l==typeof u)continue;s(l,u)}(e.sham||u&&u.sham)&&i(l,"sham",!0),a(r,g,l,e)}}},3455:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},4364:(e,t,r)=>{r(2823);var A=r(3453),n=r(8552),i=r(9867),a=r(3455),o=r(5811),s=r(139),c=o("species"),g=RegExp.prototype;e.exports=function(e,t,r,u){var l=o(e),h=!a((function(){var t={};return t[l]=function(){return 7},7!==""[e](t)})),I=h&&!a((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[l]=/./[l]),r.exec=function(){return t=!0,null},r[l](""),!t}));if(!h||!I||r){var f=/./[l],C=t(l,""[e],(function(e,t,r,n,a){var o=t.exec;return o===i||o===g.exec?h&&!a?{done:!0,value:A(f,t,r,n)}:{done:!0,value:A(e,r,t,n)}:{done:!1}}));n(String.prototype,e,C[0]),n(g,l,C[1])}u&&s(g[l],"sham",!0)}},2851:(e,t,r)=>{var A=r(5448),n=r(7878),i=r(9573),a=r(4864),o=function(e,t,r,s,c,g,u,l){for(var h,I,f=c,C=0,B=!!u&&a(u,l);C0&&A(h)?(I=n(h),f=o(e,t,h,I,f,g-1)-1):(i(f+1),e[f]=h),f++),C++;return f};e.exports=o},568:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){return Object.isExtensible(Object.preventExtensions({}))}))},3881:(e,t,r)=>{var A=r(9128),n=Function.prototype,i=n.apply,a=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(A?a.bind(i):function(){return a.apply(i,arguments)})},4864:(e,t,r)=>{var A=r(2116),n=r(4186),i=r(9128),a=A(A.bind);e.exports=function(e,t){return n(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},9128:(e,t,r)=>{var A=r(3455);e.exports=!A((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},2230:(e,t,r)=>{var A=r(2608),n=r(4186),i=r(2674),a=r(9649),o=r(4224),s=r(9128),c=Function,g=A([].concat),u=A([].join),l={};e.exports=s?c.bind:function(e){var t=n(this),r=t.prototype,A=o(arguments,1),s=function(){var r=g(A,o(arguments));return this instanceof s?function(e,t,r){if(!a(l,t)){for(var A=[],n=0;n{var A=r(9128),n=Function.prototype.call;e.exports=A?n.bind(n):function(){return n.apply(n,arguments)}},2542:(e,t,r)=>{var A=r(2444),n=r(9649),i=Function.prototype,a=A&&Object.getOwnPropertyDescriptor,o=n(i,"name"),s=o&&"something"===function(){}.name,c=o&&(!A||A&&a(i,"name").configurable);e.exports={EXISTS:o,PROPER:s,CONFIGURABLE:c}},5026:(e,t,r)=>{var A=r(2608),n=r(4186);e.exports=function(e,t,r){try{return A(n(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},2116:(e,t,r)=>{var A=r(9872),n=r(2608);e.exports=function(e){if("Function"===A(e))return n(e)}},2608:(e,t,r)=>{var A=r(9128),n=Function.prototype,i=n.call,a=A&&n.bind.bind(i,i);e.exports=A?a:function(e){return function(){return i.apply(e,arguments)}}},9685:(e,t,r)=>{var A=r(4032),n=r(4529);e.exports=function(e){if(n){try{return A.process.getBuiltinModule(e)}catch(e){}try{return Function('return require("'+e+'")')()}catch(e){}}}},8711:(e,t,r)=>{var A=r(4032),n=r(3749);e.exports=function(e,t){return arguments.length<2?(r=A[e],n(r)?r:void 0):A[e]&&A[e][t];var r}},3447:e=>{e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},7507:(e,t,r)=>{var A=r(1179),n=r(8622),i=r(6021),a=r(5597),o=r(5811)("iterator");e.exports=function(e){if(!i(e))return n(e,o)||n(e,"@@iterator")||a[A(e)]}},6961:(e,t,r)=>{var A=r(3453),n=r(4186),i=r(7447),a=r(8055),o=r(7507),s=TypeError;e.exports=function(e,t){var r=arguments.length<2?o(e):t;if(n(r))return i(A(r,e));throw new s(a(e)+" is not iterable")}},213:(e,t,r)=>{var A=r(2608),n=r(5448),i=r(3749),a=r(9872),o=r(687),s=A([].push);e.exports=function(e){if(i(e))return e;if(n(e)){for(var t=e.length,r=[],A=0;A{var A=r(4186),n=r(6021);e.exports=function(e,t){var r=e[t];return n(r)?void 0:A(r)}},3885:(e,t,r)=>{var A=r(4186),n=r(7447),i=r(3453),a=r(1211),o=r(3447),s="Invalid size",c=RangeError,g=TypeError,u=Math.max,l=function(e,t){this.set=e,this.size=u(t,0),this.has=A(e.has),this.keys=A(e.keys)};l.prototype={getIterator:function(){return o(n(i(this.keys,this.set)))},includes:function(e){return i(this.has,this.set,e)}},e.exports=function(e){n(e);var t=+e.size;if(t!=t)throw new g(s);var r=a(t);if(r<0)throw new c(s);return new l(e,r)}},3966:(e,t,r)=>{var A=r(2608),n=r(4165),i=Math.floor,a=A("".charAt),o=A("".replace),s=A("".slice),c=/\\$([$&'\`]|\\d{1,2}|<[^>]*>)/g,g=/\\$([$&'\`]|\\d{1,2})/g;e.exports=function(e,t,r,A,u,l){var h=r+e.length,I=A.length,f=g;return void 0!==u&&(u=n(u),f=c),o(l,f,(function(n,o){var c;switch(a(o,0)){case"$":return"$";case"&":return e;case"\`":return s(t,0,r);case"'":return s(t,h);case"<":c=u[s(o,1,-1)];break;default:var g=+o;if(0===g)return n;if(g>I){var l=i(g/10);return 0===l?n:l<=I?void 0===A[l-1]?a(o,1):A[l-1]+a(o,1):n}c=A[g-1]}return void 0===c?"":c}))}},4032:function(e){var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9649:(e,t,r)=>{var A=r(2608),n=r(4165),i=A({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(n(e),t)}},2645:e=>{e.exports={}},4885:e=>{e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},3085:(e,t,r)=>{var A=r(8711);e.exports=A("document","documentElement")},8829:(e,t,r)=>{var A=r(2444),n=r(3455),i=r(5751);e.exports=!A&&!n((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},1306:e=>{var t=Array,r=Math.abs,A=Math.pow,n=Math.floor,i=Math.log,a=Math.LN2;e.exports={pack:function(e,o,s){var c,g,u,l=t(s),h=8*s-o-1,I=(1<>1,C=23===o?A(2,-24)-A(2,-77):0,B=e<0||0===e&&1/e<0?1:0,Q=0;for((e=r(e))!=e||e===1/0?(g=e!=e?1:0,c=I):(c=n(i(e)/a),e*(u=A(2,-c))<1&&(c--,u*=2),(e+=c+f>=1?C/u:C*A(2,1-f))*u>=2&&(c++,u/=2),c+f>=I?(g=0,c=I):c+f>=1?(g=(e*u-1)*A(2,o),c+=f):(g=e*A(2,f-1)*A(2,o),c=0));o>=8;)l[Q++]=255&g,g/=256,o-=8;for(c=c<0;)l[Q++]=255&c,c/=256,h-=8;return l[Q-1]|=128*B,l},unpack:function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<>1,s=i-7,c=n-1,g=e[c--],u=127&g;for(g>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:g?-1/0:1/0;r+=A(2,t),u-=o}return(g?-1:1)*r*A(2,u-t)}}},9455:(e,t,r)=>{var A=r(2608),n=r(3455),i=r(9872),a=Object,o=A("".split);e.exports=n((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):a(e)}:a},3951:(e,t,r)=>{var A=r(3749),n=r(2674),i=r(9415);e.exports=function(e,t,r){var a,o;return i&&A(a=t.constructor)&&a!==r&&n(o=a.prototype)&&o!==r.prototype&&i(e,o),e}},6906:(e,t,r)=>{var A=r(2608),n=r(3749),i=r(2205),a=A(Function.toString);n(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},2483:(e,t,r)=>{var A=r(2674),n=r(139);e.exports=function(e,t){A(t)&&"cause"in t&&n(e,"cause",t.cause)}},5227:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(2645),a=r(2674),o=r(9649),s=r(1601).f,c=r(3408),g=r(6442),u=r(8812),l=r(5936),h=r(568),I=!1,f=l("meta"),C=0,B=function(e){s(e,f,{value:{objectID:"O"+C++,weakData:{}}})},Q=e.exports={enable:function(){Q.enable=function(){},I=!0;var e=c.f,t=n([].splice),r={};r[f]=1,e(r).length&&(c.f=function(r){for(var A=e(r),n=0,i=A.length;n{var A,n,i,a=r(6206),o=r(4032),s=r(2674),c=r(139),g=r(9649),u=r(2205),l=r(2343),h=r(2645),I="Object already initialized",f=o.TypeError,C=o.WeakMap;if(a||u.state){var B=u.state||(u.state=new C);B.get=B.get,B.has=B.has,B.set=B.set,A=function(e,t){if(B.has(e))throw new f(I);return t.facade=e,B.set(e,t),t},n=function(e){return B.get(e)||{}},i=function(e){return B.has(e)}}else{var Q=l("state");h[Q]=!0,A=function(e,t){if(g(e,Q))throw new f(I);return t.facade=e,c(e,Q,t),t},n=function(e){return g(e,Q)?e[Q]:{}},i=function(e){return g(e,Q)}}e.exports={set:A,get:n,has:i,enforce:function(e){return i(e)?n(e):A(e,{})},getterFor:function(e){return function(t){var r;if(!s(t)||(r=n(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}},993:(e,t,r)=>{var A=r(5811),n=r(5597),i=A("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[i]===e)}},5448:(e,t,r)=>{var A=r(9872);e.exports=Array.isArray||function(e){return"Array"===A(e)}},5415:(e,t,r)=>{var A=r(1179);e.exports=function(e){var t=A(e);return"BigInt64Array"===t||"BigUint64Array"===t}},3749:e=>{var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},8413:(e,t,r)=>{var A=r(2608),n=r(3455),i=r(3749),a=r(1179),o=r(8711),s=r(6906),c=function(){},g=o("Reflect","construct"),u=/^\\s*(?:class|function)\\b/,l=A(u.exec),h=!u.test(c),I=function(e){if(!i(e))return!1;try{return g(c,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!l(u,s(e))}catch(e){return!0}};f.sham=!0,e.exports=!g||n((function(){var e;return I(I.call)||!I(Object)||!I((function(){e=!0}))||e}))?f:I},3007:(e,t,r)=>{var A=r(9649);e.exports=function(e){return void 0!==e&&(A(e,"value")||A(e,"writable"))}},5868:(e,t,r)=>{var A=r(3455),n=r(3749),i=/#|\\.prototype\\./,a=function(e,t){var r=s[o(e)];return r===g||r!==c&&(n(t)?A(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",g=a.POLYFILL="P";e.exports=a},2599:(e,t,r)=>{var A=r(2674),n=Math.floor;e.exports=Number.isInteger||function(e){return!A(e)&&isFinite(e)&&n(e)===e}},6021:e=>{e.exports=function(e){return null==e}},2674:(e,t,r)=>{var A=r(3749);e.exports=function(e){return"object"==typeof e?null!==e:A(e)}},4597:(e,t,r)=>{var A=r(2674);e.exports=function(e){return A(e)||null===e}},8507:e=>{e.exports=!1},6484:(e,t,r)=>{var A=r(2674),n=r(9872),i=r(5811)("match");e.exports=function(e){var t;return A(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===n(e))}},2277:(e,t,r)=>{var A=r(8711),n=r(3749),i=r(6921),a=r(4752),o=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=A("Symbol");return n(t)&&i(t.prototype,o(e))}},2939:(e,t,r)=>{var A=r(3453);e.exports=function(e,t,r){for(var n,i,a=r?e:e.iterator,o=e.next;!(n=A(o,a)).done;)if(void 0!==(i=t(n.value)))return i}},1804:(e,t,r)=>{var A=r(4864),n=r(3453),i=r(7447),a=r(8055),o=r(993),s=r(7878),c=r(6921),g=r(6961),u=r(7507),l=r(5235),h=TypeError,I=function(e,t){this.stopped=e,this.result=t},f=I.prototype;e.exports=function(e,t,r){var C,B,Q,E,d,y,p,v=r&&r.that,m=!(!r||!r.AS_ENTRIES),w=!(!r||!r.IS_RECORD),b=!(!r||!r.IS_ITERATOR),k=!(!r||!r.INTERRUPTED),D=A(t,v),S=function(e){return C&&l(C,"normal",e),new I(!0,e)},F=function(e){return m?(i(e),k?D(e[0],e[1],S):D(e[0],e[1])):k?D(e,S):D(e)};if(w)C=e.iterator;else if(b)C=e;else{if(!(B=u(e)))throw new h(a(e)+" is not iterable");if(o(B)){for(Q=0,E=s(e);E>Q;Q++)if((d=F(e[Q]))&&c(f,d))return d;return new I(!1)}C=g(e,B)}for(y=w?e.next:C.next;!(p=n(y,C)).done;){try{d=F(p.value)}catch(e){l(C,"throw",e)}if("object"==typeof d&&d&&c(f,d))return d}return new I(!1)}},5235:(e,t,r)=>{var A=r(3453),n=r(7447),i=r(8622);e.exports=function(e,t,r){var a,o;n(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw r;return r}a=A(a,e)}catch(e){o=!0,a=e}if("throw"===t)throw r;if(o)throw a;return n(a),r}},282:(e,t,r)=>{var A=r(2857).IteratorPrototype,n=r(5304),i=r(4004),a=r(6911),o=r(5597),s=function(){return this};e.exports=function(e,t,r,c){var g=t+" Iterator";return e.prototype=n(A,{next:i(+!c,r)}),a(e,g,!1,!0),o[g]=s,e}},2342:(e,t,r)=>{var A=r(3453),n=r(5304),i=r(139),a=r(4183),o=r(5811),s=r(8301),c=r(8622),g=r(2857).IteratorPrototype,u=r(9393),l=r(5235),h=o("toStringTag"),I="IteratorHelper",f="WrapForValidIterator",C=s.set,B=function(e){var t=s.getterFor(e?f:I);return a(n(g),{next:function(){var r=t(this);if(e)return r.nextHandler();try{var A=r.done?void 0:r.nextHandler();return u(A,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var i=c(n,"return");return i?A(i,n):u(void 0,!0)}if(r.inner)try{l(r.inner.iterator,"normal")}catch(e){return l(n,"throw",e)}return l(n,"normal"),u(void 0,!0)}})},Q=B(!0),E=B(!1);i(E,h,"Iterator Helper"),e.exports=function(e,t){var r=function(r,A){A?(A.iterator=r.iterator,A.next=r.next):A=r,A.type=t?f:I,A.nextHandler=e,A.counter=0,A.done=!1,C(this,A)};return r.prototype=t?Q:E,r}},656:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(8507),a=r(2542),o=r(3749),s=r(282),c=r(2611),g=r(9415),u=r(6911),l=r(139),h=r(8552),I=r(5811),f=r(5597),C=r(2857),B=a.PROPER,Q=a.CONFIGURABLE,E=C.IteratorPrototype,d=C.BUGGY_SAFARI_ITERATORS,y=I("iterator"),p="keys",v="values",m="entries",w=function(){return this};e.exports=function(e,t,r,a,I,C,b){s(r,t,a);var k,D,S,F=function(e){if(e===I&&L)return L;if(!d&&e&&e in G)return G[e];switch(e){case p:case v:case m:return function(){return new r(this,e)}}return function(){return new r(this)}},x=t+" Iterator",R=!1,G=e.prototype,N=G[y]||G["@@iterator"]||I&&G[I],L=!d&&N||F(I),U="Array"===t&&G.entries||N;if(U&&(k=c(U.call(new e)))!==Object.prototype&&k.next&&(i||c(k)===E||(g?g(k,E):o(k[y])||h(k,y,w)),u(k,x,!0,!0),i&&(f[x]=w)),B&&I===v&&N&&N.name!==v&&(!i&&Q?l(G,"name",v):(R=!0,L=function(){return n(N,this)})),I)if(D={values:F(v),keys:C?L:F(p),entries:F(m)},b)for(S in D)(d||R||!(S in G))&&h(G,S,D[S]);else A({target:t,proto:!0,forced:d||R},D);return i&&!b||G[y]===L||h(G,y,L,{name:I}),f[t]=L,D}},4009:(e,t,r)=>{var A=r(3453),n=r(4186),i=r(7447),a=r(3447),o=r(2342),s=r(3535),c=o((function(){var e=this.iterator,t=i(A(this.next,e));if(!(this.done=!!t.done))return s(e,this.mapper,[t.value,this.counter++],!0)}));e.exports=function(e){return i(this),n(e),new c(a(this),{mapper:e})}},2857:(e,t,r)=>{var A,n,i,a=r(3455),o=r(3749),s=r(2674),c=r(5304),g=r(2611),u=r(8552),l=r(5811),h=r(8507),I=l("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(n=g(g(i)))!==Object.prototype&&(A=n):f=!0),!s(A)||a((function(){var e={};return A[I].call(e)!==e}))?A={}:h&&(A=c(A)),o(A[I])||u(A,I,(function(){return this})),e.exports={IteratorPrototype:A,BUGGY_SAFARI_ITERATORS:f}},5597:e=>{e.exports={}},7878:(e,t,r)=>{var A=r(5806);e.exports=function(e){return A(e.length)}},1147:(e,t,r)=>{var A=r(2608),n=r(3455),i=r(3749),a=r(9649),o=r(2444),s=r(2542).CONFIGURABLE,c=r(6906),g=r(8301),u=g.enforce,l=g.get,h=String,I=Object.defineProperty,f=A("".slice),C=A("".replace),B=A([].join),Q=o&&!n((function(){return 8!==I((function(){}),"length",{value:8}).length})),E=String(String).split("String"),d=e.exports=function(e,t,r){"Symbol("===f(h(t),0,7)&&(t="["+C(h(t),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||s&&e.name!==t)&&(o?I(e,"name",{value:t,configurable:!0}):e.name=t),Q&&r&&a(r,"arity")&&e.length!==r.arity&&I(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?o&&I(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var A=u(e);return a(A,"source")||(A.source=B(E,"string"==typeof t?t:"")),e};Function.prototype.toString=d((function(){return i(this)&&l(this).source||c(this)}),"toString")},9676:(e,t,r)=>{var A=r(550),n=Math.abs,i=2220446049250313e-31,a=1/i;e.exports=function(e,t,r,o){var s=+e,c=n(s),g=A(s);if(cr||l!=l?g*(1/0):g*l}},3505:(e,t,r)=>{var A=r(9676);e.exports=Math.fround||function(e){return A(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},550:e=>{e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},2789:e=>{var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var A=+e;return(A>0?r:t)(A)}},755:(e,t,r)=>{var A,n,i,a,o,s=r(4032),c=r(5725),g=r(4864),u=r(1369).set,l=r(3529),h=r(9352),I=r(9081),f=r(628),C=r(4529),B=s.MutationObserver||s.WebKitMutationObserver,Q=s.document,E=s.process,d=s.Promise,y=c("queueMicrotask");if(!y){var p=new l,v=function(){var e,t;for(C&&(e=E.domain)&&e.exit();t=p.get();)try{t()}catch(e){throw p.head&&A(),e}e&&e.enter()};h||C||f||!B||!Q?!I&&d&&d.resolve?((a=d.resolve(void 0)).constructor=d,o=g(a.then,a),A=function(){o(v)}):C?A=function(){E.nextTick(v)}:(u=g(u,s),A=function(){u(v)}):(n=!0,i=Q.createTextNode(""),new B(v).observe(i,{characterData:!0}),A=function(){i.data=n=!n}),y=function(e){p.head||A(),p.add(e)}}e.exports=y},9371:(e,t,r)=>{var A=r(4186),n=TypeError,i=function(e){var t,r;this.promise=new e((function(e,A){if(void 0!==t||void 0!==r)throw new n("Bad Promise constructor");t=e,r=A})),this.resolve=A(t),this.reject=A(r)};e.exports.f=function(e){return new i(e)}},8363:(e,t,r)=>{var A=r(687);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:A(e)}},3631:(e,t,r)=>{var A=r(6484),n=TypeError;e.exports=function(e){if(A(e))throw new n("The method doesn't accept regular expressions");return e}},8069:(e,t,r)=>{var A=r(2444),n=r(2608),i=r(3453),a=r(3455),o=r(496),s=r(6005),c=r(9221),g=r(4165),u=r(9455),l=Object.assign,h=Object.defineProperty,I=n([].concat);e.exports=!l||a((function(){if(A&&1!==l({b:1},l(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==l({},e)[r]||o(l({},t)).join("")!==n}))?function(e,t){for(var r=g(e),n=arguments.length,a=1,l=s.f,h=c.f;n>a;)for(var f,C=u(arguments[a++]),B=l?I(o(C),l(C)):o(C),Q=B.length,E=0;Q>E;)f=B[E++],A&&!i(h,C,f)||(r[f]=C[f]);return r}:l},5304:(e,t,r)=>{var A,n=r(7447),i=r(9217),a=r(5175),o=r(2645),s=r(3085),c=r(5751),g=r(2343),u="prototype",l="script",h=g("IE_PROTO"),I=function(){},f=function(e){return"<"+l+">"+e+""},C=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},B=function(){try{A=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;B="undefined"!=typeof document?document.domain&&A?C(A):(t=c("iframe"),r="java"+l+":",t.style.display="none",s.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):C(A);for(var n=a.length;n--;)delete B[u][a[n]];return B()};o[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(I[u]=n(e),r=new I,I[u]=null,r[h]=e):r=B(),void 0===t?r:i.f(r,t)}},9217:(e,t,r)=>{var A=r(2444),n=r(782),i=r(1601),a=r(7447),o=r(3637),s=r(496);t.f=A&&!n?Object.defineProperties:function(e,t){a(e);for(var r,A=o(t),n=s(t),c=n.length,g=0;c>g;)i.f(e,r=n[g++],A[r]);return e}},1601:(e,t,r)=>{var A=r(2444),n=r(8829),i=r(782),a=r(7447),o=r(6201),s=TypeError,c=Object.defineProperty,g=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",h="writable";t.f=A?i?function(e,t,r){if(a(e),t=o(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var A=g(e,t);A&&A[h]&&(e[t]=r.value,r={configurable:l in r?r[l]:A[l],enumerable:u in r?r[u]:A[u],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(a(e),t=o(t),a(r),n)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new s("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},1139:(e,t,r)=>{var A=r(2444),n=r(3453),i=r(9221),a=r(4004),o=r(3637),s=r(6201),c=r(9649),g=r(8829),u=Object.getOwnPropertyDescriptor;t.f=A?u:function(e,t){if(e=o(e),t=s(t),g)try{return u(e,t)}catch(e){}if(c(e,t))return a(!n(i.f,e,t),e[t])}},6442:(e,t,r)=>{var A=r(9872),n=r(3637),i=r(3408).f,a=r(4224),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===A(e)?function(e){try{return i(e)}catch(e){return a(o)}}(e):i(n(e))}},3408:(e,t,r)=>{var A=r(2468),n=r(5175).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return A(e,n)}},6005:(e,t)=>{t.f=Object.getOwnPropertySymbols},2611:(e,t,r)=>{var A=r(9649),n=r(3749),i=r(4165),a=r(2343),o=r(5139),s=a("IE_PROTO"),c=Object,g=c.prototype;e.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(A(t,s))return t[s];var r=t.constructor;return n(r)&&t instanceof r?r.prototype:t instanceof c?g:null}},8812:(e,t,r)=>{var A=r(3455),n=r(2674),i=r(9872),a=r(7060),o=Object.isExtensible,s=A((function(){o(1)}));e.exports=s||a?function(e){return!!n(e)&&(!a||"ArrayBuffer"!==i(e))&&(!o||o(e))}:o},6921:(e,t,r)=>{var A=r(2608);e.exports=A({}.isPrototypeOf)},2468:(e,t,r)=>{var A=r(2608),n=r(9649),i=r(3637),a=r(7921).indexOf,o=r(2645),s=A([].push);e.exports=function(e,t){var r,A=i(e),c=0,g=[];for(r in A)!n(o,r)&&n(A,r)&&s(g,r);for(;t.length>c;)n(A,r=t[c++])&&(~a(g,r)||s(g,r));return g}},496:(e,t,r)=>{var A=r(2468),n=r(5175);e.exports=Object.keys||function(e){return A(e,n)}},9221:(e,t)=>{var r={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,n=A&&!r.call({1:2},1);t.f=n?function(e){var t=A(this,e);return!!t&&t.enumerable}:r},9415:(e,t,r)=>{var A=r(5026),n=r(2674),i=r(7222),a=r(7330);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=A(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,A){return i(r),a(A),n(r)?(t?e(r,A):r.__proto__=A,r):r}}():void 0)},8885:(e,t,r)=>{var A=r(2444),n=r(3455),i=r(2608),a=r(2611),o=r(496),s=r(3637),c=i(r(9221).f),g=i([].push),u=A&&n((function(){var e=Object.create(null);return e[2]=2,!c(e,2)})),l=function(e){return function(t){for(var r,n=s(t),i=o(n),l=u&&null===a(n),h=i.length,I=0,f=[];h>I;)r=i[I++],A&&!(l?r in n:c(n,r))||g(f,e?[r,n[r]]:n[r]);return f}};e.exports={entries:l(!0),values:l(!1)}},3003:(e,t,r)=>{var A=r(3724),n=r(1179);e.exports=A?{}.toString:function(){return"[object "+n(this)+"]"}},3118:(e,t,r)=>{var A=r(3453),n=r(3749),i=r(2674),a=TypeError;e.exports=function(e,t){var r,o;if("string"===t&&n(r=e.toString)&&!i(o=A(r,e)))return o;if(n(r=e.valueOf)&&!i(o=A(r,e)))return o;if("string"!==t&&n(r=e.toString)&&!i(o=A(r,e)))return o;throw new a("Can't convert object to primitive value")}},2919:(e,t,r)=>{var A=r(8711),n=r(2608),i=r(3408),a=r(6005),o=r(7447),s=n([].concat);e.exports=A("Reflect","ownKeys")||function(e){var t=i.f(o(e)),r=a.f;return r?s(t,r(e)):t}},8799:(e,t,r)=>{var A=r(4032);e.exports=A},6703:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9492:(e,t,r)=>{var A=r(4032),n=r(5318),i=r(3749),a=r(5868),o=r(6906),s=r(5811),c=r(7351),g=r(8507),u=r(6415),l=n&&n.prototype,h=s("species"),I=!1,f=i(A.PromiseRejectionEvent),C=a("Promise",(function(){var e=o(n),t=e!==String(n);if(!t&&66===u)return!0;if(g&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(e)){var r=new n((function(e){e(1)})),A=function(e){e((function(){}),(function(){}))};if((r.constructor={})[h]=A,!(I=r.then((function(){}))instanceof A))return!0}return!(t||"BROWSER"!==c&&"DENO"!==c||f)}));e.exports={CONSTRUCTOR:C,REJECTION_EVENT:f,SUBCLASSING:I}},5318:(e,t,r)=>{var A=r(4032);e.exports=A.Promise},1774:(e,t,r)=>{var A=r(7447),n=r(2674),i=r(9371);e.exports=function(e,t){if(A(e),n(t)&&t.constructor===e)return t;var r=i.f(e);return(0,r.resolve)(t),r.promise}},2041:(e,t,r)=>{var A=r(5318),n=r(4348),i=r(9492).CONSTRUCTOR;e.exports=i||!n((function(e){A.all(e).then(void 0,(function(){}))}))},2848:(e,t,r)=>{var A=r(1601).f;e.exports=function(e,t,r){r in e||A(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}},3529:e=>{var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},4410:(e,t,r)=>{var A=r(3453),n=r(7447),i=r(3749),a=r(9872),o=r(9867),s=TypeError;e.exports=function(e,t){var r=e.exec;if(i(r)){var c=A(r,e,t);return null!==c&&n(c),c}if("RegExp"===a(e))return A(o,e,t);throw new s("RegExp#exec called on incompatible receiver")}},9867:(e,t,r)=>{var A,n,i=r(3453),a=r(2608),o=r(687),s=r(747),c=r(1837),g=r(4593),u=r(5304),l=r(8301).get,h=r(3651),I=r(9502),f=g("native-string-replace",String.prototype.replace),C=RegExp.prototype.exec,B=C,Q=a("".charAt),E=a("".indexOf),d=a("".replace),y=a("".slice),p=(n=/b*/g,i(C,A=/a/,"a"),i(C,n,"a"),0!==A.lastIndex||0!==n.lastIndex),v=c.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(p||m||v||h||I)&&(B=function(e){var t,r,A,n,a,c,g,h=this,I=l(h),w=o(e),b=I.raw;if(b)return b.lastIndex=h.lastIndex,t=i(B,b,w),h.lastIndex=b.lastIndex,t;var k=I.groups,D=v&&h.sticky,S=i(s,h),F=h.source,x=0,R=w;if(D&&(S=d(S,"y",""),-1===E(S,"g")&&(S+="g"),R=y(w,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\\n"!==Q(w,h.lastIndex-1))&&(F="(?: "+F+")",R=" "+R,x++),r=new RegExp("^(?:"+F+")",S)),m&&(r=new RegExp("^"+F+"$(?!\\\\s)",S)),p&&(A=h.lastIndex),n=i(C,D?r:h,R),D?n?(n.input=y(n.input,x),n[0]=y(n[0],x),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:p&&n&&(h.lastIndex=h.global?n.index+n[0].length:A),m&&n&&n.length>1&&i(f,n[0],r,(function(){for(a=1;a{var A=r(7447);e.exports=function(){var e=A(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},4554:(e,t,r)=>{var A=r(3453),n=r(9649),i=r(6921),a=r(747),o=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in o||n(e,"flags")||!i(o,e)?t:A(a,e)}},1837:(e,t,r)=>{var A=r(3455),n=r(4032).RegExp,i=A((function(){var e=n("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),a=i||A((function(){return!n("a","y").sticky})),o=i||A((function(){var e=n("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));e.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:i}},3651:(e,t,r)=>{var A=r(3455),n=r(4032).RegExp;e.exports=A((function(){var e=n(".","s");return!(e.dotAll&&e.test("\\n")&&"s"===e.flags)}))},9502:(e,t,r)=>{var A=r(3455),n=r(4032).RegExp;e.exports=A((function(){var e=n("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},7222:(e,t,r)=>{var A=r(6021),n=TypeError;e.exports=function(e){if(A(e))throw new n("Can't call method on "+e);return e}},5725:(e,t,r)=>{var A=r(4032),n=r(2444),i=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!n)return A[e];var t=i(A,e);return t&&t.value}},8550:(e,t,r)=>{var A=r(418),n=r(5605),i=A.Set,a=A.add;e.exports=function(e){var t=new i;return n(e,(function(e){a(t,e)})),t}},4656:(e,t,r)=>{var A=r(4376),n=r(418),i=r(8550),a=r(82),o=r(3885),s=r(5605),c=r(2939),g=n.has,u=n.remove;e.exports=function(e){var t=A(this),r=o(e),n=i(t);return a(t)<=r.size?s(t,(function(e){r.includes(e)&&u(n,e)})):c(r.getIterator(),(function(e){g(t,e)&&u(n,e)})),n}},418:(e,t,r)=>{var A=r(2608),n=Set.prototype;e.exports={Set,add:A(n.add),has:A(n.has),remove:A(n.delete),proto:n}},2446:(e,t,r)=>{var A=r(4376),n=r(418),i=r(82),a=r(3885),o=r(5605),s=r(2939),c=n.Set,g=n.add,u=n.has;e.exports=function(e){var t=A(this),r=a(e),n=new c;return i(t)>r.size?s(r.getIterator(),(function(e){u(t,e)&&g(n,e)})):o(t,(function(e){r.includes(e)&&g(n,e)})),n}},4545:(e,t,r)=>{var A=r(4376),n=r(418).has,i=r(82),a=r(3885),o=r(5605),s=r(2939),c=r(5235);e.exports=function(e){var t=A(this),r=a(e);if(i(t)<=r.size)return!1!==o(t,(function(e){if(r.includes(e))return!1}),!0);var g=r.getIterator();return!1!==s(g,(function(e){if(n(t,e))return c(g,"normal",!1)}))}},7918:(e,t,r)=>{var A=r(4376),n=r(82),i=r(5605),a=r(3885);e.exports=function(e){var t=A(this),r=a(e);return!(n(t)>r.size)&&!1!==i(t,(function(e){if(!r.includes(e))return!1}),!0)}},6111:(e,t,r)=>{var A=r(4376),n=r(418).has,i=r(82),a=r(3885),o=r(2939),s=r(5235);e.exports=function(e){var t=A(this),r=a(e);if(i(t){var A=r(2608),n=r(2939),i=r(418),a=i.Set,o=i.proto,s=A(o.forEach),c=A(o.keys),g=c(new a).next;e.exports=function(e,t,r){return r?n({iterator:c(e),next:g},t):s(e,t)}},1716:(e,t,r)=>{var A=r(8711),n=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};e.exports=function(e){var t=A("Set");try{(new t)[e](n(0));try{return(new t)[e](n(-1)),!1}catch(e){return!0}}catch(e){return!1}}},82:(e,t,r)=>{var A=r(5026),n=r(418);e.exports=A(n.proto,"size","get")||function(e){return e.size}},5409:(e,t,r)=>{var A=r(8711),n=r(8986),i=r(5811),a=r(2444),o=i("species");e.exports=function(e){var t=A(e);a&&t&&!t[o]&&n(t,o,{configurable:!0,get:function(){return this}})}},4498:(e,t,r)=>{var A=r(4376),n=r(418),i=r(8550),a=r(3885),o=r(2939),s=n.add,c=n.has,g=n.remove;e.exports=function(e){var t=A(this),r=a(e).getIterator(),n=i(t);return o(r,(function(e){c(t,e)?g(n,e):s(n,e)})),n}},6911:(e,t,r)=>{var A=r(1601).f,n=r(9649),i=r(5811)("toStringTag");e.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!n(e,i)&&A(e,i,{configurable:!0,value:t})}},9500:(e,t,r)=>{var A=r(4376),n=r(418).add,i=r(8550),a=r(3885),o=r(2939);e.exports=function(e){var t=A(this),r=a(e).getIterator(),s=i(t);return o(r,(function(e){n(s,e)})),s}},2343:(e,t,r)=>{var A=r(4593),n=r(5936),i=A("keys");e.exports=function(e){return i[e]||(i[e]=n(e))}},2205:(e,t,r)=>{var A=r(8507),n=r(4032),i=r(5801),a="__core-js_shared__",o=e.exports=n[a]||i(a,{});(o.versions||(o.versions=[])).push({version:"3.38.1",mode:A?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4593:(e,t,r)=>{var A=r(2205);e.exports=function(e,t){return A[e]||(A[e]=t||{})}},1365:(e,t,r)=>{var A=r(7447),n=r(9052),i=r(6021),a=r(5811)("species");e.exports=function(e,t){var r,o=A(e).constructor;return void 0===o||i(r=A(o)[a])?t:n(r)}},6903:(e,t,r)=>{var A=r(2608),n=r(1211),i=r(687),a=r(7222),o=A("".charAt),s=A("".charCodeAt),c=A("".slice),g=function(e){return function(t,r){var A,g,u=i(a(t)),l=n(r),h=u.length;return l<0||l>=h?e?"":void 0:(A=s(u,l))<55296||A>56319||l+1===h||(g=s(u,l+1))<56320||g>57343?e?o(u,l):A:e?c(u,l,l+2):g-56320+(A-55296<<10)+65536}};e.exports={codeAt:g(!1),charAt:g(!0)}},4903:(e,t,r)=>{var A=r(7607);e.exports=/Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(A)},6437:(e,t,r)=>{var A=r(2608),n=r(5806),i=r(687),a=r(6605),o=r(7222),s=A(a),c=A("".slice),g=Math.ceil,u=function(e){return function(t,r,A){var a,u,l=i(o(t)),h=n(r),I=l.length,f=void 0===A?" ":i(A);return h<=I||""===f?l:((u=s(f,g((a=h-I)/f.length))).length>a&&(u=c(u,0,a)),e?l+u:u+l)}};e.exports={start:u(!1),end:u(!0)}},5141:(e,t,r)=>{var A=r(2608),n=2147483647,i=/[^\\0-\\u007E]/,a=/[.\\u3002\\uFF0E\\uFF61]/g,o="Overflow: input needs wider integers to process",s=RangeError,c=A(a.exec),g=Math.floor,u=String.fromCharCode,l=A("".charCodeAt),h=A([].join),I=A([].push),f=A("".replace),C=A("".split),B=A("".toLowerCase),Q=function(e){return e+22+75*(e<26)},E=function(e,t,r){var A=0;for(e=r?g(e/700):e>>1,e+=g(e/t);e>455;)e=g(e/35),A+=36;return g(A+36*e/(e+38))},d=function(e){var t=[];e=function(e){for(var t=[],r=0,A=e.length;r=55296&&n<=56319&&r=a&&Ag((n-c)/y))throw new s(o);for(c+=(d-a)*y,a=d,r=0;rn)throw new s(o);if(A===a){for(var p=c,v=36;;){var m=v<=f?1:v>=f+26?26:v-f;if(p{var A=r(1211),n=r(687),i=r(7222),a=RangeError;e.exports=function(e){var t=n(i(this)),r="",o=A(e);if(o<0||o===1/0)throw new a("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},2882:(e,t,r)=>{var A=r(9418).end,n=r(3794);e.exports=n("trimEnd")?function(){return A(this)}:"".trimEnd},3794:(e,t,r)=>{var A=r(2542).PROPER,n=r(3455),i=r(2284);e.exports=function(e){return n((function(){return!!i[e]()||"​…᠎"!=="​…᠎"[e]()||A&&i[e].name!==e}))}},9418:(e,t,r)=>{var A=r(2608),n=r(7222),i=r(687),a=r(2284),o=A("".replace),s=RegExp("^["+a+"]+"),c=RegExp("(^|[^"+a+"])["+a+"]+$"),g=function(e){return function(t){var r=i(n(t));return 1&e&&(r=o(r,s,"")),2&e&&(r=o(r,c,"$1")),r}};e.exports={start:g(1),end:g(2),trim:g(3)}},6572:(e,t,r)=>{var A=r(4032),n=r(3455),i=r(6415),a=r(7351),o=A.structuredClone;e.exports=!!o&&!n((function(){if("DENO"===a&&i>92||"NODE"===a&&i>94||"BROWSER"===a&&i>97)return!1;var e=new ArrayBuffer(8),t=o(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}))},6943:(e,t,r)=>{var A=r(6415),n=r(3455),i=r(4032).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&A&&A<41}))},3042:(e,t,r)=>{var A=r(3453),n=r(8711),i=r(5811),a=r(8552);e.exports=function(){var e=n("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&a(t,o,(function(e){return A(r,this)}),{arity:1})}},8592:(e,t,r)=>{var A=r(6943);e.exports=A&&!!Symbol.for&&!!Symbol.keyFor},1369:(e,t,r)=>{var A,n,i,a,o=r(4032),s=r(3881),c=r(4864),g=r(3749),u=r(9649),l=r(3455),h=r(3085),I=r(4224),f=r(5751),C=r(7900),B=r(9352),Q=r(4529),E=o.setImmediate,d=o.clearImmediate,y=o.process,p=o.Dispatch,v=o.Function,m=o.MessageChannel,w=o.String,b=0,k={},D="onreadystatechange";l((function(){A=o.location}));var S=function(e){if(u(k,e)){var t=k[e];delete k[e],t()}},F=function(e){return function(){S(e)}},x=function(e){S(e.data)},R=function(e){o.postMessage(w(e),A.protocol+"//"+A.host)};E&&d||(E=function(e){C(arguments.length,1);var t=g(e)?e:v(e),r=I(arguments,1);return k[++b]=function(){s(t,void 0,r)},n(b),b},d=function(e){delete k[e]},Q?n=function(e){y.nextTick(F(e))}:p&&p.now?n=function(e){p.now(F(e))}:m&&!B?(a=(i=new m).port2,i.port1.onmessage=x,n=c(a.postMessage,a)):o.addEventListener&&g(o.postMessage)&&!o.importScripts&&A&&"file:"!==A.protocol&&!l(R)?(n=R,o.addEventListener("message",x,!1)):n=D in f("script")?function(e){h.appendChild(f("script"))[D]=function(){h.removeChild(this),S(e)}}:function(e){setTimeout(F(e),0)}),e.exports={set:E,clear:d}},9002:(e,t,r)=>{var A=r(1211),n=Math.max,i=Math.min;e.exports=function(e,t){var r=A(e);return r<0?n(r+t,0):i(r,t)}},1198:(e,t,r)=>{var A=r(8921),n=TypeError;e.exports=function(e){var t=A(e,"number");if("number"==typeof t)throw new n("Can't convert number to bigint");return BigInt(t)}},9088:(e,t,r)=>{var A=r(1211),n=r(5806),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=A(e),r=n(t);if(t!==r)throw new i("Wrong length or index");return r}},3637:(e,t,r)=>{var A=r(9455),n=r(7222);e.exports=function(e){return A(n(e))}},1211:(e,t,r)=>{var A=r(2789);e.exports=function(e){var t=+e;return t!=t||0===t?0:A(t)}},5806:(e,t,r)=>{var A=r(1211),n=Math.min;e.exports=function(e){var t=A(e);return t>0?n(t,9007199254740991):0}},4165:(e,t,r)=>{var A=r(7222),n=Object;e.exports=function(e){return n(A(e))}},8402:(e,t,r)=>{var A=r(5590),n=RangeError;e.exports=function(e,t){var r=A(e);if(r%t)throw new n("Wrong offset");return r}},5590:(e,t,r)=>{var A=r(1211),n=RangeError;e.exports=function(e){var t=A(e);if(t<0)throw new n("The argument can't be less than 0");return t}},8921:(e,t,r)=>{var A=r(3453),n=r(2674),i=r(2277),a=r(8622),o=r(3118),s=r(5811),c=TypeError,g=s("toPrimitive");e.exports=function(e,t){if(!n(e)||i(e))return e;var r,s=a(e,g);if(s){if(void 0===t&&(t="default"),r=A(s,e,t),!n(r)||i(r))return r;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},6201:(e,t,r)=>{var A=r(8921),n=r(2277);e.exports=function(e){var t=A(e,"string");return n(t)?t:t+""}},3724:(e,t,r)=>{var A={};A[r(5811)("toStringTag")]="z",e.exports="[object z]"===String(A)},687:(e,t,r)=>{var A=r(1179),n=String;e.exports=function(e){if("Symbol"===A(e))throw new TypeError("Cannot convert a Symbol value to a string");return n(e)}},5215:e=>{var t=Math.round;e.exports=function(e){var r=t(e);return r<0?0:r>255?255:255&r}},8055:e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},8975:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3453),a=r(2444),o=r(949),s=r(4356),c=r(7226),g=r(3399),u=r(4004),l=r(139),h=r(2599),I=r(5806),f=r(9088),C=r(8402),B=r(5215),Q=r(6201),E=r(9649),d=r(1179),y=r(2674),p=r(2277),v=r(5304),m=r(6921),w=r(9415),b=r(3408).f,k=r(2291),D=r(5645).forEach,S=r(5409),F=r(8986),x=r(1601),R=r(1139),G=r(7434),N=r(8301),L=r(3951),U=N.get,M=N.set,J=N.enforce,H=x.f,Y=R.f,P=n.RangeError,O=c.ArrayBuffer,K=O.prototype,T=c.DataView,q=s.NATIVE_ARRAY_BUFFER_VIEWS,j=s.TYPED_ARRAY_TAG,W=s.TypedArray,Z=s.TypedArrayPrototype,_=s.isTypedArray,X="BYTES_PER_ELEMENT",V="Wrong length",z=function(e,t){F(e,t,{configurable:!0,get:function(){return U(this)[t]}})},$=function(e){var t;return m(K,e)||"ArrayBuffer"===(t=d(e))||"SharedArrayBuffer"===t},ee=function(e,t){return _(e)&&!p(t)&&t in e&&h(+t)&&t>=0},te=function(e,t){return t=Q(t),ee(e,t)?u(2,e[t]):Y(e,t)},re=function(e,t,r){return t=Q(t),!(ee(e,t)&&y(r)&&E(r,"value"))||E(r,"get")||E(r,"set")||r.configurable||E(r,"writable")&&!r.writable||E(r,"enumerable")&&!r.enumerable?H(e,t,r):(e[t]=r.value,e)};a?(q||(R.f=te,x.f=re,z(Z,"buffer"),z(Z,"byteOffset"),z(Z,"byteLength"),z(Z,"length")),A({target:"Object",stat:!0,forced:!q},{getOwnPropertyDescriptor:te,defineProperty:re}),e.exports=function(e,t,r){var a=e.match(/\\d+/)[0]/8,s=e+(r?"Clamped":"")+"Array",c="get"+e,u="set"+e,h=n[s],Q=h,E=Q&&Q.prototype,d={},p=function(e,t){H(e,t,{get:function(){return function(e,t){var r=U(e);return r.view[c](t*a+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,A){var n=U(e);n.view[u](t*a+n.byteOffset,r?B(A):A,!0)}(this,t,e)},enumerable:!0})};q?o&&(Q=t((function(e,t,r,A){return g(e,E),L(y(t)?$(t)?void 0!==A?new h(t,C(r,a),A):void 0!==r?new h(t,C(r,a)):new h(t):_(t)?G(Q,t):i(k,Q,t):new h(f(t)),e,Q)})),w&&w(Q,W),D(b(h),(function(e){e in Q||l(Q,e,h[e])})),Q.prototype=E):(Q=t((function(e,t,r,A){g(e,E);var n,o,s,c=0,u=0;if(y(t)){if(!$(t))return _(t)?G(Q,t):i(k,Q,t);n=t,u=C(r,a);var l=t.byteLength;if(void 0===A){if(l%a)throw new P(V);if((o=l-u)<0)throw new P(V)}else if((o=I(A)*a)+u>l)throw new P(V);s=o/a}else s=f(t),n=new O(o=s*a);for(M(e,{buffer:n,byteOffset:u,byteLength:o,length:s,view:new T(n)});c{var A=r(4032),n=r(3455),i=r(4348),a=r(4356).NATIVE_ARRAY_BUFFER_VIEWS,o=A.ArrayBuffer,s=A.Int8Array;e.exports=!a||!n((function(){s(1)}))||!n((function(){new s(-1)}))||!i((function(e){new s,new s(null),new s(1.5),new s(e)}),!0)||n((function(){return 1!==new s(new o(2),1,void 0).length}))},85:(e,t,r)=>{var A=r(7434),n=r(580);e.exports=function(e,t){return A(n(e),t)}},2291:(e,t,r)=>{var A=r(4864),n=r(3453),i=r(9052),a=r(4165),o=r(7878),s=r(6961),c=r(7507),g=r(993),u=r(5415),l=r(4356).aTypedArrayConstructor,h=r(1198);e.exports=function(e){var t,r,I,f,C,B,Q,E,d=i(this),y=a(e),p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,w=c(y);if(w&&!g(w))for(E=(Q=s(y,w)).next,y=[];!(B=n(E,Q)).done;)y.push(B.value);for(m&&p>2&&(v=A(v,arguments[2])),r=o(y),I=new(l(d))(r),f=u(I),t=0;r>t;t++)C=m?v(y[t],t):y[t],I[t]=f?h(C):+C;return I}},580:(e,t,r)=>{var A=r(4356),n=r(1365),i=A.aTypedArrayConstructor,a=A.getTypedArrayConstructor;e.exports=function(e){return i(n(e,a(e)))}},5936:(e,t,r)=>{var A=r(2608),n=0,i=Math.random(),a=A(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+i,36)}},8200:(e,t,r)=>{var A=r(3455),n=r(5811),i=r(2444),a=r(8507),o=n("iterator");e.exports=!A((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),A="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),A+=r+e})),r.delete("a",2),r.delete("b",void 0),a&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(a||!i)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==A||"x"!==new URL("https://x",void 0).host}))},4752:(e,t,r)=>{var A=r(6943);e.exports=A&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},782:(e,t,r)=>{var A=r(2444),n=r(3455);e.exports=A&&n((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7900:e=>{var t=TypeError;e.exports=function(e,r){if(e{var A=r(4032),n=r(3749),i=A.WeakMap;e.exports=n(i)&&/native code/.test(String(i))},5343:(e,t,r)=>{var A=r(8799),n=r(9649),i=r(4559),a=r(1601).f;e.exports=function(e){var t=A.Symbol||(A.Symbol={});n(t,e)||a(t,e,{value:i.f(e)})}},4559:(e,t,r)=>{var A=r(5811);t.f=A},5811:(e,t,r)=>{var A=r(4032),n=r(4593),i=r(9649),a=r(5936),o=r(6943),s=r(4752),c=A.Symbol,g=n("wks"),u=s?c.for||c:c&&c.withoutSetter||a;e.exports=function(e){return i(g,e)||(g[e]=o&&i(c,e)?c[e]:u("Symbol."+e)),g[e]}},2284:e=>{e.exports="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff"},9257:(e,t,r)=>{var A=r(8711),n=r(9649),i=r(139),a=r(6921),o=r(9415),s=r(2924),c=r(2848),g=r(3951),u=r(8363),l=r(2483),h=r(4171),I=r(2444),f=r(8507);e.exports=function(e,t,r,C){var B="stackTraceLimit",Q=C?2:1,E=e.split("."),d=E[E.length-1],y=A.apply(null,E);if(y){var p=y.prototype;if(!f&&n(p,"cause")&&delete p.cause,!r)return y;var v=A("Error"),m=t((function(e,t){var r=u(C?t:e,void 0),A=C?new y(e):new y;return void 0!==r&&i(A,"message",r),h(A,m,A.stack,2),this&&a(p,this)&&g(A,this,m),arguments.length>Q&&l(A,arguments[Q]),A}));if(m.prototype=p,"Error"!==d?o?o(m,v):s(m,v,{name:!0}):I&&B in y&&(c(m,y,B),c(m,y,"prepareStackTrace")),s(m,y),!f)try{p.name!==d&&i(p,"name",d),p.constructor=m}catch(e){}return m}}},5015:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(7226),a=r(5409),o="ArrayBuffer",s=i[o];A({global:!0,constructor:!0,forced:n[o]!==s},{ArrayBuffer:s}),a(o)},9261:(e,t,r)=>{var A=r(2444),n=r(8986),i=r(8102),a=ArrayBuffer.prototype;A&&!("detached"in a)&&n(a,"detached",{configurable:!0,get:function(){return i(this)}})},6209:(e,t,r)=>{var A=r(5366),n=r(2116),i=r(3455),a=r(7226),o=r(7447),s=r(9002),c=r(5806),g=r(1365),u=a.ArrayBuffer,l=a.DataView,h=l.prototype,I=n(u.prototype.slice),f=n(h.getUint8),C=n(h.setUint8);A({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new u(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(I&&void 0===t)return I(o(this),e);for(var r=o(this).byteLength,A=s(e,r),n=s(void 0===t?r:t,r),i=new(g(this,u))(c(n-A)),a=new l(this),h=new l(i),B=0;A{var A=r(5366),n=r(4676);n&&A({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return n(this,arguments.length?arguments[0]:void 0,!1)}})},3700:(e,t,r)=>{var A=r(5366),n=r(4676);n&&A({target:"ArrayBuffer",proto:!0},{transfer:function(){return n(this,arguments.length?arguments[0]:void 0,!0)}})},6347:(e,t,r)=>{var A=r(5366),n=r(4165),i=r(7878),a=r(1211),o=r(1458);A({target:"Array",proto:!0},{at:function(e){var t=n(this),r=i(t),A=a(e),o=A>=0?A:r+A;return o<0||o>=r?void 0:t[o]}}),o("at")},3234:(e,t,r)=>{var A=r(5366),n=r(3455),i=r(5448),a=r(2674),o=r(4165),s=r(7878),c=r(9573),g=r(3552),u=r(1453),l=r(9077),h=r(5811),I=r(6415),f=h("isConcatSpreadable"),C=I>=51||!n((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),B=function(e){if(!a(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};A({target:"Array",proto:!0,arity:1,forced:!C||!l("concat")},{concat:function(e){var t,r,A,n,i,a=o(this),l=u(a,0),h=0;for(t=-1,A=arguments.length;t{var A=r(5366),n=r(5645).filter;A({target:"Array",proto:!0,forced:!r(9077)("filter")},{filter:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},6497:(e,t,r)=>{var A=r(5366),n=r(2851),i=r(4165),a=r(7878),o=r(1211),s=r(1453);A({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=i(this),r=a(t),A=s(t,0);return A.length=n(A,t,t,r,0,void 0===e?1:o(e)),A}})},6746:(e,t,r)=>{var A=r(5366),n=r(3948);A({target:"Array",stat:!0,forced:!r(4348)((function(e){Array.from(e)}))},{from:n})},932:(e,t,r)=>{var A=r(5366),n=r(7921).includes,i=r(3455),a=r(1458);A({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},3276:(e,t,r)=>{var A=r(5366),n=r(2116),i=r(7921).indexOf,a=r(1814),o=n([].indexOf),s=!!o&&1/o([1],1,-0)<0;A({target:"Array",proto:!0,forced:s||!a("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return s?o(this,e,t)||0:i(this,e,t)}})},9024:(e,t,r)=>{var A=r(3637),n=r(1458),i=r(5597),a=r(8301),o=r(1601).f,s=r(656),c=r(9393),g=r(8507),u=r(2444),l="Array Iterator",h=a.set,I=a.getterFor(l);e.exports=s(Array,"Array",(function(e,t){h(this,{type:l,target:A(e),index:0,kind:t})}),(function(){var e=I(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([r,t[r]],!1)}),"values");var f=i.Arguments=i.Array;if(n("keys"),n("values"),n("entries"),!g&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},3177:(e,t,r)=>{var A=r(5366),n=r(3499);A({target:"Array",proto:!0,forced:n!==[].lastIndexOf},{lastIndexOf:n})},5550:(e,t,r)=>{var A=r(5366),n=r(5645).map;A({target:"Array",proto:!0,forced:!r(9077)("map")},{map:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},9138:(e,t,r)=>{var A=r(5366),n=r(4165),i=r(7878),a=r(7375),o=r(9573);A({target:"Array",proto:!0,arity:1,forced:r(3455)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),r=i(t),A=arguments.length;o(r+A);for(var s=0;s{var A=r(5366),n=r(4734).left,i=r(1814),a=r(6415);A({target:"Array",proto:!0,forced:!r(4529)&&a>79&&a<83||!i("reduce")},{reduce:function(e){var t=arguments.length;return n(this,e,t,t>1?arguments[1]:void 0)}})},6794:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(5448),a=n([].reverse),o=[1,2];A({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},750:(e,t,r)=>{var A=r(5366),n=r(5448),i=r(8413),a=r(2674),o=r(9002),s=r(7878),c=r(3637),g=r(3552),u=r(5811),l=r(9077),h=r(4224),I=l("slice"),f=u("species"),C=Array,B=Math.max;A({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,A,u,l=c(this),I=s(l),Q=o(e,I),E=o(void 0===t?I:t,I);if(n(l)&&(r=l.constructor,(i(r)&&(r===C||n(r.prototype))||a(r)&&null===(r=r[f]))&&(r=void 0),r===C||void 0===r))return h(l,Q,E);for(A=new(void 0===r?C:r)(B(E-Q,0)),u=0;Q{var A=r(5366),n=r(2608),i=r(4186),a=r(4165),o=r(7878),s=r(1870),c=r(687),g=r(3455),u=r(5272),l=r(1814),h=r(7085),I=r(5123),f=r(6415),C=r(1911),B=[],Q=n(B.sort),E=n(B.push),d=g((function(){B.sort(void 0)})),y=g((function(){B.sort(null)})),p=l("sort"),v=!g((function(){if(f)return f<70;if(!(h&&h>3)){if(I)return!0;if(C)return C<603;var e,t,r,A,n="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(A=0;A<47;A++)B.push({k:t+A,v:r})}for(B.sort((function(e,t){return t.v-e.v})),A=0;Ac(r)?1:-1}}(e)),r=o(n),A=0;A{var A=r(5366),n=r(4165),i=r(9002),a=r(1211),o=r(7878),s=r(7375),c=r(9573),g=r(1453),u=r(3552),l=r(1870),h=r(9077)("splice"),I=Math.max,f=Math.min;A({target:"Array",proto:!0,forced:!h},{splice:function(e,t){var r,A,h,C,B,Q,E=n(this),d=o(E),y=i(e,d),p=arguments.length;for(0===p?r=A=0:1===p?(r=0,A=d-y):(r=p-2,A=f(I(a(t),0),d-y)),c(d+r-A),h=g(E,A),C=0;Cd-A+r;C--)l(E,C-1)}else if(r>A)for(C=d-A;C>y;C--)Q=C+r-1,(B=C+A-1)in E?E[Q]=E[B]:l(E,Q);for(C=0;C{r(1458)("flat")},8937:(e,t,r)=>{var A=r(5366),n=r(4165),i=r(7878),a=r(7375),o=r(1870),s=r(9573);A({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=n(this),r=i(t),A=arguments.length;if(A){s(r+A);for(var c=r;c--;){var g=c+A;c in t?t[g]=t[c]:o(t,g)}for(var u=0;u{var A=r(5366),n=r(3455),i=r(4165),a=r(8921);A({target:"Date",proto:!0,arity:1,forced:n((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),r=a(t,"number");return"number"!=typeof r||isFinite(r)?t.toISOString():null}})},7316:(e,t,r)=>{var A=r(9649),n=r(8552),i=r(952),a=r(5811)("toPrimitive"),o=Date.prototype;A(o,a)||n(o,a,i)},184:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3881),a=r(9257),o="WebAssembly",s=n[o],c=7!==new Error("e",{cause:7}).cause,g=function(e,t){var r={};r[e]=a(e,t,c),A({global:!0,constructor:!0,arity:1,forced:c},r)},u=function(e,t){if(s&&s[e]){var r={};r[e]=a(o+"."+e,t,c),A({target:o,stat:!0,constructor:!0,arity:1,forced:c},r)}};g("Error",(function(e){return function(t){return i(e,this,arguments)}})),g("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),g("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),g("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),g("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),g("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),g("URIError",(function(e){return function(t){return i(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},8169:(e,t,r)=>{var A=r(5366),n=r(4032);A({global:!0,forced:n.globalThis!==n},{globalThis:n})},9750:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(3881),a=r(3453),o=r(2608),s=r(3455),c=r(3749),g=r(2277),u=r(4224),l=r(213),h=r(6943),I=String,f=n("JSON","stringify"),C=o(/./.exec),B=o("".charAt),Q=o("".charCodeAt),E=o("".replace),d=o(1..toString),y=/[\\uD800-\\uDFFF]/g,p=/^[\\uD800-\\uDBFF]$/,v=/^[\\uDC00-\\uDFFF]$/,m=!h||s((function(){var e=n("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),w=s((function(){return'"\\\\udf06\\\\ud834"'!==f("\\udf06\\ud834")||'"\\\\udead"'!==f("\\udead")})),b=function(e,t){var r=u(arguments),A=l(t);if(c(A)||void 0!==e&&!g(e))return r[1]=function(e,t){if(c(A)&&(t=a(A,this,I(e),t)),!g(t))return t},i(f,null,r)},k=function(e,t,r){var A=B(r,t-1),n=B(r,t+1);return C(p,e)&&!C(v,n)||C(v,e)&&!C(p,A)?"\\\\u"+d(Q(e,0),16):e};f&&A({target:"JSON",stat:!0,arity:3,forced:m||w},{stringify:function(e,t,r){var A=u(arguments),n=i(m?b:f,null,A);return w&&"string"==typeof n?E(n,y,k):n}})},7531:(e,t,r)=>{var A=r(4032);r(6911)(A.JSON,"JSON",!0)},6539:(e,t,r)=>{r(9556)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(2042))},1425:(e,t,r)=>{r(6539)},3821:(e,t,r)=>{var A=r(5366),n=Math.hypot,i=Math.abs,a=Math.sqrt;A({target:"Math",stat:!0,arity:2,forced:!!n&&n(1/0,NaN)!==1/0},{hypot:function(e,t){for(var r,A,n=0,o=0,s=arguments.length,c=0;o0?(A=r/c)*A:r;return c===1/0?1/0:c*a(n)}})},1999:(e,t,r)=>{r(6911)(Math,"Math",!0)},8674:(e,t,r)=>{var A=r(5366),n=r(8885).entries;A({target:"Object",stat:!0},{entries:function(e){return n(e)}})},1309:(e,t,r)=>{var A=r(5366),n=r(6943),i=r(3455),a=r(6005),o=r(4165);A({target:"Object",stat:!0,forced:!n||i((function(){a.f(1)}))},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(o(e)):[]}})},3379:(e,t,r)=>{var A=r(3724),n=r(8552),i=r(3003);A||n(Object.prototype,"toString",i,{unsafe:!0})},482:(e,t,r)=>{var A=r(5366),n=r(8885).values;A({target:"Object",stat:!0},{values:function(e){return n(e)}})},5204:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(9371),o=r(6703),s=r(1804);A({target:"Promise",stat:!0,forced:r(2041)},{allSettled:function(e){var t=this,r=a.f(t),A=r.resolve,c=r.reject,g=o((function(){var r=i(t.resolve),a=[],o=0,c=1;s(e,(function(e){var i=o++,s=!1;c++,n(r,t,e).then((function(e){s||(s=!0,a[i]={status:"fulfilled",value:e},--c||A(a))}),(function(e){s||(s=!0,a[i]={status:"rejected",reason:e},--c||A(a))}))})),--c||A(a)}));return g.error&&c(g.value),r.promise}})},6195:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(9371),o=r(6703),s=r(1804);A({target:"Promise",stat:!0,forced:r(2041)},{all:function(e){var t=this,r=a.f(t),A=r.resolve,c=r.reject,g=o((function(){var r=i(t.resolve),a=[],o=0,g=1;s(e,(function(e){var i=o++,s=!1;g++,n(r,t,e).then((function(e){s||(s=!0,a[i]=e,--g||A(a))}),c)})),--g||A(a)}));return g.error&&c(g.value),r.promise}})},1459:(e,t,r)=>{var A=r(5366),n=r(8507),i=r(9492).CONSTRUCTOR,a=r(5318),o=r(8711),s=r(3749),c=r(8552),g=a&&a.prototype;if(A({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!n&&s(a)){var u=o("Promise").prototype.catch;g.catch!==u&&c(g,"catch",u,{unsafe:!0})}},9236:(e,t,r)=>{var A,n,i,a=r(5366),o=r(8507),s=r(4529),c=r(4032),g=r(3453),u=r(8552),l=r(9415),h=r(6911),I=r(5409),f=r(4186),C=r(3749),B=r(2674),Q=r(3399),E=r(1365),d=r(1369).set,y=r(755),p=r(4885),v=r(6703),m=r(3529),w=r(8301),b=r(5318),k=r(9492),D=r(9371),S="Promise",F=k.CONSTRUCTOR,x=k.REJECTION_EVENT,R=k.SUBCLASSING,G=w.getterFor(S),N=w.set,L=b&&b.prototype,U=b,M=L,J=c.TypeError,H=c.document,Y=c.process,P=D.f,O=P,K=!!(H&&H.createEvent&&c.dispatchEvent),T="unhandledrejection",q=function(e){var t;return!(!B(e)||!C(t=e.then))&&t},j=function(e,t){var r,A,n,i=t.value,a=1===t.state,o=a?e.ok:e.fail,s=e.resolve,c=e.reject,u=e.domain;try{o?(a||(2===t.rejection&&V(t),t.rejection=1),!0===o?r=i:(u&&u.enter(),r=o(i),u&&(u.exit(),n=!0)),r===e.promise?c(new J("Promise-chain cycle")):(A=q(r))?g(A,r,s,c):s(r)):c(i)}catch(e){u&&!n&&u.exit(),c(e)}},W=function(e,t){e.notified||(e.notified=!0,y((function(){for(var r,A=e.reactions;r=A.get();)j(r,e);e.notified=!1,t&&!e.rejection&&_(e)})))},Z=function(e,t,r){var A,n;K?((A=H.createEvent("Event")).promise=t,A.reason=r,A.initEvent(e,!1,!0),c.dispatchEvent(A)):A={promise:t,reason:r},!x&&(n=c["on"+e])?n(A):e===T&&p("Unhandled promise rejection",r)},_=function(e){g(d,c,(function(){var t,r=e.facade,A=e.value;if(X(e)&&(t=v((function(){s?Y.emit("unhandledRejection",A,r):Z(T,r,A)})),e.rejection=s||X(e)?2:1,t.error))throw t.value}))},X=function(e){return 1!==e.rejection&&!e.parent},V=function(e){g(d,c,(function(){var t=e.facade;s?Y.emit("rejectionHandled",t):Z("rejectionhandled",t,e.value)}))},z=function(e,t,r){return function(A){e(t,A,r)}},$=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,W(e,!0))},ee=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new J("Promise can't be resolved itself");var A=q(t);A?y((function(){var r={done:!1};try{g(A,t,z(ee,r,e),z($,r,e))}catch(t){$(r,t,e)}})):(e.value=t,e.state=1,W(e,!1))}catch(t){$({done:!1},t,e)}}};if(F&&(M=(U=function(e){Q(this,M),f(e),g(A,this);var t=G(this);try{e(z(ee,t),z($,t))}catch(e){$(t,e)}}).prototype,(A=function(e){N(this,{type:S,done:!1,notified:!1,parent:!1,reactions:new m,rejection:!1,state:0,value:null})}).prototype=u(M,"then",(function(e,t){var r=G(this),A=P(E(this,U));return r.parent=!0,A.ok=!C(e)||e,A.fail=C(t)&&t,A.domain=s?Y.domain:void 0,0===r.state?r.reactions.add(A):y((function(){j(A,r)})),A.promise})),n=function(){var e=new A,t=G(e);this.promise=e,this.resolve=z(ee,t),this.reject=z($,t)},D.f=P=function(e){return e===U||void 0===e?new n(e):O(e)},!o&&C(b)&&L!==Object.prototype)){i=L.then,R||u(L,"then",(function(e,t){var r=this;return new U((function(e,t){g(i,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete L.constructor}catch(e){}l&&l(L,M)}a({global:!0,constructor:!0,wrap:!0,forced:F},{Promise:U}),h(U,S,!1,!0),I(S)},2431:(e,t,r)=>{var A=r(5366),n=r(8507),i=r(5318),a=r(3455),o=r(8711),s=r(3749),c=r(1365),g=r(1774),u=r(8552),l=i&&i.prototype;if(A({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){l.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=c(this,o("Promise")),r=s(e);return this.then(r?function(r){return g(t,e()).then((function(){return r}))}:e,r?function(r){return g(t,e()).then((function(){throw r}))}:e)}}),!n&&s(i)){var h=o("Promise").prototype.finally;l.finally!==h&&u(l,"finally",h,{unsafe:!0})}},1234:(e,t,r)=>{r(9236),r(6195),r(1459),r(5167),r(5257),r(1128)},5167:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(9371),o=r(6703),s=r(1804);A({target:"Promise",stat:!0,forced:r(2041)},{race:function(e){var t=this,r=a.f(t),A=r.reject,c=o((function(){var a=i(t.resolve);s(e,(function(e){n(a,t,e).then(r.resolve,A)}))}));return c.error&&A(c.value),r.promise}})},5257:(e,t,r)=>{var A=r(5366),n=r(9371);A({target:"Promise",stat:!0,forced:r(9492).CONSTRUCTOR},{reject:function(e){var t=n.f(this);return(0,t.reject)(e),t.promise}})},1128:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(8507),a=r(5318),o=r(9492).CONSTRUCTOR,s=r(1774),c=n("Promise"),g=i&&!o;A({target:"Promise",stat:!0,forced:i||o},{resolve:function(e){return s(g&&this===c?a:this,e)}})},9732:(e,t,r)=>{var A=r(5366),n=r(9371);A({target:"Promise",stat:!0},{withResolvers:function(){var e=n.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}})},489:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(3881),a=r(2230),o=r(9052),s=r(7447),c=r(2674),g=r(5304),u=r(3455),l=n("Reflect","construct"),h=Object.prototype,I=[].push,f=u((function(){function e(){}return!(l((function(){}),[],e)instanceof e)})),C=!u((function(){l((function(){}))})),B=f||C;A({target:"Reflect",stat:!0,forced:B,sham:B},{construct:function(e,t){o(e),s(t);var r=arguments.length<3?e:o(arguments[2]);if(C&&!f)return l(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var A=[null];return i(I,A,t),new(i(a,e,A))}var n=r.prototype,u=g(c(n)?n:h),B=i(e,u,t);return c(B)?B:u}})},7288:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(2674),a=r(7447),o=r(3007),s=r(1139),c=r(2611);A({target:"Reflect",stat:!0},{get:function e(t,r){var A,g,u=arguments.length<3?t:arguments[2];return a(t)===u?t[r]:(A=s.f(t,r))?o(A)?A.value:void 0===A.get?void 0:n(A.get,u):i(g=c(t))?e(g,r,u):void 0}})},176:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(6911);A({global:!0},{Reflect:{}}),i(n.Reflect,"Reflect",!0)},4592:(e,t,r)=>{var A=r(2444),n=r(4032),i=r(2608),a=r(5868),o=r(3951),s=r(139),c=r(5304),g=r(3408).f,u=r(6921),l=r(6484),h=r(687),I=r(4554),f=r(1837),C=r(2848),B=r(8552),Q=r(3455),E=r(9649),d=r(8301).enforce,y=r(5409),p=r(5811),v=r(3651),m=r(9502),w=p("match"),b=n.RegExp,k=b.prototype,D=n.SyntaxError,S=i(k.exec),F=i("".charAt),x=i("".replace),R=i("".indexOf),G=i("".slice),N=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,L=/a/g,U=/a/g,M=new b(L)!==L,J=f.MISSED_STICKY,H=f.UNSUPPORTED_Y;if(a("RegExp",A&&(!M||J||v||m||Q((function(){return U[w]=!1,b(L)!==L||b(U)===U||"/a/i"!==String(b(L,"i"))}))))){for(var Y=function(e,t){var r,A,n,i,a,g,f=u(k,this),C=l(e),B=void 0===t,Q=[],y=e;if(!f&&C&&B&&e.constructor===Y)return e;if((C||u(k,e))&&(e=e.source,B&&(t=I(y))),e=void 0===e?"":h(e),t=void 0===t?"":h(t),y=e,v&&"dotAll"in L&&(A=!!t&&R(t,"s")>-1)&&(t=x(t,/s/g,"")),r=t,J&&"sticky"in L&&(n=!!t&&R(t,"y")>-1)&&H&&(t=x(t,/y/g,"")),m&&(i=function(e){for(var t,r=e.length,A=0,n="",i=[],a=c(null),o=!1,s=!1,g=0,u="";A<=r;A++){if("\\\\"===(t=F(e,A)))t+=F(e,++A);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:if(n+=t,"?:"===G(e,A+1,A+3))continue;S(N,G(e,A+1))&&(A+=2,s=!0),g++;continue;case">"===t&&s:if(""===u||E(a,u))throw new D("Invalid capture group name");a[u]=!0,i[i.length]=[u,g],s=!1,u="";continue}s?u+=t:n+=t}return[n,i]}(e),e=i[0],Q=i[1]),a=o(b(e,t),f?this:k,Y),(A||n||Q.length)&&(g=d(a),A&&(g.dotAll=!0,g.raw=Y(function(e){for(var t,r=e.length,A=0,n="",i=!1;A<=r;A++)"\\\\"!==(t=F(e,A))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),n+=t):n+="[\\\\s\\\\S]":n+=t+F(e,++A);return n}(e),r)),n&&(g.sticky=!0),Q.length&&(g.groups=Q)),e!==y)try{s(a,"source",""===y?"(?:)":y)}catch(e){}return a},P=g(b),O=0;P.length>O;)C(Y,b,P[O++]);k.constructor=Y,Y.prototype=k,B(n,"RegExp",Y,{constructor:!0})}y("RegExp")},8345:(e,t,r)=>{var A=r(2444),n=r(3651),i=r(9872),a=r(8986),o=r(8301).get,s=RegExp.prototype,c=TypeError;A&&n&&a(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!o(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},2823:(e,t,r)=>{var A=r(5366),n=r(9867);A({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},7879:(e,t,r)=>{var A=r(4032),n=r(2444),i=r(8986),a=r(747),o=r(3455),s=A.RegExp,c=s.prototype;n&&o((function(){var e=!0;try{s(".","d")}catch(t){e=!1}var t={},r="",A=e?"dgimsy":"gimsy",n=function(e,A){Object.defineProperty(t,e,{get:function(){return r+=A,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(i.hasIndices="d"),i)n(a,i[a]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(t)!==A||r!==A}))&&i(c,"flags",{configurable:!0,get:a})},2865:(e,t,r)=>{var A=r(2444),n=r(1837).MISSED_STICKY,i=r(9872),a=r(8986),o=r(8301).get,s=RegExp.prototype,c=TypeError;A&&n&&a(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===i(this))return!!o(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},5594:(e,t,r)=>{r(2823);var A,n,i=r(5366),a=r(3453),o=r(3749),s=r(7447),c=r(687),g=(A=!1,(n=/[ac]/).exec=function(){return A=!0,/./.exec.apply(this,arguments)},!0===n.test("abc")&&A),u=/./.test;i({target:"RegExp",proto:!0,forced:!g},{test:function(e){var t=s(this),r=c(e),A=t.exec;if(!o(A))return a(u,t,r);var n=a(A,t,r);return null!==n&&(s(n),!0)}})},8397:(e,t,r)=>{var A=r(2542).PROPER,n=r(8552),i=r(7447),a=r(687),o=r(3455),s=r(4554),c="toString",g=RegExp.prototype,u=g[c],l=o((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),h=A&&u.name!==c;(l||h)&&n(g,c,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(s(e))}),{unsafe:!0})},4645:(e,t,r)=>{r(9556)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(2042))},5130:(e,t,r)=>{var A=r(5366),n=r(4656);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("difference")},{difference:n})},5636:(e,t,r)=>{var A=r(5366),n=r(3455),i=r(2446);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("intersection")||n((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},8509:(e,t,r)=>{var A=r(5366),n=r(4545);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("isDisjointFrom")},{isDisjointFrom:n})},7332:(e,t,r)=>{var A=r(5366),n=r(7918);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSubsetOf")},{isSubsetOf:n})},6555:(e,t,r)=>{var A=r(5366),n=r(6111);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSupersetOf")},{isSupersetOf:n})},9255:(e,t,r)=>{r(4645)},3296:(e,t,r)=>{var A=r(5366),n=r(4498);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("symmetricDifference")},{symmetricDifference:n})},4594:(e,t,r)=>{var A=r(5366),n=r(9500);A({target:"Set",proto:!0,real:!0,forced:!r(1716)("union")},{union:n})},8653:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(7222),a=r(1211),o=r(687),s=r(3455),c=n("".charAt);A({target:"String",proto:!0,forced:s((function(){return"\\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=o(i(this)),r=t.length,A=a(e),n=A>=0?A:r+A;return n<0||n>=r?void 0:c(t,n)}})},9657:(e,t,r)=>{var A,n=r(5366),i=r(2116),a=r(1139).f,o=r(5806),s=r(687),c=r(3631),g=r(7222),u=r(860),l=r(8507),h=i("".slice),I=Math.min,f=u("endsWith");n({target:"String",proto:!0,forced:!(!l&&!f&&(A=a(String.prototype,"endsWith"),A&&!A.writable)||f)},{endsWith:function(e){var t=s(g(this));c(e);var r=arguments.length>1?arguments[1]:void 0,A=t.length,n=void 0===r?A:I(o(r),A),i=s(e);return h(t,n-i.length,n)===i}})},2217:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(9002),a=RangeError,o=String.fromCharCode,s=String.fromCodePoint,c=n([].join);A({target:"String",stat:!0,arity:1,forced:!!s&&1!==s.length},{fromCodePoint:function(e){for(var t,r=[],A=arguments.length,n=0;A>n;){if(t=+arguments[n++],i(t,1114111)!==t)throw new a(t+" is not a valid code point");r[n]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return c(r,"")}})},2467:(e,t,r)=>{var A=r(5366),n=r(2608),i=r(3631),a=r(7222),o=r(687),s=r(860),c=n("".indexOf);A({target:"String",proto:!0,forced:!s("includes")},{includes:function(e){return!!~c(o(a(this)),o(i(e)),arguments.length>1?arguments[1]:void 0)}})},7460:(e,t,r)=>{var A=r(6903).charAt,n=r(687),i=r(8301),a=r(656),o=r(9393),s="String Iterator",c=i.set,g=i.getterFor(s);a(String,"String",(function(e){c(this,{type:s,string:n(e),index:0})}),(function(){var e,t=g(this),r=t.string,n=t.index;return n>=r.length?o(void 0,!0):(e=A(r,n),t.index+=e.length,o(e,!1))}))},1281:(e,t,r)=>{var A=r(3453),n=r(4364),i=r(7447),a=r(6021),o=r(5806),s=r(687),c=r(7222),g=r(8622),u=r(8149),l=r(4410);n("match",(function(e,t,r){return[function(t){var r=c(this),n=a(t)?void 0:g(t,e);return n?A(n,t,r):new RegExp(t)[e](s(r))},function(e){var A=i(this),n=s(e),a=r(t,A,n);if(a.done)return a.value;if(!A.global)return l(A,n);var c=A.unicode;A.lastIndex=0;for(var g,h=[],I=0;null!==(g=l(A,n));){var f=s(g[0]);h[I]=f,""===f&&(A.lastIndex=u(n,o(A.lastIndex),c)),I++}return 0===I?null:h}]}))},9484:(e,t,r)=>{var A=r(5366),n=r(6437).start;A({target:"String",proto:!0,forced:r(4903)},{padStart:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},4413:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(2608),a=r(7222),o=r(3749),s=r(6021),c=r(6484),g=r(687),u=r(8622),l=r(4554),h=r(3966),I=r(5811),f=r(8507),C=I("replace"),B=TypeError,Q=i("".indexOf),E=i("".replace),d=i("".slice),y=Math.max;A({target:"String",proto:!0},{replaceAll:function(e,t){var r,A,i,I,p,v,m,w,b,k,D=a(this),S=0,F="";if(!s(e)){if((r=c(e))&&(A=g(a(l(e))),!~Q(A,"g")))throw new B("\`.replaceAll\` does not allow non-global regexes");if(i=u(e,C))return n(i,e,D,t);if(f&&r)return E(g(D),e,t)}for(I=g(D),p=g(e),(v=o(t))||(t=g(t)),m=p.length,w=y(1,m),b=Q(I,p);-1!==b;)k=v?g(t(p,b,I)):h(p,I,b,[],void 0,t),F+=d(I,S,b)+k,S=b+m,b=b+w>I.length?-1:Q(I,p,b+w);return S{var A=r(3881),n=r(3453),i=r(2608),a=r(4364),o=r(3455),s=r(7447),c=r(3749),g=r(6021),u=r(1211),l=r(5806),h=r(687),I=r(7222),f=r(8149),C=r(8622),B=r(3966),Q=r(4410),E=r(5811)("replace"),d=Math.max,y=Math.min,p=i([].concat),v=i([].push),m=i("".indexOf),w=i("".slice),b="$0"==="a".replace(/./,"$0"),k=!!/./[E]&&""===/./[E]("a","$0");a("replace",(function(e,t,r){var i=k?"$":"$0";return[function(e,r){var A=I(this),i=g(e)?void 0:C(e,E);return i?n(i,e,A,r):n(t,h(A),e,r)},function(e,n){var a=s(this),o=h(e);if("string"==typeof n&&-1===m(n,i)&&-1===m(n,"$<")){var g=r(t,a,o,n);if(g.done)return g.value}var I=c(n);I||(n=h(n));var C,E=a.global;E&&(C=a.unicode,a.lastIndex=0);for(var b,k=[];null!==(b=Q(a,o))&&(v(k,b),E);)""===h(b[0])&&(a.lastIndex=f(o,l(a.lastIndex),C));for(var D,S="",F=0,x=0;x=F&&(S+=w(o,F,N)+R,F=N+G.length)}return S+w(o,F)}]}),!!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}))||!b||k)},4072:(e,t,r)=>{var A=r(3453),n=r(2608),i=r(4364),a=r(7447),o=r(6021),s=r(7222),c=r(1365),g=r(8149),u=r(5806),l=r(687),h=r(8622),I=r(4410),f=r(1837),C=r(3455),B=f.UNSUPPORTED_Y,Q=Math.min,E=n([].push),d=n("".slice),y=!C((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),p="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;i("split",(function(e,t,r){var n="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:A(t,this,e,r)}:t;return[function(t,r){var i=s(this),a=o(t)?void 0:h(t,e);return a?A(a,t,i,r):A(n,l(i),t,r)},function(e,A){var i=a(this),o=l(e);if(!p){var s=r(n,i,o,A,n!==t);if(s.done)return s.value}var h=c(i,RegExp),f=i.unicode,C=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(B?"g":"y"),y=new h(B?"^(?:"+i.source+")":i,C),v=void 0===A?4294967295:A>>>0;if(0===v)return[];if(0===o.length)return null===I(y,o)?[o]:[];for(var m=0,w=0,b=[];w{var A,n=r(5366),i=r(2116),a=r(1139).f,o=r(5806),s=r(687),c=r(3631),g=r(7222),u=r(860),l=r(8507),h=i("".slice),I=Math.min,f=u("startsWith");n({target:"String",proto:!0,forced:!(!l&&!f&&(A=a(String.prototype,"startsWith"),A&&!A.writable)||f)},{startsWith:function(e){var t=s(g(this));c(e);var r=o(I(arguments.length>1?arguments[1]:void 0,t.length)),A=s(e);return h(t,r,r+A.length)===A}})},98:(e,t,r)=>{r(3185);var A=r(5366),n=r(2882);A({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==n},{trimEnd:n})},3185:(e,t,r)=>{var A=r(5366),n=r(2882);A({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==n},{trimRight:n})},9210:(e,t,r)=>{var A=r(5366),n=r(9418).trim;A({target:"String",proto:!0,forced:r(3794)("trim")},{trim:function(){return n(this)}})},4172:(e,t,r)=>{r(5343)("asyncIterator")},2873:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3453),a=r(2608),o=r(8507),s=r(2444),c=r(6943),g=r(3455),u=r(9649),l=r(6921),h=r(7447),I=r(3637),f=r(6201),C=r(687),B=r(4004),Q=r(5304),E=r(496),d=r(3408),y=r(6442),p=r(6005),v=r(1139),m=r(1601),w=r(9217),b=r(9221),k=r(8552),D=r(8986),S=r(4593),F=r(2343),x=r(2645),R=r(5936),G=r(5811),N=r(4559),L=r(5343),U=r(3042),M=r(6911),J=r(8301),H=r(5645).forEach,Y=F("hidden"),P="Symbol",O="prototype",K=J.set,T=J.getterFor(P),q=Object[O],j=n.Symbol,W=j&&j[O],Z=n.RangeError,_=n.TypeError,X=n.QObject,V=v.f,z=m.f,$=y.f,ee=b.f,te=a([].push),re=S("symbols"),Ae=S("op-symbols"),ne=S("wks"),ie=!X||!X[O]||!X[O].findChild,ae=function(e,t,r){var A=V(q,t);A&&delete q[t],z(e,t,r),A&&e!==q&&z(q,t,A)},oe=s&&g((function(){return 7!==Q(z({},"a",{get:function(){return z(this,"a",{value:7}).a}})).a}))?ae:z,se=function(e,t){var r=re[e]=Q(W);return K(r,{type:P,tag:e,description:t}),s||(r.description=t),r},ce=function(e,t,r){e===q&&ce(Ae,t,r),h(e);var A=f(t);return h(r),u(re,A)?(r.enumerable?(u(e,Y)&&e[Y][A]&&(e[Y][A]=!1),r=Q(r,{enumerable:B(0,!1)})):(u(e,Y)||z(e,Y,B(1,Q(null))),e[Y][A]=!0),oe(e,A,r)):z(e,A,r)},ge=function(e,t){h(e);var r=I(t),A=E(r).concat(Ie(r));return H(A,(function(t){s&&!i(ue,r,t)||ce(e,t,r[t])})),e},ue=function(e){var t=f(e),r=i(ee,this,t);return!(this===q&&u(re,t)&&!u(Ae,t))&&(!(r||!u(this,t)||!u(re,t)||u(this,Y)&&this[Y][t])||r)},le=function(e,t){var r=I(e),A=f(t);if(r!==q||!u(re,A)||u(Ae,A)){var n=V(r,A);return!n||!u(re,A)||u(r,Y)&&r[Y][A]||(n.enumerable=!0),n}},he=function(e){var t=$(I(e)),r=[];return H(t,(function(e){u(re,e)||u(x,e)||te(r,e)})),r},Ie=function(e){var t=e===q,r=$(t?Ae:I(e)),A=[];return H(r,(function(e){!u(re,e)||t&&!u(q,e)||te(A,re[e])})),A};c||(k(W=(j=function(){if(l(W,this))throw new _("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?C(arguments[0]):void 0,t=R(e),r=function(e){var A=void 0===this?n:this;A===q&&i(r,Ae,e),u(A,Y)&&u(A[Y],t)&&(A[Y][t]=!1);var a=B(1,e);try{oe(A,t,a)}catch(e){if(!(e instanceof Z))throw e;ae(A,t,a)}};return s&&ie&&oe(q,t,{configurable:!0,set:r}),se(t,e)})[O],"toString",(function(){return T(this).tag})),k(j,"withoutSetter",(function(e){return se(R(e),e)})),b.f=ue,m.f=ce,w.f=ge,v.f=le,d.f=y.f=he,p.f=Ie,N.f=function(e){return se(G(e),e)},s&&(D(W,"description",{configurable:!0,get:function(){return T(this).description}}),o||k(q,"propertyIsEnumerable",ue,{unsafe:!0}))),A({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:j}),H(E(ne),(function(e){L(e)})),A({target:P,stat:!0,forced:!c},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),A({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(e,t){return void 0===t?Q(e):ge(Q(e),t)},defineProperty:ce,defineProperties:ge,getOwnPropertyDescriptor:le}),A({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:he}),U(),M(j,P),x[Y]=!0},4551:(e,t,r)=>{var A=r(5366),n=r(2444),i=r(4032),a=r(2608),o=r(9649),s=r(3749),c=r(6921),g=r(687),u=r(8986),l=r(2924),h=i.Symbol,I=h&&h.prototype;if(n&&s(h)&&(!("description"in I)||void 0!==h().description)){var f={},C=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:g(arguments[0]),t=c(I,this)?new h(e):void 0===e?h():h(e);return""===e&&(f[t]=!0),t};l(C,h),C.prototype=I,I.constructor=C;var B="Symbol(description detection)"===String(h("description detection")),Q=a(I.valueOf),E=a(I.toString),d=/^Symbol\\((.*)\\)[^)]+$/,y=a("".replace),p=a("".slice);u(I,"description",{configurable:!0,get:function(){var e=Q(this);if(o(f,e))return"";var t=E(e),r=B?p(t,7,-1):y(t,d,"$1");return""===r?void 0:r}}),A({global:!0,constructor:!0,forced:!0},{Symbol:C})}},4182:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(9649),a=r(687),o=r(4593),s=r(8592),c=o("string-to-symbol-registry"),g=o("symbol-to-string-registry");A({target:"Symbol",stat:!0,forced:!s},{for:function(e){var t=a(e);if(i(c,t))return c[t];var r=n("Symbol")(t);return c[t]=r,g[r]=t,r}})},7651:(e,t,r)=>{r(2873),r(4182),r(7876),r(9750),r(1309)},7876:(e,t,r)=>{var A=r(5366),n=r(9649),i=r(2277),a=r(8055),o=r(4593),s=r(8592),c=o("symbol-to-string-registry");A({target:"Symbol",stat:!0,forced:!s},{keyFor:function(e){if(!i(e))throw new TypeError(a(e)+" is not a symbol");if(n(c,e))return c[e]}})},5268:(e,t,r)=>{var A=r(5343),n=r(3042);A("toPrimitive"),n()},5997:(e,t,r)=>{var A=r(8711),n=r(5343),i=r(6911);n("toStringTag"),i(A("Symbol"),"Symbol")},3740:(e,t,r)=>{var A=r(4356),n=r(7878),i=r(1211),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("at",(function(e){var t=a(this),r=n(t),A=i(e),o=A>=0?A:r+A;return o<0||o>=r?void 0:t[o]}))},6542:(e,t,r)=>{var A=r(2608),n=r(4356),i=A(r(6677)),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("copyWithin",(function(e,t){return i(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},5738:(e,t,r)=>{var A=r(4356),n=r(5645).every,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("every",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2900:(e,t,r)=>{var A=r(4356),n=r(9557),i=r(1198),a=r(1179),o=r(3453),s=r(2608),c=r(3455),g=A.aTypedArray,u=A.exportTypedArrayMethod,l=s("".slice);u("fill",(function(e){var t=arguments.length;g(this);var r="Big"===l(a(this),0,3)?i(e):+e;return o(n,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},2051:(e,t,r)=>{var A=r(4356),n=r(5645).filter,i=r(85),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("filter",(function(e){var t=n(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},4211:(e,t,r)=>{var A=r(4356),n=r(5645).findIndex,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("findIndex",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},5294:(e,t,r)=>{var A=r(4356),n=r(767).findLastIndex,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("findLastIndex",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},9791:(e,t,r)=>{var A=r(4356),n=r(767).findLast,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("findLast",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3198:(e,t,r)=>{var A=r(4356),n=r(5645).find,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("find",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},4306:(e,t,r)=>{r(8975)("Float32",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},6473:(e,t,r)=>{r(8975)("Float64",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},1526:(e,t,r)=>{var A=r(4356),n=r(5645).forEach,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("forEach",(function(e){n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2569:(e,t,r)=>{var A=r(949);(0,r(4356).exportTypedArrayStaticMethod)("from",r(2291),A)},6032:(e,t,r)=>{var A=r(4356),n=r(7921).includes,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("includes",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3659:(e,t,r)=>{var A=r(4356),n=r(7921).indexOf,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("indexOf",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},3195:(e,t,r)=>{r(8975)("Int16",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},1237:(e,t,r)=>{r(8975)("Int32",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},4834:(e,t,r)=>{r(8975)("Int8",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},8551:(e,t,r)=>{var A=r(4032),n=r(3455),i=r(2608),a=r(4356),o=r(9024),s=r(5811)("iterator"),c=A.Uint8Array,g=i(o.values),u=i(o.keys),l=i(o.entries),h=a.aTypedArray,I=a.exportTypedArrayMethod,f=c&&c.prototype,C=!n((function(){f[s].call([1])})),B=!!f&&f.values&&f[s]===f.values&&"values"===f.values.name,Q=function(){return g(h(this))};I("entries",(function(){return l(h(this))}),C),I("keys",(function(){return u(h(this))}),C),I("values",Q,C||!B,{name:"values"}),I(s,Q,C||!B,{name:"values"})},8553:(e,t,r)=>{var A=r(4356),n=r(2608),i=A.aTypedArray,a=A.exportTypedArrayMethod,o=n([].join);a("join",(function(e){return o(i(this),e)}))},7612:(e,t,r)=>{var A=r(4356),n=r(3881),i=r(3499),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return n(i,a(this),t>1?[e,arguments[1]]:[e])}))},8579:(e,t,r)=>{var A=r(4356),n=r(5645).map,i=r(580),a=A.aTypedArray;(0,A.exportTypedArrayMethod)("map",(function(e){return n(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(i(e))(t)}))}))},7576:(e,t,r)=>{var A=r(4356),n=r(4734).right,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return n(i(this),e,t,t>1?arguments[1]:void 0)}))},7719:(e,t,r)=>{var A=r(4356),n=r(4734).left,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return n(i(this),e,t,t>1?arguments[1]:void 0)}))},2891:(e,t,r)=>{var A=r(4356),n=A.aTypedArray,i=A.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,r=n(t).length,A=a(r/2),i=0;i{var A=r(4032),n=r(3453),i=r(4356),a=r(7878),o=r(8402),s=r(4165),c=r(3455),g=A.RangeError,u=A.Int8Array,l=u&&u.prototype,h=l&&l.set,I=i.aTypedArray,f=i.exportTypedArrayMethod,C=!c((function(){var e=new Uint8ClampedArray(2);return n(h,e,{length:1,0:3},1),3!==e[1]})),B=C&&i.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new u(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));f("set",(function(e){I(this);var t=o(arguments.length>1?arguments[1]:void 0,1),r=s(e);if(C)return n(h,this,r,t);var A=this.length,i=a(r),c=0;if(i+t>A)throw new g("Wrong length");for(;c{var A=r(4356),n=r(580),i=r(3455),a=r(4224),o=A.aTypedArray;(0,A.exportTypedArrayMethod)("slice",(function(e,t){for(var r=a(o(this),e,t),A=n(this),i=0,s=r.length,c=new A(s);s>i;)c[i]=r[i++];return c}),i((function(){new Int8Array(1).slice()})))},9637:(e,t,r)=>{var A=r(4356),n=r(5645).some,i=A.aTypedArray;(0,A.exportTypedArrayMethod)("some",(function(e){return n(i(this),e,arguments.length>1?arguments[1]:void 0)}))},2709:(e,t,r)=>{var A=r(4032),n=r(2116),i=r(3455),a=r(4186),o=r(5272),s=r(4356),c=r(7085),g=r(5123),u=r(6415),l=r(1911),h=s.aTypedArray,I=s.exportTypedArrayMethod,f=A.Uint16Array,C=f&&n(f.prototype.sort),B=!(!C||i((function(){C(new f(2),null)}))&&i((function(){C(new f(2),{})}))),Q=!!C&&!i((function(){if(u)return u<74;if(c)return c<67;if(g)return!0;if(l)return l<602;var e,t,r=new f(516),A=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,A[e]=e-2*t+3;for(C(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==A[e])return!0}));I("sort",(function(e){return void 0!==e&&a(e),Q?C(this,e):o(h(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!Q||B)},8941:(e,t,r)=>{var A=r(4032),n=r(3881),i=r(4356),a=r(3455),o=r(4224),s=A.Int8Array,c=i.aTypedArray,g=i.exportTypedArrayMethod,u=[].toLocaleString,l=!!s&&a((function(){u.call(new s(1))}));g("toLocaleString",(function(){return n(u,l?o(c(this)):c(this),o(arguments))}),a((function(){return[1,2].toLocaleString()!==new s([1,2]).toLocaleString()}))||!a((function(){s.prototype.toLocaleString.call([1,2])})))},1579:(e,t,r)=>{var A=r(6444),n=r(4356),i=n.aTypedArray,a=n.exportTypedArrayMethod,o=n.getTypedArrayConstructor;a("toReversed",(function(){return A(i(this),o(this))}))},6236:(e,t,r)=>{var A=r(4356),n=r(2608),i=r(4186),a=r(7434),o=A.aTypedArray,s=A.getTypedArrayConstructor,c=A.exportTypedArrayMethod,g=n(A.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&i(e);var t=o(this),r=a(s(t),t);return g(r,e)}))},7716:(e,t,r)=>{var A=r(4356).exportTypedArrayMethod,n=r(3455),i=r(4032),a=r(2608),o=i.Uint8Array,s=o&&o.prototype||{},c=[].toString,g=a([].join);n((function(){c.call({})}))&&(c=function(){return g(this)});var u=s.toString!==c;A("toString",c,u)},3034:(e,t,r)=>{r(8975)("Uint16",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},2044:(e,t,r)=>{r(8975)("Uint32",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},7329:(e,t,r)=>{r(8975)("Uint8",(function(e){return function(t,r,A){return e(this,t,r,A)}}))},4262:(e,t,r)=>{r(8975)("Uint8",(function(e){return function(t,r,A){return e(this,t,r,A)}}),!0)},1913:(e,t,r)=>{var A=r(920),n=r(4356),i=r(5415),a=r(1211),o=r(1198),s=n.aTypedArray,c=n.getTypedArrayConstructor,g=n.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();g("with",{with:function(e,t){var r=s(this),n=a(e),g=i(r)?o(t):+t;return A(r,c(r),n,g)}}.with,!u)},6722:(e,t,r)=>{var A,n=r(568),i=r(4032),a=r(2608),o=r(4183),s=r(5227),c=r(9556),g=r(8153),u=r(2674),l=r(8301).enforce,h=r(3455),I=r(6206),f=Object,C=Array.isArray,B=f.isExtensible,Q=f.isFrozen,E=f.isSealed,d=f.freeze,y=f.seal,p=!i.ActiveXObject&&"ActiveXObject"in i,v=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=c("WeakMap",v,g),w=m.prototype,b=a(w.set);if(I)if(p){A=g.getConstructor(v,"WeakMap",!0),s.enable();var k=a(w.delete),D=a(w.has),S=a(w.get);o(w,{delete:function(e){if(u(e)&&!B(e)){var t=l(this);return t.frozen||(t.frozen=new A),k(this,e)||t.frozen.delete(e)}return k(this,e)},has:function(e){if(u(e)&&!B(e)){var t=l(this);return t.frozen||(t.frozen=new A),D(this,e)||t.frozen.has(e)}return D(this,e)},get:function(e){if(u(e)&&!B(e)){var t=l(this);return t.frozen||(t.frozen=new A),D(this,e)?S(this,e):t.frozen.get(e)}return S(this,e)},set:function(e,t){if(u(e)&&!B(e)){var r=l(this);r.frozen||(r.frozen=new A),D(this,e)?b(this,e,t):r.frozen.set(e,t)}else b(this,e,t);return this}})}else n&&h((function(){var e=d([]);return b(new m,e,1),!Q(e)}))&&o(w,{set:function(e,t){var r;return C(e)&&(Q(e)?r=d:E(e)&&(r=y)),b(this,e,t),r&&r(e),this}})},8492:(e,t,r)=>{r(6722)},1176:(e,t,r)=>{r(9556)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),r(8153))},7121:(e,t,r)=>{r(1176)},4192:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(3399),a=r(7447),o=r(3749),s=r(2611),c=r(8986),g=r(3552),u=r(3455),l=r(9649),h=r(5811),I=r(2857).IteratorPrototype,f=r(2444),C=r(8507),B="constructor",Q="Iterator",E=h("toStringTag"),d=TypeError,y=n[Q],p=C||!o(y)||y.prototype!==I||!u((function(){y({})})),v=function(){if(i(this,I),s(this)===I)throw new d("Abstract class Iterator not directly constructable")},m=function(e,t){f?c(I,e,{configurable:!0,get:function(){return t},set:function(t){if(a(this),this===I)throw new d("You can't redefine this property");l(this,e)?this[e]=t:g(this,e,t)}}):I[e]=t};l(I,E)||m(E,Q),!p&&l(I,B)&&I[B]!==Object||m(B,v),v.prototype=I,A({global:!0,constructor:!0,forced:p},{Iterator:v})},463:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{every:function(e){a(this),i(e);var t=o(this),r=0;return!n(t,(function(t,A){if(!e(t,r++))return A()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},8856:(e,t,r)=>{var A=r(5366),n=r(3453),i=r(4186),a=r(7447),o=r(3447),s=r(2342),c=r(3535),g=r(8507),u=s((function(){for(var e,t,r=this.iterator,A=this.predicate,i=this.next;;){if(e=a(n(i,r)),this.done=!!e.done)return;if(t=e.value,c(r,A,[t,this.counter++],!0))return t}}));A({target:"Iterator",proto:!0,real:!0,forced:g},{filter:function(e){return a(this),i(e),new u(o(this),{predicate:e})}})},4865:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{find:function(e){a(this),i(e);var t=o(this),r=0;return n(t,(function(t,A){if(e(t,r++))return A(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},1565:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{forEach:function(e){a(this),i(e);var t=o(this),r=0;n(t,(function(t){e(t,r++)}),{IS_RECORD:!0})}})},5342:(e,t,r)=>{var A=r(5366),n=r(4009);A({target:"Iterator",proto:!0,real:!0,forced:r(8507)},{map:n})},8075:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447),s=TypeError;A({target:"Iterator",proto:!0,real:!0},{reduce:function(e){a(this),i(e);var t=o(this),r=arguments.length<2,A=r?void 0:arguments[1],c=0;if(n(t,(function(t){r?(r=!1,A=t):A=e(A,t,c),c++}),{IS_RECORD:!0}),r)throw new s("Reduce of empty iterator with no initial value");return A}})},9582:(e,t,r)=>{var A=r(5366),n=r(1804),i=r(4186),a=r(7447),o=r(3447);A({target:"Iterator",proto:!0,real:!0},{some:function(e){a(this),i(e);var t=o(this),r=0;return n(t,(function(t,A){if(e(t,r++))return A()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},7987:(e,t,r)=>{var A=r(5366),n=r(7447),i=r(1804),a=r(3447),o=[].push;A({target:"Iterator",proto:!0,real:!0},{toArray:function(){var e=[];return i(a(n(this)),o,{that:e,IS_RECORD:!0}),e}})},6625:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(8711),a=r(2608),o=r(3453),s=r(3455),c=r(687),g=r(7900),u=r(2996).c2i,l=/[^\\d+/a-z]/i,h=/[\\t\\n\\f\\r ]+/g,I=/[=]{1,2}$/,f=i("atob"),C=String.fromCharCode,B=a("".charAt),Q=a("".replace),E=a(l.exec),d=!!f&&!s((function(){return"hi"!==f("aGk=")})),y=d&&s((function(){return""!==f(" ")})),p=d&&!s((function(){f("a")})),v=d&&!s((function(){f()})),m=d&&1!==f.length;A({global:!0,bind:!0,enumerable:!0,forced:!d||y||p||v||m},{atob:function(e){if(g(arguments.length,1),d&&!y&&!p)return o(f,n,e);var t,r,A,a=Q(c(e),h,""),s="",v=0,m=0;if(a.length%4==0&&(a=Q(a,I,"")),(t=a.length)%4==1||E(l,a))throw new(i("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;v>(-2*m&6)));return s}})},8316:(e,t,r)=>{var A=r(4032),n=r(2760),i=r(4784),a=r(3147),o=r(139),s=function(e){if(e&&e.forEach!==a)try{o(e,"forEach",a)}catch(t){e.forEach=a}};for(var c in n)n[c]&&s(A[c]&&A[c].prototype);s(i)},3577:(e,t,r)=>{var A=r(4032),n=r(2760),i=r(4784),a=r(9024),o=r(139),s=r(6911),c=r(5811)("iterator"),g=a.values,u=function(e,t){if(e){if(e[c]!==g)try{o(e,c,g)}catch(t){e[c]=g}if(s(e,t,!0),n[t])for(var r in a)if(e[r]!==a[r])try{o(e,r,a[r])}catch(t){e[r]=a[r]}}};for(var l in n)u(A[l]&&A[l].prototype,l);u(i,"DOMTokenList")},4967:(e,t,r)=>{var A=r(5366),n=r(8711),i=r(9685),a=r(3455),o=r(5304),s=r(4004),c=r(1601).f,g=r(8552),u=r(8986),l=r(9649),h=r(3399),I=r(7447),f=r(2912),C=r(8363),B=r(4090),Q=r(3633),E=r(8301),d=r(2444),y=r(8507),p="DOMException",v="DATA_CLONE_ERR",m=n("Error"),w=n(p)||function(){try{(new(n("MessageChannel")||i("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===v&&25===e.code)return e.constructor}}(),b=w&&w.prototype,k=m.prototype,D=E.set,S=E.getterFor(p),F="stack"in new m(p),x=function(e){return l(B,e)&&B[e].m?B[e].c:0},R=function(){h(this,G);var e=arguments.length,t=C(e<1?void 0:arguments[0]),r=C(e<2?void 0:arguments[1],"Error"),A=x(r);if(D(this,{type:p,name:r,message:t,code:A}),d||(this.name=r,this.message=t,this.code=A),F){var n=new m(t);n.name=p,c(this,"stack",s(1,Q(n.stack,1)))}},G=R.prototype=o(k),N=function(e){return{enumerable:!0,configurable:!0,get:e}},L=function(e){return N((function(){return S(this)[e]}))};d&&(u(G,"code",L("code")),u(G,"message",L("message")),u(G,"name",L("name"))),c(G,"constructor",s(1,R));var U=a((function(){return!(new w instanceof m)})),M=U||a((function(){return k.toString!==f||"2: 1"!==String(new w(1,2))})),J=U||a((function(){return 25!==new w(1,"DataCloneError").code})),H=U||25!==w[v]||25!==b[v],Y=y?M||J||H:U;A({global:!0,constructor:!0,forced:Y},{DOMException:Y?R:w});var P=n(p),O=P.prototype;for(var K in M&&(y||w===P)&&g(O,"toString",f),J&&d&&w===P&&u(O,"code",N((function(){return x(I(this).name)}))),B)if(l(B,K)){var T=B[K],q=T.s,j=s(6,T.c);l(P,q)||c(P,q,j),l(O,q)||c(O,q,j)}},6403:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(8711),a=r(4004),o=r(1601).f,s=r(9649),c=r(3399),g=r(3951),u=r(8363),l=r(4090),h=r(3633),I=r(2444),f=r(8507),C="DOMException",B=i("Error"),Q=i(C),E=function(){c(this,d);var e=arguments.length,t=u(e<1?void 0:arguments[0]),r=u(e<2?void 0:arguments[1],"Error"),A=new Q(t,r),n=new B(t);return n.name=C,o(A,"stack",a(1,h(n.stack,1))),g(A,this,E),A},d=E.prototype=Q.prototype,y="stack"in new B(C),p="stack"in new Q(1,2),v=Q&&I&&Object.getOwnPropertyDescriptor(n,C),m=!(!v||v.writable&&v.configurable),w=y&&!m&&!p;A({global:!0,constructor:!0,forced:f||w},{DOMException:w?E:Q});var b=i(C),k=b.prototype;if(k.constructor!==b)for(var D in f||o(k,"constructor",a(1,b)),l)if(s(l,D)){var S=l[D],F=S.s;s(b,F)||o(b,F,a(6,S.c))}},3355:(e,t,r)=>{var A=r(8711),n="DOMException";r(6911)(A(n),n)},8043:(e,t,r)=>{var A=r(5366),n=r(4032),i=r(8986),a=r(2444),o=TypeError,s=Object.defineProperty,c=n.self!==n;try{if(a){var g=Object.getOwnPropertyDescriptor(n,"self");!c&&g&&g.get&&g.enumerable||i(n,"self",{get:function(){return n},set:function(e){if(this!==n)throw new o("Illegal invocation");s(n,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else A({global:!0,simple:!0,forced:c},{self:n})}catch(e){}},9734:(e,t,r)=>{r(9024),r(2217);var A=r(5366),n=r(4032),i=r(5725),a=r(8711),o=r(3453),s=r(2608),c=r(2444),g=r(8200),u=r(8552),l=r(8986),h=r(4183),I=r(6911),f=r(282),C=r(8301),B=r(3399),Q=r(3749),E=r(9649),d=r(4864),y=r(1179),p=r(7447),v=r(2674),m=r(687),w=r(5304),b=r(4004),k=r(6961),D=r(7507),S=r(9393),F=r(7900),x=r(5811),R=r(5272),G=x("iterator"),N="URLSearchParams",L=N+"Iterator",U=C.set,M=C.getterFor(N),J=C.getterFor(L),H=i("fetch"),Y=i("Request"),P=i("Headers"),O=Y&&Y.prototype,K=P&&P.prototype,T=n.TypeError,q=n.encodeURIComponent,j=String.fromCharCode,W=a("String","fromCodePoint"),Z=parseInt,_=s("".charAt),X=s([].join),V=s([].push),z=s("".replace),$=s([].shift),ee=s([].splice),te=s("".split),re=s("".slice),Ae=s(/./.exec),ne=/\\+/g,ie=/^[0-9a-f]+$/i,ae=function(e,t){var r=re(e,t,t+2);return Ae(ie,r)?Z(r,16):NaN},oe=function(e){for(var t=0,r=128;r>0&&0!=(e&r);r>>=1)t++;return t},se=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ce=function(e){for(var t=(e=z(e,ne," ")).length,r="",A=0;At){r+="%",A++;continue}var i=ae(e,A+1);if(i!=i){r+=n,A++;continue}A+=2;var a=oe(i);if(0===a)n=j(i);else{if(1===a||a>4){r+="�",A++;continue}for(var o=[i],s=1;st||"%"!==_(e,A));){var c=ae(e,A+1);if(c!=c){A+=3;break}if(c>191||c<128)break;V(o,c),A+=2,s++}if(o.length!==a){r+="�";continue}var g=se(o);null===g?r+="�":n=W(g)}}r+=n,A++}return r},ge=/[!'()~]|%20/g,ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},le=function(e){return ue[e]},he=function(e){return z(q(e),ge,le)},Ie=f((function(e,t){U(this,{type:L,target:M(e).entries,index:0,kind:t})}),N,(function(){var e=J(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,S(void 0,!0);var A=t[r];switch(e.kind){case"keys":return S(A.key,!1);case"values":return S(A.value,!1)}return S([A.key,A.value],!1)}),!0),fe=function(e){this.entries=[],this.url=null,void 0!==e&&(v(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===_(e,0)?re(e,1):e:m(e)))};fe.prototype={type:N,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,A,n,i,a,s,c=this.entries,g=D(e);if(g)for(r=(t=k(e,g)).next;!(A=o(r,t)).done;){if(i=(n=k(p(A.value))).next,(a=o(i,n)).done||(s=o(i,n)).done||!o(i,n).done)throw new T("Expected sequence with length 2");V(c,{key:m(a.value),value:m(s.value)})}else for(var u in e)E(e,u)&&V(c,{key:u,value:m(e[u])})},parseQuery:function(e){if(e)for(var t,r,A=this.entries,n=te(e,"&"),i=0;i0?arguments[0]:void 0));c||(this.size=e.entries.length)},Be=Ce.prototype;if(h(Be,{append:function(e,t){var r=M(this);F(arguments.length,2),V(r.entries,{key:m(e),value:m(t)}),c||this.length++,r.updateURL()},delete:function(e){for(var t=M(this),r=F(arguments.length,1),A=t.entries,n=m(e),i=r<2?void 0:arguments[1],a=void 0===i?i:m(i),o=0;ot.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=M(this).entries,A=d(e,arguments.length>1?arguments[1]:void 0),n=0;n1?de(arguments[1]):{})}}),Q(Y)){var ye=function(e){return B(this,O),new Y(e,arguments.length>1?de(arguments[1]):{})};O.constructor=ye,ye.prototype=O,A({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ye})}}e.exports={URLSearchParams:Ce,getState:M}},1531:(e,t,r)=>{var A=r(8552),n=r(2608),i=r(687),a=r(7900),o=URLSearchParams,s=o.prototype,c=n(s.append),g=n(s.delete),u=n(s.forEach),l=n([].push),h=new o("a=1&a=2&b=3");h.delete("a",1),h.delete("b",void 0),h+""!="a=2"&&A(s,"delete",(function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&void 0===r)return g(this,e);var A=[];u(this,(function(e,t){l(A,{key:t,value:e})})),a(t,1);for(var n,o=i(e),s=i(r),h=0,I=0,f=!1,C=A.length;h{var A=r(8552),n=r(2608),i=r(687),a=r(7900),o=URLSearchParams,s=o.prototype,c=n(s.getAll),g=n(s.has),u=new o("a=1");!u.has("a",2)&&u.has("a",void 0)||A(s,"has",(function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&void 0===r)return g(this,e);var A=c(this,e);a(t,1);for(var n=i(r),o=0;o{r(9734)},4145:(e,t,r)=>{var A=r(2444),n=r(2608),i=r(8986),a=URLSearchParams.prototype,o=n(a.forEach);A&&!("size"in a)&&i(a,"size",{get:function(){var e=0;return o(this,(function(){e++})),e},configurable:!0,enumerable:!0})},161:(e,t,r)=>{r(7460);var A,n=r(5366),i=r(2444),a=r(8200),o=r(4032),s=r(4864),c=r(2608),g=r(8552),u=r(8986),l=r(3399),h=r(9649),I=r(8069),f=r(3948),C=r(4224),B=r(6903).codeAt,Q=r(5141),E=r(687),d=r(6911),y=r(7900),p=r(9734),v=r(8301),m=v.set,w=v.getterFor("URL"),b=p.URLSearchParams,k=p.getState,D=o.URL,S=o.TypeError,F=o.parseInt,x=Math.floor,R=Math.pow,G=c("".charAt),N=c(/./.exec),L=c([].join),U=c(1..toString),M=c([].pop),J=c([].push),H=c("".replace),Y=c([].shift),P=c("".split),O=c("".slice),K=c("".toLowerCase),T=c([].unshift),q="Invalid scheme",j="Invalid host",W="Invalid port",Z=/[a-z]/i,_=/[\\d+-.a-z]/i,X=/\\d/,V=/^0x/i,z=/^[0-7]+$/,$=/^\\d+$/,ee=/^[\\da-f]+$/i,te=/[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/,re=/[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/,Ae=/^[\\u0000-\\u0020]+/,ne=/(^|[^\\u0000-\\u0020])[\\u0000-\\u0020]+$/,ie=/[\\t\\n\\r]/g,ae=function(e){var t,r,A,n;if("number"==typeof e){for(t=[],r=0;r<4;r++)T(t,e%256),e=x(e/256);return L(t,".")}if("object"==typeof e){for(t="",A=function(e){for(var t=null,r=1,A=null,n=0,i=0;i<8;i++)0!==e[i]?(n>r&&(t=A,r=n),A=null,n=0):(null===A&&(A=i),++n);return n>r?A:t}(e),r=0;r<8;r++)n&&0===e[r]||(n&&(n=!1),A===r?(t+=r?":":"::",n=!0):(t+=U(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},oe={},se=I({},oe,{" ":1,'"':1,"<":1,">":1,"\`":1}),ce=I({},se,{"#":1,"?":1,"{":1,"}":1}),ge=I({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\\\":1,"]":1,"^":1,"|":1}),ue=function(e,t){var r=B(e,0);return r>32&&r<127&&!h(t,e)?e:encodeURIComponent(e)},le={ftp:21,file:null,http:80,https:443,ws:80,wss:443},he=function(e,t){var r;return 2===e.length&&N(Z,G(e,0))&&(":"===(r=G(e,1))||!t&&"|"===r)},Ie=function(e){var t;return e.length>1&&he(O(e,0,2))&&(2===e.length||"/"===(t=G(e,2))||"\\\\"===t||"?"===t||"#"===t)},fe=function(e){return"."===e||"%2e"===K(e)},Ce={},Be={},Qe={},Ee={},de={},ye={},pe={},ve={},me={},we={},be={},ke={},De={},Se={},Fe={},xe={},Re={},Ge={},Ne={},Le={},Ue={},Me=function(e,t,r){var A,n,i,a=E(e);if(t){if(n=this.parse(a))throw new S(n);this.searchParams=null}else{if(void 0!==r&&(A=new Me(r,!0)),n=this.parse(a,null,A))throw new S(n);(i=k(new b)).bindURL(this),this.searchParams=i}};Me.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,g=t||Ce,u=0,l="",I=!1,B=!1,Q=!1;for(e=E(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=H(e,Ae,""),e=H(e,ne,"$1")),e=H(e,ie,""),n=f(e);u<=n.length;){switch(i=n[u],g){case Ce:if(!i||!N(Z,i)){if(t)return q;g=Qe;continue}l+=K(i),g=Be;break;case Be:if(i&&(N(_,i)||"+"===i||"-"===i||"."===i))l+=K(i);else{if(":"!==i){if(t)return q;l="",g=Qe,u=0;continue}if(t&&(c.isSpecial()!==h(le,l)||"file"===l&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&le[c.scheme]===c.port&&(c.port=null));l="","file"===c.scheme?g=Se:c.isSpecial()&&r&&r.scheme===c.scheme?g=Ee:c.isSpecial()?g=ve:"/"===n[u+1]?(g=de,u++):(c.cannotBeABaseURL=!0,J(c.path,""),g=Ne)}break;case Qe:if(!r||r.cannotBeABaseURL&&"#"!==i)return q;if(r.cannotBeABaseURL&&"#"===i){c.scheme=r.scheme,c.path=C(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,g=Ue;break}g="file"===r.scheme?Se:ye;continue;case Ee:if("/"!==i||"/"!==n[u+1]){g=ye;continue}g=me,u++;break;case de:if("/"===i){g=we;break}g=Ge;continue;case ye:if(c.scheme=r.scheme,i===A)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.query=r.query;else if("/"===i||"\\\\"===i&&c.isSpecial())g=pe;else if("?"===i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.query="",g=Le;else{if("#"!==i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.path.length--,g=Ge;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=C(r.path),c.query=r.query,c.fragment="",g=Ue}break;case pe:if(!c.isSpecial()||"/"!==i&&"\\\\"!==i){if("/"!==i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,g=Ge;continue}g=we}else g=me;break;case ve:if(g=me,"/"!==i||"/"!==G(l,u+1))continue;u++;break;case me:if("/"!==i&&"\\\\"!==i){g=we;continue}break;case we:if("@"===i){I&&(l="%40"+l),I=!0,a=f(l);for(var d=0;d65535)return W;c.port=c.isSpecial()&&v===le[c.scheme]?null:v,l=""}if(t)return;g=Re;continue}return W}l+=i;break;case Se:if(c.scheme="file","/"===i||"\\\\"===i)g=Fe;else{if(!r||"file"!==r.scheme){g=Ge;continue}switch(i){case A:c.host=r.host,c.path=C(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=C(r.path),c.query="",g=Le;break;case"#":c.host=r.host,c.path=C(r.path),c.query=r.query,c.fragment="",g=Ue;break;default:Ie(L(C(n,u),""))||(c.host=r.host,c.path=C(r.path),c.shortenPath()),g=Ge;continue}}break;case Fe:if("/"===i||"\\\\"===i){g=xe;break}r&&"file"===r.scheme&&!Ie(L(C(n,u),""))&&(he(r.path[0],!0)?J(c.path,r.path[0]):c.host=r.host),g=Ge;continue;case xe:if(i===A||"/"===i||"\\\\"===i||"?"===i||"#"===i){if(!t&&he(l))g=Ge;else if(""===l){if(c.host="",t)return;g=Re}else{if(o=c.parseHost(l))return o;if("localhost"===c.host&&(c.host=""),t)return;l="",g=Re}continue}l+=i;break;case Re:if(c.isSpecial()){if(g=Ge,"/"!==i&&"\\\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==A&&(g=Ge,"/"!==i))continue}else c.fragment="",g=Ue;else c.query="",g=Le;break;case Ge:if(i===A||"/"===i||"\\\\"===i&&c.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(s=K(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"===i||"\\\\"===i&&c.isSpecial()||J(c.path,"")):fe(l)?"/"===i||"\\\\"===i&&c.isSpecial()||J(c.path,""):("file"===c.scheme&&!c.path.length&&he(l)&&(c.host&&(c.host=""),l=G(l,0)+":"),J(c.path,l)),l="","file"===c.scheme&&(i===A||"?"===i||"#"===i))for(;c.path.length>1&&""===c.path[0];)Y(c.path);"?"===i?(c.query="",g=Le):"#"===i&&(c.fragment="",g=Ue)}else l+=ue(i,ce);break;case Ne:"?"===i?(c.query="",g=Le):"#"===i?(c.fragment="",g=Ue):i!==A&&(c.path[0]+=ue(i,oe));break;case Le:t||"#"!==i?i!==A&&("'"===i&&c.isSpecial()?c.query+="%27":c.query+="#"===i?"%23":ue(i,oe)):(c.fragment="",g=Ue);break;case Ue:i!==A&&(c.fragment+=ue(i,se))}u++}},parseHost:function(e){var t,r,A;if("["===G(e,0)){if("]"!==G(e,e.length-1))return j;if(t=function(e){var t,r,A,n,i,a,o,s=[0,0,0,0,0,0,0,0],c=0,g=null,u=0,l=function(){return G(e,u)};if(":"===l()){if(":"!==G(e,1))return;u+=2,g=++c}for(;l();){if(8===c)return;if(":"!==l()){for(t=r=0;r<4&&N(ee,l());)t=16*t+F(l(),16),u++,r++;if("."===l()){if(0===r)return;if(u-=r,c>6)return;for(A=0;l();){if(n=null,A>0){if(!("."===l()&&A<4))return;u++}if(!N(X,l()))return;for(;N(X,l());){if(i=F(l(),10),null===n)n=i;else{if(0===n)return;n=10*n+i}if(n>255)return;u++}s[c]=256*s[c]+n,2!=++A&&4!==A||c++}if(4!==A)return;break}if(":"===l()){if(u++,!l())return}else if(l())return;s[c++]=t}else{if(null!==g)return;u++,g=++c}}if(null!==g)for(a=c-g,c=7;0!==c&&a>0;)o=s[c],s[c--]=s[g+a-1],s[g+--a]=o;else if(8!==c)return;return s}(O(e,1,-1)),!t)return j;this.host=t}else if(this.isSpecial()){if(e=Q(e),N(te,e))return j;if(t=function(e){var t,r,A,n,i,a,o,s=P(e,".");if(s.length&&""===s[s.length-1]&&s.length--,(t=s.length)>4)return e;for(r=[],A=0;A1&&"0"===G(n,0)&&(i=N(V,n)?16:8,n=O(n,8===i?1:2)),""===n)a=0;else{if(!N(10===i?$:8===i?z:ee,n))return e;a=F(n,i)}J(r,a)}for(A=0;A=R(256,5-t))return null}else if(a>255)return null;for(o=M(r),A=0;A1?arguments[1]:void 0,A=m(t,new Me(e,!1,r));i||(t.href=A.serialize(),t.origin=A.getOrigin(),t.protocol=A.getProtocol(),t.username=A.getUsername(),t.password=A.getPassword(),t.host=A.getHost(),t.hostname=A.getHostname(),t.port=A.getPort(),t.pathname=A.getPathname(),t.search=A.getSearch(),t.searchParams=A.getSearchParams(),t.hash=A.getHash())},He=Je.prototype,Ye=function(e,t){return{get:function(){return w(this)[e]()},set:t&&function(e){return w(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(u(He,"href",Ye("serialize","setHref")),u(He,"origin",Ye("getOrigin")),u(He,"protocol",Ye("getProtocol","setProtocol")),u(He,"username",Ye("getUsername","setUsername")),u(He,"password",Ye("getPassword","setPassword")),u(He,"host",Ye("getHost","setHost")),u(He,"hostname",Ye("getHostname","setHostname")),u(He,"port",Ye("getPort","setPort")),u(He,"pathname",Ye("getPathname","setPathname")),u(He,"search",Ye("getSearch","setSearch")),u(He,"searchParams",Ye("getSearchParams")),u(He,"hash",Ye("getHash","setHash"))),g(He,"toJSON",(function(){return w(this).serialize()}),{enumerable:!0}),g(He,"toString",(function(){return w(this).serialize()}),{enumerable:!0}),D){var Pe=D.createObjectURL,Oe=D.revokeObjectURL;Pe&&g(Je,"createObjectURL",s(Pe,D)),Oe&&g(Je,"revokeObjectURL",s(Oe,D))}d(Je,"URL"),n({global:!0,constructor:!0,forced:!a,sham:!i},{URL:Je})},5728:(e,t,r)=>{r(161)},4136:(e,t,r)=>{var A=r(5366),n=r(3453);A({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return n(URL.prototype.toString,this)}})}},t={};function r(A){var n=t[A];if(void 0!==n)return n.exports;var i=t[A]={exports:{}};return e[A].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var A in t)r.o(t,A)&&!r.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var A,n=globalThis.pdfjsWorker={};function i(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function a(e,t){for(var r=0;riL}),r(7651),r(4551),r(4172),r(5268),r(5997),r(184),r(3234),r(6497),r(6746),r(9024),r(5550),r(9138),r(6794),r(750),r(9722),r(5015),r(6209),r(9261),r(3700),r(3632),r(7316),r(7531),r(1999),r(3379),r(1234),r(2431),r(9732),r(2823),r(5594),r(8397),r(9255),r(5130),r(5636),r(8509),r(7332),r(6555),r(3296),r(4594),r(7329),r(3740),r(6542),r(5738),r(2900),r(2051),r(3198),r(4211),r(9791),r(5294),r(1526),r(6032),r(3659),r(8551),r(8553),r(7612),r(8579),r(7719),r(7576),r(2891),r(2605),r(4863),r(9637),r(2709),r(8941),r(1579),r(6236),r(7716),r(1913),r(4192),r(1565),r(5342),r(9582),r(8316),r(3577),r(8043),r(932),r(8169),r(1425),r(489),r(2467),r(1281),r(9484),r(4672),r(4413),r(9264),r(2044),r(5728),r(4136),r(4520),r(1531),r(3678),r(4145);var f=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),C=[1,0,0,1,0,0],B=[.001,0,0,.001,0,0],Q=1.35,E=.25925925925925924,d="pdfjs_internal_editor_",y={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},p="Group",v=32,m=8192,w=65536,b={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},k={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},D={O:"PageOpen",C:"PageClose"},S={ERRORS:0,WARNINGS:1,INFOS:5},F={NONE:0,BINARY:1},x=10,R=11,G=12,N=37,L=44,U=58,M=59,J=70,H=71,Y=83,P=85,O=S.WARNINGS;function K(){return O}function T(e){O>=S.INFOS&&console.log("Info: ".concat(e))}function q(e){O>=S.WARNINGS&&console.log("Warning: ".concat(e))}function j(e){throw new Error(e)}function W(e,t){e||j(t)}function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var A=e.match(/\\./g);(null==A?void 0:A.length)>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=fe(e)}catch(e){}}var n=t?new URL(e,t):new URL(e);if(function(e){switch(null==e?void 0:e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch(e){}return null}function _(e,t,r){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(e,t,{value:r,enumerable:!A,configurable:!0,writable:!1}),r}var X=function(){function e(e,t){this.message=e,this.name=t}return e.prototype=new Error,e.constructor=e,e}(),V=function(e){function t(e,r){var A;return c(this,t),(A=g(this,t,[e,"PasswordException"])).code=r,A}return h(t,X),o(t)}(),z=function(e){function t(e,r){var A;return c(this,t),(A=g(this,t,[e,"UnknownErrorException"])).details=r,A}return h(t,X),o(t)}(),$=function(e){function t(e){return c(this,t),g(this,t,[e,"InvalidPDFException"])}return h(t,X),o(t)}(),ee=function(e){function t(e){return c(this,t),g(this,t,[e,"MissingPDFException"])}return h(t,X),o(t)}(),te=function(e){function t(e,r){var A;return c(this,t),(A=g(this,t,[e,"UnexpectedResponseException"])).status=r,A}return h(t,X),o(t)}(),re=function(e){function t(e){return c(this,t),g(this,t,[e,"FormatError"])}return h(t,X),o(t)}(),Ae=function(e){function t(e){return c(this,t),g(this,t,[e,"AbortException"])}return h(t,X),o(t)}();function ne(e){"object"==typeof e&&void 0!==(null==e?void 0:e.length)||j("Invalid argument for bytesToString");var t=e.length,r=8192;if(t>24&255,e>>16&255,e>>8&255,255&e)}function oe(e){return Object.keys(e).length}var se=function(){return o((function e(){c(this,e)}),null,[{key:"isLittleEndian",get:function(){return _(this,"isLittleEndian",((e=new Uint8Array(4))[0]=1,1===new Uint32Array(e.buffer,0,1)[0]));var e}},{key:"isEvalSupported",get:function(){return _(this,"isEvalSupported",function(){try{return new Function(""),!0}catch(e){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function(){return _(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function(){var e,t;return"undefined"!=typeof navigator&&"string"==typeof(null===(e=navigator)||void 0===e?void 0:e.platform)?_(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.userAgent)&&navigator.userAgent.includes("Firefox")}):_(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}},{key:"isCSSRoundSupported",get:function(){var e,t;return _(this,"isCSSRoundSupported",null===(e=globalThis.CSS)||void 0===e||null===(t=e.supports)||void 0===t?void 0:t.call(e,"width: round(1.5px, 1px)"))}}])}(),ce=Array.from(Array(256).keys(),(function(e){return e.toString(16).padStart(2,"0")})),ge=function(){function e(){c(this,e)}return o(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(ce[e]).concat(ce[t]).concat(ce[r])}},{key:"scaleMinMax",value:function(e,t){var r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[0],t[2]*=e[0],e[3]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[1],t[1]=r,r=t[2],t[2]=t[3],t[3]=r,e[1]<0&&(r=t[1],t[1]=t[3],t[3]=r),t[1]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[2],t[2]=r),t[0]*=e[2],t[2]*=e[2]),t[0]+=e[4],t[1]+=e[5],t[2]+=e[4],t[3]+=e[5]}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(e,t){var r=this.applyTransform(e,t),A=this.applyTransform(e.slice(2,4),t),n=this.applyTransform([e[0],e[3]],t),i=this.applyTransform([e[2],e[1]],t);return[Math.min(r[0],A[0],n[0],i[0]),Math.min(r[1],A[1],n[1],i[1]),Math.max(r[0],A[0],n[0],i[0]),Math.max(r[1],A[1],n[1],i[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],A=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],a=(r+i)/2,o=Math.sqrt(Math.pow(r+i,2)-4*(r*i-n*A))/2,s=a+o||1,c=a-o||1;return[Math.sqrt(s),Math.sqrt(c)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(e,t){var r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),A=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>A)return null;var n=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return n>i?null:[r,n,A,i]}},{key:"bezierBoundingBox",value:function(t,r,A,n,a,o,s,c,g){return g?(g[0]=Math.min(g[0],t,s),g[1]=Math.min(g[1],r,c),g[2]=Math.max(g[2],t,s),g[3]=Math.max(g[3],r,c)):g=[Math.min(t,s),Math.min(r,c),Math.max(t,s),Math.max(r,c)],i(e,this,le).call(this,t,A,a,s,r,n,o,c,3*(3*(A-a)-t+s),6*(t-2*A+a),3*(A-t),g),i(e,this,le).call(this,t,A,a,s,r,n,o,c,3*(3*(n-o)-r+c),6*(r-2*n+o),3*(n-r),g),g}}])}();function ue(e,t,r,A,n,i,a,o,s,c){if(!(s<=0||s>=1)){var g=1-s,u=s*s,l=u*s,h=g*(g*(g*e+3*s*t)+3*u*r)+l*A,I=g*(g*(g*n+3*s*i)+3*u*a)+l*o;c[0]=Math.min(c[0],h),c[1]=Math.min(c[1],I),c[2]=Math.max(c[2],h),c[3]=Math.max(c[3],I)}}function le(e,t,r,n,a,o,s,c,g,u,l,h){if(Math.abs(g)<1e-12)Math.abs(u)>=1e-12&&i(A,this,ue).call(this,e,t,r,n,a,o,s,c,-l/u,h);else{var I=Math.pow(u,2)-4*l*g;if(!(I<0)){var f=Math.sqrt(I),C=2*g;i(A,this,ue).call(this,e,t,r,n,a,o,s,c,(-u+f)/C,h),i(A,this,ue).call(this,e,t,r,n,a,o,s,c,(-u-f)/C,h)}}}A=ge;var he=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function Ie(e){var t;if(e[0]>="ï"&&("þ"===e[0]&&"ÿ"===e[1]?(t="utf-16be",e.length%2==1&&(e=e.slice(0,-1))):"ÿ"===e[0]&&"þ"===e[1]?(t="utf-16le",e.length%2==1&&(e=e.slice(0,-1))):"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t))try{var r=new TextDecoder(t,{fatal:!0}),A=ie(e),n=r.decode(A);return n.includes("\x1B")?n.replaceAll(/\\x1b[^\\x1b]*(?:\\x1b|$)/g,""):n}catch(e){q('stringToPDFString: "'.concat(e,'".'))}for(var i=[],a=0,o=e.length;a0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}var Ee=null,de=null;function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||ve(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ve(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ve(e,t){if(e){if("string"==typeof e)return me(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function be(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;ke(this,e),this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=Je}return Se(e,[{key:"assignXref",value:function(e){this.xref=e}},{key:"size",get:function(){return Object.keys(this._map).length}},{key:"get",value:function(e,t,r){var A=this._map[e];return void 0===A&&void 0!==t&&void 0===(A=this._map[t])&&void 0!==r&&(A=this._map[r]),A instanceof Ye&&this.xref?this.xref.fetch(A,this.suppressEncryption):A}},{key:"getAsync",value:(t=we().mark((function e(t,r,A){var n;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(n=this._map[t])&&void 0!==r&&void 0===(n=this._map[r])&&void 0!==A&&(n=this._map[A]),!(n instanceof Ye&&this.xref)){e.next=4;break}return e.abrupt("return",this.xref.fetchAsync(n,this.suppressEncryption));case 4:return e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(A,n){var i=t.apply(e,r);function a(e){be(i,A,n,a,o,"next",e)}function o(e){be(i,A,n,a,o,"throw",e)}a(void 0)}))},function(e,t,A){return r.apply(this,arguments)})},{key:"getArray",value:function(e,t,r){var A=this._map[e];if(void 0===A&&void 0!==t&&void 0===(A=this._map[t])&&void 0!==r&&(A=this._map[r]),A instanceof Ye&&this.xref&&(A=this.xref.fetch(A,this.suppressEncryption)),Array.isArray(A))for(var n=0,i=(A=A.slice()).length;n0&&(o._map[d]=v)}else o._map[d]=y[0]}}catch(e){Q.e(e)}finally{Q.f()}return s.clear(),o.size>0?o:e.empty}}]);var t,r}(),Ye=function(){function e(t,r){ke(this,e),this.num=t,this.gen=r}return Se(e,[{key:"toString",value:function(){return 0===this.gen?"".concat(this.num,"R"):"".concat(this.num,"R").concat(this.gen)}}],[{key:"fromString",value:function(t){var r=Le[t];if(r)return r;var A=/^(\\d+)R(\\d*)$/.exec(t);return A&&"0"!==A[1]?Le[t]=new e(parseInt(A[1]),A[2]?parseInt(A[2]):0):null}},{key:"get",value:function(t,r){var A,n=0===r?"".concat(t,"R"):"".concat(t,"R").concat(r);return(A=Le)[n]||(A[n]=new e(t,r))}}])}(),Pe=function(){return Se((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;ke(this,e),this._set=new Set(null==t?void 0:t._set)}),[{key:"has",value:function(e){return this._set.has(e.toString())}},{key:"put",value:function(e){this._set.add(e.toString())}},{key:"remove",value:function(e){this._set.delete(e.toString())}},{key:Symbol.iterator,value:function(){return this._set.values()}},{key:"clear",value:function(){this._set.clear()}}])}(),Oe=function(){return Se((function e(){ke(this,e),this._map=new Map}),[{key:"size",get:function(){return this._map.size}},{key:"get",value:function(e){return this._map.get(e.toString())}},{key:"has",value:function(e){return this._map.has(e.toString())}},{key:"put",value:function(e,t){this._map.set(e.toString(),t)}},{key:"putAlias",value:function(e,t){this._map.set(e.toString(),this.get(t))}},{key:Symbol.iterator,value:function(){return this._map.values()}},{key:"clear",value:function(){this._map.clear()}},{key:"items",value:we().mark((function e(){var t,r,A,n,i;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=pe(this._map),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return A=ye(r.value,2),n=A[0],i=A[1],e.next=7,[Ye.fromString(n),i];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))}])}();function Ke(e,t){return e instanceof Ue&&(void 0===t||e.name===t)}function Te(e,t){return e instanceof Me&&(void 0===t||e.cmd===t)}function qe(e,t){return e instanceof He&&(void 0===t||Ke(e.get("Type"),t))}function je(e,t){return e.num===t.num&&e.gen===t.gen}function We(){We=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Ze(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function _e(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Ze(i,A,n,a,o,"next",e)}function o(e){Ze(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Xe(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}var tt=et().mark(Ht);function rt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=At(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function At(e,t){if(e){if("string"==typeof e)return nt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nt(e,t):void 0}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1];W(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var r,A=[];e>=1e3;)e-=1e3,A.push("M");r=e/100|0,e%=100,A.push(pt[r]),r=e/10|0,e%=10,A.push(pt[10+r]),A.push(pt[20+e]);var n=A.join("");return t?n.toLowerCase():n}function mt(e){return e<=0?0:Math.ceil(Math.log2(e))}function wt(e,t){return e[t]<<24>>24}function bt(e,t){return e[t]<<8|e[t+1]}function kt(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Dt(e){return 32===e||9===e||13===e||10===e}function St(e,t){return Array.isArray(e)?(null===t||e.length===t)&&e.every((function(e){return"number"==typeof e})):ArrayBuffer.isView(e)&&(0===e.length||"number"==typeof e[0])&&(null===t||e.length===t)}function Ft(e,t){return St(e,6)?e:t}function xt(e,t){return St(e,4)?e:t}function Rt(e,t){return St(e,4)?ge.normalizeRect(e):t}function Gt(e){var t=/(.+)\\[(\\d+)\\]$/;return e.split(".").map((function(e){var r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}}))}function Nt(e){for(var t=[],r=0,A=0,n=e.length;A126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i)&&(r=0;i--){var a=n[i];if(a instanceof He){var o,s=rt(a.getKeys());try{for(s.s();!(o=s.n()).done;){var c=o.value,g=r[c];if(g){var u=a.getRaw(c),l=new Pe,h=[];Ut(u,e,h,l),h.length>0&&(A[g]=h)}}}catch(e){s.e(e)}finally{s.f()}}}if(t.has("A")){var I=[];Ut(t.get("A"),e,I,new Pe),I.length>0&&(A.Action=I)}return oe(A)>0?A:null}var Jt={60:"<",62:">",38:"&",34:""",39:"'"};function Ht(e){var t,r,A;return et().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=0,r=e.length;case 1:if(!(t55295&&(A<57344||A>65533)&&t++,n.next=6,A;case 6:t++,n.next=1;break;case 9:case"end":return n.stop()}}),tt)}function Yt(e){for(var t=[],r=0,A=0,n=e.length;A55295&&(i<57344||i>65533)&&A++,r=A+1}return 0===t.length?e:(r1&&void 0!==arguments[1]&&arguments[1],r=/^("|').*("|')$/.exec(e);if(r&&r[1]===r[2]){if(new RegExp("[^\\\\\\\\]".concat(r[1])).test(e.slice(1,-1)))return t&&q("FontFamily contains unescaped ".concat(r[1],": ").concat(e,".")),!1}else{var A,n=rt(e.split(/[ \\t]+/));try{for(n.s();!(A=n.n()).done;){var i=A.value;if(/^(\\d|(-(\\d|-)))/.test(i)||!/^[\\w-\\\\]+$/.test(i))return t&&q("FontFamily contains invalid : ".concat(e,".")),!1}}catch(e){n.e(e)}finally{n.f()}}return!0}function Ot(e){var t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),r=e.fontFamily,A=e.fontWeight,n=e.italicAngle;if(!Pt(r,!0))return!1;var i=A?A.toString():"";e.fontWeight=t.has(i)?i:"400";var a=parseFloat(n);return e.italicAngle=isNaN(a)||a<-90||a>90?"14":n.toString(),!0}function Kt(e){var t=new RegExp("^\\\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\\\.")+")\\\\((?:'|\\")([^'\\"]*)(?:'|\\")(?:,\\\\s*(\\\\w+)\\\\)|\\\\))","i").exec(e);if(null!=t&&t[2]){var r=t[2],A=!1;return"true"===t[3]&&"app.launchURL"===t[1]&&(A=!0),{url:r,newWindow:A}}return null}function Tt(e){if(Number.isInteger(e))return e.toString();var t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}function qt(e){if(!e)return null;var t,r=new Map,A=rt(e);try{for(A.s();!(t=A.n()).done;){var n=$e(t.value,2),i=n[0],a=n[1];if(i.startsWith(d)){var o=r.get(a.pageIndex);o||(o=[],r.set(a.pageIndex,o)),o.push(a)}}}catch(e){A.e(e)}finally{A.f()}return r.size>0?r:null}function jt(e){return function(e){return/^[\\x00-\\x7F]*$/.test(e)}(e)?e:Zt(e,!0)}function Wt(e){for(var t=[],r=0,A=e.length;r>8&255).toString(16).padStart(2,"0"),(255&n).toString(16).padStart(2,"0"))}return t.join("")}function Zt(e){var t=[];arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&t.push("þÿ");for(var r=0,A=e.length;r>8&255),String.fromCharCode(255&n))}return t.join("")}function _t(e,t,r){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,r];case 270:return[0,-1,1,0,0,r];default:throw new Error("Invalid rotation")}}function Xt(e){return Math.ceil(Math.ceil(Math.log2(1+e))/8)}function Vt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){for(var r=0;r=this.end?-1:this.bytes[this.pos++]}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,A=this.end;if(!e)return t.subarray(r,A);var n=r+e;return n>A&&(n=A),this.pos=n,t.subarray(r,n)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,r){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new t(this.bytes.buffer,e,r,A)}}])}(),or=function(e){function t(e){return Vt(this,t),tr(this,t,[ie(e)])}return nr(t,ar),$t(t)}(),sr=function(e){function t(){return Vt(this,t),tr(this,t,[new Uint8Array(0)])}return nr(t,ar),$t(t)}();function cr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return gr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=this.end?this.numChunks:Math.floor(t/this.chunkSize),n=r;nthis.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new Ct(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}}},{key:"ensureRange",value:function(e,t){if(!(e>=t||t<=this.progressiveDataLength)){var r=Math.floor(e/this.chunkSize);if(!(r>this.numChunks))for(var A=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks),n=r;n=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,A=this.end;if(!e)return A>this.progressiveDataLength&&this.ensureRange(r,A),t.subarray(r,A);var n=r+e;return n>A&&(n=A),n>this.progressiveDataLength&&this.ensureRange(r,n),this.pos=n,t.subarray(r,n)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;function A(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),A.prototype=Object.create(this),A.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,A=[],n=t;n0&&void 0!==arguments[0]&&arguments[0])){var e=this.stream.getMissingChunks();this._requestChunks(e)}return this._loadedStreamCapability.promise}},{key:"_requestChunks",value:function(e){var t=this,r=this.currRequestId++,A=new Set;this._chunksNeededByRequest.set(r,A);var n,i=cr(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;this.stream.hasChunk(a)||A.add(a)}}catch(e){i.e(e)}finally{i.f()}if(0===A.size)return Promise.resolve();var o=Promise.withResolvers();this._promisesByRequest.set(r,o);var s,c=[],g=cr(A);try{for(g.s();!(s=g.n()).done;){var u=s.value,l=this._requestsByChunk.get(u);l||(l=[],this._requestsByChunk.set(u,l),c.push(u)),l.push(r)}}catch(e){g.e(e)}finally{g.f()}if(c.length>0){var h,I=cr(this.groupChunks(c));try{for(I.s();!(h=I.n()).done;){var f=h.value,C=f.beginChunk*this.chunkSize,B=Math.min(f.endChunk*this.chunkSize,this.length);this.sendRequest(C,B).catch(o.reject)}}catch(e){I.e(e)}finally{I.f()}}return o.promise.catch((function(e){if(!t.aborted)throw e}))}},{key:"getStream",value:function(){return this.stream}},{key:"requestRange",value:function(e,t){t=Math.min(t,this.length);for(var r=this.getBeginChunk(e),A=this.getEndChunk(t),n=[],i=r;i0&&void 0!==arguments[0]?arguments[0]:[]);try{for(r.s();!(e=r.n()).done;)for(var A=e.value,n=this.getBeginChunk(A.begin),i=this.getEndChunk(A.end),a=n;a=0&&A+1!==a&&(t.push({beginChunk:r,endChunk:A+1}),r=a),n+1===e.length&&t.push({beginChunk:r,endChunk:a+1}),A=a}return t}},{key:"onProgress",value:function(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}},{key:"onReceiveData",value:function(e){var t=e.chunk,r=void 0===e.begin,A=r?this.progressiveDataLength:e.begin,n=A+t.byteLength,i=Math.floor(A/this.chunkSize),a=n0||o.push(l)}}catch(e){u.e(e)}finally{u.f()}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){var I;if(1===this.stream.numChunksLoaded){var f=this.stream.numChunks-1;this.stream.hasChunk(f)||(I=f)}else I=this.stream.nextEmptyChunk(a);Number.isInteger(I)&&this._requestChunks([I])}for(var C=0,B=o;Ce.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function xr(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gr(e,t){for(var r=0;ru&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){for(var h=a<=8?new Uint8Array(u):new Uint16Array(u),I=0;I2&&void 0!==arguments[2]?arguments[2]:null,A=arguments.length>3?arguments[3]:void 0;if((e=t.fetchIfRef(e))instanceof Ue)switch(e.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"DeviceRGBA":return this.singletons.rgba;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new Jr(null);default:if(r instanceof He){var n=r.get("ColorSpace");if(n instanceof He){var i=n.get(e.name);if(i){if(i instanceof Ue)return this._parse(i,t,r,A);e=i;break}}}return q("Unrecognized ColorSpace: ".concat(e.name)),this.singletons.gray}if(Array.isArray(e)){var a,o,s,c,g,u,l=t.fetchIfRef(e[0]).name;switch(l){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return c=(a=t.fetchIfRef(e[1])).getArray("WhitePoint"),g=a.getArray("BlackPoint"),u=a.get("Gamma"),new Wr(c,g,u);case"CalRGB":c=(a=t.fetchIfRef(e[1])).getArray("WhitePoint"),g=a.getArray("BlackPoint"),u=a.getArray("Gamma");var h=a.getArray("Matrix");return new Xr(c,g,u,h);case"ICCBased":var I=t.fetchIfRef(e[1]).dict;o=I.get("N");var f=I.get("Alternate");if(f){var C=this._parse(f,t,r,A);if(C.numComps===o)return C;q("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.singletons.gray;if(3===o)return this.singletons.rgb;if(4===o)return this.singletons.cmyk;break;case"Pattern":return(s=e[1]||null)&&(s=this._parse(s,t,r,A)),new Jr(s);case"I":case"Indexed":s=this._parse(e[1],t,r,A);var B=t.fetchIfRef(e[2])+1,Q=t.fetchIfRef(e[3]);return new Hr(s,B,Q);case"Separation":case"DeviceN":var E=t.fetchIfRef(e[1]);o=Array.isArray(E)?E.length:1,s=this._parse(e[2],t,r,A);var d=A.create(e[3]);return new Mr(o,s,d);case"Lab":c=(a=t.fetchIfRef(e[1])).getArray("WhitePoint"),g=a.getArray("BlackPoint");var y=a.getArray("Range");return new CA(c,g,y);default:return q("Unimplemented ColorSpace object: ".concat(l)),this.singletons.gray}}return q("Unrecognized ColorSpace object: ".concat(e)),this.singletons.gray}},{key:"isDefaultDecode",value:function(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return q("The decode map is not the correct length"),!0;for(var r=0,A=e.length;r=.99554525?1:mr(_r,this,tA).call(this,0,1,1.055*Math.pow(e,1/2.4)-.055)}function tA(e,t,r){return Math.max(e,Math.min(t,r))}function rA(e){return e<0?-mr(_r,this,rA).call(this,-e):e>8?Math.pow((e+16)/116,3):e*IA._}function AA(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var A=mr(_r,this,rA).call(this,0),n=(1-A)/(1-mr(_r,this,rA).call(this,e[0])),i=1-n,a=(1-A)/(1-mr(_r,this,rA).call(this,e[1])),o=1-a,s=(1-A)/(1-mr(_r,this,rA).call(this,e[2])),c=1-s;r[0]=t[0]*n+i,r[1]=t[1]*a+o,r[2]=t[2]*s+c}function nA(e,t,r){if(1===e[0]&&1===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);var A=r;mr(_r,this,Vr).call(this,oA._,t,A);var n=uA._;mr(_r,this,zr).call(this,e,A,n),mr(_r,this,Vr).call(this,sA._,n,r)}function iA(e,t,r){var A=r;mr(_r,this,Vr).call(this,oA._,t,A);var n=uA._;mr(_r,this,$r).call(this,e,A,n),mr(_r,this,Vr).call(this,sA._,n,r)}function aA(e,t,r,A,n){var i=mr(_r,this,tA).call(this,0,1,e[t]*n),a=mr(_r,this,tA).call(this,0,1,e[t+1]*n),o=mr(_r,this,tA).call(this,0,1,e[t+2]*n),s=1===i?1:Math.pow(i,this.GR),c=1===a?1:Math.pow(a,this.GG),g=1===o?1:Math.pow(o,this.GB),u=this.MXA*s+this.MXB*c+this.MXC*g,l=this.MYA*s+this.MYB*c+this.MYC*g,h=this.MZA*s+this.MZB*c+this.MZC*g,I=lA._;I[0]=u,I[1]=l,I[2]=h;var f=hA._;mr(_r,this,nA).call(this,this.whitePoint,I,f);var C=lA._;mr(_r,this,AA).call(this,this.blackPoint,f,C);var B=hA._;mr(_r,this,iA).call(this,gA._,C,B);var Q=lA._;mr(_r,this,Vr).call(this,cA._,B,Q),r[A]=255*mr(_r,this,eA).call(this,Q[0]),r[A+1]=255*mr(_r,this,eA).call(this,Q[1]),r[A+2]=255*mr(_r,this,eA).call(this,Q[2])}var oA={_:new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296])},sA={_:new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867])},cA={_:new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252])},gA={_:new Float32Array([1,1,1])},uA={_:new Float32Array(3)},lA={_:new Float32Array(3)},hA={_:new Float32Array(3)},IA={_:Math.pow(24/116,3)/8},fA=new WeakSet,CA=function(e){function t(e,r,A){var n;if(Rr(this,t),vr(n=wr(this,t,["Lab",3]),fA),!e)throw new re("WhitePoint missing - required for color space Lab");var i=yr(e,3);n.XW=i[0],n.YW=i[1],n.ZW=i[2];var a=yr(A||[-100,100,-100,100],4);n.amin=a[0],n.amax=a[1],n.bmin=a[2],n.bmax=a[3];var o=yr(r||[0,0,0],3);if(n.XB=o[0],n.YB=o[1],n.ZB=o[2],n.XW<0||n.ZW<0||1!==n.YW)throw new re("Invalid WhitePoint components, no fallback available");return(n.XB<0||n.YB<0||n.ZB<0)&&(T("Invalid BlackPoint, falling back to default"),n.XB=n.YB=n.ZB=0),(n.amin>n.amax||n.bmin>n.bmax)&&(T("Invalid Range, falling back to defaults"),n.amin=-100,n.amax=100,n.bmin=-100,n.bmax=100),n}return Dr(t,Ur),Nr(t,[{key:"getRgbItem",value:function(e,t,r,A){mr(fA,this,EA).call(this,e,t,!1,r,A)}},{key:"getRgbBuffer",value:function(e,t,r,A,n,i,a){for(var o=(1<=6/29?Math.pow(e,3):108/841*(e-4/29)}function QA(e,t,r,A){return r+e*(A-r)/t}function EA(e,t,r,A,n){var i=e[t],a=e[t+1],o=e[t+2];!1!==r&&(i=mr(fA,this,QA).call(this,i,r,0,100),a=mr(fA,this,QA).call(this,a,r,this.amin,this.amax),o=mr(fA,this,QA).call(this,o,r,this.bmin,this.bmax)),a>this.amax?a=this.amax:athis.bmax?o=this.bmax:o=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function yA(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function pA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vA(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,A=Array(t);r>>0}function DA(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode.apply(String,function(e){return function(e){if(Array.isArray(e))return bA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return bA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bA(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.subarray(0,t+1)))}function SA(e,t,r){for(var A=0,n=r;n>=0;n--)A+=e[n]+t[n],e[n]=255&A,A>>=8}function FA(e,t){for(var r=1,A=t;A>=0&&r>0;A--)r+=e[A],e[A]=255&r,r>>=8}r(3276);var xA=16,RA=function(){return mA((function e(t){pA(this,e),this.buffer=t,this.pos=0,this.end=t.length,this.tmpBuf=new Uint8Array(19)}),[{key:"readByte",value:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]}},{key:"readNumber",value:function(){var e,t=0;do{var r=this.readByte();if(r<0)throw new re("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t}},{key:"readSigned",value:function(){var e=this.readNumber();return 1&e?~(e>>>1):e>>>1}},{key:"readHex",value:function(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1}},{key:"readHexNumber",value:function(e,t){var r,A=this.tmpBuf,n=0;do{var i=this.readByte();if(i<0)throw new re("unexpected EOF in bcmap");r=!(128&i),A[n++]=127&i}while(!r);for(var a=t,o=0,s=0;a>=0;){for(;s<8&&A.length>0;)o|=A[--n]<>=8,s-=8}}},{key:"readHexSigned",value:function(e,t){this.readHexNumber(e,t);for(var r=1&e[t]?255:0,A=0,n=0;n<=t;n++)A=(1&A)<<8|e[n],e[n]=A>>1^r}},{key:"readString",value:function(){for(var e=this.readNumber(),t=new Array(e),r=0;r=0)){e.next=68;break}if(7!=(I=h>>5)){e.next=20;break}e.t0=31&h,e.next=0===e.t0?15:1===e.t0?17:19;break;case 15:return n.readString(),e.abrupt("break",19);case 17:return a=n.readString(),e.abrupt("break",19);case 19:return e.abrupt("continue",9);case 20:if(f=!!(16&h),!(1+(C=15&h)>xA)){e.next=24;break}throw new Error("BinaryCMapReader.process: Invalid dataSize.");case 24:B=1,Q=n.readNumber(),e.t1=I,e.next=0===e.t1?29:1===e.t1?35:2===e.t1?41:3===e.t1?46:4===e.t1?53:5===e.t1?58:65;break;case 29:for(n.readHex(o,C),n.readHexNumber(s,C),SA(s,o,C),r.addCodespaceRange(C+1,kA(o,C),kA(s,C)),E=1;E=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function UA(e,t){if(e){if("string"==typeof e)return MA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?MA(e,t):void 0}}function MA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function HA(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function YA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PA(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,A=this.pos;if(e){for(this.ensureBuffer(A+e),t=A+e;!this.eof&&this.bufferLengthn&&(t=n)}else{for(;!this.eof;)this.readBlock(r);t=this.bufferLength}return this.pos=t,this.buffer.subarray(A,t)}},{key:"getImageData",value:(r=JA().mark((function e(t){var r,A,n=arguments;return JA().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>1&&void 0!==n[1]?n[1]:null,this.canAsyncDecodeImageFromBuffer){e.next=3;break}return e.abrupt("return",this.getBytes(t,r));case 3:return e.next=5,this.stream.asyncGetBytes();case 5:return A=e.sent,e.abrupt("return",this.decodeImage(A,r));case 7:case"end":return e.stop()}}),e,this)})),A=function(){var e=this,t=arguments;return new Promise((function(A,n){var i=r.apply(e,t);function a(e){HA(i,A,n,a,o,"next",e)}function o(e){HA(i,A,n,a,o,"throw",e)}a(void 0)}))},function(e){return A.apply(this,arguments)})},{key:"reset",value:function(){this.pos=0}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)for(;!this.eof;)this.readBlock();else for(var A=e+t;this.bufferLength<=A&&!this.eof;)this.readBlock();return new ar(this.buffer,e,t,r)}},{key:"getBaseStreams",value:function(){return this.str?this.str.getBaseStreams():null}}]);var r,A}(),VA=function(e){function t(e){var r,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;YA(this,t);var n,i=0,a=LA(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;i+=o instanceof XA?o._rawMinBufferLength:o.length}}catch(e){a.e(e)}finally{a.f()}return(r=TA(this,t,[i])).streams=e,r._onError=A,r}return WA(t,XA),OA(t,[{key:"readBlock",value:function(){var e=this.streams;if(0!==e.length){var t,r=e.shift();try{t=r.getBytes()}catch(e){var A;if(this._onError)return void this._onError(e,null===(A=r.dict)||void 0===A?void 0:A.objId);throw e}var n=this.bufferLength,i=n+t.length;this.ensureBuffer(i).set(t,n),this.bufferLength=i}else this.eof=!0}},{key:"getBaseStreams",value:function(){var e,t=[],r=LA(this.streams);try{for(r.s();!(e=r.n()).done;){var A=e.value.getBaseStreams();A&&t.push.apply(t,NA(A))}}catch(e){r.e(e)}finally{r.f()}return t.length>0?t:null}}])}();function zA(e,t){for(var r=0;r=0;--A)r[n+A]=255&a,a>>=8}}else this.eof=!0}}],A&&zA(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>1,A=this.ensureBuffer(this.bufferLength+r),n=this.bufferLength,i=this.firstDigit,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return an(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?an(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=void 0;if(o>=48&&o<=57)s=15&o;else{if(!(o>=65&&o<=70||o>=97&&o<=102)){if(62===o){this.eof=!0;break}continue}s=9+(15&o)}i<0?i=s:(A[n++]=i<<4|s,i=-1)}}catch(e){a.e(e)}finally{a.f()}i>=0&&this.eof&&(A[n++]=i<<4,i=-1),this.firstDigit=i,this.bufferLength=n}else this.eof=!0}}])&&on(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function In(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t||"function"!=typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');for(this.source=t,this.eof=!1,this.encoding=n.K||0,this.eoline=n.EndOfLine||!1,this.byteAlign=n.EncodedByteAlign||!1,this.columns=n.Columns||1728,this.rows=n.Rows||0,this.eoblock=null===(r=n.EndOfBlock)||void 0===r||r,this.black=n.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;0===(A=this._lookBits(12));)this._eatBits(1);1===A&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))},(t=[{key:"readNextChar",value:function(){if(this.eof)return-1;var e,t,r,A,n,i=this.refLine,a=this.codingLine,o=this.columns;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;var s,c,g;if(this.err=!1,this.nextLine2D){for(A=0;a[A]=64);do{c+=g=this._getWhiteCode()}while(g>=64)}else{do{s+=g=this._getWhiteCode()}while(g>=64);do{c+=g=this._getBlackCode()}while(g>=64)}for(this._addPixels(a[this.codingPos]+s,t),a[this.codingPos]0?--e:++e;i[e]<=a[this.codingPos]&&i[e]0?--e:++e;i[e]<=a[this.codingPos]&&i[e]0?--e:++e;i[e]<=a[this.codingPos]&&i[e]=64);else do{s+=g=this._getWhiteCode()}while(g>=64);this._addPixels(a[this.codingPos]+s,t),t^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(s=this._lookBits(12),this.eoline)for(;s!==Cn&&1!==s;)this._eatBits(1),s=this._lookBits(12);else for(;0===s;)this._eatBits(1),s=this._lookBits(12);1===s?(this._eatBits(12),u=!0):s===Cn&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&u&&this.byteAlign){if(1===(s=this._lookBits(12))){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(A=0;A<4;++A)1!==(s=this._lookBits(12))&&T("bad rtc code: "+s),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if((s=this._lookBits(13))===Cn)return this.eof=!0,-1;if(s>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&s))}this.outputBits=a[0]>0?a[this.codingPos=0]:a[this.codingPos=1],this.row++}if(this.outputBits>=8)n=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&a[this.codingPos]r?(n<<=r,1&this.codingPos||(n|=255>>8-r),this.outputBits-=r,r=0):(n<<=this.outputBits,1&this.codingPos||(n|=255>>8-this.outputBits),r-=this.outputBits,this.outputBits=0,a[this.codingPos]0&&(n<<=r,r=0))}while(r)}return this.black&&(n^=255),n}},{key:"_addPixels",value:function(e,t){var r=this.codingLine,A=this.codingPos;e>r[A]&&(e>this.columns&&(T("row is wrong length"),this.err=!0,e=this.columns),1&A^t&&++A,r[A]=e),this.codingPos=A}},{key:"_addPixelsNeg",value:function(e,t){var r=this.codingLine,A=this.codingPos;if(e>r[A])e>this.columns&&(T("row is wrong length"),this.err=!0,e=this.columns),1&A^t&&++A,r[A]=e;else if(e0&&e=n){var o=r[a-n];if(o[0]===i)return this._eatBits(i),[!0,o[1],!0]}}return[!1,0,!1]}},{key:"_getTwoDimCode",value:function(){var e,t=0;if(this.eoblock){var r;if(t=this._lookBits(7),(null===(r=e=Bn[t])||void 0===r?void 0:r[0])>0)return this._eatBits(e[0]),e[1]}else{var A=this._findTableCode(1,7,Bn);if(A[0]&&A[2])return A[1]}return T("Bad two dim code"),Cn}},{key:"_getWhiteCode",value:function(){var e,t=0;if(this.eoblock){if((t=this._lookBits(12))===Cn)return 1;if((e=t>>5==0?Qn[t]:En[t>>3])[0]>0)return this._eatBits(e[0]),e[1]}else{var r=this._findTableCode(1,9,En);if(r[0])return r[1];if((r=this._findTableCode(11,12,Qn))[0])return r[1]}return T("bad white code"),this._eatBits(1),1}},{key:"_getBlackCode",value:function(){var e,t;if(this.eoblock){if((e=this._lookBits(13))===Cn)return 1;if((t=e>>7==0?dn[e]:e>>9==0&&e>>7!=0?yn[(e>>1)-64]:pn[e>>7])[0]>0)return this._eatBits(t[0]),t[1]}else{var r=this._findTableCode(2,6,pn);if(r[0])return r[1];if((r=this._findTableCode(7,12,yn,64))[0])return r[1];if((r=this._findTableCode(10,13,dn))[0])return r[1]}return T("bad black code"),this._eatBits(1),1}},{key:"_lookBits",value:function(e){for(var t;this.inputBits>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}},{key:"_eatBits",value:function(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}])&&In(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function mn(e,t){for(var r=0;re.getByte()};return n.ccittFaxDecoder=new vn(i,{K:A.get("K"),EndOfLine:A.get("EndOfLine"),EncodedByteAlign:A.get("EncodedByteAlign"),Columns:A.get("Columns"),Rows:A.get("Rows"),EndOfBlock:A.get("EndOfBlock"),BlackIs1:A.get("BlackIs1")}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(t,XA),r=t,(A=[{key:"readBlock",value:function(){for(;!this.eof;){var e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}])&&mn(r.prototype,A),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,A}();function xn(){xn=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Rn(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Gn(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Rn(i,A,n,a,o,"next",e)}function o(e){Rn(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Nn(e,t){for(var r=0;r>e,this.codeSize=A-=e,t}},{key:"getCode",value:function(e){for(var t,r=this.str,A=e[0],n=e[1],i=this.codeSize,a=this.codeBuf;i>16,c=65535&o;if(s<1||i>s,this.codeSize=i-s,c}},{key:"generateHuffmanTable",value:function(e){var t,r=e.length,A=0;for(t=0;tA&&(A=e[t]);for(var n=1<>=1;for(t=g;t>=1)){var n,i;if(1===t)n=jn,i=Wn;else{if(2!==t)throw new re("Unknown block type in flate stream");var a,o=this.getBits(5)+257,s=this.getBits(5)+1,c=this.getBits(4)+4,g=new Uint8Array(Kn.length);for(a=0;a0;)C[a++]=I}n=this.generateHuffmanTable(C.subarray(0,o)),i=this.generateHuffmanTable(C.subarray(o,f))}for(var E=(e=this.buffer)?e.length:0,d=this.bufferLength;;){var y=this.getCode(n);if(y<256)d+1>=E&&(E=(e=this.ensureBuffer(d+1)).length),e[d++]=y;else{if(256===y)return void(this.bufferLength=d);var p=(y=Tn[y-=257])>>16;p>0&&(p=this.getBits(p)),r=(65535&y)+p,y=this.getCode(i),(p=(y=qn[y])>>16)>0&&(p=this.getBits(p));var v=(65535&y)+p;d+r>=E&&(E=(e=this.ensureBuffer(d+r)).length);for(var m=0;m>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768},(t=[{key:"byteIn",value:function(){var e=this.data,t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}},{key:"readBit",value:function(e,t){var r,A=e[t]>>1,n=1&e[t],i=$n[A],a=i.qe,o=this.a-a;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0==(32768&o));return this.a=o,e[t]=A<<1|n,r}}])&&Vn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ti(e){return function(e){if(Array.isArray(e))return ni(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ai(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ri(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ai(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ai(e,t){if(e){if("string"==typeof e)return ni(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ni(e,t):void 0}}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>>0}var a,o=i(1),s=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);return 0===o?a=s:s>0&&(a=-s),a>=Bi&&a<=Ci?a:null}function Ei(e,t,r){for(var A=e.getContexts("IAID"),n=1,i=0;i=S&&m=F)for(J=J<<1&C,u=0;u=0&&b=0&&(k=N[w][b])&&(J|=k<=e?F<<=1:F=F<<1|y[D][S];for(g=0;g=E||S<0||S>=Q?F<<=1:F=F<<1|A[D][S];var x=p.readBit(v,F);b[k]=x}}return y}function ki(e,t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q){if(e&&t)throw new hi("refinement with Huffman is not supported");var E,d,y=[];for(E=0;E1&&(D=e?Q.readBits(B):Qi(m,"IAIT",v));var S=a*w+D,F=e?h.symbolIDTable.decode(Q):Ei(m,v,s),x=t&&(e?Q.readBit():Qi(m,"IARI",v)),R=o[F],G=R[0].length,N=R.length;if(x){var L=Qi(m,"IARDW",v),U=Qi(m,"IARDH",v);R=bi(G+=L,N+=U,I,R,(L>>1)+Qi(m,"IARDX",v),(U>>1)+Qi(m,"IARDY",v),!1,f,C)}var M=0;c?1&u?M=N-1:k+=N-1:u>1?k+=G-1:M=G-1;var J=S-(1&u?0:N-1),H=k-(2&u?G-1:0),Y=void 0,P=void 0,O=void 0;if(c){for(Y=0;Y>5&7,s=[31&a],c=t+6;if(7===a){o=536870911&kt(e,c-1),c+=3;var g=o+7>>3;for(s[0]=e[c++];--g>0;)s.push(e[c++])}else if(5===a||6===a)throw new hi("invalid referred-to flags");r.retainBits=s;var u=4;r.number<=256?u=1:r.number<=65536&&(u=2);var l,h,I=[];for(l=0;l>>24&255,Q[3]=C.height>>16&255,Q[4]=C.height>>8&255,Q[5]=255&C.height,l=c,h=e.length;l>2&3,g.huffmanDWSelector=u>>4&3,g.bitmapSizeSelector=u>>6&1,g.aggregationInstancesSelector=u>>7&1,g.bitmapCodingContextUsed=!!(256&u),g.bitmapCodingContextRetained=!!(512&u),g.template=u>>10&3,g.refinementTemplate=u>>12&1,c+=2,!g.huffman){for(i=0===g.template?4:1,A=[],n=0;n>2&3,l.stripSize=1<>4&3,l.transposed=!!(64&h),l.combinationOperator=h>>7&3,l.defaultPixelValue=h>>9&1,l.dsOffset=h<<17>>27,l.refinementTemplate=h>>15&1,l.huffman){var I=bt(o,c);c+=2,l.huffmanFS=3&I,l.huffmanDS=I>>2&3,l.huffmanDT=I>>4&3,l.huffmanRefinementDW=I>>6&3,l.huffmanRefinementDH=I>>8&3,l.huffmanRefinementDX=I>>10&3,l.huffmanRefinementDY=I>>12&3,l.huffmanRefinementSizeSelector=!!(16384&I)}if(l.refinement&&!l.refinementTemplate){for(A=[],n=0;n<2;n++)A.push({x:wt(o,c),y:wt(o,c+1)}),c+=2;l.refinementAt=A}l.numberOfSymbolInstances=kt(o,c),c+=4,r=[l,a.referredTo,o,c,s];break;case 16:var f={},C=o[c++];f.mmr=!!(1&C),f.template=C>>1&3,f.patternWidth=o[c++],f.patternHeight=o[c++],f.maxPatternIndex=kt(o,c),c+=4,r=[f,a.number,o,c,s];break;case 22:case 23:var B={};B.info=Fi(o,c),c+=xi;var Q=o[c++];B.mmr=!!(1&Q),B.template=Q>>1&3,B.enableSkip=!!(8&Q),B.combinationOperator=Q>>4&7,B.defaultPixelValue=Q>>7&1,B.gridWidth=kt(o,c),c+=4,B.gridHeight=kt(o,c),c+=4,B.gridOffsetX=4294967295&kt(o,c),c+=4,B.gridOffsetY=4294967295&kt(o,c),c+=4,B.gridVectorX=bt(o,c),c+=2,B.gridVectorY=bt(o,c),c+=2,r=[B,a.referredTo,o,c,s];break;case 38:case 39:var E={};E.info=Fi(o,c),c+=xi;var d=o[c++];if(E.mmr=!!(1&d),E.template=d>>1&3,E.prediction=!!(8&d),!E.mmr){for(i=0===E.template?4:1,A=[],n=0;n>2&1,y.combinationOperator=p>>3&3,y.requiresBuffer=!!(32&p),y.combinationOperatorOverride=!!(64&p),r=[y];break;case 49:case 50:case 51:case 62:break;case 53:r=[a.number,o,c,s];break;default:throw new hi("segment type ".concat(a.typeName,"(").concat(a.type,") is not implemented"))}var v="on"+a.typeName;v in t&&t[v].apply(t,r)}function Gi(e,t){for(var r=0,A=e.length;r>3,r=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&r.fill(255),this.buffer=r}},{key:"drawBitmap",value:function(e,t){var r,A,n,i,a=this.currentPageInfo,o=e.width,s=e.height,c=a.width+7>>3,g=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,u=this.buffer,l=128>>(7&e.x),h=e.y*c+(e.x>>3);switch(g){case 0:for(r=0;r>=1)||(n=128,i++);h+=c}break;case 2:for(r=0;r>=1)||(n=128,i++);h+=c}break;default:throw new hi("operator ".concat(g," is not supported"))}}},{key:"onImmediateGenericRegion",value:function(e,t,r,A){var n=e.info,i=new fi(t,r,A),a=wi(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,i);this.drawBitmap(n,a)}},{key:"onImmediateLosslessGenericRegion",value:function(){this.onImmediateGenericRegion.apply(this,arguments)}},{key:"onSymbolDictionary",value:function(e,t,r,A,n,i){var a,o;e.huffman&&(a=function(e,t,r){var A,n,i,a=0;switch(e.huffmanDHSelector){case 0:case 1:A=Hi(e.huffmanDHSelector+4);break;case 3:A=Pi(a,t,r),a++;break;default:throw new hi("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:n=Hi(e.huffmanDWSelector+2);break;case 3:n=Pi(a,t,r),a++;break;default:throw new hi("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=Pi(a,t,r),a++):i=Hi(1),{tableDeltaHeight:A,tableDeltaWidth:n,tableBitmapSize:i,tableAggregateInstances:e.aggregationInstancesSelector?Pi(a,t,r):Hi(1)}}(e,r,this.customTables),o=new Yi(A,n,i));var s=this.symbols;s||(this.symbols=s={});var c,g=[],u=ri(r);try{for(u.s();!(c=u.n()).done;){var l=s[c.value];l&&g.push.apply(g,ti(l))}}catch(e){u.e(e)}finally{u.f()}var h=new fi(A,n,i);s[t]=function(e,t,r,A,n,i,a,o,s,c,g,u){if(e&&t)throw new hi("symbol refinement with Huffman is not supported");var l,h,I=[],f=0,C=mt(r.length+A),B=g.decoder,Q=g.contextCache;for(e&&(l=Hi(1),h=[],C=Math.max(C,1));I.length1)v=ki(e,t,E,f,0,m,1,r.concat(I),C,0,0,1,0,i,s,c,g,0,u);else{var w=Ei(Q,B,C),b=Qi(Q,"IARDX",B),k=Qi(Q,"IARDY",B);v=bi(E,f,s,w=32){var u=void 0,l=void 0,h=void 0;switch(g){case 32:if(0===c)throw new hi("no previous value in symbol ID table");l=n.readBits(2)+3,u=i[c-1].prefixLength;break;case 33:l=n.readBits(3)+3,u=0;break;case 34:l=n.readBits(7)+11,u=0;break;default:throw new hi("invalid code length in symbol ID table")}for(h=0;h=0;f--)b=e?Ki(w,s,c,!0):wi(!1,s,c,r,!1,null,m,I),U[f]=b;for(k=0;k=0;C--)F|=(S^=U[C][k][D])<>8,(R=g+k*h+D*l>>8)>=0&&R+y<=A&&G>=0&&G+p<=n)for(f=0;f=n))for(L=Q[J],N=x[f],C=0;C=0&&M>1&7),g=1+(i>>4&7),u=[],l=a;do{A=s.readBits(c),n=s.readBits(g),u.push(new Li([l,A,n,0])),l+=1<>r&1;if(r<=0)this.children[A]=new e(t);else{var n=this.children[A];n||(this.children[A]=n=new e(null)),n.buildTree(t,r-1)}}},{key:"decodeNode",value:function(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new hi("invalid Huffman data");return r.decodeNode(e)}}])}(),Mi=function(){return ai((function e(t,r){si(this,e),r||this.assignPrefixCodes(t),this.rootNode=new Ui(null);for(var A=0,n=t.length;A0&&this.rootNode.buildTree(i,i.prefixLength-1)}}),[{key:"decode",value:function(e){return this.rootNode.decodeNode(e)}},{key:"assignPrefixCodes",value:function(e){for(var t=e.length,r=0,A=0;A=this.end)throw new hi("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}var e=this.currentByte>>this.shift&1;return this.shift--,e}},{key:"readBits",value:function(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<=this.end?-1:this.data[this.position++]}}])}();function Pi(e,t,r){for(var A=0,n=0,i=t.length;n>g&1,g--}if(A&&!o)for(var l=0;l<5&&-1!==i.readNextChar();l++);return a}var Ti=function(){return ai((function e(){si(this,e)}),[{key:"parseChunks",value:function(e){return function(e){for(var t=new Ni,r=0,A=e.length;re.length)&&(t=e.length);for(var r=0,A=Array(t);r>3,C=7&i,B=t.length;n=new Uint32Array(n.buffer);for(var Q=0,E=0;E=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&!e[i-1];)i--;var a,o=[{children:[],index:0}],s=o[0];for(r=0;r0;)s=o.pop();for(s.index++,o.push(s);o.length<=r;)o.push(a={children:[],index:0}),s.children[s.index]=a.children,s=a;n++}r+19&&void 0!==arguments[9]&&arguments[9],g=r.mcusPerLine,u=r.progressive,l=t,h=0,I=0;function f(){if(I>0)return I--,h>>I&1;if(255===(h=e[t++])){var A=e[t++];if(A){if(220===A&&c){var n=bt(e,t+=2);if(t+=2,n>0&&n!==r.scanLines)throw new la("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===A){if(c){var i=p*(8===r.precision?8:0);if(i>0&&Math.round(r.scanLines/i)>=5)throw new la("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect \`scanLines\` parameter",i)}throw new ha("Found EOI marker (0xFFD9) while parsing scan data")}throw new ua("unexpected marker ".concat((h<<8|A).toString(16)))}}return I=7,h>>>7}function C(e){for(var t=e;;){switch(typeof(t=t[f()])){case"number":return t;case"object":continue}throw new ua("invalid huffman sequence")}}function B(e){for(var t=0;e>0;)t=t<<1|f(),e--;return t}function Q(e){if(1===e)return 1===f()?1:-1;var t=B(e);return t>=1<0)d--;else for(var r=i,A=a;r<=A;){var n=C(e.huffmanTableAC),o=15&n,c=n>>4;if(0!==o){var g=Ia[r+=c];e.blockData[t+g]=Q(o)*(1<>4,0==(r=15&A))c<15?(d=B(c)+(1<>4;if(0!==a){var s=Ia[n+=o];e.blockData[t+s]=Q(a),n++}else{if(o<15)break;n+=16}}};for(var R,G,N,L=0,U=1===x?A[0].blocksPerLine*A[0].blocksPerColumn:g*r.mcusPerColumn;L<=U;){var M=n?Math.min(U-L,n):U;if(M>0){for(b=0;b0?"unexpected":"excessive"," MCU data, current marker is: ").concat(R.invalid)),t=R.offset),!(R.marker>=65488&&R.marker<=65495))break;t+=2}return t-l}function ba(e,t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d=e.quantizationTable,y=e.blockData;if(!d)throw new ua("missing required Quantization Table.");for(var p=0;p<64;p+=8)u=y[t+p],l=y[t+p+1],h=y[t+p+2],I=y[t+p+3],f=y[t+p+4],C=y[t+p+5],B=y[t+p+6],Q=y[t+p+7],u*=d[p],0!=(l|h|I|f|C|B|Q)?(l*=d[p+1],h*=d[p+2],I*=d[p+3],f*=d[p+4],C*=d[p+5],B*=d[p+6],Q*=d[p+7],n=(A=(A=ya*u+128>>8)+(n=ya*f+128>>8)+1>>1)-n,E=(i=h)*da+(a=B)*Ea+128>>8,i=i*Ea-a*da+128>>8,c=(o=(o=pa*(l-Q)+128>>8)+(c=C<<4)+1>>1)-c,s=(g=(g=pa*(l+Q)+128>>8)+(s=I<<4)+1>>1)-s,a=(A=A+(a=E)+1>>1)-a,i=(n=n+i+1>>1)-i,E=o*Qa+g*Ba+2048>>12,o=o*Ba-g*Qa+2048>>12,g=E,E=s*Ca+c*fa+2048>>12,s=s*fa-c*Ca+2048>>12,c=E,r[p]=A+g,r[p+7]=A-g,r[p+1]=n+c,r[p+6]=n-c,r[p+2]=i+s,r[p+5]=i-s,r[p+3]=a+o,r[p+4]=a-o):(E=ya*u+512>>10,r[p]=E,r[p+1]=E,r[p+2]=E,r[p+3]=E,r[p+4]=E,r[p+5]=E,r[p+6]=E,r[p+7]=E);for(var v=0;v<8;++v)u=r[v],0!=((l=r[v+8])|(h=r[v+16])|(I=r[v+24])|(f=r[v+32])|(C=r[v+40])|(B=r[v+48])|(Q=r[v+56]))?(n=(A=4112+((A=ya*u+2048>>12)+(n=ya*f+2048>>12)+1>>1))-n,E=(i=h)*da+(a=B)*Ea+2048>>12,i=i*Ea-a*da+2048>>12,a=E,c=(o=(o=pa*(l-Q)+2048>>12)+(c=C)+1>>1)-c,s=(g=(g=pa*(l+Q)+2048>>12)+(s=I)+1>>1)-s,E=o*Qa+g*Ba+2048>>12,o=o*Ba-g*Qa+2048>>12,g=E,E=s*Ca+c*fa+2048>>12,s=s*fa-c*Ca+2048>>12,(u=(A=A+a+1>>1)+g)<16?u=0:u>=4080?u=255:u>>=4,(l=(n=n+i+1>>1)+(c=E))<16?l=0:l>=4080?l=255:l>>=4,(h=(i=n-i)+s)<16?h=0:h>=4080?h=255:h>>=4,(I=(a=A-a)+o)<16?I=0:I>=4080?I=255:I>>=4,(f=a-o)<16?f=0:f>=4080?f=255:f>>=4,(C=i-s)<16?C=0:C>=4080?C=255:C>>=4,(B=n-c)<16?B=0:B>=4080?B=255:B>>=4,(Q=A-g)<16?Q=0:Q>=4080?Q=255:Q>>=4,y[t+v]=u,y[t+v+8]=l,y[t+v+16]=h,y[t+v+24]=I,y[t+v+32]=f,y[t+v+40]=C,y[t+v+48]=B,y[t+v+56]=Q):(E=(E=ya*u+8192>>14)<-2040?0:E>=2024?255:E+2056>>4,y[t+v]=E,y[t+v+8]=E,y[t+v+16]=E,y[t+v+24]=E,y[t+v+32]=E,y[t+v+40]=E,y[t+v+48]=E,y[t+v+56]=E)}function ka(e,t){for(var r=t.blocksPerLine,A=t.blocksPerColumn,n=new Int16Array(64),i=0;i2&&void 0!==arguments[2]?arguments[2]:t,A=e.length-1,n=r=A)return null;var i=bt(e,t);if(i>=65472&&i<=65534)return{invalid:null,marker:i,offset:t};for(var a=bt(e,n);!(a>=65472&&a<=65534);){if(++n>=A)return null;a=bt(e,n)}return{invalid:i.toString(16),marker:a,offset:n}}var Sa=function(){return Aa((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.decodeTransform,A=void 0===r?null:r,n=t.colorTransform,i=void 0===n?-1:n;ia(this,e),this._decodeTransform=A,this._colorTransform=i}),[{key:"parse",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).dnlScanLines,r=void 0===t?null:t;function A(){var t=bt(e,o),r=(o+=2)+t-2,A=Da(e,r,o);null!=A&&A.invalid&&(q("readDataBlock - incorrect length, current marker is: "+A.invalid),r=A.offset);var n=e.subarray(o,r);return o+=n.length,n}function n(e){var t,r=Math.ceil(e.samplesPerLine/8/e.maxH),A=Math.ceil(e.scanLines/8/e.maxV),n=ea(e.components);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=Math.ceil(Math.ceil(e.samplesPerLine/8)*i.h/e.maxH),o=Math.ceil(Math.ceil(e.scanLines/8)*i.v/e.maxV),s=r*i.h,c=A*i.v*64*(s+1);i.blockData=new Int16Array(c),i.blocksPerLine=a,i.blocksPerColumn=o}}catch(e){n.e(e)}finally{n.f()}e.mcusPerLine=r,e.mcusPerColumn=A}var i,a,o=0,s=null,c=null,g=0,u=[],l=[],h=[],I=bt(e,o);if(o+=2,65496!==I)throw new ua("SOI not found");I=bt(e,o),o+=2;e:for(;65497!==I;){var f=void 0,C=void 0,B=void 0;switch(I){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var Q=A();65504===I&&74===Q[0]&&70===Q[1]&&73===Q[2]&&70===Q[3]&&0===Q[4]&&(s={version:{major:Q[5],minor:Q[6]},densityUnits:Q[7],xDensity:Q[8]<<8|Q[9],yDensity:Q[10]<<8|Q[11],thumbWidth:Q[12],thumbHeight:Q[13],thumbData:Q.subarray(14,14+3*Q[12]*Q[13])}),65518===I&&65===Q[0]&&100===Q[1]&&111===Q[2]&&98===Q[3]&&101===Q[4]&&(c={version:Q[5]<<8|Q[6],flags0:Q[7]<<8|Q[8],flags1:Q[9]<<8|Q[10],transformCode:Q[11]});break;case 65499:for(var E=bt(e,o)+(o+=2)-2;o>4==0)for(C=0;C<64;C++)y[Ia[C]]=e[o++];else{if(d>>4!=1)throw new ua("DQT - invalid table spec");for(C=0;C<64;C++)y[Ia[C]]=bt(e,o),o+=2}u[15&d]=y}break;case 65472:case 65473:case 65474:if(i)throw new ua("Only single frame JPEGs supported");o+=2,(i={}).extended=65473===I,i.progressive=65474===I,i.precision=e[o++];var p=bt(e,o);o+=2,i.scanLines=r||p,i.samplesPerLine=bt(e,o),o+=2,i.components=[],i.componentIds={};var v=e[o++],m=0,w=0;for(f=0;f>4,D=15&e[o+1];m>4==0?h:l)[15&x]=va(R,N)}break;case 65501:a=bt(e,o+=2),o+=2;break;case 65498:var L=1==++g&&!r;o+=2;var U=e[o++],M=[];for(f=0;f>4],Y.huffmanTableAC=l[15&P],M.push(Y)}var O=e[o++],K=e[o++],T=e[o++];try{var j=wa(e,o,i,M,a,O,K,T>>4,15&T,L);o+=j}catch(t){if(t instanceof la)return q("".concat(t.message," -- attempting to re-parse the JPEG image.")),this.parse(e,{dnlScanLines:t.scanLines});if(t instanceof ha){q("".concat(t.message," -- ignoring the rest of the image data."));break e}throw t}break;case 65500:o+=4;break;case 65535:255!==e[o]&&o--;break;default:var W=Da(e,o-2,o-3);if(null!=W&&W.invalid){q("JpegImage.parse - unexpected data, current marker is: "+W.invalid),o=W.offset;break}if(!W||o>=e.length-1){q("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new ua("JpegImage.parse - unknown marker: "+I.toString(16))}I=bt(e,o),o+=2}if(!i)throw new ua("JpegImage.parse - no frame data found.");this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=s,this.adobe=c,this.components=[];var Z,_=ea(i.components);try{for(_.s();!(Z=_.n()).done;){var X=Z.value,V=u[X.quantizationId];V&&(X.quantizationTable=V),this.components.push({index:X.index,output:ka(0,X),scaleX:X.h/i.maxH,scaleY:X.v/i.maxV,blocksPerLine:X.blocksPerLine,blocksPerColumn:X.blocksPerColumn})}}catch(e){_.e(e)}finally{_.f()}this.numComponents=this.components.length}},{key:"_getLinearizedBlockData",value:function(e,t){var r,A,n,i,a,o,s,c,g,u,l,h,I=arguments.length>2&&void 0!==arguments[2]&&arguments[2],f=this.width/e,C=this.height/t,B=0,Q=this.components.length,E=e*t*Q,d=new Uint8ClampedArray(E),y=new Uint32Array(e),p=4294967288;for(s=0;s>8)+v[g+1];return d}},{key:"_isColorConversionNeeded",get:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}},{key:"_convertYccToRgb",value:function(e){for(var t,r,A,n=0,i=e.length;n4)throw new ua("Unsupported color mode");var c=this._getLinearizedBlockData(t,r,s);if(1===this.numComponents&&(n||a)){var g=c.length*(n?4:3),u=new Uint8ClampedArray(g),l=0;if(n)!function(e,t){if(se.isLittleEndian)for(var r=0,A=e.length;r0&&(e=e.subarray(t));break}var A={decodeTransform:void 0,colorTransform:void 0},n=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(n)){for(var i=this.dict.get("BPC","BitsPerComponent")||8,a=n.length,o=new Int32Array(a),s=!1,c=(1<0&&void 0!==arguments[0]?arguments[0]:{};new Promise((function(r,A){e=r,t=A})),r.decode=function(e,t){var A=t.numComponents,n=void 0===A?4:A,i=t.isIndexedColormap,a=void 0!==i&&i,o=t.smaskInData,s=void 0!==o&&o,c=e.length,g=r._malloc(c);r.HEAPU8.set(e,g);var u=r._jp2_decode(g,c,n>0?n:0,!!a,!!s);if(r._free(g),u){var l=r.errorMessages;return l?(delete r.errorMessages,l):"Unknown error"}var h=r.imageData;return r.imageData=null,h};var A=Object.assign({},r),n="./this.program",i="";"undefined"!=typeof document&&document.currentScript&&(i=document.currentScript.src),Ma&&(i=Ma),i=i.startsWith("blob:")?"":i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1);var a,o,s,c,g,u=r.print||console.log.bind(console),l=r.printErr||console.error.bind(console);function h(){var e=o.buffer;r.HEAP8=s=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAPU8=c=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU32=g=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}Object.assign(r,A),A=null,r.arguments&&r.arguments,r.thisProgram&&(n=r.thisProgram),r.quit&&r.quit,r.wasmBinary&&(a=r.wasmBinary);var I,f=[],C=[],B=[],Q=0,E=null,d=null,y="data:application/octet-stream;base64,",p=function(e){return e.startsWith(y)};function v(e,t){var r,A=function(e){if(e==I&&a)return new Uint8Array(a);var t=function(e){if(p(e))return function(e){for(var t=atob(e),r=new Uint8Array(t.length),A=0;A0;)e.shift()(r)};r.noExitRuntime;var w,b=function(e){var t=(e-o.buffer.byteLength+65535)/65536;try{return o.grow(t),h(),1}catch(e){}},k={},D=function(){if(!D.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t in k)void 0===k[t]?delete e[t]:e[t]=k[t];var r=[];for(var t in e)r.push("".concat(t,"=").concat(e[t]));D.strings=r}return D.strings},S=[null,[],[]],F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,x=function(e,t,r){for(var A=t+r,n=t;e[n]&&!(n>=A);)++n;if(n-t>16&&e.buffer&&F)return F.decode(e.subarray(t,n));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|o)}else i+=String.fromCharCode(a)}return i},R=function(e,t){return e?x(c,e,t):""},G={c:function(e,t,r){return c.copyWithin(e,t,t+r)},g:function(e,t){e>>=2;var A=r.imageData=new Uint8ClampedArray(t),n=r.HEAP32.subarray(e,e+t);A.set(n)},f:function(e,t,A,n){e>>=2,t>>=2,A>>=2;for(var i=r.imageData=new Uint8ClampedArray(3*n),a=r.HEAP32.subarray(e,e+n),o=r.HEAP32.subarray(t,t+n),s=r.HEAP32.subarray(A,A+n),c=0;c>=2,t>>=2,A>>=2,n>>=2;for(var a=r.imageData=new Uint8ClampedArray(4*i),o=r.HEAP32.subarray(e,e+i),s=r.HEAP32.subarray(t,t+i),c=r.HEAP32.subarray(A,A+i),g=r.HEAP32.subarray(n,n+i),u=0;u>>=0)>r)return!1;for(var A,n=1;n<=4;n*=2){var i=t*(1+.2/n);i=Math.min(i,e+100663296);var a=Math.min(r,(A=Math.max(e,i))+(65536-A%65536)%65536);if(b(a))return!0}return!1},l:function(e,t){var r=0;return D().forEach((function(A,n){var i=t+r;g[e+4*n>>2]=i,function(e,t){for(var r=0;r>2]=r.length;var A=0;return r.forEach((function(e){return A+=e.length+1})),g[t>>2]=A,0},n:function(e){return 52},j:function(e,t,r,A,n){return 70},b:function(e,t,r,A){for(var n,i,a,o=0,s=0;s>2],I=g[t+4>>2];t+=8;for(var f=0;f>2]=o,0},o:function(e,t){e>>=2;for(var A=r.imageData=new Uint8ClampedArray(4*t),n=r.HEAP32.subarray(e,e+t),i=0;i>=2,t>>=2;for(var n=r.imageData=new Uint8ClampedArray(4*A),i=r.HEAP32.subarray(e,e+A),a=r.HEAP32.subarray(t,t+A),o=0;o>=2,t>>=2,A>>=2;for(var i=r.imageData=new Uint8ClampedArray(4*n),a=r.HEAP32.subarray(e,e+n),o=r.HEAP32.subarray(t,t+n),s=r.HEAP32.subarray(A,A+n),c=0;c0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),f.unshift(e);var e;m(f)}(),Q>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t()))}if(N.q,r._malloc=N.r,r._free=N.s,r._jp2_decode=N.u,d=function e(){w||L(),w||(d=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return L(),r});const Ya=Ha;function Pa(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function Oa(e,t){for(var r=0;r=0;)if(65361==(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,A=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.getInt32()>>>0;return e.skip(16),{width:r-n,height:A-i,bitsPerComponent:8,componentsCount:e.getUint16()}}throw new Xa("No size marker found in JPX stream")}}])}(),za={_:null};function $a(e,t){for(var r=0;r>>t&(1<0;if(B<256)l[0]=B,h=1;else{if(!(B>=258)){if(256===B){g=9,a=258,h=0;continue}this.eof=!0,delete this.lzwState;break}if(B=0;t--)l[t]=o[r],r=c[r];else l[h++]=l[0]}if(Q&&(c[a]=u,s[a]=s[u]+1,o[a]=l[0],g=++a+i&a+i-1?g:0|Math.min(Math.log(a+i)/.6931471805599453+1,12)),u=B,A<(I+=h)){do{A+=512}while(A15))throw new re("Unsupported predictor: ".concat(i));n.readBlock=2===i?n.readBlockTiff:n.readBlockPng,n.str=e,n.dict=e.dict;var a=n.colors=A.get("Colors")||1,o=n.bits=A.get("BPC","BitsPerComponent")||8,s=n.columns=A.get("Columns")||1;return n.pixBytes=a*o+7>>3,n.rowBytes=s*a*o+7>>3,Co(n,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eo(e,t)}(t,XA),r=t,(A=[{key:"readBlockTiff",value:function(){var e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),A=this.bits,n=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,!this.eof){var a,o=0,s=0,c=0,g=0,u=t;if(1===A&&1===n)for(a=0;a>1,l^=l>>2,o=(1&(l^=l>>4))<<7,r[u++]=l}else if(8===A){for(a=0;a>8&255,r[u++]=255&I}}else{var f=new Uint8Array(n+1),C=(1<>c-A)&C,c-=A,s=s<=8&&(r[Q++]=s>>g-8&255,g-=8);g>0&&(r[Q++]=(s<<8-g)+(o&(1<<8-g)-1))}this.bufferLength+=e}}},{key:"readBlockPng",value:function(){var e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),A=this.str.getBytes(e);if(this.eof=!A.length,!this.eof){var n=this.bufferLength,i=this.ensureBuffer(n+e),a=i.subarray(n-e,n);0===a.length&&(a=new Uint8Array(e));var o,s,c,g=n;switch(r){case 0:for(o=0;o>1)+A[o];for(;o>1)+A[o]&255,g++;break;case 4:for(o=0;o0){var n=this.str.getBytes(A);t.set(n,r),r+=A}}else{A=257-A;var i=e[1];t=this.ensureBuffer(r+A+1);for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function xo(e,t){if(e){if("string"==typeof e)return Ro(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ro(e,t):void 0}}function Ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&void 0!==arguments[0]?arguments[0]:null,t=this.buf1;if(this.shift(),t instanceof Me)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":for(var r=[];!Te(this.buf1,"]")&&this.buf1!==Re;)r.push(this.getObj(e));if(this.buf1===Re){if(this.recoveryMode)return r;throw new Bt("End of file inside array.")}return this.shift(),r;case"<<":for(var A=new He(this.xref);!Te(this.buf1,">>")&&this.buf1!==Re;)if(this.buf1 instanceof Ue){var n=this.buf1.name;if(this.shift(),this.buf1===Re)break;A.set(n,this.getObj(e))}else T("Malformed dictionary: key must be a name object"),this.shift();if(this.buf1===Re){if(this.recoveryMode)return A;throw new Bt("End of file inside dictionary.")}return Te(this.buf2,"stream")?this.allowStreams?this.makeStream(A,e):A:(this.shift(),A);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&Te(this.buf2,"R")){var i=Ye.get(t,this.buf1);return this.shift(),this.shift(),i}return t}return"string"==typeof t&&e?e.decryptString(t):t}},{key:"findDefaultInlineStreamEnd",value:function(e){for(var t,r,A=this.lexer.knownCommands,n=e.pos,i=0;-1!==(t=e.getByte());)if(0===i)i=69===t?1:0;else if(1===i)i=73===t?2:0;else if(32===t||10===t||13===t){r=e.pos;var a=e.peekBytes(15),o=a.length;if(0===o)break;for(var s=0;s127)){i=0;break}if(2!==i)continue;if(!A){q("findDefaultInlineStreamEnd - \`lexer.knownCommands\` is undefined.");continue}var c=new Oo(new ar(a.slice()),A);c._hexStringWarn=function(){};for(var g=0;;){var u=c.getObj();if(u===Re){i=0;break}if(u instanceof Me){var l=A[u.cmd];if(!l){i=0;break}if(l.variableArgs?g<=l.numArgs:g===l.numArgs)break;g=0}else g++}if(2===i)break}else i=0;-1===t&&(q("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),r&&(q('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-r))));var h=4;return e.skip(-h),t=e.peekByte(),e.skip(h),Dt(t)||h--,e.pos-h-n}},{key:"findDCTDecodeInlineStreamEnd",value:function(e){for(var t,r,A=e.pos,n=!1;-1!==(t=e.getByte());)if(255===t){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:n=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:(r=e.getUint16())>2?e.skip(r-2):e.skip(-2)}if(n)break}var i=e.pos-A;return-1===t?(q("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCII85DecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte());)if(126===t){var A=e.pos;for(t=e.peekByte();Dt(t);)e.skip(),t=e.peekByte();if(62===t){e.skip();break}if(e.pos>A){var n=e.peekBytes(2);if(69===n[0]&&73===n[1])break}}var i=e.pos-r;return-1===t?(q("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-i),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),i)}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function(e){for(var t,r=e.pos;-1!==(t=e.getByte())&&62!==t;);var A=e.pos-r;return-1===t?(q("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-A),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),A)}},{key:"inlineStreamSkipEI",value:function(e){for(var t,r=0;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}},{key:"makeInlineImage",value:function(e){for(var t,r=this.lexer,A=r.stream,n=Object.create(null);!Te(this.buf1,"ID")&&this.buf1!==Re;){if(!(this.buf1 instanceof Ue))throw new re("Dictionary key must be a name object");var i=this.buf1.name;if(this.shift(),this.buf1===Re)break;n[i]=this.getObj(e)}-1!==r.beginInlineImagePos&&(t=A.pos-r.beginInlineImagePos);var a,o=this.xref.fetchIfRef(n.F||n.Filter);if(o instanceof Ue)a=o.name;else if(Array.isArray(o)){var s=this.xref.fetchIfRef(o[0]);s instanceof Ue&&(a=s.name)}var c,g,u=A.pos;switch(a){case"DCT":case"DCTDecode":c=this.findDCTDecodeInlineStreamEnd(A);break;case"A85":case"ASCII85Decode":c=this.findASCII85DecodeInlineStreamEnd(A);break;case"AHx":case"ASCIIHexDecode":c=this.findASCIIHexDecodeInlineStreamEnd(A);break;default:c=this.findDefaultInlineStreamEnd(A)}if(c<1e3&&t>0){var l=A.pos;A.pos=r.beginInlineImagePos,g=function(e){for(var t=[],r=e.length,A=0;A=A){var g,u=!1,l=Fo(n);try{for(l.s();!(g=l.n()).done;){for(var h=g.value,I=h.length,f=0;f=i){u=!0;break}if(f>=I){Dt(a[s+c+f])&&(T('Found "'.concat(ne([].concat(So(r),So(h))),'" when ')+"searching for endstream command."),u=!0);break}}}catch(e){l.e(e)}finally{l.f()}if(u)return t.pos+=s,t.pos-e}s++}t.pos+=o}return-1}var Yo=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Po(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}var Oo=function(){return Lo((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Go(this,e),this.stream=t,this.nextChar(),this.strBuf=[],this.knownCommands=r,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}),[{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function(){return this.stream.peekByte()}},{key:"getNumber",value:function(){var e=this.currentChar,t=!1,r=0,A=1;if(45===e?(A=-1,45===(e=this.nextChar())&&(e=this.nextChar())):43===e&&(e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){var n="Invalid number: ".concat(String.fromCharCode(e)," (charCode ").concat(e,")");if(Dt(e)||-1===e)return T('Lexer.getNumber - "'.concat(n,'".')),0;throw new re(n)}for(var i=e-48,a=0,o=1;(e=this.nextChar())>=0;)if(e>=48&&e<=57){var s=e-48;t?a=10*a+s:(0!==r&&(r*=10),i=10*i+s)}else if(46===e){if(0!==r)break;r=1}else if(45===e)q("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(43===(e=this.peekChar())||45===e)o=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(i/=r),t&&(i*=Math.pow(10,o*a)),A*i}},{key:"getString",value:function(){var e=1,t=!1,r=this.strBuf;r.length=0;for(var A=this.nextChar();;){var n=!1;switch(0|A){case-1:q("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(A=this.nextChar()){case-1:q("Unterminated string"),t=!0;break;case 110:r.push("\\n");break;case 114:r.push("\\r");break;case 116:r.push("\\t");break;case 98:r.push("\\b");break;case 102:r.push("\\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(A));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var i=15&A;n=!0,(A=this.nextChar())>=48&&A<=55&&(i=(i<<3)+(15&A),(A=this.nextChar())>=48&&A<=55&&(n=!1,i=(i<<3)+(15&A))),r.push(String.fromCharCode(i));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(A))}break;default:r.push(String.fromCharCode(A))}if(t)break;n||(A=this.nextChar())}return r.join("")}},{key:"getName",value:function(){var e,t,r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!Yo[e];)if(35===e){if(e=this.nextChar(),Yo[e]){q("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}var A=Po(e);if(-1!==A){t=e;var n=Po(e=this.nextChar());if(-1===n){if(q("Lexer_getName: Illegal digit (".concat(String.fromCharCode(e),") ")+"in hexadecimal number."),r.push("#",String.fromCharCode(t)),Yo[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(A<<4|n))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&q("Name token is longer than allowed by the spec: ".concat(r.length)),Ue.get(r.join(""))}},{key:"_hexStringWarn",value:function(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||q("getHexString - ignoring invalid character: ".concat(e)):q("getHexString - ignoring additional invalid characters.")}},{key:"getHexString",value:function(){var e=this.strBuf;e.length=0;var t=this.currentChar,r=-1,A=-1;for(this._hexStringNumWarn=0;;){if(t<0){q("Unterminated hex string");break}if(62===t){this.nextChar();break}1!==Yo[t]?(-1===(A=Po(t))?this._hexStringWarn(t):-1===r?r=A:(e.push(String.fromCharCode(r<<4|A)),r=-1),t=this.nextChar()):t=this.nextChar()}return-1!==r&&e.push(String.fromCharCode(r<<4)),e.join("")}},{key:"getObj",value:function(){for(var e=!1,t=this.currentChar;;){if(t<0)return Re;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==Yo[t])break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),Me.get("[");case 93:return this.nextChar(),Me.get("]");case 60:return 60===(t=this.nextChar())?(this.nextChar(),Me.get("<<")):this.getHexString();case 62:return 62===(t=this.nextChar())?(this.nextChar(),Me.get(">>")):Me.get(">");case 123:return this.nextChar(),Me.get("{");case 125:return this.nextChar(),Me.get("}");case 41:throw this.nextChar(),new re("Illegal character: ".concat(t))}var r=String.fromCharCode(t);if(t<32||t>127){var A=this.peekChar();if(A>=32&&A<=127)return this.nextChar(),Me.get(r)}for(var n=this.knownCommands,i=void 0!==(null==n?void 0:n[r]);(t=this.nextChar())>=0&&!Yo[t];){var a=r+String.fromCharCode(t);if(i&&void 0===n[a])break;if(128===r.length)throw new re("Command token too long: ".concat(r.length));r=a,i=void 0!==(null==n?void 0:n[r])}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),Me.get(r)))}},{key:"skipToNextLine",value:function(){for(var e=this.currentChar;e>=0;){if(13===e){10===(e=this.nextChar())&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}])}(),Ko=function(){return Lo((function e(){Go(this,e)}),null,[{key:"create",value:function(e){function t(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=e.get(t);if(Number.isInteger(A)&&(r?A>=0:A>0))return A;throw new Error('The "'.concat(t,'" parameter in the linearization ')+"dictionary is invalid.")}var r,A,n=new Jo({lexer:new Oo(e),xref:null}),i=n.getObj(),a=n.getObj(),o=n.getObj(),s=n.getObj();if(!(Number.isInteger(i)&&Number.isInteger(a)&&Te(o,"obj")&&s instanceof He&&"number"==typeof(r=s.get("Linearized"))&&r>0))return null;if((A=t(s,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:A,hints:function(e){var t,r=e.get("H");if(Array.isArray(r)&&(2===(t=r.length)||4===t)){for(var A=0;A0))throw new Error("Hint (".concat(A,") in the linearization dictionary is invalid."))}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}(s),objectNumberFirst:t(s,"O"),endFirst:t(s,"E"),numPages:t(s,"N"),mainXRefEntriesOffset:t(s,"T"),pageFirst:s.has("P")?t(s,"P",!0):0}}}])}();function To(){To=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function qo(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function jo(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){qo(i,A,n,a,o,"next",e)}function o(e){qo(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Wo(e,t,r){return t=_o(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zo()?Reflect.construct(t,r||[],_o(e).constructor):t.apply(e,r))}function Zo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Zo=function(){return!!e})()}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_o(e)}function Xo(e,t){return Xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xo(e,t)}function Vo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zo(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];Vo(this,e),this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=t}),[{key:"addCodespaceRange",value:function(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}},{key:"mapCidRange",value:function(e,t,r){if(t-e>rs)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}},{key:"mapBfRange",value:function(e,t,r){if(t-e>rs)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");for(var A=r.length-1;e<=t;){this._map[e++]=r;var n=r.charCodeAt(A)+1;r=n>255?r.substring(0,A-1)+String.fromCharCode(r.charCodeAt(A-1)+1)+"\\0":r.substring(0,A)+String.fromCharCode(n)}}},{key:"mapBfRangeToArray",value:function(e,t,r){if(t-e>rs)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");for(var A=r.length,n=0;e<=t&&n>>0;for(var o=n[i],s=0,c=o.length;s=g&&A<=u)return r.charcode=A,void(r.length=i+1)}}r.charcode=0,r.length=1}},{key:"getCharCodeLength",value:function(e){for(var t=this.codespaceRanges,r=0,A=t.length;r=o&&e<=s)return r+1}return 1}},{key:"length",get:function(){return this._map.length}},{key:"isIdentityCMap",get:function(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}])}(),ns=function(e){function t(e,r){var A;return Vo(this,t),(A=Wo(this,t)).vertical=e,A.addCodespaceRange(r,0,65535),A}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xo(e,t)}(t,As),$o(t,[{key:"mapCidRange",value:function(e,t,r){j("should not call mapCidRange")}},{key:"mapBfRange",value:function(e,t,r){j("should not call mapBfRange")}},{key:"mapBfRangeToArray",value:function(e,t,r){j("should not call mapBfRangeToArray")}},{key:"mapOne",value:function(e,t){j("should not call mapCidOne")}},{key:"lookup",value:function(e){return Number.isInteger(e)&&e<=65535?e:void 0}},{key:"contains",value:function(e){return Number.isInteger(e)&&e<=65535}},{key:"forEach",value:function(e){for(var t=0;t<=65535;t++)e(t,t)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e<=65535?e:-1}},{key:"getMap",value:function(){for(var e=new Array(65536),t=0;t<=65535;t++)e[t]=t;return e}},{key:"length",get:function(){return 65536}},{key:"isIdentityCMap",get:function(){j("should not access .isIdentityCMap")}}])}();function is(e){for(var t=0,r=0;r>>0}function as(e){if("string"!=typeof e)throw new re("Malformed CMap: expected string.")}function os(e){if(!Number.isInteger(e))throw new re("Malformed CMap: expected int.")}function ss(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endbfchar"))return;as(r);var A=is(r);as(r=t.getObj());var n=r;e.mapOne(A,n)}}function cs(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endbfrange"))return;as(r);var A=is(r);as(r=t.getObj());var n=is(r);if(r=t.getObj(),Number.isInteger(r)||"string"==typeof r){var i=Number.isInteger(r)?String.fromCharCode(r):r;e.mapBfRange(A,n,i)}else{if(!Te(r,"["))break;r=t.getObj();for(var a=[];!Te(r,"]")&&r!==Re;)a.push(r),r=t.getObj();e.mapBfRangeToArray(A,n,a)}}throw new re("Invalid bf range.")}function gs(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcidchar"))return;as(r);var A=is(r);os(r=t.getObj());var n=r;e.mapOne(A,n)}}function us(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcidrange"))return;as(r);var A=is(r);as(r=t.getObj());var n=is(r);os(r=t.getObj());var i=r;e.mapCidRange(A,n,i)}}function ls(e,t){for(;;){var r=t.getObj();if(r===Re)break;if(Te(r,"endcodespacerange"))return;if("string"!=typeof r)break;var A=is(r);if("string"!=typeof(r=t.getObj()))break;var n=is(r);e.addCodespaceRange(r.length,A,n)}throw new re("Invalid codespace range.")}function hs(e,t){var r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function Is(e,t){var r=t.getObj();r instanceof Ue&&(e.name=r.name)}function fs(e,t,r,A){return Cs.apply(this,arguments)}function Cs(){return(Cs=jo(To().mark((function e(t,r,A,n){var i,a,o;return To().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,(o=r.getObj())!==Re){e.next=7;break}return e.abrupt("break",39);case 7:if(!(o instanceof Ue)){e.next=12;break}"WMode"===o.name?hs(t,r):"CMapName"===o.name&&Is(t,r),i=o,e.next=29;break;case 12:if(!(o instanceof Me)){e.next=29;break}e.t0=o.cmd,e.next="endcmap"===e.t0?16:"usecmap"===e.t0?17:"begincodespacerange"===e.t0?19:"beginbfchar"===e.t0?21:"begincidchar"===e.t0?23:"beginbfrange"===e.t0?25:"begincidrange"===e.t0?27:29;break;case 16:return e.abrupt("break",39);case 17:return i instanceof Ue&&(a=i.name),e.abrupt("break",29);case 19:return ls(t,r),e.abrupt("break",29);case 21:return ss(t,r),e.abrupt("break",29);case 23:return gs(t,r),e.abrupt("break",29);case 25:return cs(t,r),e.abrupt("break",29);case 27:return us(t,r),e.abrupt("break",29);case 29:e.next=37;break;case 31:if(e.prev=31,e.t1=e.catch(1),!(e.t1 instanceof Ct)){e.next=35;break}throw e.t1;case 35:return q("Invalid cMap data: "+e.t1),e.abrupt("continue",0);case 37:e.next=0;break;case 39:if(!n&&a&&(n=a),!n){e.next=42;break}return e.abrupt("return",Bs(t,A,n));case 42:return e.abrupt("return",t);case 43:case"end":return e.stop()}}),e,null,[[1,31]])})))).apply(this,arguments)}function Bs(e,t,r){return Qs.apply(this,arguments)}function Qs(){return(Qs=jo(To().mark((function e(t,r,A){var n,i;return To().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Es(A,r);case 2:if(t.useCMap=e.sent,0===t.numCodespaceRanges){for(n=t.useCMap.codespaceRanges,i=0;i=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ps(e,t){if(e){if("string"==typeof e)return Os(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Os(e,t):void 0}}function Os(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=t)throw new re("Invalid CFF header");0!==r&&(T("cff data is shifted"),e=e.subarray(r),this.bytes=e);var A=e[0],n=e[1],i=e[2],a=e[3];return{obj:new zs(A,n,i,a),endPos:i}}},{key:"parseDict",value:function(e){var t=0;var r,A=[],n=[];t=0;for(var i=e.length;t>4,o=15&i;if(15===a)break;if(r+=A[a],15===o)break;r+=A[o]}return parseFloat(r)}():28===r?r=((r=e[t++])<<24|e[t++]<<16)>>16:29===r?r=(r=(r=(r=e[t++])<<8|e[t++])<<8|e[t++])<<8|e[t++]:r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:(q('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)))}return n}},{key:"parseIndex",value:function(e){var t,r,A=new ec,n=this.bytes,i=n[e++]<<8|n[e++],a=[],o=e;if(0!==i){var s=n[e++],c=e+(i+1)*s-1;for(t=0,r=i+1;t10)return!1;for(var n=e.stackSize,i=e.stack,a=t.length,o=0;o>16,o+=2,n++;else if(14===s){if(n>=4&&(n-=4,this.seacAnalysisEnabled))return e.seac=i.slice(n,n+4),!1;c=Zs[s]}else if(s>=32&&s<=246)i[n]=s-139,n++;else if(s>=247&&s<=254)i[n]=s<251?(s-247<<8)+t[o]+108:-(s-251<<8)-t[o]-108,o++,n++;else if(255===s)i[n]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536,o+=4,n++;else if(19===s||20===s){if(e.hints+=n>>1,0===e.hints){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}o+=e.hints+7>>3,n%=2,c=Zs[s]}else{if(10===s||29===s){var u=10===s?r:A;if(!u)return q("Missing subrsIndex for "+(c=Zs[s]).id),!1;var l=32768;u.count<1240?l=107:u.count<33900&&(l=1131);var h=i[--n]+l;if(h<0||h>=u.count||isNaN(h))return q("Out of bounds subrIndex for "+(c=Zs[s]).id),!1;if(e.stackSize=n,e.callDepth++,!this.parseCharString(e,u.get(h),r,A))return!1;e.callDepth--,n=e.stackSize;continue}if(11===s)return e.stackSize=n,!0;if(0===s&&o===t.length)t[o-1]=14,c=Zs[14];else{if(9===s){t.copyWithin(o-1,o,-1),o-=1,a-=1;continue}c=Zs[s]}}if(c){if(c.stem&&(e.hints+=n>>1,3===s||23===s?e.hasVStems=!0:!e.hasVStems||1!==s&&18!==s||(q("CFF stem hints are in wrong order"),t[o-1]=1===s?3:23)),"min"in c&&!e.undefStack&&n=2&&c.stem?n%=2:n>1&&q("Found too many parameters for stack-clearing command"),n>0&&(e.width=i[n-1])),"stackDelta"in c?("stackFn"in c&&c.stackFn(i,n),n+=c.stackDelta):c.stackClearing?n=0:c.resetStack?(n=0,e.undefStack=!1):c.undefStack&&(n=0,e.undefStack=!0,e.firstStackClearing=!1)}}return a=i.length&&(q("Invalid fd index for glyph index."),h=!1),h&&(I=(f=i[C].privateDict).subrsIndex)}else r&&(I=r);if(h&&(h=this.parseCharString(l,u,I,A)),null!==l.width){var B=f.getByName("nominalWidthX");s[g]=B+l.width}else{var Q=f.getByName("defaultWidthX");s[g]=Q}null!==l.seac&&(o[g]=l.seac),h||t.set(g,new Uint8Array([14]))}return{charStrings:t,seacs:o,widths:s}}},{key:"emptyPrivateDictionary",value:function(e){var t=this.createDict(ic,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}},{key:"parsePrivateDict",value:function(e){if(e.hasName("Private")){var t=e.getByName("Private");if(Array.isArray(t)&&2===t.length){var r=t[0],A=t[1];if(0===r||A>=this.bytes.length)this.emptyPrivateDictionary(e);else{var n=A+r,i=this.bytes.subarray(A,n),a=this.parseDict(i),o=this.createDict(ic,a,e.strings);if(e.privateDict=o,0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06),o.getByName("Subrs")){var s=o.getByName("Subrs"),c=A+s;if(0===s||c>=this.bytes.length)this.emptyPrivateDictionary(e);else{var g=this.parseIndex(c);o.subrsIndex=g.obj}}}}else e.removeByName("Private")}else this.emptyPrivateDictionary(e)}},{key:"parseCharsets",value:function(e,t,r,A){if(0===e)return new oc(!0,ac.ISO_ADOBE,ps);if(1===e)return new oc(!0,ac.EXPERT,vs);if(2===e)return new oc(!0,ac.EXPERT_SUBSET,ms);var n,i,a,o=this.bytes,s=e,c=o[e++],g=[A?0:".notdef"];switch(t-=1,c){case 0:for(a=0;a=65535)q("Not enough space in charstrings to duplicate first glyph.");else{var e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}}])}(),zs=qs((function e(t,r,A,n){Ks(this,e),this.major=t,this.minor=r,this.hdrSize=A,this.offSize=n})),$s=function(){return qs((function e(){Ks(this,e),this.strings=[]}),[{key:"get",value:function(e){return e>=0&&e<=390?Ws[e]:e-391<=this.strings.length?this.strings[e-391]:Ws[0]}},{key:"getSID",value:function(e){var t=Ws.indexOf(e);return-1!==t?t:-1!==(t=this.strings.indexOf(e))?t+391:-1}},{key:"add",value:function(e){this.strings.push(e)}},{key:"count",get:function(){return this.strings.length}}])}(),ec=function(){return qs((function e(){Ks(this,e),this.objects=[],this.length=0}),[{key:"add",value:function(e){this.length+=e.length,this.objects.push(e)}},{key:"set",value:function(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}},{key:"get",value:function(e){return this.objects[e]}},{key:"count",get:function(){return this.objects.length}}])}(),tc=function(){return qs((function e(t,r){Ks(this,e),this.keyToNameMap=t.keyToNameMap,this.nameToKeyMap=t.nameToKeyMap,this.defaults=t.defaults,this.types=t.types,this.opcodes=t.opcodes,this.order=t.order,this.strings=r,this.values=Object.create(null)}),[{key:"setByKey",value:function(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;var r,A=Ys(t);try{for(A.s();!(r=A.n()).done;){var n=r.value;if(isNaN(n))return q('Invalid CFFDict value: "'.concat(t,'" for key "').concat(e,'".')),!0}}catch(e){A.e(e)}finally{A.f()}var i=this.types[e];return"num"!==i&&"sid"!==i&&"offset"!==i||(t=t[0]),this.values[e]=t,!0}},{key:"setByName",value:function(e,t){if(!(e in this.nameToKeyMap))throw new re('Invalid dictionary name "'.concat(e,'"'));this.values[this.nameToKeyMap[e]]=t}},{key:"hasName",value:function(e){return this.nameToKeyMap[e]in this.values}},{key:"getByName",value:function(e){if(!(e in this.nameToKeyMap))throw new re("Invalid dictionary name ".concat(e,'"'));var t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}},{key:"removeByName",value:function(e){delete this.values[this.nameToKeyMap[e]]}}],[{key:"createTables",value:function(e){var t,r={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},A=Ys(e);try{for(A.s();!(t=A.n()).done;){var n=t.value,i=Array.isArray(n[0])?(n[0][0]<<8)+n[0][1]:n[0];r.keyToNameMap[i]=n[1],r.nameToKeyMap[n[1]]=i,r.types[i]=n[2],r.defaults[i]=n[3],r.opcodes[i]=Array.isArray(n[0])?n[0]:[n[0]],r.order.push(i)}}catch(e){A.e(e)}finally{A.f()}return r}}])}(),rc=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],Ac=function(e){function t(e){var r;return Ks(this,t),(r=Ns(this,t,[t.tables,e])).privateDict=null,r}return Ms(t,tc),qs(t,null,[{key:"tables",get:function(){return _(this,"tables",this.createTables(rc))}}])}(),nc=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],ic=function(e){function t(e){var r;return Ks(this,t),(r=Ns(this,t,[t.tables,e])).subrsIndex=null,r}return Ms(t,tc),qs(t,null,[{key:"tables",get:function(){return _(this,"tables",this.createTables(nc))}}])}(),ac={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},oc=qs((function e(t,r,A,n){Ks(this,e),this.predefined=t,this.format=r,this.charset=A,this.raw=n})),sc=qs((function e(t,r,A,n){Ks(this,e),this.predefined=t,this.format=r,this.encoding=A,this.raw=n})),cc=function(){return qs((function e(t,r){Ks(this,e),this.format=t,this.fdSelect=r}),[{key:"getFDIndex",value:function(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}])}(),gc=function(){return qs((function e(){Ks(this,e),this.offsets=Object.create(null)}),[{key:"isTracking",value:function(e){return e in this.offsets}},{key:"track",value:function(e,t){if(e in this.offsets)throw new re("Already tracking location of ".concat(e));this.offsets[e]=t}},{key:"offset",value:function(e){for(var t in this.offsets)this.offsets[t]+=e}},{key:"setEntryLocation",value:function(e,t,r){if(!(e in this.offsets))throw new re("Not tracking location of ".concat(e));for(var A=r.data,n=this.offsets[e],i=0,a=t.length;i>24&255,A[c]=l>>16&255,A[g]=l>>8&255,A[u]=255&l}}}])}(),uc=function(){function e(t){Ks(this,e),this.cff=t}return qs(e,[{key:"compile",value:function(){var e=this.cff,t={data:[],length:0,add(e){try{var t;(t=this.data).push.apply(t,Gs(e))}catch(t){this.data=this.data.concat(e)}this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);var A=this.compileNameIndex(e.names);if(t.add(A),e.isCIDFont&&e.topDict.hasName("FontMatrix")){var n=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");var i,a=Ys(e.fdArray);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=n.slice(0);o.hasName("FontMatrix")&&(s=ge.transform(s,o.getByName("FontMatrix"))),o.setByName("FontMatrix",s)}}catch(e){a.e(e)}finally{a.f()}}var c=e.topDict.getByName("XUID");(null==c?void 0:c.length)>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);var g=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(g.output);var u=g.trackers[0],l=this.compileStringIndex(e.strings.strings);t.add(l);var h=this.compileIndex(e.globalSubrIndex);if(t.add(h),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)u.setEntryLocation("Encoding",[e.encoding.format],t);else{var I=this.compileEncoding(e.encoding);u.setEntryLocation("Encoding",[t.length],t),t.add(I)}var f=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);u.setEntryLocation("charset",[t.length],t),t.add(f);var C=this.compileCharStrings(e.charStrings);if(u.setEntryLocation("CharStrings",[t.length],t),t.add(C),e.isCIDFont){u.setEntryLocation("FDSelect",[t.length],t);var B=this.compileFDSelect(e.fdSelect);t.add(B),g=this.compileTopDicts(e.fdArray,t.length,!0),u.setEntryLocation("FDArray",[t.length],t),t.add(g.output);var Q=g.trackers;this.compilePrivateDicts(e.fdArray,Q,t)}return this.compilePrivateDicts([e.topDict],[u],t),t.add([0]),t.data}},{key:"encodeNumber",value:function(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}},{key:"encodeFloat",value:function(t){var r=t.toString(),A=e.EncodeFloatRegExp.exec(r);if(A){var n=parseFloat("1e"+((A[2]?+A[2]:0)+A[1].length));r=(Math.round(t*n)/n).toString()}var i,a,o="";for(i=0,a=r.length;i=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e]}},{key:"compileHeader",value:function(e){return[e.major,e.minor,4,e.offSize]}},{key:"compileNameIndex",value:function(e){var t,r=new ec,A=Ys(e);try{for(A.s();!(t=A.n()).done;){for(var n=t.value,i=Math.min(n.length,127),a=new Array(i),o=0;o"~"||"["===s||"]"===s||"("===s||")"===s||"{"===s||"}"===s||"<"===s||">"===s||"/"===s||"%"===s)&&(s="_"),a[o]=s}""===(a=a.join(""))&&(a="Bad_Font_Name"),r.add(ie(a))}}catch(e){A.e(e)}finally{A.f()}return this.compileIndex(r)}},{key:"compileTopDicts",value:function(e,t,r){var A,n=[],i=new ec,a=Ys(e);try{for(a.s();!(A=a.n()).done;){var o=A.value;r&&(o.removeByName("CIDFontVersion"),o.removeByName("CIDFontRevision"),o.removeByName("CIDFontType"),o.removeByName("CIDCount"),o.removeByName("UIDBase"));var s=new gc,c=this.compileDict(o,s);n.push(s),i.add(c),s.offset(t)}}catch(e){a.e(e)}finally{a.f()}return{trackers:n,output:i=this.compileIndex(i,n)}}},{key:"compilePrivateDicts",value:function(e,t,r){for(var A=0,n=e.length;A>8&255,255&i]);else{(n=new Uint8Array(1+2*i))[0]=0;for(var a=0,o=e.charset.length,s=!1,c=1;c>8&255,n[c+1]=255&g}}return this.compileTypedArray(n)}},{key:"compileEncoding",value:function(e){return this.compileTypedArray(e.raw)}},{key:"compileFDSelect",value:function(e){var t,r,A=e.format;switch(A){case 0:for((t=new Uint8Array(1+e.fdSelect.length))[0]=A,r=0;r>8&255,255&r,a),n=a)}var o=(i.length-3)/3;i[1]=o>>8&255,i[2]=255&o,i.push(r>>8&255,255&r),t=new Uint8Array(i)}return this.compileTypedArray(t)}},{key:"compileTypedArray",value:function(e){return Array.from(e)}},{key:"compileIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.objects,A=r.length;if(0===A)return[0,0];var n,i,a=[A>>8&255,255&A],o=1;for(n=0;n>8&255,255&s):3===i?a.push(s>>16&255,s>>8&255,255&s):a.push(s>>>24&255,s>>16&255,s>>8&255,255&s),r[n]&&(s+=r[n].length);for(n=0;n=5&&n<=7))return-1;A=e.substring(1)}if(A===A.toUpperCase()&&(r=parseInt(A,16))>=0)return r}return-1}var Cc=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function Bc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(-1!==t)for(var r=Cc[t],A=0,n=r.length;A=r[A]&&e<=r[A+1])return t;for(var i=0,a=Cc.length;i=o[s]&&e<=o[s+1])return i;return-1}var Qc=new RegExp("^(\\\\s)|(\\\\p{Mn})|(\\\\p{Cf})$","u"),Ec=new Map,dc=!0,yc=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function pc(e,t){if(void 0!==t[e])return e;var r=fc(e,t);if(-1!==r)for(var A in t)if(t[A]===r)return A;return T("Unable to recover a standard glyph name for: "+e),e}function vc(e,t,r){var A,n,i,a=Object.create(null),o=!!(4&e.flags);if(e.isInternalFont)for(i=t,n=0;n=0?A:0;else if(e.baseEncodingName)for(i=Rs(e.baseEncodingName),n=0;n=0?A:0;else if(o)for(n in t)a[n]=t[n];else for(i=Ds,n=0;n=0?A:0;var s,c=e.differences;if(c)for(n in c){var g=c[n];if(-1===(A=r.indexOf(g))){s||(s=lc());var u=pc(g,s);u!==g&&(A=r.indexOf(u))}a[n]=A>=0?A:0}return a}function mc(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\\s/g,"")}var wc=ft((function(e){e[8211]=65074,e[8212]=65073,e[8229]=65072,e[8230]=65049,e[12289]=65041,e[12290]=65042,e[12296]=65087,e[12297]=65088,e[12298]=65085,e[12299]=65086,e[12300]=65089,e[12301]=65090,e[12302]=65091,e[12303]=65092,e[12304]=65083,e[12305]=65084,e[12308]=65081,e[12309]=65082,e[12310]=65047,e[12311]=65048,e[65103]=65076,e[65281]=65045,e[65288]=65077,e[65289]=65078,e[65292]=65040,e[65306]=65043,e[65307]=65044,e[65311]=65046,e[65339]=65095,e[65341]=65096,e[65343]=65075,e[65371]=65079,e[65373]=65080})),bc=ft((function(e){e["Times-Roman"]="Times-Roman",e.Helvetica="Helvetica",e.Courier="Courier",e.Symbol="Symbol",e["Times-Bold"]="Times-Bold",e["Helvetica-Bold"]="Helvetica-Bold",e["Courier-Bold"]="Courier-Bold",e.ZapfDingbats="ZapfDingbats",e["Times-Italic"]="Times-Italic",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Courier-Oblique"]="Courier-Oblique",e["Times-BoldItalic"]="Times-BoldItalic",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Courier-BoldOblique"]="Courier-BoldOblique",e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",e["Arial-BoldMT-Bold"]="Helvetica-Bold",e["Arial-ItalicMT-Italic"]="Helvetica-Oblique",e.ArialUnicodeMS="Helvetica",e["ArialUnicodeMS-Bold"]="Helvetica-Bold",e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",e["ArialUnicodeMS-Italic"]="Helvetica-Oblique",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"})),kc=ft((function(e){e.Courier="FoxitFixed.pfb",e["Courier-Bold"]="FoxitFixedBold.pfb",e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",e["Courier-Oblique"]="FoxitFixedItalic.pfb",e.Helvetica="LiberationSans-Regular.ttf",e["Helvetica-Bold"]="LiberationSans-Bold.ttf",e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",e["Helvetica-Oblique"]="LiberationSans-Italic.ttf",e["Times-Roman"]="FoxitSerif.pfb",e["Times-Bold"]="FoxitSerifBold.pfb",e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",e["Times-Italic"]="FoxitSerifItalic.pfb",e.Symbol="FoxitSymbol.pfb",e.ZapfDingbats="FoxitDingbats.pfb",e["LiberationSans-Regular"]="LiberationSans-Regular.ttf",e["LiberationSans-Bold"]="LiberationSans-Bold.ttf",e["LiberationSans-Italic"]="LiberationSans-Italic.ttf",e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"})),Dc=ft((function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e.GillSansMT="Helvetica",e["GillSansMT-Bold"]="Helvetica-Bold",e["GillSansMT-BoldItalic"]="Helvetica-BoldOblique",e["GillSansMT-Italic"]="Helvetica-Oblique",e.Impact="Helvetica",e["ItcSymbol-Bold"]="Helvetica-Bold",e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",e["ItcSymbol-Book"]="Helvetica",e["ItcSymbol-BookItalic"]="Helvetica-Oblique",e["ItcSymbol-Medium"]="Helvetica",e["ItcSymbol-MediumItalic"]="Helvetica-Oblique",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica"})),Sc=ft((function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e.LiberationSerif=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0})),Fc=ft((function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0,e.Wingdings=!0,e["Wingdings-Bold"]=!0,e["Wingdings-Regular"]=!0})),xc=ft((function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[179]=8220,e[180]=8221,e[181]=8216,e[182]=8217,e[200]=193,e[203]=205,e[207]=211,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[226]=352,e[227]=353,e[228]=381,e[229]=382,e[233]=221,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[267]=282,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[283]=344,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[672]=1488,e[673]=1489,e[674]=1490,e[675]=1491,e[676]=1492,e[677]=1493,e[678]=1494,e[679]=1495,e[680]=1496,e[681]=1497,e[682]=1498,e[683]=1499,e[684]=1500,e[685]=1501,e[686]=1502,e[687]=1503,e[688]=1504,e[689]=1505,e[690]=1506,e[691]=1507,e[692]=1508,e[693]=1509,e[694]=1510,e[695]=1511,e[696]=1512,e[697]=1513,e[698]=1514,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377})),Rc=ft((function(e){e[227]=322,e[264]=261,e[291]=346})),Gc=ft((function(e){e[1]=32,e[4]=65,e[5]=192,e[6]=193,e[9]=196,e[17]=66,e[18]=67,e[21]=268,e[24]=68,e[28]=69,e[29]=200,e[30]=201,e[32]=282,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[48]=204,e[49]=205,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[76]=210,e[80]=214,e[87]=80,e[89]=81,e[90]=82,e[92]=344,e[94]=83,e[97]=352,e[100]=84,e[104]=85,e[109]=220,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[124]=221,e[127]=90,e[129]=381,e[258]=97,e[259]=224,e[260]=225,e[263]=228,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[275]=269,e[282]=100,e[286]=101,e[287]=232,e[288]=233,e[290]=283,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[350]=236,e[351]=237,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[382]=242,e[383]=243,e[386]=246,e[393]=112,e[395]=113,e[396]=114,e[398]=345,e[400]=115,e[401]=347,e[403]=353,e[410]=116,e[437]=117,e[442]=252,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[457]=253,e[460]=122,e[462]=382,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45}));function Nc(e){var t=mc(e);return bc()[t]}function Lc(e){var t=mc(e);return!!(bc()[t]||Dc()[t]||Sc()[t]||Fc()[t])}function Uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mc(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];Uc(this,e),this._map=t}),[{key:"length",get:function(){return this._map.length}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this._map[t].charCodeAt(0))}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"get",value:function(e){return this._map[e]}},{key:"charCodeOf",value:function(e){var t=this._map;if(t.length<=65536)return t.indexOf(e);for(var r in t)if(t[r]===e)return 0|r;return-1}},{key:"amend",value:function(e){for(var t in e)this._map[t]=e[t]}}])}(),Pc=function(){return Jc((function e(t,r){Uc(this,e),this.firstChar=t,this.lastChar=r}),[{key:"length",get:function(){return this.lastChar+1-this.firstChar}},{key:"forEach",value:function(e){for(var t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)}},{key:"has",value:function(e){return this.firstChar<=e&&e<=this.lastChar}},{key:"get",value:function(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}},{key:"charCodeOf",value:function(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}},{key:"amend",value:function(e){j("Should not call amend()")}}])}();function Oc(e,t){for(var r=0;r0){o=Object.create(null);for(var c=0,g=n.length;c=0){var s=A[o];s&&(i[a]=s)}}i.length>0&&(this.properties.builtInEncoding=i)}}}])&&Oc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function qc(e,t,r){return t=Wc(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jc()?Reflect.construct(t,r||[],Wc(e).constructor):t.apply(e,r))}function jc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jc=function(){return!!e})()}function Wc(e){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wc(e)}function Zc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}function _c(e,t){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_c(e,t)}function Xc(e){return function(e){if(Array.isArray(e))return Vc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Vc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>>0}function Ag(e,t){return e[t]<<8|e[t+1]}function ng(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function ig(e,t){return e[t]<<24>>24}function ag(e,t){return ng(e,t)/16384}function og(e){var t=e.length,r=32768;return t<1240?r=107:t<33900&&(r=1131),r}function sg(e,t,r){var A,n,i,a=1===Ag(e,t+2)?rg(e,t+8):rg(e,t+16),o=Ag(e,t+a);if(4===o){Ag(e,t+a+2);var s=Ag(e,t+a+6)>>1;for(n=t+a+14,A=[],i=0;i>1;r0;)v.push({flags:a})}for(E=0;E>1,h=!0;break;case 4:c+=o.pop(),n(s,c),h=!0;break;case 5:for(;o.length>0;)s+=o.shift(),c+=o.shift(),i(s,c);break;case 6:for(;o.length>0&&(i(s+=o.shift(),c),0!==o.length);)c+=o.shift(),i(s,c);break;case 7:for(;o.length>0&&(c+=o.shift(),i(s,c),0!==o.length);)i(s+=o.shift(),c);break;case 8:for(;o.length>0;)f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 10:if(y=o.pop(),p=null,r.isCFFCIDFont){var v=r.fdSelect.getFDIndex(A);if(v>=0&&vMath.abs(c-D)?s+=o.shift():c+=o.shift(),a(f,B,C,Q,s,c);break;default:throw new re("unknown operator: 12 ".concat(I))}break;case 14:if(o.length>=4){var S=o.pop(),F=o.pop();c=o.pop(),s=o.pop(),t.add(5),t.add(8,[s,c]);var x=gg(r.cmap,String.fromCharCode(r.glyphNameMap[Ds[S]]));lg(r.glyphs[x.glyphId],t,r,x.glyphId),t.add(4),x=gg(r.cmap,String.fromCharCode(r.glyphNameMap[Ds[F]])),lg(r.glyphs[x.glyphId],t,r,x.glyphId)}return;case 19:case 20:l+=(g+=o.length>>1)+7>>3,h=!0;break;case 21:c+=o.pop(),n(s+=o.pop(),c),h=!0;break;case 22:n(s+=o.pop(),c),h=!0;break;case 24:for(;o.length>2;)f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);s+=o.shift(),c+=o.shift(),i(s,c);break;case 25:for(;o.length>6;)s+=o.shift(),c+=o.shift(),i(s,c);f=s+o.shift(),B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 26:for(o.length%2&&(s+=o.shift());o.length>0;)f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C,c=Q+o.shift(),a(f,B,C,Q,s,c);break;case 27:for(o.length%2&&(c+=o.shift());o.length>0;)a(f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q);break;case 28:o.push((u[l]<<24|u[l+1]<<16)>>16),l+=2;break;case 29:y=o.pop()+r.gsubrsBias,(p=r.gsubrs[y])&&e(p);break;case 30:for(;o.length>0&&(f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+(1===o.length?o.shift():0),a(f,B,C,Q,s,c),0!==o.length);)f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s=C+(1===o.length?o.shift():0),c);break;case 31:for(;o.length>0&&(f=s+o.shift(),B=c,C=f+o.shift(),Q=B+o.shift(),c=Q+o.shift(),a(f,B,C,Q,s=C+(1===o.length?o.shift():0),c),0!==o.length);)f=s,B=c+o.shift(),C=f+o.shift(),Q=B+o.shift(),s=C+o.shift(),c=Q+(1===o.length?o.shift():0),a(f,B,C,Q,s,c);break;default:if(I<32)throw new re("unknown operator: ".concat(I));I<247?o.push(I-139):I<251?o.push(256*(I-247)+u[l++]+108):I<255?o.push(256*-(I-251)-u[l++]-108):(o.push((u[l]<<24|u[l+1]<<16|u[l+2]<<8|u[l+3])/65536),l+=4)}h&&(o.length=0)}}(e)}var hg=[],Ig=function(){return eg((function e(){var t,r,A;zc(this,e),t=this,A=[],(r=tg(r="cmds"))in t?Object.defineProperty(t,r,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[r]=A}),[{key:"add",value:function(e,t){if(t)if(St(t,null)){var r;(r=this.cmds).push.apply(r,[e].concat(Xc(t)))}else{var A;q('Commands.add - "'.concat(e,'" has at least one non-number arg: "').concat(t,'".'));var n=t.map((function(e){return"number"==typeof e?e:0}));(A=this.cmds).push.apply(A,[e].concat(Xc(n)))}else this.cmds.push(e)}}])}(),fg=function(){return eg((function e(t){zc(this,e),this.fontMatrix=t,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}),[{key:"getPathJs",value:function(e){var t,r,A,n=gg(this.cmap,e),i=n.charCode,a=n.glyphId,o=this.compiledGlyphs[a];if(!o){try{o=this.compileGlyph(this.glyphs[a],a)}catch(e){o=hg,A=e}this.compiledGlyphs[a]=o}if(null!==(r=(t=this.compiledCharCodeToGlyphId)[i])&&void 0!==r||(t[i]=a),A)throw A;return o}},{key:"compileGlyph",value:function(e,t){if(!e||0===e.length||14===e[0])return hg;var r=this.fontMatrix;if(this.isCFFCIDFont){var A=this.fdSelect.getFDIndex(t);A>=0&&A=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function vg(e,t){if(e){if("string"==typeof e)return mg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mg(e,t):void 0}}function mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r131070,A=r?4:2,n=new DataView(new ArrayBuffer((this.glyphs.length+1)*A));r?n.setUint32(0,0):n.setUint16(0,0);var i,a=0,o=0,s=pg(this.glyphs);try{for(s.s();!(i=s.n()).done;)a=(a+=i.value.write(a,t))+3&-4,o+=A,r?n.setUint32(o,a):n.setUint16(o,a>>1)}catch(e){s.e(e)}finally{s.f()}return{isLocationLong:r,loca:new Uint8Array(n.buffer),glyf:new Uint8Array(t.buffer)}}},{key:"scale",value:function(e){for(var t=0,r=this.glyphs.length;t255?t+=2:g>0&&(t+=1),r=s,(g=Math.abs(c-A))>255?t+=2:g>0&&(t+=1),A=c}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"write",value:function(e,t){var r,A=e,n=[],i=[],a=[],o=0,s=0,c=pg(this.contours);try{for(c.s();!(r=c.n()).done;){for(var g=r.value,u=0,l=g.xCoordinates.length;u=0?18:2,n.push(C)):n.push(f)}o=I;var B=g.yCoordinates[u];if(0==(f=B-s))h|=32,i.push(0);else{var Q=Math.abs(f);Q<=255?(h|=f>=0?36:4,i.push(Q)):i.push(f)}s=B,a.push(h)}t.setUint16(e,n.length-1),e+=2}}catch(e){c.e(e)}finally{c.f()}t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length);for(var E=0,d=a;E=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2),e}},{key:"write",value:function(e,t){var r=e;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),t.setUint16(e,this.flags),t.setUint16(e+2,this.glyphIndex),e+=4,1&this.flags?(2&this.flags?(t.setInt16(e,this.argument1),t.setInt16(e+2,this.argument2)):(t.setUint16(e,this.argument1),t.setUint16(e+2,this.argument2)),e+=4):(t.setUint8(e,this.argument1),t.setUint8(e+1,this.argument2),e+=2),256&this.flags&&(t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length)),e-r}},{key:"scale",value:function(e,t){}}],[{key:"parse",value:function(t,r){var A,n,i=t,a=[],o=r.getUint16(t),s=r.getUint16(t+2);t+=4,1&o?(2&o?(A=r.getInt16(t),n=r.getInt16(t+2)):(A=r.getUint16(t),n=r.getUint16(t+2)),t+=4,o^=1):(2&o?(A=r.getInt8(t),n=r.getInt8(t+1)):(A=r.getUint8(t),n=r.getUint8(t+1)),t+=2),8&o?(a.push(r.getUint16(t)),t+=2):64&o?(a.push(r.getUint16(t),r.getUint16(t+2)),t+=4):128&o&&(a.push(r.getUint16(t),r.getUint16(t+2),r.getUint16(t+4),r.getUint16(t+6)),t+=8);var c=null;if(256&o){var g=r.getUint16(t);t+=2,c=new Uint8Array(r).slice(t,t+g),t+=g}return[t-i,new e({flags:o,glyphIndex:s,argument1:A,argument2:n,transf:a,instructions:c})]}}])}();function Lg(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,A=Array(t);r>8&255,e[t+1]=255&r}function Hg(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function Yg(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(var A=0,n=r.length;A=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(r);try{for(a.s();!(i=a.n()).done;){var o=i.value;e[t++]=255&o}}catch(e){a.e(e)}finally{a.f()}}}var Pg=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sfnt=t,this.tables=Object.create(null)}return t=e,A=[{key:"getSearchParams",value:function(e,t){for(var r=1,A=0;(r^e)>r;)r<<=1,A++;var n=r*t;return{range:n,entry:A,rangeShift:t*e-n}}}],(r=[{key:"toArray",value:function(){var t=this.sfnt,r=this.tables,A=Object.keys(r);A.sort();var n,i,a,o,s,c=A.length,g=12+16*c,u=[g];for(n=0;n>>0,u.push(g);var l=new Uint8Array(g);for(n=0;n>>0;Hg(l,g+4,I),Hg(l,g+8,u[n]),Hg(l,g+12,r[s].length),g+=16}return l}},{key:"addTable",value:function(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}])&&Lg(t.prototype,r),A&&Lg(t,A),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,A}();function Og(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);rn)return!0;for(var i=n-e,a=i;a>8&255,255&o):(o=65536*o|0,this.output.push(255,o>>24&255,o>>16&255,o>>8&255,255&o))}return(A=this.output).push.apply(A,function(e){return function(e){if(Array.isArray(e))return Og(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Og(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Og(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)),r?this.stack.splice(i,e):this.stack.length=0,!1}}])}();function iu(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function au(e,t,r){if(r>=e.length)return new Uint8Array(0);var A,n,i=0|t;for(A=0;A>8,i=52845*(s+i)+22719&65535}return o}function ou(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}var su=function(){return qg((function e(t,r,A){if(Kg(this,e),r){var n=t.getBytes(),i=!((iu(n[0])||Dt(n[0]))&&iu(n[1])&&iu(n[2])&&iu(n[3])&&iu(n[4])&&iu(n[5])&&iu(n[6])&&iu(n[7]));t=new ar(i?au(n,55665,4):function(e,t,r){var A,n,i=55665,a=e.length,o=new Uint8Array(a>>>1);for(A=0,n=0;A>8,i=52845*(g+i)+22719&65535}}}return o.slice(4,n)}(n))}this.seacAnalysisEnabled=!!A,this.stream=t,this.nextChar()}),[{key:"readNumberArray",value:function(){this.getToken();for(var e=[];;){var t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}},{key:"readNumber",value:function(){var e=this.getToken();return parseFloat(e||0)}},{key:"readInt",value:function(){var e=this.getToken();return 0|parseInt(e||0,10)}},{key:"readBoolean",value:function(){return"true"===this.getToken()?1:0}},{key:"nextChar",value:function(){return this.currentChar=this.stream.getByte()}},{key:"prevChar",value:function(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}},{key:"getToken",value:function(){for(var e=!1,t=this.currentChar;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!Dt(t))break;t=this.nextChar()}if(ou(t))return this.nextChar(),String.fromCharCode(t);var r="";do{r+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!Dt(t)&&!ou(t));return r}},{key:"readCharStrings",value:function(e,t){return-1===t?e:au(e,4330,t)}},{key:"extractFontProgram",value:function(e){var t=this.stream,r=[],A=[],n=Object.create(null);n.lenIV=4;for(var i,a,o,s,c={subrs:[],charstrings:[],properties:{privateData:n}};null!==(i=this.getToken());)if("/"===i)switch(i=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();null!==(i=this.getToken())&&"end"!==i;)if("/"===i){var g=this.getToken();a=this.readInt(),this.getToken(),o=a>0?t.getBytes(a):new Uint8Array(0),s=c.properties.privateData.lenIV;var u=this.readCharStrings(o,s);this.nextChar(),"noaccess"===(i=this.getToken())?this.getToken():"/"===i&&this.prevChar(),A.push({glyph:g,encoded:u})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){var l=this.readInt();a=this.readInt(),this.getToken(),o=a>0?t.getBytes(a):new Uint8Array(0),s=c.properties.privateData.lenIV;var h=this.readCharStrings(o,s);this.nextChar(),"noaccess"===(i=this.getToken())&&this.getToken(),r[l]=h}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var I=this.readNumberArray();I.length>0&&I.length;break;case"StemSnapH":case"StemSnapV":c.properties.privateData[i]=this.readNumberArray();break;case"StdHW":case"StdVW":c.properties.privateData[i]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":c.properties.privateData[i]=this.readNumber();break;case"ExpansionFactor":c.properties.privateData[i]=this.readNumber()||.06;break;case"ForceBold":c.properties.privateData[i]=this.readBoolean()}for(var f=0,C=A;f-1&&void 0===e.widths[m]&&m>=e.firstChar&&m<=e.lastChar&&(e.widths[m]=d.width)}}return c}},{key:"extractFontHeader",value:function(e){for(var t;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken()){case"FontMatrix":var r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":var A=this.getToken(),n=void 0;if(/^\\d+$/.test(A)){n=[];var i=0|parseInt(A,10);this.getToken();for(var a=0;a=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function gu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=n){for(a+=s;a=0&&(i[c]=a);return vc(e,i,o)}},{key:"hasGlyphId",value:function(e){return!(e<0||e>=this.numGlyphs)&&(0===e||this.charstrings[e-1].charstring.length>0)}},{key:"getSeacs",value:function(e){for(var t=[],r=0,A=e.length;r0;Q--)B[Q]-=B[Q-1];I.setByName(C,B)}}i.topDict.privateDict=I;var E=new ec;for(s=0,c=A.length;s=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function pu(e,t){if(e){if("string"==typeof e)return vu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vu(e,t):void 0}}function vu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&e.toUnicode.amend(t)}}var Fu=function(){return Eu((function e(t,r,A,n,i,a,o,s,c){Bu(this,e),this.originalCharCode=t,this.fontChar=r,this.unicode=A,this.accent=n,this.width=i,this.vmetric=a,this.operatorListId=o,this.isSpace=s,this.isInFont=c}),[{key:"category",get:function(){return _(this,"category",function(e){var t=Ec.get(e);if(t)return t;var r=e.match(Qc),A={isWhitespace:!(null==r||!r[1]),isZeroWidthDiacritic:!(null==r||!r[2]),isInvisibleFormatMark:!(null==r||!r[3])};return Ec.set(e,A),A}(this.unicode),!0)}}])}();function xu(e,t){return(e<<8)+t}function Ru(e,t,r){e[t+1]=r,e[t]=r>>>8}function Gu(e,t){var r=(e<<8)+t;return 32768&r?r-65536:r}function Nu(e){return String.fromCharCode(e>>8&255,255&e)}function Lu(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function Uu(e){return"ttcf"===ne(e.peekBytes(4))}function Mu(e,t){for(var r in t)e[+r]=t[r]}function Ju(e,t,r){for(var A,n=[],i=0,a=e.length;i2&&void 0!==arguments[2]&&arguments[2];switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}var A="Unsupported CID string (charCode ".concat(e,'): "').concat(t,'".');if(r)throw new re(A);return q(A),t}function Ou(e,t,r,A){var n,i=Object.create(null),a=new Map,o=[],s=new Set,c=0,g=mu[c][0],u=mu[c][1];for(var l in e){var h=e[l];if(t(h)){if(g>u){if(++c>=mu.length){q("Ran out of space in font private use area.");break}g=mu[c][0],u=mu[c][1]}var I=g++;0===h&&(h=r);var f=A.get(l);"string"==typeof f&&(f=f.codePointAt(0)),!f||(n=f,mu[0][0]<=n&&n<=mu[0][1]||mu[1][0]<=n&&n<=mu[1][1])||s.has(h)||(a.set(f,h),s.add(h)),i[I]=h,o[l]=I}}return{toFontChar:o,charCodeToGlyphId:i,toUnicodeExtraMap:a,nextAvailableFontCharCode:g}}function Ku(e,t,r){var A,n,i,a,o=function(e,t,r){var A=[];for(var n in e)e[n]>=r||A.push({fontCharCode:0|n,glyphId:e[n]});if(t){var i,a=yu(t);try{for(a.s();!(i=a.n()).done;){var o=Cu(i.value,2),s=o[0],c=o[1];c>=r||A.push({fontCharCode:s,glyphId:c})}}catch(e){a.e(e)}finally{a.f()}}0===A.length&&A.push({fontCharCode:0,glyphId:0}),A.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));for(var g=[],u=A.length,l=0;l65535?2:1,c="\\0\\0"+Nu(s)+"\\0\\0"+ae(4+8*s);for(A=o.length-1;A>=0&&!(o[A][0]<=65535);--A);var g=A+1;o[A][0]<65535&&65535===o[A][1]&&(o[A][1]=65534);var u,l,h,I,f=o[A][1]<65535?1:0,C=g+f,B=Pg.getSearchParams(C,2),Q="",E="",d="",y="",p="",v=0;for(A=0,n=g;A0&&(E+="ÿÿ",Q+="ÿÿ",d+="\\0",y+="\\0\\0");var b="\\0\\0"+Nu(2*C)+Nu(B.range)+Nu(B.entry)+Nu(B.rangeShift)+E+"\\0\\0"+Q+d+y+p,k="",D="";if(s>1){for(c+="\\0\\0\\n"+ae(4+8*s+4+b.length),k="",A=0,n=o.length;A(g|=0)||!o)&&(o=g),s 123 are reserved for internal usage");a|=1<65535&&(s=65535)}else o=0,s=255;var u=e.bbox||[0,0,0,0],l=r.unitsPerEm||(e.fontMatrix?1/Math.max.apply(Math,fu(e.fontMatrix.slice(0,4).map(Math.abs))):1e3),h=e.ascentScaled?1:l/wu,I=r.ascent||Math.round(h*(e.ascent||u[3])),f=r.descent||Math.round(h*(e.descent||u[1]));f>0&&e.descent>0&&u[1]<0&&(f=-f);var C=r.yMax||I,B=-r.yMin||-f;return"\\0$ô\\0\\0\\0Š»\\0\\0\\0ŒŠ»\\0\\0ß\\x001\\0\\0\\0\\0"+String.fromCharCode(e.fixedPitch?9:0)+"\\0\\0\\0\\0\\0\\0"+ae(A)+ae(n)+ae(i)+ae(a)+"*21*"+Nu(e.italicAngle?1:0)+Nu(o||e.firstChar)+Nu(s||e.lastChar)+Nu(I)+Nu(f)+"\\0d"+Nu(C)+Nu(B)+"\\0\\0\\0\\0\\0\\0\\0\\0"+Nu(e.xHeight)+Nu(e.capHeight)+Nu(0)+Nu(o||e.firstChar)+"\\0"}function qu(e){return"\\0\\0\\0"+ae(Math.floor(e.italicAngle*Math.pow(2,16)))+"\\0\\0\\0\\0"+ae(e.fixedPitch?1:0)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"}function ju(e){return e.replaceAll(/[^\\x21-\\x7E]|[[\\](){}<>/%]/g,"").slice(0,63)}function Wu(e,t){t||(t=[[],[]]);var r,A,n,i,a,o=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||ju(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],s=[];for(r=0,A=o.length;r=1&&t[3]>=1&&t[3]<=4}(e)?a?(r="CIDFontType0",A="CIDFontType0C"):(r="MMType1"===n?"MMType1":"Type1",A="Type1C"):(q("getFontFileType: Unable to detect correct font file Type/Subtype."),r=n,A=i),[r,A]}(r,A),2);g=I[0],u=I[1],g===this.type&&u===this.subtype||T("Inconsistent font file Type/SubType, expected: "+"".concat(this.type,"/").concat(this.subtype," but found: ").concat(g,"/").concat(u,"."));try{switch(g){case"MMType1":T("MMType1 font ("+t+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var f="Type1C"===u||"CIDFontType0C"===u?new Tc(r,A):new Iu(t,r,A);Du(A),h=this.convert(t,f,A);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",h=this.checkAndRepair(t,r,A),this.isOpenType&&(Du(A),g="OpenType");break;default:throw new re("Font ".concat(g," is not supported"))}}catch(e){return q(e),void this.fallbackToSystemFont(A)}Su(A),this.data=h,this.type=g,this.subtype=u,this.fontMatrix=A.fontMatrix,this.widths=A.widths,this.defaultWidth=A.defaultWidth,this.toUnicode=A.toUnicode,this.seacMap=A.seacMap}else for(var C=0;C<256;C++)this.toFontChar[C]=this.differences[C]||A.defaultEncoding[C]}),[{key:"renderer",get:function(){return _(this,"renderer",Qg.create(this,dc))}},{key:"exportData",value:function(){var e,t,r,A=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?[].concat(bu,ku):bu,n=Object.create(null),i=yu(A);try{for(i.s();!(r=i.n()).done;)void 0!==(t=this[e=r.value])&&(n[e]=t)}catch(e){i.e(e)}finally{i.f()}return n}},{key:"fallbackToSystemFont",value:function(e){var t=this;this.missingFile=!0;var r=this.name,A=this.type,n=mc(r),i=bc(),a=Dc(),o=!!i[n],s=!(!a[n]||!i[a[n]]);n=i[n]||a[n]||n;var c=dg()[n];c&&(isNaN(this.ascent)&&(this.ascent=c.ascent/wu),isNaN(this.descent)&&(this.descent=c.descent/wu),isNaN(this.capHeight)&&(this.capHeight=c.capHeight/wu)),this.bold=/bold/gi.test(n),this.italic=/oblique|italic/gi.test(n),this.black=/Black/g.test(r);var g=/Narrow/g.test(r);if(this.remeasure=(!o||g)&&Object.keys(this.widths).length>0,(o||s)&&"CIDFontType2"===A&&this.cidEncoding.startsWith("Identity-")){var u=e.cidToGidMap,l=[];if(Mu(l,xc()),/Arial-?Black/i.test(r)?Mu(l,Rc()):/Calibri/i.test(r)&&Mu(l,Gc()),u){for(var h in l){var I=l[h];void 0!==u[I]&&(l[+h]=u[I])}u.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof Pc&&this.toUnicode.forEach((function(e,t){var r=l[e];void 0===u[r]&&(l[+e]=t)}))}this.toUnicode instanceof Pc||this.toUnicode.forEach((function(e,t){l[+e]=t})),this.toFontChar=l,this.toUnicode=new Yc(l)}else if(/Symbol/i.test(n))this.toFontChar=Ju(Fs,lc(),this.differences);else if(/Dingbats/i.test(n))this.toFontChar=Ju(xs,hc(),this.differences);else if(o||s){var f=Ju(this.defaultEncoding,lc(),this.differences);"CIDFontType2"!==A||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof Pc||this.toUnicode.forEach((function(e,t){f[+e]=t})),this.toFontChar=f}else{var C=lc(),B=[];this.toUnicode.forEach((function(e,r){if(!t.composite){var A=fc(t.differences[e]||t.defaultEncoding[e],C);-1!==A&&(r=A)}B[+e]=r})),this.composite&&this.toUnicode instanceof Pc&&/Tahoma|Verdana/i.test(r)&&Mu(B,xc()),this.toFontChar=B}Su(e),this.loadedName=n.split("-",1)[0]}},{key:"checkAndRepair",value:function(e,t,r){var A,n,i=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function a(e,t){var r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(var A=0;A>>0,A=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.pos;e.pos=e.start||0,e.skip(A);var a=e.getBytes(n);return e.pos=i,"head"===t&&(a[8]=a[9]=a[10]=a[11]=0,a[17]|=32),{tag:t,checksum:r,length:n,offset:A,data:a}}function s(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function c(e,t,r,A,n,i){var a={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||r>e.length||r-t<=12)return a;var o=e.subarray(t,r),s=Gu(o[2],o[3]),c=Gu(o[4],o[5]),g=Gu(o[6],o[7]),u=Gu(o[8],o[9]);s>g&&(Ru(o,2,g),Ru(o,6,s)),c>u&&(Ru(o,4,u),Ru(o,8,c));var l=Gu(o[0],o[1]);if(l<0)return l<-1||(A.set(o,n),a.length=o.length),a;var h,I=10,f=0;for(h=0;ho.length?a:!i&&B>0?(A.set(o.subarray(0,C),n),A.set([0,0],n+C),A.set(o.subarray(Q,w),n+C+2),w-=B,o.length-w>3&&(w=w+3&-4),a.length=w,a):o.length-w>3?(w=w+3&-4,A.set(o.subarray(0,w),n),a.length=w,a):(A.set(o,n),a.length=o.length,a)}function g(e){var r=(t.start||0)+e.offset;t.pos=r;var A=[[],[]],n=[],i=e.length,a=r+i;if(0!==t.getUint16()||i<6)return[A,n];var o,s,c=t.getUint16(),g=t.getUint16();for(o=0;oa)){t.pos=h;var I=l.name;if(l.encoding){for(var f="",C=0,B=l.length;C0&&(s+=y-1)}}else(C||Q)&&(q("TT: nested FDEFs not allowed"),I=!0),C=!0,g=s,i=u.pop(),t.functionsDefined[i]={data:o,i:s};else if(!C&&!Q)if(i=u.at(-1),isNaN(i))T("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[i]=!0,i in t.functionsStackDeltas){var p=u.length+t.functionsStackDeltas[i];if(p<0)return q("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);u.length=p}else if(i in t.functionsDefined&&!h.includes(i)){if(l.push({data:o,i:s,stackTop:u.length-1}),h.push(i),!(a=t.functionsDefined[i]))return q("TT: CALL non-existent function"),void(t.hintsValid=!1);o=a.data,s=a.i}if(!C&&!Q){var v=0;for(d<=142?v=f[d]:d>=192&&d<=223?v=-1:d>=224&&(v=-2),d>=113&&d<=117&&(A=u.pop(),isNaN(A)||(v=2*-A));v<0&&u.length>0;)u.pop(),v++;for(;v>0;)u.push(NaN),v--}}t.tooComplexToFollowFunctions=I;var m=[o];s>o.length&&m.push(new Uint8Array(s-o.length)),g>c&&(q("TT: complementing a missing function tail"),m.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){var r,A,n=0;for(r=0,A=t.length;r>>0,i=[],a=0;a>>0);var o={ttcTag:t,majorVersion:r,minorVersion:A,numFonts:n,offsetTable:i};switch(r){case 1:return o;case 2:return o.dsigTag=e.getInt32()>>>0,o.dsigLength=e.getInt32()>>>0,o.dsigOffset=e.getInt32()>>>0,o}throw new re("Invalid TrueType Collection majorVersion: ".concat(r,"."))}(e),n=A.numFonts,i=A.offsetTable,o=t.split("+"),c=0;c0||!(r.cMap instanceof ns));if("OTTO"===u.version&&!d||!l.head||!l.hhea||!l.maxp||!l.post)return I=new ar(l["CFF "].data),h=new Tc(I,r),Du(r),this.convert(e,h,r);delete l.glyf,delete l.loca,delete l.fpgm,delete l.prep,delete l["cvt "],this.isOpenType=!0}if(!l.maxp)throw new re('Required "maxp" table is not found');t.pos=(t.start||0)+l.maxp.offset;var y,p,v=t.getInt32(),m=t.getUint16();if(65536!==v&&20480!==v){if(6===l.maxp.length)v=20480;else{if(!(l.maxp.length>=32))throw new re('"maxp" table has a wrong version number');v=65536}p=v,(y=l.maxp.data)[3+0]=255&p,y[2]=p>>>8,y[1]=p>>>16,y[0]=p>>>24}if((null===(A=r.scaleFactors)||void 0===A?void 0:A.length)===m&&Q){var w=r.scaleFactors,b=xu(l.head.data[50],l.head.data[51]),k=new Sg({glyfTable:l.glyf.data,isGlyphLocationsLong:b,locaTable:l.loca.data,numGlyphs:m});k.scale(w);var D=k.write(),S=D.glyf,F=D.loca,x=D.isLocationLong;l.glyf.data=S,l.loca.data=F,x!==!!b&&(l.head.data[50]=0,l.head.data[51]=x?1:0);for(var R=l.hmtx.data,G=0;G>8&255,R[N+1]=255&L,Ru(R,N+2,Math.round(w[G]*Gu(R[N+2],R[N+3])))}}var U=m+1,M=!0;U>65535&&(M=!1,U=m,q("Not enough space in glyfs to duplicate first glyph."));var J=0,H=0;v>=65536&&l.maxp.length>=32&&(t.pos+=8,t.getUint16()>2&&(l.maxp.data[14]=0,l.maxp.data[15]=2),t.pos+=4,J=t.getUint16(),t.pos+=4,H=t.getUint16()),l.maxp.data[4]=U>>8,l.maxp.data[5]=255&U;var Y=function(e,t,r,A){var n={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&C(e,n),t&&C(t,n),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return q("TT: more functions defined than expected"),void(e.hintsValid=!1);for(var r=0,A=e.functionsUsed.length;rt)return q("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return q("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(n,A),r&&1&r.length){var i=new Uint8Array(r.length+1);i.set(r.data),r.data=i}return n.hintsValid}(l.fpgm,l.prep,l["cvt "],J);if(Y||(delete l.fpgm,delete l.prep,delete l["cvt "]),function(e,t,r,A,n,i){if(t){e.pos=(e.start||0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2;var a=e.getUint16();e.pos+=8,e.pos+=2;var o=e.getUint16();0!==a&&(2&xu(A.data[44],A.data[45])||(t.data[22]=0,t.data[23]=0)),o>n&&(T("The numOfMetrics (".concat(o,") should not be ")+"greater than the numGlyphs (".concat(n,").")),o=n,t.data[34]=(65280&o)>>8,t.data[35]=255&o);var s=n-o-(r.length-4*o>>1);if(s>0){var c=new Uint8Array(r.length+2*s);c.set(r.data),i&&(c[r.length]=r.data[2],c[r.length+1]=r.data[3]),r.data=c}}else r&&(r.data=null)}(t,l.hhea,l.hmtx,l.head,U,M),!l.head)throw new re('Required "head" table is not found');!function(e,t,r){var A=e.data,n=(A[0]<<24)+(A[1]<<16)+(A[2]<<8)+A[3];n>>16!=1&&(T("Attempting to fix invalid version in head table: "+n),A[0]=0,A[1]=1,A[2]=0,A[3]=0);var i=xu(A[50],A[51]);if(i<0||i>1){T("Attempting to fix invalid indexToLocFormat in head table: "+i);var a=t+1;if(r===a<<1)A[50]=0,A[51]=0;else{if(r!==a<<2)throw new re("Could not fix indexToLocFormat: "+i);A[50]=0,A[51]=1}}}(l.head,m,Q?l.loca.length:0);var P=Object.create(null);if(Q){var O=xu(l.head.data[50],l.head.data[51]),K=function(e,t,r,A,n,i,a){var o,s,g;A?(o=4,s=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},g=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(o=2,s=function(e,t){return e[t]<<9|e[t+1]<<1},g=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});var u=i?r+1:r,l=o*(1+u),h=new Uint8Array(l);h.set(e.data.subarray(0,l)),e.data=h;var I,f,C=t.data,B=C.length,Q=new Uint8Array(B),E=[];for(I=0,f=0;IB&&(d=B),E.push({index:I,offset:d,endOffset:0})}for(E.sort((function(e,t){return e.offset-t.offset})),I=0;Ia&&(a=D.sizeOfInstructions),g(h,f,k+=S)}if(0===k){var F=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(I=0,f=o;Ix+k?t.data=Q.subarray(0,x+k):(t.data=new Uint8Array(x+k),t.data.set(Q.subarray(0,k))),t.data.set(Q.subarray(0,x),k),g(e.data,h.length-o,k+x)}else t.data=Q.subarray(0,k);return{missingGlyphs:b,maxSizeOfInstructions:a}}(l.loca,l.glyf,m,O,Y,M,H);P=K.missingGlyphs,v>=65536&&l.maxp.length>=32&&(l.maxp.data[26]=K.maxSizeOfInstructions>>8,l.maxp.data[27]=255&K.maxSizeOfInstructions)}if(!l.hhea)throw new re('Required "hhea" table is not found');0===l.hhea.data[10]&&0===l.hhea.data[11]&&(l.hhea.data[10]=255,l.hhea.data[11]=255);var j={unitsPerEm:xu(l.head.data[18],l.head.data[19]),yMax:Gu(l.head.data[42],l.head.data[43]),yMin:Gu(l.head.data[38],l.head.data[39]),ascent:Gu(l.hhea.data[4],l.hhea.data[5]),descent:Gu(l.hhea.data[6],l.hhea.data[7]),lineGap:Gu(l.hhea.data[8],l.hhea.data[9])};this.ascent=j.ascent/j.unitsPerEm,this.descent=j.descent/j.unitsPerEm,this.lineGap=j.lineGap/j.unitsPerEm,null!==(n=this.cssFontInfo)&&void 0!==n&&n.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,l.post&&function(e,r,A){var n=(t.start||0)+e.offset;t.pos=n;var i,a=n+e.length,o=t.getInt32();t.skip(28);var s,c=!0;switch(o){case 65536:i=yc;break;case 131072:var g=t.getUint16();if(g!==A){c=!1;break}var u=[];for(s=0;s=32768){c=!1;break}u.push(l)}if(!c)break;for(var h=[],I=[];t.pos65535)throw new re("Max size of CID is 65,535");var r=-1;V?r=t:void 0!==X[t]&&(r=X[t]),r>=0&&r>>0,f=!1;if((null===(g=a)||void 0===g?void 0:g.platformId)!==l||(null===(u=a)||void 0===u?void 0:u.encodingId)!==h){if(0!==l||0!==h&&1!==h&&3!==h)if(1===l&&0===h)f=!0;else if(3!==l||1!==h||!A&&a){if(r&&3===l&&0===h){f=!0;var C=!0;if(c>3;m.push(k),w=Math.max(k,w)}for(var D=[],S=0;S<=w;S++)D.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:Gu(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(var F=0;F<256;F++)if(0===m[F])t.pos=D[0].idRangePos+2*F,E=t.getUint16(),p.push({charCode:F,glyphId:E});else{var x=D[m[F]];for(Q=0;Q>1;t.skip(6);var N,L=[];for(N=0;N>1)-(G-N),n.offsetIndex=U,M=Math.max(M,U+n.end-n.start+1)):n.offsetIndex=-1}var H=[];for(Q=0;Q>>0;for(Q=0;Q>>0,Z=t.getInt32()>>>0,_=t.getInt32()>>>0,X=W;X<=Z;X++)p.push({charCode:X,glyphId:_++})}p.sort((function(e,t){return e.charCode-t.charCode}));for(var V=1;V=61440&&de<=61695&&(de&=255),Z[de]=Ee.glyphId}}catch(e){Qe.e(e)}finally{Qe.f()}}else{var ye,pe=yu(te);try{for(pe.s();!(ye=pe.n()).done;){var ve=ye.value;Z[ve.charCode]=ve.glyphId}}catch(e){pe.e(e)}finally{pe.f()}}if(r.glyphNames&&(Ae.length||this.differences.length))for(var me=0;me<256;++me)if(ne||void 0===Z[me]){var we=this.differences[me]||Ae[me];if(we){var be=r.glyphNames.indexOf(we);be>0&&_(be)&&(Z[me]=be)}}}0===Z.length&&(Z[0]=0);var ke=U-1;if(M||(ke=0),!r.cssFontInfo){var De=Ou(Z,_,ke,this.toUnicode);this.toFontChar=De.toFontChar,l.cmap={tag:"cmap",data:Ku(De.charCodeToGlyphId,De.toUnicodeExtraMap,U)},l["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;var r=t.getUint16();t.skip(60);var A=t.getUint16();return!(r<4&&768&A||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(l["OS/2"],t)||(l["OS/2"]={tag:"OS/2",data:Tu(r,De.charCodeToGlyphId,j)})}if(!Q)try{I=new ar(l["CFF "].data),(h=new Xs(I,r,dc).parse()).duplicateFirstGlyph();var Se=new uc(h);l["CFF "].data=Se.compile()}catch(e){q("Failed to compile font "+r.loadedName)}if(l.name){var Fe=Cu(g(l.name),2),xe=Fe[0],Re=Fe[1];l.name.data=Wu(e,xe),this.psName=xe[0][6]||null,r.composite||function(e,t,r){if(!e.isInternalFont&&!e.hasIncludedToUnicodeMap&&!e.hasEncoding&&!(e.toUnicode instanceof Pc)&&t&&0!==r.length&&e.defaultEncoding!==Ss){var A,n=yu(r);try{for(n.s();!(A=n.n()).done;)if(!Yu(A.value))return}catch(e){n.e(e)}finally{n.f()}var i=Ss,a=[],o=lc();for(var s in i){var c=i[s];if(""!==c){var g=o[c];void 0!==g&&(a[s]=String.fromCharCode(g))}}a.length>0&&e.toUnicode.amend(a)}}(r,this.isSymbolicFont,Re)}else l.name={tag:"name",data:Wu(this.name)};var Ge=new Pg(u.version);for(var Ne in l)Ge.addTable(Ne,l[Ne].data);return Ge.toArray()}},{key:"convert",value:function(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(!e.isInternalFont&&!(e.hasIncludedToUnicodeMap||t===e.defaultEncoding||e.toUnicode instanceof Pc)){var r=[],A=lc();for(var n in t)if(!e.hasEncoding||!e.baseEncodingName&&void 0===e.differences[n]){var i=fc(t[n],A);-1!==i&&(r[n]=String.fromCharCode(i))}r.length>0&&e.toUnicode.amend(r)}}(r,r.builtInEncoding);var A=1;t instanceof Tc&&(A=t.numGlyphs-1);var n=t.getGlyphMapping(r),i=null,a=n,o=null;r.cssFontInfo||(i=Ou(n,t.hasGlyphId.bind(t),A,this.toUnicode),this.toFontChar=i.toFontChar,a=i.charCodeToGlyphId,o=i.toUnicodeExtraMap);var s=t.numGlyphs;function c(e,t){var r=null;for(var A in e)t===e[A]&&(r||(r=[])).push(0|A);return r}function g(e,t){for(var r in e)if(t===e[r])return 0|r;return i.charCodeToGlyphId[i.nextAvailableFontCharCode]=t,i.nextAvailableFontCharCode++}var u=t.seacs;if(i&&null!=u&&u.length){var l=r.fontMatrix||B,h=t.getCharset(),I=Object.create(null);for(var f in u){var C=u[f|=0],Q=Ds[C[2]],E=Ds[C[3]],d=h.indexOf(Q),y=h.indexOf(E);if(!(d<0||y<0)){var p={x:C[0]*l[0]+C[1]*l[2]+l[4],y:C[0]*l[1]+C[1]*l[3]+l[5]},v=c(n,f);if(v){var m,w=yu(v);try{for(w.s();!(m=w.n()).done;){var b=m.value,k=i.charCodeToGlyphId,D=g(k,d),S=g(k,y);I[b]={baseFontCharCode:D,accentFontCharCode:S,accentOffset:p}}}catch(e){w.e(e)}finally{w.f()}}}}r.seacMap=I}var F=r.fontMatrix?1/Math.max.apply(Math,fu(r.fontMatrix.slice(0,4).map(Math.abs))):1e3,x=new Pg("OTTO");return x.addTable("CFF ",t.data),x.addTable("OS/2",Tu(r,a)),x.addTable("cmap",Ku(a,o,s)),x.addTable("head","\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0_<õ\\0\\0"+Lu(F)+"\\0\\0\\0\\0ž\\v~'\\0\\0\\0\\0ž\\v~'\\0\\0"+Lu(r.descent)+"ÿ"+Lu(r.ascent)+Nu(r.italicAngle?2:0)+"\\0\\0\\0\\0\\0\\0\\0"),x.addTable("hhea","\\0\\0\\0"+Lu(r.ascent)+Lu(r.descent)+"\\0\\0ÿÿ\\0\\0\\0\\0\\0\\0"+Lu(r.capHeight)+Lu(Math.tan(r.italicAngle)*r.xHeight)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"+Nu(s)),x.addTable("hmtx",function(){for(var e=t.charstrings,r=t.cff?t.cff.widths:null,A="\\0\\0\\0\\0",n=1,i=s;n1&&void 0!==arguments[1]&&arguments[1],c=this._glyphCache[e];if((null===(t=c)||void 0===t?void 0:t.isSpace)===s)return c;var g=e;null!==(r=this.cMap)&&void 0!==r&&r.contains(e)&&"string"==typeof(g=this.cMap.lookup(e))&&(g=Pu(e,g)),"number"!=typeof(a=this.widths[g])&&(a=this.defaultWidth);var u=null===(A=this.vmetrics)||void 0===A?void 0:A[g],l=this.toUnicode.get(e)||e;"number"==typeof l&&(l=String.fromCharCode(l));var h,I=void 0!==this.toFontChar[e];if(i=this.toFontChar[e]||e,this.missingFile){var f=this.differences[e]||this.defaultEncoding[e];".notdef"!==f&&""!==f||"Type1"!==this.type||(i=32,""===f&&(a||(a=this._spaceWidth),l=String.fromCharCode(i))),i=(h=i)>=65520&&h<=65535?0:h>=62976&&h<=63743?Ic()[h]||h:173===h?45:h}this.isType3Font&&(o=i);var C=null;if(null!==(n=this.seacMap)&&void 0!==n&&n[e]){I=!0;var B=this.seacMap[e];i=B.baseFontCharCode,C={fontChar:String.fromCodePoint(B.accentFontCharCode),offset:B.accentOffset}}var Q="";if("number"==typeof i&&(i<=1114111?Q=String.fromCodePoint(i):q("charToGlyph - invalid fontCharCode: ".concat(i))),this.missingFile&&this.vertical&&1===Q.length){var E=wc()[Q.charCodeAt(0)];E&&(Q=l=String.fromCharCode(E))}return c=new Fu(e,Q,l,C,a,u,o,s,I),this._glyphCache[e]=c}},{key:"charsToGlyphs",value:function(e){var t=this._charsCache[e];if(t)return t;if(t=[],this.cMap)for(var r=Object.create(null),A=e.length,n=0;n55295&&(s<57344||s>65533)&&a++,this.toUnicode){var c=i(s);if(-1!==c){n()&&(r.push(A.join("")),A.length=0);for(var g=(this.cMap?this.cMap.getCharCodeLength(c):1)-1;g>=0;g--)A.push(String.fromCharCode(c>>8*g&255));continue}}n()||(r.push(A.join("")),A.length=0),A.push(String.fromCodePoint(s))}return r.push(A.join("")),r}}])}(),_u=function(){return Eu((function e(t){Bu(this,e),this.error=t,this.loadedName="g_font_error",this.missingFile=!0}),[{key:"charsToGlyphs",value:function(){return[]}},{key:"encodeString",value:function(e){return[e]}},{key:"exportData",value:function(){return{error:this.error}}}])}();function Xu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vu(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=g||D<=0)return T("Bad shading domain."),$u(a);var F,x=new Float32Array(s.numComps),R=new Float32Array(1),G=0;R[0]=c,k(R,0,x,0);var N=s.getRgb(x,0),L=ge.makeHexColor(N[0],N[1],N[2]);S.push([0,L]);var U=1;R[0]=c+D,k(R,0,x,0);for(var M=s.getRgb(x,0),J=M[0]-N[0]+1,H=M[1]-N[1]+1,Y=M[2]-N[2]+1,P=M[0]-N[0]-1,O=M[1]-N[1]-1,K=M[2]-N[2]-1,j=2;j<840;j++){R[0]=c+j*D,k(R,0,x,0),F=s.getRgb(x,0);var W=j-G;if(J=Math.min(J,(F[0]-N[0]+1)/W),H=Math.min(H,(F[1]-N[1]+1)/W),Y=Math.min(Y,(F[2]-N[2]+1)/W),P=Math.max(P,(F[0]-N[0]-1)/W),O=Math.max(O,(F[1]-N[1]-1)/W),K=Math.max(K,(F[2]-N[2]-1)/W),!(P<=J&&O<=H&&K<=Y)){var Z=ge.makeHexColor(M[0],M[1],M[2]);S.push([U/840,Z]),J=F[0]-M[0]+1,H=F[1]-M[1]+1,Y=F[2]-M[2]+1,P=F[0]-M[0]-1,O=F[1]-M[1]-1,K=F[2]-M[2]-1,G=U,N=M}U=j,M=F}var _=ge.makeHexColor(M[0],M[1],M[2]);S.push([1,_]);var X="transparent";return e.has("Background")&&(F=s.getRgb(e.get("Background"),0),X=ge.makeHexColor(F[0],F[1],F[2])),I||(S.unshift([0,X]),S[1][0]+=gl.SMALL_NUMBER),f||(S.at(-1)[0]-=gl.SMALL_NUMBER,S.push([1,X])),a.colorStops=S,a}return rl(t,gl),ol(t,[{key:"getIR",value:function(){var e,t,r,A,n,i=this.coordsArr,a=this.shadingType;return 2===a?(t=[i[0],i[1]],r=[i[2],i[3]],A=null,n=null,e="axial"):3===a?(t=[i[0],i[1]],r=[i[3],i[4]],A=i[2],n=i[5],e="radial"):j("getPattern type unknown: ".concat(a)),["RadialAxial",e,this.bbox,this.colorStops,t,r,A,n]}}])}(),ll=function(){return ol((function e(t,r){il(this,e),this.stream=t,this.context=r,this.buffer=0,this.bufferLength=0;var A=r.numComps;this.tmpCompsBuf=new Float32Array(A);var n=r.colorSpace.numComps;this.tmpCsCompsBuf=r.colorFn?new Float32Array(n):this.tmpCompsBuf}),[{key:"hasData",get:function(){if(this.stream.end)return this.stream.pos0)return!0;var e=this.stream.getByte();return!(e<0||(this.buffer=e,this.bufferLength=8,0))}},{key:"readBits",value:function(e){var t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var A=this.stream.getByte();return this.buffer=A&(1<>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r>r}},{key:"align",value:function(){this.buffer=0,this.bufferLength=0}},{key:"readFlag",value:function(){return this.readBits(this.context.bitsPerFlag)}},{key:"readCoordinate",value:function(){var e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),A=this.context.decode,n=e<32?1/((1<a?a:e,t=t>o?o:t,r=re.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(i.map((function(e,t){return[e,t]})).sort((function(e,t){return nh(e,1)[0]-nh(t,1)[0]})));try{for(g.s();!(A=g.n()).done;){var u=nh(A.value,2),l=u[0],h=u[1];-1!==l&&(l===s+1?(r.push(o[h]),s+=1):(s=l,r=[o[h]],c.push(l,r)))}}catch(e){g.e(e)}finally{g.f()}return c}(e),r=new He(null);r.set("BaseFont",Ue.get(e)),r.set("Type",Ue.get("Font")),r.set("Subtype",Ue.get("CIDFontType2")),r.set("Encoding",Ue.get("Identity-H")),r.set("CIDToGIDMap",Ue.get("Identity")),r.set("W",t),r.set("FirstChar",t[0]),r.set("LastChar",t.at(-2)+t.at(-1).length-1);var A=new He(null);r.set("FontDescriptor",A);var n=new He(null);return n.set("Ordering","Identity"),n.set("Registry","Adobe"),n.set("Supplement",0),r.set("CIDSystemInfo",n),r}function gh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uh(e,t){for(var r=0;r=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));var A=r.join("");switch(A.toLowerCase()){case"if":return Bh.IF;case"ifelse":return Bh.IFELSE;default:return Bh.getOperator(A)}}},{key:"getNumber",value:function(){var e=this.currentChar,t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));var r=parseFloat(t.join(""));if(isNaN(r))throw new re("Invalid floating point number: ".concat(r));return r}}])}();function Eh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}])}(),Uh=function(e){function t(){return Fh(this,t),wh(this,t,arguments)}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;return null!==e&&this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}])}(),Mh=function(e){function t(e){return Fh(this,t),wh(this,t,[{onlyRefs:!0}])}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}])}(),Jh=function(e){function t(){return Fh(this,t),wh(this,t,arguments)}return Dh(t,Nh),Rh(t,[{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;if("string"!=typeof e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}}])}(),Hh=function(e){function t(e){return Fh(this,t),wh(this,t,[{onlyRefs:!0}])}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}])}(),Yh=function(e){function t(e){return Fh(this,t),wh(this,t,[{onlyRefs:!0}])}return Dh(t,Nh),Rh(t,[{key:"set",value:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;if(!e)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(e)||this._imageCache.put(e,t)}}])}(),Ph=new WeakMap,Oh=new WeakSet,Kh=function(){function e(){var t;Fh(this,e),dh(this,t=Oh),t.add(this),function(e,t,r){dh(e,t),t.set(e,r)}(this,Ph,new Pe),this._refCache=new Oe,this._imageCache=new Oe}return Rh(e,[{key:"shouldCache",value:function(t,r){var A=this._refCache.get(t);return A||(A=new Set,this._refCache.put(t,A)),A.add(r),!(A.size0&&void 0!==arguments[0]&&arguments[0]||(ph(Ph,this).clear(),this._refCache.clear()),this._imageCache.clear()}}])}();function Th(e){var t,r=0,A=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Eh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e._imageCache);try{for(A.s();!(t=A.n()).done;)r+=t.value.byteSize}catch(e){A.e(e)}finally{A.f()}return r}function qh(e){return!(e._imageCache.size=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function $h(e,t){if(e){if("string"==typeof e)return eI(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eI(e,t):void 0}}function eI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>s)*g,c&=(1<r?e=r:e0&&(l=c[i-1]);var h=n[1];i>1,g=n.length>>1,u=new lI(o),l=Object.create(null),h=8192,I=new Float32Array(g);return function(e,t,r,A){var n,a,o="",s=I;for(n=0;n(E=i[2*n+1]))&&(a=E),C[n]=a}h>0&&(h--,l[o]=C),r.set(C,A)}else r.set(f,A)}}}])}();function sI(e){var t;if(e instanceof He)t=e;else{if(!(e instanceof ze))return!1;t=e.dict}return t.has("FunctionType")}var cI,gI,uI=function(){function e(t){tI(this,e),this.stack=t?Array.from(t):[]}return AI(e,[{key:"push",value:function(t){if(this.stack.length>=e.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(t)}},{key:"pop",value:function(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}},{key:"copy",value:function(t){if(this.stack.length+t>=e.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");for(var r=this.stack,A=r.length-t,n=t-1;n>=0;n--,A++)r.push(r[A])}},{key:"index",value:function(e){this.push(this.stack[this.stack.length-e-1])}},{key:"roll",value:function(e,t){for(var r=this.stack,A=r.length-e,n=r.length-1,i=A+(t-Math.floor(t/e)*e),a=A,o=n;a0?n.push(r<>A);break;case"ceiling":r=n.pop(),n.push(Math.ceil(r));break;case"copy":r=n.pop(),n.copy(r);break;case"cos":r=n.pop(),n.push(Math.cos(r%360/180*Math.PI));break;case"cvi":r=0|n.pop(),n.push(r);break;case"cvr":break;case"div":A=n.pop(),r=n.pop(),n.push(r/A);break;case"dup":n.copy(1);break;case"eq":A=n.pop(),r=n.pop(),n.push(r===A);break;case"exch":n.roll(2,1);break;case"exp":A=n.pop(),r=n.pop(),n.push(Math.pow(r,A));break;case"false":n.push(!1);break;case"floor":r=n.pop(),n.push(Math.floor(r));break;case"ge":A=n.pop(),r=n.pop(),n.push(r>=A);break;case"gt":A=n.pop(),r=n.pop(),n.push(r>A);break;case"idiv":A=n.pop(),r=n.pop(),n.push(r/A|0);break;case"index":r=n.pop(),n.index(r);break;case"le":A=n.pop(),r=n.pop(),n.push(r<=A);break;case"ln":r=n.pop(),n.push(Math.log(r));break;case"log":r=n.pop(),n.push(Math.log10(r));break;case"lt":A=n.pop(),r=n.pop(),n.push(r=t?new fI(t):e.max<=t?e:new BI(e,t)}var wI=function(){return AI((function e(){tI(this,e)}),[{key:"compile",value:function(e,t,r){for(var A,n,i,a,o,s,c,g,u=[],l=[],h=t.length>>1,I=r.length>>1,f=0,C=0;Cb.min&&(F.unshift("Math.max(",D,", "),F.push(")")),S2&&void 0!==arguments[2]&&arguments[2]?r="ttb":t||(r="rtl"),{str:e,dir:r}}var NI=[],LI=[];function UI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=!0,n=e.length;if(0===n||r)return GI(e,A,r);NI.length=n,LI.length=n;var i,a,o=0;for(i=0;i4?(A=!0,t=0):(A=!1,t=1));var g=[];for(i=0;i=0&&"ET"===LI[C];--C)LI[C]="EN";for(var B=i+1;B0&&(E=LI[i-1]);var d=I;Q+1y&&DI(y)&&(v=y);for(y=p;y>=v;--y){var m=-1;for(i=0,a=g.length;i=0&&(RI(NI,m,i),m=-1):m<0&&(m=i);m>=0&&RI(NI,m,g.length)}for(i=0,a=NI.length;i"!==w||(NI[i]="")}return GI(NI.join(""),A)}function MI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||HI(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function JI(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=HI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function HI(e,t){if(e){if("string"==typeof e)return YI(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?YI(e,t):void 0}}function YI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r3&&void 0!==arguments[3])||arguments[3],g=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l={style:null,ultimate:null};if(n){var h,I=u?" ".concat(u):"",f=JI(n);try{for(f.s();!(h=f.n()).done;){var C=h.value;t.push("local(".concat(C).concat(I,")"))}}catch(e){f.e(e)}finally{f.f()}}if(A){var B=qI.get(A),Q=u||function(e){switch(e){case OI:return"Bold";case KI:return"Italic";case TI:return"Bold Italic";default:if("bold"===(null==e?void 0:e.weight))return"Bold";if("italic"===(null==e?void 0:e.style))return"Italic"}return""}(o);Object.assign(l,ZI(B,t,r,c&&!a,g&&!i,Q))}if(o&&(l.style=o),s&&(l.ultimate=s),c&&a){var E=ZI(qI.get(a),t,r,c,g&&!i,u).ultimate;l.ultimate||(l.ultimate=E)}return g&&i&&r&&t.push("url(".concat(r).concat(i,")")),l}function _I(e,t,r,A,n,i){if(A.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==i&&"Type1"!==i||!/^[A-Z]{6}\\+/.test(A)||(A=A.slice(7));var a=A=mc(A),o=e.get(a);if(o)return o;var s=qI.get(A);if(!s){var c,g=JI(jI);try{for(g.s();!(c=g.n()).done;){var u=MI(c.value,2),l=u[0],h=u[1];if(A.startsWith(l)){A="".concat(h).concat(A.substring(l.length)),s=qI.get(A);break}}}catch(e){g.e(e)}finally{g.f()}}var I=!1;s||(s=qI.get(n),I=!0);var f="".concat(t.getDocId(),"_s").concat(t.createFontId());if(!s){if(!Pt(A))return q("Cannot substitute the font because of its name: ".concat(A)),e.set(a,null),null;var C=/bold/gi.test(A),B=/oblique|italic/gi.test(A),Q=C&&B&&TI||C&&OI||B&&KI||PI;return o={css:'"'.concat(WI(A),'",').concat(f),guessFallback:!0,loadedName:f,baseFontName:A,src:"local(".concat(A,")"),style:Q},e.set(a,o),o}var E=[];I&&Pt(A)&&E.push("local(".concat(A,")"));var d=ZI(s,E,r),y=d.style,p=d.ultimate,v=null===p,m=v?"":",".concat(p);return o={css:'"'.concat(WI(A),'",').concat(f).concat(m),guessFallback:v,loadedName:f,baseFontName:A,src:E.join(","),style:y},e.set(a,o),o}function XI(){XI=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function VI(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zI(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zI(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function zI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>3,g=c+3&-4;if(c!==g){for(var u=new Uint8Array(g*A),l=0,h=0,I=A*c;hr||t>r)return!0;var A=e*t;return this._hasMaxArea?A>this.MAX_AREA:!(A(this.MAX_AREA=Math.pow(this._goodSquareLength,2))))}},{key:"MAX_DIM",get:function(){return _(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}},{key:"MAX_AREA",get:function(){return this._hasMaxArea=!0,_(this,"MAX_AREA",Math.pow(this._guessMax(e._goodSquareLength,this.MAX_DIM,128,0),2))},set:function(e){e>=0&&(this._hasMaxArea=!0,_(this,"MAX_AREA",e))}},{key:"setMaxArea",value:function(e){this._hasMaxArea||(this.MAX_AREA=e>>2)}},{key:"_areGoodDims",value:function(e,t){try{var r=new OffscreenCanvas(e,t),A=r.getContext("2d");A.fillRect(0,0,1,1);var n=A.getImageData(0,0,1,1).data[3];return r.width=r.height=1,0!==n}catch(e){return!1}}},{key:"_guessMax",value:function(e,t,r,A){for(;e+r+11&&void 0!==n[1]&&n[1],t.abrupt("return",new e(r,A)._createImage());case 2:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]);var t,r}();function nf(e,t){for(var r=0;r>>8,t[r++]=255&i)}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");r=(t=e.slice()).byteLength}for(var a=r>>2,o=r-4*a,s=new Uint32Array(t.buffer,0,a),c=0,g=0,u=this.h1,l=this.h2,h=3432918353,I=461845907,f=11601,C=13715,B=0;B>>17)*I&cf|c*C&gf)<<13|u>>>19)+3864292196:l=5*(l=(l^=g=(g=(g=(g=s[B])*h&cf|g*f&gf)<<15|g>>>17)*I&cf|g*C&gf)<<13|l>>>19)+3864292196;switch(c=0,o){case 3:c^=t[4*a+2]<<16;case 2:c^=t[4*a+1]<<8;case 1:c=(c=(c=(c^=t[4*a])*h&cf|c*f&gf)<<15|c>>>17)*I&cf|c*C&gf,1&a?u^=c:l^=c}this.h1=u,this.h2=l}},{key:"hexdigest",value:function(){var e=this.h1,t=this.h2;return e=3981806797*(e^=t>>>1)&cf|36045*e&gf,e=444984403*(e^=(t=4283543511*t&cf|(2950163797*(t<<16|e>>>16)&cf)>>>16)>>>1)&cf|60499*e&gf,((e^=(t=3301882366*t&cf|(3120437893*(t<<16|e>>>16)&cf)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}])}();function lf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return hf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function hf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1e3&&(c=Math.max(c,l),h+=u+2,l=0,u=0),g.push({transform:f,x:l,y:h,w:C.width,h:C.height}),l+=C.width+2,u=Math.max(u,C.height)}for(var B=Math.max(c,l)+1,Q=h+u+1,E=new Uint8Array(B*Q*4),d=B<<2,y=0;y=0;)p[w-4]=p[w],p[w-3]=p[w+1],p[w-2]=p[w+2],p[w-1]=p[w+3],p[w+v]=p[w+v-4],p[w+v+1]=p[w+v-3],p[w+v+2]=p[w+v-2],p[w+v+3]=p[w+v-1],w-=d}var D={width:B,height:Q};if(e.isOffscreenCanvasSupported){var S=new OffscreenCanvas(B,Q);S.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(E.buffer),B,Q),0,0),D.bitmap=S.transferToImageBitmap(),D.data=null}else D.kind=3,D.data=E;return r.splice(i,4*s,87),A.splice(i,4*s,[D,g]),i+1})),vf(mf,[x,G,Y,R],null,(function(e,t){var r=e.fnArray,A=(t-(e.iCurr-3))%4;switch(A){case 0:return r[t]===x;case 1:return r[t]===G;case 2:return r[t]===Y;case 3:return r[t]===R}throw new Error("iterateImageMaskGroup - invalid pos: ".concat(A))}),(function(e,t){var r=e.fnArray,A=e.argsArray,n=e.iCurr,i=n-3,a=n-2,o=n-1,s=Math.floor((t-i)/4);if(s<10)return t-(t-i)%4;var c,g,u=!1,l=A[o][0],h=A[a][0],I=A[a][1],f=A[a][2],C=A[a][3];if(I===f){u=!0,c=a+4;for(var B=o+4,Q=1;Q=4&&r[i-4]===r[a]&&r[i-3]===r[o]&&r[i-2]===r[s]&&r[i-1]===r[c]&&A[i-4][0]===g&&A[i-4][1]===u&&(l++,h-=5);for(var I=h+4,f=1;f=(r=e.length))break}(A=(A||mf)[e[t]])&&!Array.isArray(A)?(i.iCurr=t,t++,!A.checkFn||(0,A.checkFn)(i)?(n=A,A=null):A=null):t++}this.state=A,this.match=n,this.lastProcessed=t}else this.lastProcessed=r}},{key:"flush",value:function(){for(;this.match;){var e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}}},{key:"reset",value:function(){this.state=null,this.match=null,this.lastProcessed=0}}])}(),kf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;Ef(this,e),this._streamSink=r,this.fnArray=[],this.argsArray=[],this.optimizer=!r||256&t?new wf(this):new bf(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=r?null:Promise.resolve()}return yf(e,[{key:"isOffscreenCanvasSupported",set:function(e){this.optimizer.isOffscreenCanvasSupported=e}},{key:"length",get:function(){return this.argsArray.length}},{key:"ready",get:function(){return this._resolved||this._streamSink.ready}},{key:"totalLength",get:function(){return this._totalLength+this.length}},{key:"addOp",value:function(t,r){this.optimizer.push(t,r),this.weight++,this._streamSink&&(this.weight>=e.CHUNK_SIZE||this.weight>=e.CHUNK_SIZE_ABOUT&&(t===R||32===t))&&this.flush()}},{key:"addImageOps",value:function(e,t,r){void 0!==r&&this.addOp(J,["OC",r]),this.addOp(e,t),void 0!==r&&this.addOp(H,[])}},{key:"addDependency",value:function(e){this.dependencies.has(e)||(this.dependencies.add(e),this.addOp(1,[e]))}},{key:"addDependencies",value:function(e){var t,r=lf(e);try{for(r.s();!(t=r.n()).done;){var A=t.value;this.addDependency(A)}}catch(e){r.e(e)}finally{r.f()}}},{key:"addOpList",value:function(t){if(t instanceof e){var r,A=lf(t.dependencies);try{for(A.s();!(r=A.n()).done;){var n=r.value;this.dependencies.add(n)}}catch(e){A.e(e)}finally{A.f()}for(var i=0,a=t.length;i0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.optimizer.flush();var r=this.length;this._totalLength+=r,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:r},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}])}();function Df(){Df=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Sf(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Ff(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Sf(i,A,n,a,o,"next",e)}function o(e){Sf(i,A,n,a,o,"throw",e)}a(void 0)}))}}function xf(e,t){for(var r=0;rA&&(e=A),e}function Nf(e,t,r,A,n,i){var a,o=n*i;a=t<=8?new Uint8Array(o):t<=16?new Uint16Array(o):new Uint32Array(o);var s,c,g,u,l=r/n,h=A/i,I=0,f=new Uint16Array(n),C=r;for(s=0;s0&&Number.isInteger(n.height)&&n.height>0&&(n.width!==d||n.height!==y)&&(q("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),d=n.width,y=n.height),d<1||y<1)throw new re("Invalid image width: ".concat(d," or height: ").concat(y));this.width=d,this.height=y,this.interpolate=C.get("I","Interpolate"),this.imageMask=C.get("IM","ImageMask")||!1,this.matte=C.get("Matte")||!1;var p=n.bitsPerComponent;if(!p&&!(p=C.get("BPC","BitsPerComponent"))){if(!this.imageMask)throw new re("Bits per component missing in image: ".concat(this.imageMask));p=1}if(this.bpc=p,!this.imageMask){var v,m=C.getRaw("CS")||C.getRaw("ColorSpace"),w=!!m;if(w)null!==(v=this.jpxDecoderOptions)&&void 0!==v&&v.smaskInData&&(m=Ue.get("DeviceRGBA"));else if(this.jpxDecoderOptions)m=Ue.get("DeviceRGBA");else switch(n.numComps){case 1:m=Ue.get("DeviceGray");break;case 3:m=Ue.get("DeviceRGB");break;case 4:m=Ue.get("DeviceCMYK");break;default:throw new Error("Images with ".concat(n.numComps," color components not supported."))}this.colorSpace=Ur.parse({cs:m,xref:r,resources:a?A:null,pdfFunctionFactory:h,localColorSpaceCache:I}),this.numComps=this.colorSpace.numComps,this.jpxDecoderOptions&&(this.jpxDecoderOptions.numComponents=w?this.numComp:0,this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name)}if(this.decode=C.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,p)||l&&!Ur.isDefaultDecode(this.decode,1))){var b;this.needsDecode=!0;var k=(1<>7&1,r[l+1]=c>>6&1,r[l+2]=c>>5&1,r[l+3]=c>>4&1,r[l+4]=c>>3&1,r[l+5]=c>>2&1,r[l+6]=c>>1&1,r[l+7]=1&c,l+=8;if(l>=1}else{var B=0;for(c=0,l=0,s=a;l>Q;E<0?E=0:E>u&&(E=u),r[l]=E,c&=(1<s[E+1])){t.next=37;break}return C=255,t.abrupt("break",40);case 37:++I,t.next=31;break;case 40:c[l]=C;case 41:++l,t.next=27;break;case 44:t.next=47;break;case 46:throw new re("Unknown mask format.");case 47:if(c)for(l=0,I=3,h=A*i;l0&&void 0!==x[0]&&x[0],r=x.length>1&&void 0!==x[1]&&x[1],A=this.drawWidth,n=this.drawHeight,i={width:A,height:n,interpolate:this.interpolate,kind:0,data:null},a=this.numComps,o=this.width,s=this.height,c=this.bpc,g=o*a*c+7>>3,u=r&&Af.needsToBeResized(A,n),"DeviceRGBA"!==this.colorSpace.name){e.next=21;break}return i.kind=3,e.next=15,this.getImageBytes(s*o*4,{});case 15:if(l=i.data=e.sent,!r){e.next=20;break}if(u){e.next=19;break}return e.abrupt("return",this.createBitmap(3,A,n,l));case 19:return e.abrupt("return",Af.createImage(i,!1));case 20:return e.abrupt("return",i);case 21:if(t){e.next=68;break}if("DeviceGray"===this.colorSpace.name&&1===c?h=1:"DeviceRGB"!==this.colorSpace.name||8!==c||this.needsDecode||(h=2),!h||this.smask||this.mask||A!==o||n!==s){e.next=35;break}return e.next=26,this.getImageBytes(s*g,{});case 26:if(I=e.sent,!r){e.next=31;break}if(!u){e.next=30;break}return e.abrupt("return",Af.createImage({data:I,kind:h,width:A,height:n,interpolate:this.interpolate},this.needsDecode));case 30:return e.abrupt("return",this.createBitmap(h,o,s,I));case 31:if(i.kind=h,i.data=I,this.needsDecode)for(W(1===h,"PDFImage.createImageData: The image must be grayscale."),f=i.data,C=0,B=f.length;C>3,e.next=9,this.getImageBytes(n*a,{internal:!0});case 9:if(o=e.sent,s=this.getComponents(o),1!==i){e.next=15;break}if(g=A*n,this.needsDecode)for(c=0;c>2,c=new Uint32Array(t.buffer,A,s);if(se.isLittleEndian){for(;o>>24|u<<8|4278190080,n[a+2]=u>>>16|l<<16|4278190080,n[a+3]=l>>>8|4278190080}for(var h=4*o,I=t.length;h>>8|255,n[a+2]=C<<16|B>>>16|255,n[a+3]=B<<8|255}for(var Q=4*o,E=t.length;Q>3)*i,g=A.byteLength;if(!a||o&&c!==g?o?((t=new Uint8Array(c)).set(A),t.fill(255,g)):t=new Uint8Array(A):t=A,o)for(r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Hf(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function Yf(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){Hf(i,A,n,a,o,"next",e)}function o(e){Hf(i,A,n,a,o,"throw",e)}a(void 0)}))}}function Pf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Of(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Wf(e,t){if(e){if("string"==typeof e)return Zf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zf(e,t):void 0}}function Zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)){var r,A=jf(e);try{for(A.s();!(r=A.n()).done;){var n=Vf(r.value,!0);if(n)return n}}catch(e){A.e(e)}finally{A.f()}return q("Unsupported blend mode Array: ".concat(e)),"source-over"}if(!(e instanceof Ue))return t?null:"source-over";switch(e.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return t?null:(q("Unsupported blend mode: ".concat(e.name)),"source-over")}function zf(e,t){var r;t.objId&&e.addDependency(t.objId),e.addImageOps(t.fn,t.args,t.optionalContent),t.fn===Y&&(null===(r=t.args[0])||void 0===r?void 0:r.count)>0&&t.args[0].count++}var $f=function(){function e(){Pf(this,e),this.reset()}return Kf(e,[{key:"check",value:function(){return!(++this.checked0&&void 0!==arguments[0]?arguments[0]:null,t=Object.create(this);return t.options=Object.assign(Object.create(null),this.options,e),t}},{key:"hasBlendModes",value:function(e,t){if(!(e instanceof He))return!1;if(e.objId&&t.has(e.objId))return!1;var r=new Pe(t);e.objId&&r.put(e.objId);for(var A=[e],n=this.xref;A.length;){var i=A.shift(),a=i.get("ExtGState");if(a instanceof He){var o,s=jf(a.getRawValues());try{for(s.s();!(o=s.n()).done;){var c=o.value;if(c instanceof Ye){if(r.has(c))continue;try{c=n.fetch(c)}catch(e){r.put(c),T('hasBlendModes - ignoring ExtGState: "'.concat(e,'".'));continue}}if(c instanceof He){c.objId&&r.put(c.objId);var g=c.get("BM");if(g instanceof Ue){if("Normal"!==g.name)return!0}else if(void 0!==g&&Array.isArray(g)){var u,l=jf(g);try{for(l.s();!(u=l.n()).done;){var h=u.value;if(h instanceof Ue&&"Normal"!==h.name)return!0}}catch(e){l.e(e)}finally{l.f()}}}}}catch(e){s.e(e)}finally{s.f()}}var I=i.get("XObject");if(I instanceof He){var f,C=jf(I.getRawValues());try{for(C.s();!(f=C.n()).done;){var B=f.value;if(B instanceof Ye){if(r.has(B))continue;try{B=n.fetch(B)}catch(e){r.put(B),T('hasBlendModes - ignoring XObject: "'.concat(e,'".'));continue}}if(B instanceof ze){B.dict.objId&&r.put(B.dict.objId);var Q=B.dict.get("Resources");Q instanceof He&&(Q.objId&&r.has(Q.objId)||(A.push(Q),Q.objId&&r.put(Q.objId)))}}}catch(e){C.e(e)}finally{C.f()}}}var E,d=jf(r);try{for(d.s();!(E=d.n()).done;){var y=E.value;t.put(y)}}catch(e){d.e(e)}finally{d.f()}return!1}},{key:"fetchBuiltInCMap",value:(u=Yf(Jf().mark((function e(t){var r,A,n,i;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.builtInCMapCache.get(t))){e.next=3;break}return e.abrupt("return",r);case 3:if(null===this.options.cMapUrl){e.next=19;break}return n="".concat(this.options.cMapUrl).concat(t,".bcmap"),e.next=7,fetch(n);case 7:if((i=e.sent).ok){e.next=10;break}throw new Error('fetchBuiltInCMap: failed to fetch file "'.concat(n,'" with "').concat(i.statusText,'".'));case 10:return e.t0=Uint8Array,e.next=13,i.arrayBuffer();case 13:e.t1=e.sent,e.t2=new e.t0(e.t1),e.t3=F.BINARY,A={cMapData:e.t2,compressionType:e.t3},e.next=22;break;case 19:return e.next=21,this.handler.sendWithPromise("FetchBuiltInCMap",{name:t});case 21:A=e.sent;case 22:return A.compressionType!==F.NONE&&this.builtInCMapCache.set(t,A),e.abrupt("return",A);case 24:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"fetchStandardFontData",value:(g=Yf(Jf().mark((function e(t){var r,A,n,i,a,o;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.standardFontDataCache.get(t))){e.next=3;break}return e.abrupt("return",new ar(r));case 3:if(!this.options.useSystemFonts||"Symbol"===t||"ZapfDingbats"===t){e.next=5;break}return e.abrupt("return",null);case 5:if(A=kc(),n=A[t],null===this.options.standardFontDataUrl){e.next=22;break}return a="".concat(this.options.standardFontDataUrl).concat(n),e.next=10,fetch(a);case 10:if((o=e.sent).ok){e.next=15;break}q('fetchStandardFontData: failed to fetch file "'.concat(a,'" with "').concat(o.statusText,'".')),e.next=20;break;case 15:return e.t0=Uint8Array,e.next=18,o.arrayBuffer();case 18:e.t1=e.sent,i=new e.t0(e.t1);case 20:e.next=31;break;case 22:return e.prev=22,e.next=25,this.handler.sendWithPromise("FetchStandardFontData",{filename:n});case 25:i=e.sent,e.next=31;break;case 28:e.prev=28,e.t2=e.catch(22),q('fetchStandardFontData: failed to fetch file "'.concat(n,'" with "').concat(e.t2,'".'));case 31:if(i){e.next=33;break}return e.abrupt("return",null);case 33:return this.standardFontDataCache.set(t,i),e.abrupt("return",new ar(i));case 35:case"end":return e.stop()}}),e,this,[[22,28]])}))),function(e){return g.apply(this,arguments)})},{key:"buildFormXObject",value:(c=Yf(Jf().mark((function e(t,r,A,n,i,a,o){var s,c,g,u,l,h,I,f,C,B,Q;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.dict,c=Ft(s.getArray("Matrix"),null),g=Rt(s.getArray("BBox"),null),!s.has("OC")){e.next=7;break}return e.next=6,this.parseMarkedContentProps(s.get("OC"),t);case 6:u=e.sent;case 7:if(void 0!==u&&n.addOp(J,["OC",u]),!(h=s.get("Group"))){e.next=28;break}if(l={matrix:c,bbox:g,smask:A,isolated:!1,knockout:!1},I=h.get("S"),f=null,!Ke(I,"Transparency")){e.next=26;break}if(l.isolated=h.get("I")||!1,l.knockout=h.get("K")||!1,!h.has("CS")){e.next=26;break}if(C=h.getRaw("CS"),!(B=Ur.getCached(C,this.xref,o))){e.next=23;break}f=B,e.next=26;break;case 23:return e.next=25,this.parseColorSpace({cs:C,resources:t,localColorSpaceCache:o});case 25:f=e.sent;case 26:null!=A&&A.backdrop&&(f||(f=Ur.singletons.rgb),A.backdrop=f.getRgb(A.backdrop,0)),n.addOp(76,[l]);case 28:return Q=h?[c,null]:[c,g],n.addOp(74,Q),e.next=32,this.getOperatorList({stream:r,task:i,resources:s.get("Resources")||t,operatorList:n,initialState:a});case 32:n.addOp(75,[]),h&&n.addOp(77,[l]),void 0!==u&&n.addOp(H,[]);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t,r,A,n,i,a){return c.apply(this,arguments)})},{key:"_sendImgData",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||r?this.handler.send("commonobj",[e,"Image",t],A):this.handler.send("obj",[e,this.pageIndex,"Image",t],A)}},{key:"buildPaintImageXObject",value:(s=Yf(Jf().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p,v,m,w,b,k,D,S,F,x,R,G=this;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.resources,A=t.image,n=t.isInline,i=void 0!==n&&n,a=t.operatorList,o=t.cacheKey,s=t.localImageCache,c=t.localColorSpaceCache,g=A.dict,u=g.objId,l=g.get("W","Width"),h=g.get("H","Height"),l&&"number"==typeof l&&h&&"number"==typeof h){e.next=8;break}return q("Image dimensions are missing, or not numbers."),e.abrupt("return");case 8:if(!(-1!==(I=this.options.maxImageSize)&&l*h>I)){e.next=15;break}if(f="Image exceeded maximum allowed size and was removed.",!this.options.ignoreErrors){e.next=14;break}return q(f),e.abrupt("return");case 14:throw new Error(f);case 15:if(!g.has("OC")){e.next=19;break}return e.next=18,this.parseMarkedContentProps(g.get("OC"),r);case 18:C=e.sent;case 19:if(!g.get("IM","ImageMask")){e.next=47;break}if(E=g.get("I","Interpolate"),d=l+7>>3,y=A.getBytes(d*h),p=g.getArray("D","Decode"),!this.parsingType3Font){e.next=32;break}return(B=Lf.createRawMask({imgArray:y,width:l,height:h,imageIsFromDecodeStream:A instanceof XA,inverseDecode:(null==p?void 0:p[0])>0,interpolate:E})).cached=!!o,Q=[B],a.addImageOps(Y,Q,C),o&&(v={fn:Y,args:Q,optionalContent:C},s.set(o,u,v),u&&this._regionalImageCache.set(null,u,v)),e.abrupt("return");case 32:return e.next=34,Lf.createMask({imgArray:y,width:l,height:h,imageIsFromDecodeStream:A instanceof XA,inverseDecode:(null==p?void 0:p[0])>0,interpolate:E,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported});case 34:if(!(B=e.sent).isSingleOpaquePixel){e.next=39;break}return a.addImageOps(90,[],C),o&&(m={fn:90,args:[],optionalContent:C},s.set(o,u,m),u&&this._regionalImageCache.set(null,u,m)),e.abrupt("return");case 39:return w="mask_".concat(this.idFactory.createObjId()),a.addDependency(w),B.dataLen=B.bitmap?B.width*B.height*4:B.data.length,this._sendImgData(w,B),Q=[{data:w,width:B.width,height:B.height,interpolate:B.interpolate,count:1}],a.addImageOps(Y,Q,C),o&&(b={objId:w,fn:Y,args:Q,optionalContent:C},s.set(o,u,b),u&&this._regionalImageCache.set(null,u,b)),e.abrupt("return");case 47:if(!(i&&l+h<200)||g.has("SMask")||g.has("Mask")){e.next=65;break}return e.prev=49,k=new Lf({xref:this.xref,res:r,image:A,isInline:i,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:c}),e.next=53,k.createImageData(!0,!1);case 53:B=e.sent,a.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,a.addImageOps(86,[B],C),e.next=64;break;case 58:if(e.prev=58,e.t0=e.catch(49),D='Unable to decode inline image: "'.concat(e.t0,'".'),this.options.ignoreErrors){e.next=63;break}throw new Error(D);case 63:q(D);case 64:return e.abrupt("return");case 65:if(S="img_".concat(this.idFactory.createObjId()),F=!1,this.parsingType3Font?S="".concat(this.idFactory.getDocId(),"_type3_").concat(S):o&&u&&(F=this.globalImageCache.shouldCache(u,this.pageIndex))&&(W(!i,"Cannot cache an inline image globally."),S="".concat(this.idFactory.getDocId(),"_").concat(S)),a.addDependency(S),Q=[S,l,h],a.addImageOps(P,Q,C),!F){e.next=83;break}if(!this.globalImageCache.hasDecodeFailed(u)){e.next=75;break}return this.globalImageCache.setData(u,{objId:S,fn:P,args:Q,optionalContent:C,byteSize:0}),this._sendImgData(S,null,F),e.abrupt("return");case 75:if(!(l*h>25e4||g.has("SMask")||g.has("Mask"))){e.next=83;break}return e.next=78,this.handler.sendWithPromise("commonobj",[S,"CopyLocalImage",{imageRef:u}]);case 78:if(!(x=e.sent)){e.next=83;break}return this.globalImageCache.setData(u,{objId:S,fn:P,args:Q,optionalContent:C,byteSize:0}),this.globalImageCache.addByteSize(u,x),e.abrupt("return");case 83:Lf.buildImage({xref:this.xref,res:r,image:A,isInline:i,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:c}).then(function(){var e=Yf(Jf().mark((function e(t){return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.createImageData(!1,G.options.isOffscreenCanvasSupported);case 2:return(B=e.sent).dataLen=B.bitmap?B.width*B.height*4:B.data.length,B.ref=u,F&&G.globalImageCache.addByteSize(u,B.dataLen),e.abrupt("return",G._sendImgData(S,B,F));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return q('Unable to decode image "'.concat(S,'": "').concat(e,'".')),u&&G.globalImageCache.addDecodeFailed(u),G._sendImgData(S,null,F)})),o&&(R={objId:S,fn:P,args:Q,optionalContent:C},s.set(o,u,R),u&&(this._regionalImageCache.set(null,u,R),F&&this.globalImageCache.setData(u,{objId:S,fn:P,args:Q,optionalContent:C,byteSize:0})));case 85:case"end":return e.stop()}}),e,this,[[49,58]])}))),function(e){return s.apply(this,arguments)})},{key:"handleSMask",value:function(e,t,r,A,n,i){var a=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},s=e.get("TR");if(sI(s)){for(var c=this._pdfFunctionFactory.create(s),g=new Uint8Array(256),u=new Float32Array(1),l=0;l<256;l++)u[0]=l/255,c(u,0,u,0),g[l]=255*u[0]|0;o.transferMap=g}return this.buildFormXObject(t,a,o,r,A,n.state.clone(),i)}},{key:"handleTransferFunction",value:function(e){var t;if(Array.isArray(e))t=e;else{if(!sI(e))return null;t=[e]}var r,A=[],n=0,i=0,a=jf(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=this.xref.fetchIfRef(o);if(n++,Ke(s,"Identity"))A.push(null);else{if(!sI(s))return null;for(var c=this._pdfFunctionFactory.create(s),g=new Uint8Array(256),u=new Float32Array(1),l=0;l<256;l++)u[0]=l/255,c(u,0,u,0),g[l]=255*u[0]|0;A.push(g),i++}}}catch(e){a.e(e)}finally{a.f()}return 1!==n&&4!==n||0===i?null:A}},{key:"handleTilingType",value:function(e,t,r,A,n,i,a,o){var s=this,c=new kf,g=He.merge({xref:this.xref,dictArray:[n.get("Resources"),r]});return this.getOperatorList({stream:A,task:a,resources:g,operatorList:c}).then((function(){var r=c.getIR(),A=Bl(r,n,t);i.addDependencies(c.dependencies),i.addOp(e,A),n.objId&&o.set(null,n.objId,{operatorListIR:r,dict:n})})).catch((function(e){if(!(e instanceof Ae)){if(!s.options.ignoreErrors)throw e;q('handleTilingType - ignoring pattern: "'.concat(e,'".'))}}))}},{key:"handleSetFont",value:(o=Yf(Jf().mark((function e(t,r,A,n,i,a){var o,s,c,g,u=arguments;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>6&&void 0!==u[6]?u[6]:null,s=u.length>7&&void 0!==u[7]?u[7]:null,c=(null==r?void 0:r[0])instanceof Ue?r[0].name:null,e.next=5,this.loadFont(c,A,t,o,s);case 5:if(!(g=e.sent).font.isType3Font){e.next=16;break}return e.prev=7,e.next=10,g.loadType3Data(this,t,i);case 10:n.addDependencies(g.type3Dependencies),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),g=new tC({loadedName:"g_font_error",font:new _u("Type3 font load error: ".concat(e.t0)),dict:g.font,evaluatorOptions:this.options});case 16:return a.font=g.font,g.send(this.handler),e.abrupt("return",g.loadedName);case 19:case"end":return e.stop()}}),e,this,[[7,13]])}))),function(e,t,r,A,n,i){return o.apply(this,arguments)})},{key:"handleText",value:function(t,r){var A=r.font,n=A.charsToGlyphs(t);return A.data&&(4&r.textRenderingMode||"Pattern"===r.fillColorSpace.name||A.disableFontFace||this.options.disableFontFace)&&e.buildFontPaths(A,n,this.handler,this.options),n}},{key:"ensureStateFont",value:function(e){if(!e.font){var t=new re("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;q('ensureStateFont: "'.concat(t,'".'))}}},{key:"setGState",value:(a=Yf(Jf().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B=this;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.resources,A=t.gState,n=t.operatorList,i=t.cacheKey,a=t.task,o=t.stateManager,s=t.localGStateCache,c=t.localColorSpaceCache,g=A.objId,u=!0,l=[],h=Promise.resolve(),I=jf(A.getKeys()),e.prev=6,C=Jf().mark((function e(){var t,i,s;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=f.value,i=A.get(t),e.t0=t,e.next="Type"===e.t0?5:"LW"===e.t0||"LC"===e.t0||"LJ"===e.t0||"ML"===e.t0||"D"===e.t0||"RI"===e.t0||"FL"===e.t0||"CA"===e.t0||"ca"===e.t0?6:"Font"===e.t0?8:"BM"===e.t0?11:"SMask"===e.t0?13:"TR"===e.t0?18:"OP"===e.t0||"op"===e.t0||"OPM"===e.t0||"BG"===e.t0||"BG2"===e.t0||"UCR"===e.t0||"UCR2"===e.t0||"TR2"===e.t0||"HT"===e.t0||"SM"===e.t0||"SA"===e.t0||"AIS"===e.t0||"TK"===e.t0?21:23;break;case 5:return e.abrupt("break",25);case 6:return l.push([t,i]),e.abrupt("break",25);case 8:return u=!1,h=h.then((function(){return B.handleSetFont(r,null,i[0],n,a,o.state).then((function(e){n.addDependency(e),l.push([t,[e,i[1]]])}))})),e.abrupt("break",25);case 11:return l.push([t,Vf(i)]),e.abrupt("break",25);case 13:if(!Ke(i,"None")){e.next=16;break}return l.push([t,!1]),e.abrupt("break",25);case 16:return i instanceof He?(u=!1,h=h.then((function(){return B.handleSMask(i,r,n,a,o,c)})),l.push([t,!0])):q("Unsupported SMask type"),e.abrupt("break",25);case 18:return s=B.handleTransferFunction(i),l.push([t,s]),e.abrupt("break",25);case 21:return T("graphic state operator "+t),e.abrupt("break",25);case 23:return T("Unknown graphic state operator "+t),e.abrupt("break",25);case 25:case"end":return e.stop()}}),e)})),I.s();case 9:if((f=I.n()).done){e.next=13;break}return e.delegateYield(C(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),I.e(e.t1);case 18:return e.prev=18,I.f(),e.finish(18);case 21:return e.next=23,h;case 23:l.length>0&&n.addOp(9,[l]),u&&s.set(i,g,l);case 25:case"end":return e.stop()}}),e,null,[[6,15,18,21]])}))),function(e){return a.apply(this,arguments)})},{key:"loadFont",value:function(t,r,A){var n,i,a=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,c=function(){var e=Yf(Jf().mark((function e(){return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new tC({loadedName:"g_font_error",font:new _u('Font "'.concat(t,'" is not available.')),dict:r,evaluatorOptions:a.options}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(r)r instanceof Ye&&(i=r);else{var g=A.get("Font");g&&(i=g.getRaw(t))}if(i){var u;if(null!==(u=this.type3FontRefs)&&void 0!==u&&u.has(i))return c();if(this.fontCache.has(i))return this.fontCache.get(i);try{r=this.xref.fetchIfRef(i)}catch(e){q('loadFont - lookup failed: "'.concat(e,'".'))}}if(!(r instanceof He)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return q('Font "'.concat(t,'" is not available.')),c();q('Font "'.concat(t,'" is not available -- attempting to fallback to a default font.')),r=o||e.fallbackFontDict}if(r.cacheKey&&this.fontCache.has(r.cacheKey))return this.fontCache.get(r.cacheKey);var l,h=Promise.withResolvers(),I=h.promise,f=h.resolve;try{(l=this.preEvaluateFont(r)).cssFontInfo=s}catch(e){return q('loadFont - preEvaluateFont failed: "'.concat(e,'".')),c()}var C,B=l,Q=B.descriptor,E=B.hash,d=i instanceof Ye;if(E&&Q instanceof He){var y=Q.fontAliases||(Q.fontAliases=Object.create(null));if(y[E]){var p=y[E].aliasRef;if(d&&p&&this.fontCache.has(p))return this.fontCache.putAlias(i,p),this.fontCache.get(i)}else y[E]={fontID:this.idFactory.createFontId()};d&&(y[E].aliasRef=i),C=y[E].fontID}else C=this.idFactory.createFontId();return W(null===(n=C)||void 0===n?void 0:n.startsWith("f"),'The "fontID" must be (correctly) defined.'),d?this.fontCache.put(i,I):(r.cacheKey="cacheKey_".concat(C),this.fontCache.put(r.cacheKey,I)),r.loadedName="".concat(this.idFactory.getDocId(),"_").concat(C),this.translateFont(l).then((function(e){f(new tC({loadedName:r.loadedName,font:e,dict:r,evaluatorOptions:a.options}))})).catch((function(e){q('loadFont - translateFont failed: "'.concat(e,'".')),f(new tC({loadedName:r.loadedName,font:new _u(e instanceof Error?e.message:e),dict:r,evaluatorOptions:a.options}))})),I}},{key:"buildPath",value:function(e,t,r){var A=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=e.length-1;if(r||(r=[]),n<0||91!==e.fnArray[n]){var i;switch(A&&(q('Encountered path operator "'.concat(t,'" inside of a text object.')),e.addOp(x,null)),t){case 19:var a=r[0]+r[2],o=r[1]+r[3];i=[Math.min(r[0],a),Math.min(r[1],o),Math.max(r[0],a),Math.max(r[1],o)];break;case 13:case 14:i=[r[0],r[1],r[0],r[1]];break;default:i=[1/0,1/0,-1/0,-1/0]}e.addOp(91,[[t],r,i]),A&&e.addOp(R,null)}else{var s,c=e.argsArray[n];c[0].push(t),(s=c[1]).push.apply(s,Mf(r));var g=c[2];switch(t){case 19:var u=r[0]+r[2],l=r[1]+r[3];g[0]=Math.min(g[0],r[0],u),g[1]=Math.min(g[1],r[1],l),g[2]=Math.max(g[2],r[0],u),g[3]=Math.max(g[3],r[1],l);break;case 13:case 14:g[0]=Math.min(g[0],r[0]),g[1]=Math.min(g[1],r[1]),g[2]=Math.max(g[2],r[0]),g[3]=Math.max(g[3],r[1])}}}},{key:"parseColorSpace",value:function(e){var t=this,r=e.cs,A=e.resources,n=e.localColorSpaceCache;return Ur.parseAsync({cs:r,xref:this.xref,resources:A,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:n}).catch((function(e){if(e instanceof Ae)return null;if(t.options.ignoreErrors)return q('parseColorSpace - ignoring ColorSpace: "'.concat(e,'".')),null;throw e}))}},{key:"parseShading",value:function(e){var t,r=e.shading,A=e.resources,n=e.localColorSpaceCache,i=e.localShadingPatternCache,a=i.get(r);if(a)return a;try{t=cl.parseShading(r,this.xref,A,this._pdfFunctionFactory,n).getIR()}catch(e){if(e instanceof Ae)return null;if(this.options.ignoreErrors)return q('parseShading - ignoring shading: "'.concat(e,'".')),i.set(r,null),null;throw e}return a="pattern_".concat(this.idFactory.createObjId()),this.parsingType3Font&&(a="".concat(this.idFactory.getDocId(),"_type3_").concat(a)),i.set(r,a),this.parsingType3Font?this.handler.send("commonobj",[a,"Pattern",t]):this.handler.send("obj",[a,this.pageIndex,"Pattern",t]),a}},{key:"handleColorN",value:function(e,t,r,A,n,i,a,o,s,c){var g=r.pop();if(g instanceof Ue){var u=n.getRaw(g.name),l=u instanceof Ye&&s.getByRef(u);if(l)try{var h=A.base?A.base.getRgb(r,0):null,I=Bl(l.operatorListIR,l.dict,h);return void e.addOp(t,I)}catch(e){}var f=this.xref.fetchIfRef(u);if(f){var C=f instanceof ze?f.dict:f,B=C.get("PatternType");if(1===B){var Q=A.base?A.base.getRgb(r,0):null;return this.handleTilingType(t,Q,i,f,C,e,a,s)}if(2===B){var E=C.get("Shading"),d=this.parseShading({shading:E,resources:i,localColorSpaceCache:o,localShadingPatternCache:c});if(d){var y=Ft(C.getArray("Matrix"),null);e.addOp(t,["Shading",d,y])}return}throw new re("Unknown PatternType: ".concat(B))}}throw new re("Unknown PatternName: ".concat(g))}},{key:"_parseVisibilityExpression",value:function(e,t,r){if(++t>10)q("Visibility expression is too deeply nested");else{var A=e.length,n=this.xref.fetchIfRef(e[0]);if(!(A<2)&&n instanceof Ue){switch(n.name){case"And":case"Or":case"Not":r.push(n.name);break;default:return void q("Invalid operator ".concat(n.name," in visibility expression"))}for(var i=1;i0)){e.next=22;break}return e.abrupt("return",{type:"OCMD",expression:s});case 22:if(c=n.get("OCGs"),!(Array.isArray(c)||c instanceof He)){e.next=29;break}if(g=[],Array.isArray(c)){u=jf(c);try{for(u.s();!(l=u.n()).done;)h=l.value,g.push(h.toString())}catch(e){u.e(e)}finally{u.f()}}else g.push(c.objId);return e.abrupt("return",{type:a,ids:g,policy:n.get("P")instanceof Ue?n.get("P").name:null,expression:null});case 29:if(!(c instanceof Ye)){e.next=31;break}return e.abrupt("return",{type:a,id:c.toString()});case 31:return e.abrupt("return",null);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getOperatorList",value:function(e){var t=this,r=e.stream,A=e.task,n=e.resources,i=e.operatorList,a=e.initialState,o=void 0===a?null:a,s=e.fallbackFontDict,c=void 0===s?null:s;if(n||(n=He.empty),o||(o=new nC),!i)throw new Error('getOperatorList: missing "operatorList" parameter');var g=this,u=this.xref,l=!1,h=new Lh,I=new Uh,f=new Jh,C=new Hh,B=new Map,Q=n.get("XObject")||He.empty,E=n.get("Pattern")||He.empty,d=new rC(o),y=new iC(r,u,d),p=new $f;function v(e){for(var t=0,r=y.savedStatesDepth;t0&&i.addOp(9,[$]),S=null;continue}}return void a(new Promise((function(e,t){if(!k)throw new re("GState must be referred to by name.");var r=n.get("ExtGState");if(!(r instanceof He))throw new re("ExtGState should be a dictionary.");var a=r.get(b);if(!(a instanceof He))throw new re("GState should be a dictionary.");g.setGState({resources:n,gState:a,operatorList:i,cacheKey:b,task:A,stateManager:d,localGStateCache:f,localColorSpaceCache:I}).then(e,t)})).catch((function(e){if(!(e instanceof Ae)){if(!g.options.ignoreErrors)throw e;q('getOperatorList - ignoring ExtGState: "'.concat(e,'".'))}})));case 13:case 14:case 15:case 16:case 17:case 18:case 19:g.buildPath(i,F,S,l);continue;case 67:case 68:case 72:case 73:continue;case J:if(!(S[0]instanceof Ue)){q("Expected name for beginMarkedContentProps arg0=".concat(S[0])),i.addOp(J,["OC",null]);continue}if("OC"===S[0].name)return void a(g.parseMarkedContentProps(S[1],n).then((function(e){i.addOp(J,["OC",e])})).catch((function(e){if(!(e instanceof Ae)){if(g.options.ignoreErrors)return q('getOperatorList - ignoring beginMarkedContentProps: "'.concat(e,'".')),void i.addOp(J,["OC",null]);throw e}})));S=[S[0].name,S[1]instanceof He?S[1].get("MCID"):null];break;default:if(null!==S){for(s=0,m=S.length;s0&&(t[3]*=r*F.fontMatrix[3])}return ge.transform(F.ctm,ge.transform(F.textMatrix,t))}function z(){if(m.initialized)return m;var e=F,t=e.font,r=e.loadedName;if(!u.has(r)&&(u.add(r),v.styles[r]={fontFamily:t.fallbackName,ascent:t.ascent,descent:t.descent,vertical:t.vertical},O.options.fontExtraProperties&&t.systemFontInfo)){var A=v.styles[r];A.fontSubstitution=t.systemFontInfo.css,A.fontSubstitutionLoadedName=t.systemFontInfo.loadedName}m.fontName=r;var n=m.transform=V();t.vertical?(m.width=m.totalWidth=Math.hypot(n[0],n[1]),m.height=m.totalHeight=0,m.vertical=!0):(m.width=m.totalWidth=0,m.height=m.totalHeight=Math.hypot(n[2],n[3]),m.vertical=!1);var i=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),a=Math.hypot(F.ctm[0],F.ctm[1]);m.textAdvanceScale=a*i;var o=F.fontSize;return m.trackingSpaceMin=o*x,m.notASpace=o*G,m.negativeSpaceMax=o*U,m.spaceInFlowMin=o*M,m.spaceInFlowMax=o*Y,m.hasEOL=!1,m.initialized=!0,m}function $(){if(m.initialized){var e=Math.hypot(F.textLineMatrix[0],F.textLineMatrix[1]),t=Math.hypot(F.ctm[0],F.ctm[1])*e;t!==m.textAdvanceScale&&(m.vertical?(m.totalHeight+=m.height*m.textAdvanceScale,m.height=0):(m.totalWidth+=m.width*m.textAdvanceScale,m.width=0),m.textAdvanceScale=t)}}function ee(e,t){return te.apply(this,arguments)}function te(){return(te=Yf(Jf().mark((function e(t,r){var i;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O.loadFont(t,r,n);case 2:if(!(i=e.sent).font.isType3Font){e.next=11;break}return e.prev=4,e.next=7,i.loadType3Data(O,n,A);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(4);case 11:F.loadedName=i.loadedName,F.font=i.font,F.fontMatrix=i.font.fontMatrix||B;case 14:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ne(e,t,r){var A=Math.hypot(r[0],r[1]);return[(r[0]*e+r[1]*t)/A,(r[2]*e+r[3]*t)/A]}function ie(e){var t,r=V(),A=r[4],n=r[5];if(null!==(t=F.font)&&void 0!==t&&t.vertical){if(Al[2]||n+el[3])return!1}else if(A+el[2]||nl[3])return!1;if(!F.font||!m.prevTransform)return!0;var i=m.prevTransform[4],a=m.prevTransform[5];if(i===A&&a===n)return!0;var o=-1;switch(r[0]&&0===r[1]&&0===r[2]?o=r[0]>0?0:180:r[1]&&0===r[0]&&0===r[3]&&(o=r[1]>0?90:270),o){case 0:break;case 90:var s=[n,A];A=s[0],n=s[1];var c=[a,i];i=c[0],a=c[1];break;case 180:var g=[-A,-n,-i,-a];A=g[0],n=g[1],i=g[2],a=g[3];break;case 270:var u=[-n,-A];A=u[0],n=u[1];var h=[-a,-i];i=h[0],a=h[1];break;default:var I=Uf(ne(A,n,r),2);A=I[0],n=I[1];var f=Uf(ne(i,a,m.prevTransform),2);i=f[0],a=f[1]}if(F.font.vertical){var C=(a-n)/m.textAdvanceScale,B=A-i,Q=Math.sign(m.height);return C.5*m.width?(oe(),!0):(S(),ce(),!0):Math.abs(B)>m.width?(oe(),!0):(C<=Q*m.notASpace&&S(),C<=Q*m.trackingSpaceMin?D()?(S(),ce(),X({height:Math.abs(C)})):m.height+=C:se(C,m.prevTransform,Q)||(0===m.str.length?(S(),X({height:Math.abs(C)})):m.height+=C),Math.abs(B)>m.width*P&&ce(),!0)}var E=(A-i)/m.textAdvanceScale,d=n-a,y=Math.sign(m.width);return E.5*m.height?(oe(),!0):(S(),ce(),!0):Math.abs(d)>m.height?(oe(),!0):(E<=y*m.notASpace&&S(),E<=y*m.trackingSpaceMin?D()?(S(),ce(),X({width:Math.abs(E)})):m.width+=E:se(E,m.prevTransform,y)||(0===m.str.length?(S(),X({width:Math.abs(E)})):m.width+=E),Math.abs(d)>m.height*P&&ce(),!0)}function ae(e){var t=e.chars,r=e.extraSpacing,A=F.font;if(!t){var n=F.charSpacing+r;return n&&(A.vertical?F.translateTextMatrix(0,-n):F.translateTextMatrix(n*F.textHScale,0)),void(p&&ie(0))}for(var i=A.charsToGlyphs(t),a=F.fontMatrix[0]*F.fontSize,o=0,s=i.length;o0&&void 0!==arguments[0]&&arguments[0],t=v.items.length;0!==t&&(e&&t<10||(c.enqueue(v,t),v.items=[],v.styles=Object.create(null)))}var le=new $f;return new Promise((function e(t,r){var i=function(A){ue(!0),Promise.all([A,c.ready]).then((function(){try{e(t,r)}catch(e){r(e)}}),r)};A.ensureNotTerminated(),le.reset();for(var o,g={},h=[];!(o=le.check())&&(h.length=0,g.args=h,_.read(g));){var f=F;F=a.state;var B=g.fn;switch(h=g.args,0|B){case N:var E=h[0].name,y=h[1];if(F.font&&E===F.fontName&&y===F.fontSize)break;return ce(),F.fontName=E,F.fontSize=y,void i(ee(E,null));case 39:F.textRise=h[0];break;case 35:F.textHScale=h[0]/100;break;case 36:F.leading=h[0];break;case 40:F.translateTextLineMatrix(h[0],h[1]),F.textMatrix=F.textLineMatrix.slice();break;case 41:F.leading=-h[1],F.translateTextLineMatrix(h[0],h[1]),F.textMatrix=F.textLineMatrix.slice();break;case 43:F.carriageReturn();break;case 42:F.setTextMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),F.setTextLineMatrix(h[0],h[1],h[2],h[3],h[4],h[5]),$();break;case 33:F.charSpacing=h[0];break;case 34:F.wordSpacing=h[0];break;case 31:F.textMatrix=C.slice(),F.textLineMatrix=C.slice();break;case 45:if(!a.state.font){O.ensureStateFont(a.state);continue}for(var m=(F.font.vertical?1:-1)*F.fontSize/1e3,w=h[0],b=0,k=w.length;b0){var x=T.join("");T.length=0,ae({chars:x,extraSpacing:0})}break;case L:if(!a.state.font){O.ensureStateFont(a.state);continue}ae({chars:h[0],extraSpacing:0});break;case 46:if(!a.state.font){O.ensureStateFont(a.state);continue}F.carriageReturn(),ae({chars:h[0],extraSpacing:0});break;case 47:if(!a.state.font){O.ensureStateFont(a.state);continue}F.wordSpacing=h[0],F.charSpacing=h[1],F.carriageReturn(),ae({chars:h[2],extraSpacing:0});break;case 66:ce(),j||(j=n.get("XObject")||He.empty);var G=h[0]instanceof Ue,U=h[0].name;if(G&&W.getByName(U))break;return void i(new Promise((function(e,t){if(!G)throw new re("XObject must be referred to by name.");var r=j.getRaw(U);if(r instanceof Ye){if(W.getByRef(r))return void e();if(O.globalImageCache.getData(r,O.pageIndex))return void e();r=K.fetch(r)}if(!(r instanceof ze))throw new re("XObject should be a stream");var i=r.dict.get("Subtype");if(!(i instanceof Ue))throw new re("XObject should have a Name subtype");if("Form"!==i.name)return W.set(U,r.dict.objId,!0),void e();var o=a.state.clone(),g=new rC(o),h=Ft(r.dict.getArray("Matrix"),null);h&&g.transform(h),ue();var f={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0,c.enqueue(e,t)},get desiredSize(){return c.desiredSize},get ready(){return c.ready}};O.getTextContent({stream:r,task:A,resources:r.dict.get("Resources")||n,stateManager:g,includeMarkedContent:s,sink:f,seenStyles:u,viewBox:l,lang:I,markedContentData:Q,disableNormalization:d,keepWhiteSpace:p}).then((function(){f.enqueueInvoked||W.set(U,r.dict.objId,!0),e()}),t)})).catch((function(e){if(!(e instanceof Ae)){if(!O.options.ignoreErrors)throw e;q('getTextContent - ignoring XObject: "'.concat(e,'".'))}})));case 9:if(G=h[0]instanceof Ue,U=h[0].name,G&&Z.getByName(U))break;return void i(new Promise((function(e,t){if(!G)throw new re("GState must be referred to by name.");var r=n.get("ExtGState");if(!(r instanceof He))throw new re("ExtGState should be a dictionary.");var A=r.get(U);if(!(A instanceof He))throw new re("GState should be a dictionary.");var i=A.get("Font");if(!i)return Z.set(U,A.objId,!0),void e();ce(),F.fontName=null,F.fontSize=i[1],ee(null,i[0]).then(e,t)})).catch((function(e){if(!(e instanceof Ae)){if(!O.options.ignoreErrors)throw e;q('getTextContent - ignoring ExtGState: "'.concat(e,'".'))}})));case 69:ce(),s&&(Q.level++,v.items.push({type:"beginMarkedContent",tag:h[0]instanceof Ue?h[0].name:null}));break;case J:if(ce(),s){Q.level++;var M=null;h[1]instanceof He&&(M=h[1].get("MCID")),v.items.push({type:"beginMarkedContentProps",id:Number.isInteger(M)?"".concat(O.idFactory.getPageObjId(),"_mc").concat(M):null,tag:h[0]instanceof Ue?h[0].name:null})}break;case H:if(ce(),s){if(0===Q.level)break;Q.level--,v.items.push({type:"endMarkedContent"})}break;case R:!f||f.font===F.font&&f.fontSize===F.fontSize&&f.fontName===F.fontName||ce()}if(v.items.length>=c.desiredSize){o=!0;break}}o?i(Xf):(ce(),ue(),t())})).catch((function(e){if(!(e instanceof Ae)){if(t.options.ignoreErrors)return q('getTextContent - ignoring errors during "'.concat(A.name,'" ')+'task: "'.concat(e,'".')),ce(),void ue();throw e}}))}},{key:"extractDataStructures",value:(n=Yf(Jf().mark((function e(t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A=this.xref,i=this.readToUnicode(r.toUnicode),!r.composite){e.next=15;break}(a=t.get("CIDSystemInfo"))instanceof He&&(r.cidSystemInfo={registry:Ie(a.get("Registry")),ordering:Ie(a.get("Ordering")),supplement:a.get("Supplement")}),e.prev=5,(o=t.get("CIDToGIDMap"))instanceof ze&&(n=o.getBytes()),e.next=15;break;case 10:if(e.prev=10,e.t0=e.catch(5),this.options.ignoreErrors){e.next=14;break}throw e.t0;case 14:q('extractDataStructures - ignoring CIDToGIDMap data: "'.concat(e.t0,'".'));case 15:if(s=[],c=null,!t.has("Encoding")){e.next=61;break}if(!((g=t.get("Encoding"))instanceof He)){e.next=52;break}if(c=(c=g.get("BaseEncoding"))instanceof Ue?c.name:null,!g.has("Differences")){e.next=50;break}u=g.get("Differences"),l=0,h=jf(u),e.prev=26,h.s();case 28:if((I=h.n()).done){e.next=42;break}if(f=I.value,"number"!=typeof(C=A.fetchIfRef(f))){e.next=35;break}l=C,e.next=40;break;case 35:if(!(C instanceof Ue)){e.next=39;break}s[l++]=C.name,e.next=40;break;case 39:throw new re("Invalid entry in 'Differences' array: ".concat(C));case 40:e.next=28;break;case 42:e.next=47;break;case 44:e.prev=44,e.t1=e.catch(26),h.e(e.t1);case 47:return e.prev=47,h.f(),e.finish(47);case 50:e.next=60;break;case 52:if(!(g instanceof Ue)){e.next=56;break}c=g.name,e.next=60;break;case 56:if(B="Encoding is not a Name nor a Dict",this.options.ignoreErrors){e.next=59;break}throw new re(B);case 59:q(B);case 60:"MacRomanEncoding"!==c&&"MacExpertEncoding"!==c&&"WinAnsiEncoding"!==c&&(c=null);case 61:return Q=!r.file||r.isInternalFont,E=Fc()[r.name],c&&Q&&E&&(c=null),c?r.defaultEncoding=Rs(c):(d=!!(4&r.flags),y=!!(32&r.flags),g=Ds,"TrueType"!==r.type||y||(g=Ss),(d||E)&&(g=ks,Q&&(/Symbol/i.test(r.name)?g=Fs:/Dingbats/i.test(r.name)?g=xs:/Wingdings/i.test(r.name)&&(g=Ss))),r.defaultEncoding=g),r.differences=s,r.baseEncodingName=c,r.hasEncoding=!!c||s.length>0,r.dict=t,e.next=70,i;case 70:return r.toUnicode=e.sent,e.next=73,this.buildToUnicode(r);case 73:return p=e.sent,r.toUnicode=p,n&&(r.cidToGidMap=this.readCidToGidMap(n,p)),e.abrupt("return",r);case 77:case"end":return e.stop()}}),e,this,[[5,10],[26,44,47,50]])}))),function(e,t){return n.apply(this,arguments)})},{key:"_simpleFontToUnicode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];W(!e.composite,"Must be a simple font.");var r=[],A=e.defaultEncoding.slice(),n=e.baseEncodingName,i=e.differences;for(var a in i){var o=i[a];".notdef"!==o&&(A[a]=o)}var s=lc();for(var c in A){var g=A[c];if(""!==g){var u=s[g];if(void 0===u){var l=0;switch(g[0]){case"G":3===g.length&&(l=parseInt(g.substring(1),16));break;case"g":5===g.length&&(l=parseInt(g.substring(1),16));break;case"C":case"c":if(g.length>=3&&g.length<=4){var h=g.substring(1);if(t){l=parseInt(h,16);break}if(l=+h,Number.isNaN(l)&&Number.isInteger(parseInt(h,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":-1!==(u=fc(g,s))&&(l=u);break;default:switch(g){case"f_h":case"f_t":case"T_h":r[c]=g.replaceAll("_","");continue}}if(l>0&&l<=1114111&&Number.isInteger(l)){if(n&&l===+c){var I=Rs(n);if(I&&(g=I[c])){r[c]=String.fromCharCode(s[g]);continue}}r[c]=String.fromCodePoint(l)}}else r[c]=String.fromCharCode(u)}}return r}},{key:"buildToUnicode",value:(A=Yf(Jf().mark((function e(t){var r,A,n,i,a,o,s,c,g;return Jf().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.hasIncludedToUnicodeMap=(null===(r=t.toUnicode)||void 0===r?void 0:r.length)>0,!t.hasIncludedToUnicodeMap){e.next=4;break}return!t.composite&&t.hasEncoding&&(t.fallbackToUnicode=this._simpleFontToUnicode(t)),e.abrupt("return",t.toUnicode);case 4:if(t.composite){e.next=6;break}return e.abrupt("return",new Yc(this._simpleFontToUnicode(t)));case 6:if(!t.composite||(!t.cMap.builtInCMap||t.cMap instanceof ns)&&("Adobe"!==(null===(A=t.cidSystemInfo)||void 0===A?void 0:A.registry)||"GB1"!==t.cidSystemInfo.ordering&&"CNS1"!==t.cidSystemInfo.ordering&&"Japan1"!==t.cidSystemInfo.ordering&&"Korea1"!==t.cidSystemInfo.ordering)){e.next=15;break}return n=t.cidSystemInfo,i=n.registry,a=n.ordering,o=Ue.get("".concat(i,"-").concat(a,"-UCS2")),e.next=11,ys.create({encoding:o,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});case 11:return s=e.sent,c=[],g=[],t.cMap.forEach((function(e,t){if(t>65535)throw new re("Max size of CID is 65,535");var r=s.lookup(t);if(r){g.length=0;for(var A=0,n=r.length;A>1;(0!==i||t.has(a))&&(r[a]=i)}return r}},{key:"extractWidths",value:function(e,t,r){var A,n=this.xref,i=[],a=0,o=[];if(r.composite){var s=e.get("DW");a="number"==typeof s?Math.ceil(s):1e3;var c=e.get("W");if(Array.isArray(c))for(var g=0,u=c.length;g1&&void 0!==arguments[1]?arguments[1]:NaN,r=ge.normalizeRect(e.argsArray[0].slice(2)),A=r[2]-r[0],n=r[3]-r[1],i=Math.hypot(A,n);0===A||0===n?(e.fnArray.splice(0,1),e.argsArray.splice(0,1)):(0===t||Math.round(i/t)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],r[0]),this._bbox[1]=Math.min(this._bbox[1],r[1]),this._bbox[2]=Math.max(this._bbox[2],r[2]),this._bbox[3]=Math.max(this._bbox[3],r[3]));for(var a=0,o=e.length;a0&&void 0!==arguments[0]?arguments[0]:new nC;Pf(this,e),this.state=t,this.stateStack=[]}),[{key:"save",value:function(){var e=this.state;this.stateStack.push(this.state),this.state=e.clone()}},{key:"restore",value:function(){var e=this.stateStack.pop();e&&(this.state=e)}},{key:"transform",value:function(e){this.state.ctm=ge.transform(this.state.ctm,e)}}])}(),AC=function(){return Kf((function e(){Pf(this,e),this.ctm=new Float32Array(C),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=B,this.textMatrix=C.slice(),this.textLineMatrix=C.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}),[{key:"setTextMatrix",value:function(e,t,r,A,n,i){var a=this.textMatrix;a[0]=e,a[1]=t,a[2]=r,a[3]=A,a[4]=n,a[5]=i}},{key:"setTextLineMatrix",value:function(e,t,r,A,n,i){var a=this.textLineMatrix;a[0]=e,a[1]=t,a[2]=r,a[3]=A,a[4]=n,a[5]=i}},{key:"translateTextMatrix",value:function(e,t){var r=this.textMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}},{key:"translateTextLineMatrix",value:function(e,t){var r=this.textLineMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}},{key:"carriageReturn",value:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}},{key:"clone",value:function(){var e=Object.create(this);return e.textMatrix=this.textMatrix.slice(),e.textLineMatrix=this.textLineMatrix.slice(),e.fontMatrix=this.fontMatrix.slice(),e}}])}(),nC=function(){return Kf((function e(){Pf(this,e),this.ctm=new Float32Array(C),this.font=null,this.textRenderingMode=0,this._fillColorSpace=Ur.singletons.gray,this._strokeColorSpace=Ur.singletons.gray,this.patternFillColorSpace=null,this.patternStrokeColorSpace=null}),[{key:"fillColorSpace",get:function(){return this._fillColorSpace},set:function(e){this._fillColorSpace=this.patternFillColorSpace=e}},{key:"strokeColorSpace",get:function(){return this._strokeColorSpace},set:function(e){this._strokeColorSpace=this.patternStrokeColorSpace=e}},{key:"clone",value:function(){return Object.create(this)}}])}(),iC=function(){function e(t,r){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new rC;Pf(this,e),this.parser=new Jo({lexer:new Oo(t,e.opMap),xref:r}),this.stateManager=A,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}return Kf(e,[{key:"savedStatesDepth",get:function(){return this.stateManager.stateStack.length}},{key:"read",value:function(t){for(var r=t.args;;){var A=this.parser.getObj();if(A instanceof Me){var n=A.cmd,i=e.opMap[n];if(!i){q('Unknown command "'.concat(n,'".'));continue}var a=i.id,o=i.numArgs,s=null!==r?r.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=a>=13&&a<=28,i.variableArgs)s>o&&T("Command ".concat(n,": expected [0, ").concat(o,"] args, ")+"but received ".concat(s," args."));else{if(s!==o){for(var c=this.nonProcessedArgs;s>o;)c.push(r.shift()),s--;for(;se.MAX_INVALID_PATH_OPS)throw new re("Invalid ".concat(g));q("Skipping ".concat(g)),null!==r&&(r.length=0);continue}}return this.preprocessCommand(a,r),t.fn=a,t.args=r,!0}if(A===Re)return!1;if(null!==A&&(null===r&&(r=[]),r.push(A),r.length>33))throw new re("Too many arguments")}}},{key:"preprocessCommand",value:function(e,t){switch(0|e){case x:this.stateManager.save();break;case R:this.stateManager.restore();break;case G:this.stateManager.transform(t)}}}],[{key:"opMap",get:function(){return _(this,"opMap",Object.assign(Object.create(null),{w:{id:2,numArgs:1,variableArgs:!1},J:{id:3,numArgs:1,variableArgs:!1},j:{id:4,numArgs:1,variableArgs:!1},M:{id:5,numArgs:1,variableArgs:!1},d:{id:6,numArgs:2,variableArgs:!1},ri:{id:7,numArgs:1,variableArgs:!1},i:{id:8,numArgs:1,variableArgs:!1},gs:{id:9,numArgs:1,variableArgs:!1},q:{id:x,numArgs:0,variableArgs:!1},Q:{id:R,numArgs:0,variableArgs:!1},cm:{id:G,numArgs:6,variableArgs:!1},m:{id:13,numArgs:2,variableArgs:!1},l:{id:14,numArgs:2,variableArgs:!1},c:{id:15,numArgs:6,variableArgs:!1},v:{id:16,numArgs:4,variableArgs:!1},y:{id:17,numArgs:4,variableArgs:!1},h:{id:18,numArgs:0,variableArgs:!1},re:{id:19,numArgs:4,variableArgs:!1},S:{id:20,numArgs:0,variableArgs:!1},s:{id:21,numArgs:0,variableArgs:!1},f:{id:22,numArgs:0,variableArgs:!1},F:{id:22,numArgs:0,variableArgs:!1},"f*":{id:23,numArgs:0,variableArgs:!1},B:{id:24,numArgs:0,variableArgs:!1},"B*":{id:25,numArgs:0,variableArgs:!1},b:{id:26,numArgs:0,variableArgs:!1},"b*":{id:27,numArgs:0,variableArgs:!1},n:{id:28,numArgs:0,variableArgs:!1},W:{id:29,numArgs:0,variableArgs:!1},"W*":{id:30,numArgs:0,variableArgs:!1},BT:{id:31,numArgs:0,variableArgs:!1},ET:{id:32,numArgs:0,variableArgs:!1},Tc:{id:33,numArgs:1,variableArgs:!1},Tw:{id:34,numArgs:1,variableArgs:!1},Tz:{id:35,numArgs:1,variableArgs:!1},TL:{id:36,numArgs:1,variableArgs:!1},Tf:{id:N,numArgs:2,variableArgs:!1},Tr:{id:38,numArgs:1,variableArgs:!1},Ts:{id:39,numArgs:1,variableArgs:!1},Td:{id:40,numArgs:2,variableArgs:!1},TD:{id:41,numArgs:2,variableArgs:!1},Tm:{id:42,numArgs:6,variableArgs:!1},"T*":{id:43,numArgs:0,variableArgs:!1},Tj:{id:L,numArgs:1,variableArgs:!1},TJ:{id:45,numArgs:1,variableArgs:!1},"'":{id:46,numArgs:1,variableArgs:!1},'"':{id:47,numArgs:3,variableArgs:!1},d0:{id:48,numArgs:2,variableArgs:!1},d1:{id:49,numArgs:6,variableArgs:!1},CS:{id:50,numArgs:1,variableArgs:!1},cs:{id:51,numArgs:1,variableArgs:!1},SC:{id:52,numArgs:4,variableArgs:!0},SCN:{id:53,numArgs:33,variableArgs:!0},sc:{id:54,numArgs:4,variableArgs:!0},scn:{id:55,numArgs:33,variableArgs:!0},G:{id:56,numArgs:1,variableArgs:!1},g:{id:57,numArgs:1,variableArgs:!1},RG:{id:U,numArgs:3,variableArgs:!1},rg:{id:M,numArgs:3,variableArgs:!1},K:{id:60,numArgs:4,variableArgs:!1},k:{id:61,numArgs:4,variableArgs:!1},sh:{id:62,numArgs:1,variableArgs:!1},BI:{id:63,numArgs:0,variableArgs:!1},ID:{id:64,numArgs:0,variableArgs:!1},EI:{id:65,numArgs:1,variableArgs:!1},Do:{id:66,numArgs:1,variableArgs:!1},MP:{id:67,numArgs:1,variableArgs:!1},DP:{id:68,numArgs:2,variableArgs:!1},BMC:{id:69,numArgs:1,variableArgs:!1},BDC:{id:J,numArgs:2,variableArgs:!1},EMC:{id:H,numArgs:0,variableArgs:!1},BX:{id:72,numArgs:0,variableArgs:!1},EX:{id:73,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}}])}();function aC(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=sC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function oC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||sC(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sC(e,t){if(e){if("string"==typeof e)return cC(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cC(e,t):void 0}}function cC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&(t.fontSize=a);break;case M:Ur.singletons.rgb.getRgbItem(A,0,t.fontColor,0);break;case 57:Ur.singletons.gray.getRgbItem(A,0,t.fontColor,0);break;case 61:Ur.singletons.cmyk.getRgbItem(A,0,t.fontColor,0)}}}catch(e){q('parseDefaultAppearance - ignoring errors: "'.concat(e,'".'))}return t}}])}();function dC(e){return new EC(e).parse()}var yC=function(e){function t(e,r,A){var n,i;return gC(this,t),(i=IC(this,t,[e])).stream=e,i.evaluatorOptions=r,i.xref=A,i.resources=null===(n=e.dict)||void 0===n?void 0:n.get("Resources"),i}return BC(t,iC),lC(t,[{key:"parse",value:function(){var e={fn:0,args:[]},t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:Ur.singletons.gray},r=!1,A=[];try{for(;e.args.length=0,!r&&this.read(e);){var n=e.fn,i=e.args;switch(0|n){case x:A.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case R:t=A.pop()||t;break;case 42:t.scaleFactor*=Math.hypot(i[0],i[1]);break;case N:var a=oC(i,2),o=a[0],s=a[1];o instanceof Ue&&(t.fontName=o.name),"number"==typeof s&&s>0&&(t.fontSize=s*t.scaleFactor);break;case 51:t.fillColorSpace=Ur.parse({cs:i[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case 54:t.fillColorSpace.getRgbItem(i,0,t.fontColor,0);break;case M:Ur.singletons.rgb.getRgbItem(i,0,t.fontColor,0);break;case 57:Ur.singletons.gray.getRgbItem(i,0,t.fontColor,0);break;case 61:Ur.singletons.cmyk.getRgbItem(i,0,t.fontColor,0);break;case L:case 45:case 46:case 47:r=!0}}}catch(e){q('parseAppearanceStream - ignoring errors: "'.concat(e,'".'))}return this.stream.reset(),delete t.scaleFactor,delete t.fillColorSpace,t}},{key:"_localColorSpaceCache",get:function(){return _(this,"_localColorSpaceCache",new Uh)}},{key:"_pdfFunctionFactory",get:function(){return _(this,"_pdfFunctionFactory",new iI({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}])}();function pC(e,t){if(e[0]===e[1]&&e[1]===e[2]){var r=e[0]/255;return"".concat(Tt(r)," ").concat(t?"g":"G")}return Array.from(e,(function(e){return Tt(e/255)})).join(" ")+" ".concat(t?"rg":"RG")}var vC=function(){function e(t,r){gC(this,e),this.xref=t,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=r;var A=new OffscreenCanvas(1,1);this.ctxMeasure=A.getContext("2d",{willReadFrequently:!0}),e._fontNameId||(e._fontNameId=1),this.fontName=Ue.get("InvalidPDFjsFont_".concat(r,"_").concat(e._fontNameId++))}return lC(e,[{key:"fontDescriptorRef",get:function(){if(!e._fontDescriptorRef){var t=new He(this.xref);t.set("Type",Ue.get("FontDescriptor")),t.set("FontName",this.fontName),t.set("FontFamily","MyriadPro Regular"),t.set("FontBBox",[0,0,0,0]),t.set("FontStretch",Ue.get("Normal")),t.set("FontWeight",400),t.set("ItalicAngle",0),e._fontDescriptorRef=this.xref.getNewPersistentRef(t)}return e._fontDescriptorRef}},{key:"descendantFontRef",get:function(){var e=new He(this.xref);e.set("BaseFont",this.fontName),e.set("Type",Ue.get("Font")),e.set("Subtype",Ue.get("CIDFontType0")),e.set("CIDToGIDMap",Ue.get("Identity")),e.set("FirstChar",this.firstChar),e.set("LastChar",this.lastChar),e.set("FontDescriptor",this.fontDescriptorRef),e.set("DW",1e3);var t,r=[],A=null,n=null,i=aC(function(e){return function(e){if(Array.isArray(e))return cC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sC(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.widths.entries()).sort());try{for(i.s();!(t=i.n()).done;){var a=oC(t.value,2),o=a[0],s=a[1];A?o===A+n.length?n.push(s):(r.push(A,n),A=o,n=[s]):(A=o,n=[s])}}catch(e){i.e(e)}finally{i.f()}A&&r.push(A,n),e.set("W",r);var c=new He(this.xref);return c.set("Ordering","Identity"),c.set("Registry","Adobe"),c.set("Supplement",0),e.set("CIDSystemInfo",c),this.xref.getNewPersistentRef(e)}},{key:"baseFontRef",get:function(){var e=new He(this.xref);return e.set("BaseFont",this.fontName),e.set("Type",Ue.get("Font")),e.set("Subtype",Ue.get("Type0")),e.set("Encoding",Ue.get("Identity-H")),e.set("DescendantFonts",[this.descendantFontRef]),e.set("ToUnicode",Ue.get("Identity-H")),this.xref.getNewPersistentRef(e)}},{key:"resources",get:function(){var e=new He(this.xref),t=new He(this.xref);return t.set(this.fontName.name,this.baseFontRef),e.set("Font",t),e}},{key:"_createContext",value:function(){return this.widths=new Map,this.ctxMeasure.font="1000px ".concat(this.fontFamily),this.ctxMeasure}},{key:"createFontResources",value:function(e){var t,r=this._createContext(),A=aC(e.split(/\\r\\n?|\\n/));try{for(A.s();!(t=A.n()).done;){var n,i=aC(t.value.split(""));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.charCodeAt(0);if(!this.widths.has(o)){var s=r.measureText(a),c=Math.ceil(s.width);this.widths.set(o,c),this.firstChar=Math.min(o,this.firstChar),this.lastChar=Math.max(o,this.lastChar)}}}catch(e){i.e(e)}finally{i.f()}}}catch(e){A.e(e)}finally{A.f()}return this.resources}},{key:"createAppearance",value:function(e,t,r,A,n,i){var a,o=this._createContext(),s=[],c=-1/0,g=aC(e.split(/\\r\\n?|\\n/));try{for(g.s();!(a=g.n()).done;){var u=a.value;s.push(u);var l=o.measureText(u).width;c=Math.max(c,l);var h,I=aC(Ht(u));try{for(I.s();!(h=I.n()).done;){var f=h.value,C=String.fromCodePoint(f),B=this.widths.get(f);if(void 0===B){var E=o.measureText(C);B=Math.ceil(E.width),this.widths.set(f,B),this.firstChar=Math.min(f,this.firstChar),this.lastChar=Math.max(f,this.lastChar)}}}catch(e){I.e(e)}finally{I.f()}}}catch(e){g.e(e)}finally{g.f()}c*=A/1e3;var d=oC(t,4),y=d[0],p=d[1],v=d[2]-y,m=d[3]-p;if(r%180!=0){var w=[m,v];v=w[0],m=w[1]}var b=1;c>v&&(b=v/c);var k=1,D=Q*A,S=.35*A,F=D*s.length;F>m&&(k=m/F);var x=A*Math.min(b,k),R=["q","0 0 ".concat(Tt(v)," ").concat(Tt(m)," re W n"),"BT","1 0 0 1 0 ".concat(Tt(m+S)," Tm 0 Tc ").concat(pC(n,!0)),"/".concat(this.fontName.name," ").concat(Tt(x)," Tf")],G=this.resources;if(1!==(i="number"==typeof i&&i>=0&&i<=1?i:1)){R.push("/R0 gs");var N=new He(this.xref),L=new He(this.xref);L.set("ca",i),L.set("CA",i),L.set("Type",Ue.get("ExtGState")),N.set("R0",L),G.set("ExtGState",N)}for(var U=Tt(D),M=0,J=s;M Tj"))}R.push("ET","Q");var Y=R.join("\\n"),P=new He(this.xref);if(P.set("Subtype",Ue.get("Form")),P.set("Type",Ue.get("XObject")),P.set("BBox",[0,0,v,m]),P.set("Length",Y.length),P.set("Resources",G),r){var O=_t(r,v,m);P.set("Matrix",O)}var K=new or(Y);return K.dict=P,K}}],[{key:"getFirstPositionInfo",value:function(e,t,r){var A=oC(e,4),n=A[0],i=A[1],a=A[2]-n,o=A[3]-i;if(t%180!=0){var s=[o,a];a=s[0],o=s[1]}var c=Q*r;return{coords:[0,o+.35*r-c],bbox:[0,0,a,o],matrix:0!==t?_t(t,o,c):void 0}}}])}();function mC(e,t,r){return t=bC(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wC()?Reflect.construct(t,r||[],bC(e).constructor):t.apply(e,r))}function wC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(wC=function(){return!!e})()}function bC(e){return bC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bC(e)}function kC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DC(e,t)}function DC(e,t){return DC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},DC(e,t)}function SC(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return FC(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?FC(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function FC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0;){var n=t.fetchIfRef(A.shift());if(n instanceof He)if(n.has("Kids")){var i=n.get("Kids");if(!Array.isArray(i))continue;var a,o=SC(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(r.has(s))throw new re('Duplicate entry in "'.concat(this._type,'" tree.'));A.push(s),r.put(s)}}catch(e){o.e(e)}finally{o.f()}}else{var c=n.get(this._type);if(Array.isArray(c))for(var g=0,u=c.length;g10)return q('Search depth limit reached for "'.concat(this._type,'" tree.')),null;var n=r.get("Kids");if(!Array.isArray(n))return null;for(var i=0,a=n.length-1;i<=a;){var o=i+a>>1,s=t.fetchIfRef(n[o]),c=s.get("Limits");if(et.fetchIfRef(c[1]))){r=s;break}i=o+1}}if(i>a)return null}var g=r.get(this._type);if(Array.isArray(g))for(var u=0,l=g.length-2;u<=l;){var h=u+l>>1,I=h+(1&h),f=t.fetchIfRef(g[I]);if(ef))return g[I+1];u=I+2}}return null}},{key:"get",value:function(e){return this.xref.fetchIfRef(this.getRaw(e))}}])}(),UC=function(e){function t(e,r){return xC(this,t),mC(this,t,[e,r,"Names"])}return kC(t,LC),GC(t)}(),MC=function(e){function t(e,r){return xC(this,t),mC(this,t,[e,r,"Nums"])}return kC(t,LC),GC(t)}();function JC(){hl=Object.create(null),Ge=Object.create(null),Ne=Object.create(null),Le=Object.create(null),Ec.clear(),Va.cleanup()}function HC(e,t){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,KC,!1),t instanceof He&&(this.xref=r,this.root=t,t.has("FS")&&(this.fs=t.get("FS")),t.has("RF")&&q("Related file specifications are not supported"),i||(t.has("EF")?(n=this,(A=KC).set(PC(A,n),!0)):q("Non-embedded file specifications are not supported")))}),[{key:"filename",get:function(){var e="",t=OC(this.root);return t&&"string"==typeof t&&(e=Ie(t).replaceAll("\\\\\\\\","\\\\").replaceAll("\\\\/","/").replaceAll("\\\\","/")),_(this,"filename",e||"unnamed")}},{key:"content",get:function(){var e,t;if(this,!(t=KC).get(PC(t,this)))return null;this._contentRef||(this._contentRef=OC(null===(e=this.root)||void 0===e?void 0:e.get("EF")));var r=null;if(this._contentRef){var A=this.xref.fetchIfRef(this._contentRef);A instanceof ze?r=A.getBytes():q("Embedded file specification points to non-existing/invalid content")}else q("Embedded file specification does not have any content");return r}},{key:"description",get:function(){var e,t="",r=null===(e=this.root)||void 0===e?void 0:e.get("Desc");return r&&"string"==typeof r&&(t=Ie(r)),_(this,"description",t)}},{key:"serializable",get:function(){return{rawFilename:this.filename,filename:(e=this.filename,e.substring(e.lastIndexOf("/")+1)),content:this.content,description:this.description};var e}}])}();function qC(e,t,r){return t=WC(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jC()?Reflect.construct(t,r||[],WC(e).constructor):t.apply(e,r))}function jC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jC=function(){return!!e})()}function WC(e){return WC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WC(e)}function ZC(e,t){return ZC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ZC(e,t)}function _C(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=VC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function XC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||VC(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VC(e,t){if(e){if("string"==typeof e)return zC(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zC(e,t):void 0}}function zC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return t.onResolveEntity(r)}))}},{key:"_parseContent",value:function(e,t){var r=[],A=t;function n(){for(;A"!==e[A]&&"/"!==e[A];)++A;var i=e.substring(t,A);for(n();A"!==e[A]&&"/"!==e[A]&&"?"!==e[A];){n();for(var a,o="";A"!==e[r]&&"?"!==e[r]&&"/"!==e[r];)++r;var A=e.substring(t,r);!function(){for(;r"!==e[r+1]);)++r;return{name:A,value:e.substring(n,r),parsed:r-t}}},{key:"parseXml",value:function(e){for(var t=0;t",r))<0)return void this.onError(-9);this.onEndElement(e.substring(r,A)),r=A+1;break;case"?":++r;var n=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+n.parsed,r+n.parsed+2))return void this.onError(-3);this.onPi(n.name,n.value),r+=n.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if((A=e.indexOf("--\\x3e",r+3))<0)return void this.onError(-5);this.onComment(e.substring(r+3,A)),r=A+3}else if("[CDATA["===e.substring(r+1,r+8)){if((A=e.indexOf("]]>",r+8))<0)return void this.onError(-2);this.onCdata(e.substring(r+8,A)),r=A+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(-6);var i=e.indexOf("[",r+8),a=!1;if((A=e.indexOf(">",r+8))<0)return void this.onError(-4);if(i>0&&A>i){if((A=e.indexOf("]>",r+8))<0)return void this.onError(-4);a=!0}var o=e.substring(r+8,A+(a?1:0));this.onDoctype(o),r=A+(a?2:1)}break;default:var s=this._parseContent(e,r);if(null===s)return void this.onError(-6);var c=!1;if("/>"===e.substring(r+s.parsed,r+s.parsed+2))c=!0;else if(">"!==e.substring(r+s.parsed,r+s.parsed+1))return void this.onError(-9);this.onBeginElement(s.name,s.attributes,c),r+=s.parsed+(c?2:1)}}else{for(;r0}},{key:"searchNode",value:function(e,t){if(t>=e.length)return this;var r=e[t];if(r.name.startsWith("#")&&t0)A.push([n,0]),n=n.childNodes[0];else{if(0===A.length)return null;for(;0!==A.length;){var u=XC(A.pop(),2),l=u[0],h=u[1]+1;if(h");var n,i=_C(this.childNodes);try{for(i.s();!(n=i.n()).done;)n.value.dump(e)}catch(e){i.e(e)}finally{i.f()}e.push(""))}else this.nodeValue?e.push(">".concat(Yt(this.nodeValue),"")):e.push("/>")}else e.push(Yt(this.nodeValue))}}])}(),aB=function(e){function t(e){var r,A=e.hasAttributes,n=void 0!==A&&A,i=e.lowerCaseName,a=void 0!==i&&i;return $C(this,t),(r=qC(this,t))._currentFragment=null,r._stack=null,r._errorCode=0,r._hasAttributes=n,r._lowerCaseName=a,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZC(e,t)}(t,nB),tB(t,[{key:"parseFromString",value:function(e){if(this._currentFragment=[],this._stack=[],this._errorCode=0,this.parseXml(e),0===this._errorCode){var t=XC(this._currentFragment,1)[0];if(t)return{documentElement:t}}}},{key:"onText",value:function(e){if(!function(e){for(var t=0,r=e.length;t=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function sB(e,t){if(e){if("string"==typeof e)return cB(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cB(e,t):void 0}}function cB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r\\\\376\\\\377([^<]+)/g,(function(e,t){for(var r=t.replaceAll(/\\\\([0-3])([0-7])([0-7])/g,(function(e,t,r,A){return String.fromCharCode(64*t+8*r+1*A)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(e,t){switch(t){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error("_repair: ".concat(t," isn't defined."))})),A=[">"],n=0,i=r.length;n=32&&a<127&&60!==a&&62!==a&&38!==a?A.push(String.fromCharCode(a)):A.push("&#x"+(65536+a).toString(16).substring(1)+";")}return A.join("")}))}},{key:"_getSequence",value:function(e){var t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((function(e){return"rdf:li"===e.nodeName}))}},{key:"_parseArray",value:function(e){if(e.hasChildNodes()){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||sB(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.childNodes,1)[0],r=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,r.map((function(e){return e.textContent.trim()})))}}},{key:"_parse",value:function(e){var t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes()){var r,A=oB(t.childNodes);try{for(A.s();!(r=A.n()).done;){var n=r.value;if("rdf:description"===n.nodeName){var i,a=oB(n.childNodes);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=o.nodeName;switch(s){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(o);continue}this._metadataMap.set(s,o.textContent.trim())}}catch(e){a.e(e)}finally{a.f()}}}}catch(e){A.e(e)}finally{A.f()}}}},{key:"serializable",get:function(){return{parsedData:this._metadataMap,rawData:this._data}}}])}();function hB(e,t){for(var r=0;r0;t=(0,this.decrypt)(t,!r);var A=this.bufferLength,n=A+t.length;this.ensureBuffer(n).set(t,A),this.bufferLength=n}else this.eof=!0}}])}();function dB(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function yB(e,t,r){return t=vB(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pB()?Reflect.construct(t,r||[],vB(e).constructor):t.apply(e,r))}function pB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(pB=function(){return!!e})()}function vB(e){return vB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vB(e)}function mB(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wB(e,t)}function wB(e,t){return wB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wB(e,t)}function bB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kB(e,t){for(var r=0;r>5&255,l[i++]=n>>13&255,l[i++]=n>>21&255,l[i++]=n>>>29&255,l[i++]=0,l[i++]=0,l[i++]=0;var I=new Int32Array(16);for(i=0;i>>32-v)|0,f=y}o=o+f|0,s=s+C|0,c=c+B|0,g=g+Q|0}return new Uint8Array([255&o,o>>8&255,o>>16&255,o>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255,255&g,g>>8&255,g>>16&255,g>>>24&255])}}(),RB=function(){return DB((function e(t,r){bB(this,e),this.high=0|t,this.low=0|r}),[{key:"and",value:function(e){this.high&=e.high,this.low&=e.low}},{key:"xor",value:function(e){this.high^=e.high,this.low^=e.low}},{key:"or",value:function(e){this.high|=e.high,this.low|=e.low}},{key:"shiftRight",value:function(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)}},{key:"shiftLeft",value:function(e){e>=32?(this.high=this.low<>>32-e,this.low<<=e)}},{key:"rotateRight",value:function(e){var t,r;32&e?(r=this.low,t=this.high):(t=this.low,r=this.high),e&=31,this.low=t>>>e|r<<32-e,this.high=r>>>e|t<<32-e}},{key:"not",value:function(){this.high=~this.high,this.low=~this.low}},{key:"add",value:function(e){var t=(this.low>>>0)+(e.low>>>0),r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r}},{key:"copyTo",value:function(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low}},{key:"assign",value:function(e){this.high=e.high,this.low=e.low}}])}(),GB=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function A(t){return e(t,2)^e(t,13)^e(t,22)}function n(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return function(o,s,c){var g,u,l=1779033703,h=3144134277,I=1013904242,f=2773480762,C=1359893119,B=2600822924,Q=528734635,E=1541459225,d=64*Math.ceil((c+9)/64),y=new Uint8Array(d);for(g=0;g>>29&255,y[g++]=c>>21&255,y[g++]=c>>13&255,y[g++]=c>>5&255,y[g++]=c<<3&255;var v,m=new Uint32Array(64);for(g=0;g>>10)+m[u-7]+i(m[u-15])+m[u-16];var w=l,b=h,k=I,D=f,S=C,F=B,x=Q,R=E,G=void 0,N=void 0;for(u=0;u<64;++u)G=R+n(S)+t(S,F,x)+a[u]+m[u],N=A(w)+r(w,b,k),R=x,x=F,F=S,S=D+G|0,D=k,k=b,b=w,w=G+N|0;l=l+w|0,h=h+b|0,I=I+k|0,f=f+D|0,C=C+S|0,B=B+F|0,Q=Q+x|0,E=E+R|0}return new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h,I>>24&255,I>>16&255,I>>8&255,255&I,f>>24&255,f>>16&255,f>>8&255,255&f,C>>24&255,C>>16&255,C>>8&255,255&C,B>>24&255,B>>16&255,B>>8&255,255&B,Q>>24&255,Q>>16&255,Q>>8&255,255&Q,E>>24&255,E>>16&255,E>>8&255,255&E])}}(),NB=function(){function e(e,t,r,A,n){e.assign(t),e.and(r),n.assign(t),n.not(),n.and(A),e.xor(n)}function t(e,t,r,A,n){e.assign(t),e.and(r),n.assign(t),n.and(A),e.xor(n),n.assign(r),n.and(A),e.xor(n)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function A(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}var a=[new RB(1116352408,3609767458),new RB(1899447441,602891725),new RB(3049323471,3964484399),new RB(3921009573,2173295548),new RB(961987163,4081628472),new RB(1508970993,3053834265),new RB(2453635748,2937671579),new RB(2870763221,3664609560),new RB(3624381080,2734883394),new RB(310598401,1164996542),new RB(607225278,1323610764),new RB(1426881987,3590304994),new RB(1925078388,4068182383),new RB(2162078206,991336113),new RB(2614888103,633803317),new RB(3248222580,3479774868),new RB(3835390401,2666613458),new RB(4022224774,944711139),new RB(264347078,2341262773),new RB(604807628,2007800933),new RB(770255983,1495990901),new RB(1249150122,1856431235),new RB(1555081692,3175218132),new RB(1996064986,2198950837),new RB(2554220882,3999719339),new RB(2821834349,766784016),new RB(2952996808,2566594879),new RB(3210313671,3203337956),new RB(3336571891,1034457026),new RB(3584528711,2466948901),new RB(113926993,3758326383),new RB(338241895,168717936),new RB(666307205,1188179964),new RB(773529912,1546045734),new RB(1294757372,1522805485),new RB(1396182291,2643833823),new RB(1695183700,2343527390),new RB(1986661051,1014477480),new RB(2177026350,1206759142),new RB(2456956037,344077627),new RB(2730485921,1290863460),new RB(2820302411,3158454273),new RB(3259730800,3505952657),new RB(3345764771,106217008),new RB(3516065817,3606008344),new RB(3600352804,1432725776),new RB(4094571909,1467031594),new RB(275423344,851169720),new RB(430227734,3100823752),new RB(506948616,1363258195),new RB(659060556,3750685593),new RB(883997877,3785050280),new RB(958139571,3318307427),new RB(1322822218,3812723403),new RB(1537002063,2003034995),new RB(1747873779,3602036899),new RB(1955562222,1575990012),new RB(2024104815,1125592928),new RB(2227730452,2716904306),new RB(2361852424,442776044),new RB(2428436474,593698344),new RB(2756734187,3733110249),new RB(3204031479,2999351573),new RB(3329325298,3815920427),new RB(3391569614,3928383900),new RB(3515267271,566280711),new RB(3940187606,3454069534),new RB(4118630271,4000239992),new RB(116418474,1914138554),new RB(174292421,2731055270),new RB(289380356,3203993006),new RB(460393269,320620315),new RB(685471733,587496836),new RB(852142971,1086792851),new RB(1017036298,365543100),new RB(1126000580,2618297676),new RB(1288033470,3409855158),new RB(1501505948,4234509866),new RB(1607167915,987167468),new RB(1816402316,1246189591)];return function(o,s,c){var g,u,l,h,I,f,C,B,Q=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Q?(g=new RB(3418070365,3238371032),u=new RB(1654270250,914150663),l=new RB(2438529370,812702999),h=new RB(355462360,4144912697),I=new RB(1731405415,4290775857),f=new RB(2394180231,1750603025),C=new RB(3675008525,1694076839),B=new RB(1203062813,3204075428)):(g=new RB(1779033703,4089235720),u=new RB(3144134277,2227873595),l=new RB(1013904242,4271175723),h=new RB(2773480762,1595750129),I=new RB(1359893119,2917565137),f=new RB(2600822924,725511199),C=new RB(528734635,4215389547),B=new RB(1541459225,327033209));var E,d,y=128*Math.ceil((c+17)/128),p=new Uint8Array(y);for(E=0;E>>29&255,p[E++]=c>>21&255,p[E++]=c>>13&255,p[E++]=c>>5&255,p[E++]=c<<3&255;var m=new Array(80);for(E=0;E<80;E++)m[E]=new RB(0,0);var w,b,k=new RB(0,0),D=new RB(0,0),S=new RB(0,0),F=new RB(0,0),x=new RB(0,0),R=new RB(0,0),G=new RB(0,0),N=new RB(0,0),L=new RB(0,0),U=new RB(0,0),M=new RB(0,0),J=new RB(0,0);for(E=0;E=1;--s){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],A=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=A,r=i[15],A=i[11],n=i[7],i[15]=i[3],i[11]=r,i[7]=A,i[3]=n;for(var c=0;c<16;++c)i[c]=this._inv_s[i[c]];for(var g=0,u=16*s;g<16;++g,++u)i[g]^=t[u];for(var l=0;l<16;l+=4){var h=this._mix[i[l]],I=this._mix[i[l+1]],f=this._mix[i[l+2]],C=this._mix[i[l+3]];r=h^I>>>8^I<<24^f>>>16^f<<16^C>>>24^C<<8,i[l]=r>>>24&255,i[l+1]=r>>16&255,i[l+2]=r>>8&255,i[l+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],A=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=A,r=i[15],A=i[11],n=i[7],i[15]=i[3],i[11]=r,i[7]=A,i[3]=n;for(var B=0;B<16;++B)i[B]=this._inv_s[i[B]],i[B]^=t[B];return i}},{key:"_encrypt",value:function(e,t){var r,A,n,i=this._s,a=new Uint8Array(16);a.set(e);for(var o=0;o<16;++o)a[o]^=t[o];for(var s=1;s=I;--h)if(u[h]!==l){l=0;break}g-=l,i[i.length-1]=u.subarray(0,16-l)}}for(var f=new Uint8Array(g),C=0,B=0,Q=i.length;C2&&void 0!==arguments[2]?arguments[2]:null,A=e.length,n=this.buffer,i=this.bufferPosition;if(r)this.iv=r;else{for(var a=0;i<16&&a=256&&(o=255&(27^o)));for(var g=0;g<4;++g)r[s]=A^=r[s-32],r[++s]=n^=r[s-32],r[++s]=i^=r[s-32],r[++s]=a^=r[s-32],s++}return r}}])}(),HB=function(){return DB((function e(){bB(this,e)}),[{key:"checkOwnerPassword",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);return n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length),Be(GB(n,0,n.length),A)}},{key:"checkUserPassword",value:function(e,t,r){var A=new Uint8Array(e.length+8);return A.set(e,0),A.set(t,e.length),Be(GB(A,0,A.length),r)}},{key:"getOwnerKey",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length);var i=GB(n,0,n.length);return new JB(i).decryptBlock(A,!1,new Uint8Array(16))}},{key:"getUserKey",value:function(e,t,r){var A=new Uint8Array(e.length+8);A.set(e,0),A.set(t,e.length);var n=GB(A,0,A.length);return new JB(n).decryptBlock(r,!1,new Uint8Array(16))}}])}(),YB=function(){return DB((function e(){bB(this,e)}),[{key:"_hash",value:function(e,t,r){for(var A,n,i=GB(t,0,t.length).subarray(0,32),a=[0],o=0;o<64||a.at(-1)>o-32;){var s=e.length+i.length+r.length,c=new Uint8Array(s),g=0;c.set(e,g),g+=e.length,c.set(i,g),g+=i.length,c.set(r,g);for(var u=new Uint8Array(64*s),l=0,h=0;l<64;l++,h+=s)u.set(c,h);var I=(a=new MB(i.subarray(0,16)).encrypt(u,i.subarray(16,32))).slice(0,16).reduce((function(e,t){return e+t}),0)%3;0===I?i=GB(a,0,a.length):1===I?(A=a,0,n=a.length,i=NB(A,0,n,!0)):2===I&&(i=NB(a,0,a.length)),o++}return i.subarray(0,32)}},{key:"checkOwnerPassword",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);return n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length),Be(this._hash(e,n,r),A)}},{key:"checkUserPassword",value:function(e,t,r){var A=new Uint8Array(e.length+8);return A.set(e,0),A.set(t,e.length),Be(this._hash(e,A,[]),r)}},{key:"getOwnerKey",value:function(e,t,r,A){var n=new Uint8Array(e.length+56);n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length);var i=this._hash(e,n,r);return new JB(i).decryptBlock(A,!1,new Uint8Array(16))}},{key:"getUserKey",value:function(e,t,r){var A=new Uint8Array(e.length+8);A.set(e,0),A.set(t,e.length);var n=this._hash(e,A,[]);return new JB(n).decryptBlock(r,!1,new Uint8Array(16))}}])}(),PB=function(){return DB((function e(t,r){bB(this,e),this.StringCipherConstructor=t,this.StreamCipherConstructor=r}),[{key:"createStream",value:function(e,t){var r=new this.StreamCipherConstructor;return new EB(e,t,(function(e,t){return r.decryptBlock(e,t)}))}},{key:"decryptString",value:function(e){var t=new this.StringCipherConstructor,r=ie(e);return ne(r=t.decryptBlock(r,!0))}},{key:"encryptString",value:function(e){var t=new this.StringCipherConstructor;if(t instanceof UB){var r=16-e.length%16;e+=String.fromCharCode(r).repeat(r);var A=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(A);else for(var n=0;n<16;n++)A[n]=Math.floor(256*Math.random());var i=ie(e);i=t.encrypt(i,A);var a=new Uint8Array(16+i.length);return a.set(A),a.set(i,16),ne(a)}var o=ie(e);return ne(o=t.encrypt(o))}}])}(),OB=new WeakSet,KB=function(){return DB((function e(t,r,A){bB(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,OB);var n=t.get("Filter");if(!Ke(n,"Standard"))throw new re("unknown encryption method");this.filterName=n.name,this.dict=t;var i=t.get("V");if(!Number.isInteger(i)||1!==i&&2!==i&&4!==i&&5!==i)throw new re("unsupported encryption algorithm");this.algorithm=i;var a=t.get("Length");if(!a)if(i<=3)a=40;else{var o=t.get("CF"),s=t.get("StmF");if(o instanceof He&&s instanceof Ue){o.suppressEncryption=!0;var c=o.get(s.name);(a=(null==c?void 0:c.get("Length"))||128)<40&&(a<<=3)}}if(!Number.isInteger(a)||a<40||a%8!=0)throw new re("invalid key length");var g=ie(t.get("O")),u=ie(t.get("U")),l=g.subarray(0,32),h=u.subarray(0,32),I=t.get("P"),f=t.get("R"),C=(4===i||5===i)&&!1!==t.get("EncryptMetadata");this.encryptMetadata=C;var B,Q,E=ie(r);if(A){if(6===f)try{A=Ce(A)}catch(e){q("CipherTransformFactory: Unable to convert UTF8 encoded password.")}B=ie(A)}if(5!==i)Q=dB(OB,this,qB).call(this,E,B,l,h,I,f,a,C);else{var d=g.subarray(32,40),y=g.subarray(40,48),p=u.subarray(0,48),v=u.subarray(32,40),m=u.subarray(40,48),w=ie(t.get("OE")),b=ie(t.get("UE")),k=ie(t.get("Perms"));Q=dB(OB,this,TB).call(this,f,B,l,d,y,p,h,v,m,w,b,k)}if(!Q&&!A)throw new V("No password given",1);if(!Q&&A){var D=dB(OB,this,jB).call(this,B,l,f,a);Q=dB(OB,this,qB).call(this,E,D,l,h,I,f,a,C)}if(!Q)throw new V("Incorrect Password",2);if(this.encryptionKey=Q,i>=4){var S=t.get("CF");S instanceof He&&(S.suppressEncryption=!0),this.cf=S,this.stmf=t.get("StmF")||Ue.get("Identity"),this.strf=t.get("StrF")||Ue.get("Identity"),this.eff=t.get("EFF")||this.stmf}}),[{key:"createCipherTransform",value:function(e,t){if(4===this.algorithm||5===this.algorithm)return new PB(dB(OB,this,ZB).call(this,this.cf,this.strf,e,t,this.encryptionKey),dB(OB,this,ZB).call(this,this.cf,this.stmf,e,t,this.encryptionKey));var r=dB(OB,this,WB).call(this,e,t,this.encryptionKey,!1),A=function(){return new FB(r)};return new PB(A,A)}}])}();function TB(e,t,r,A,n,i,a,o,s,c,g,u){if(t){var l=Math.min(127,t.length);t=t.subarray(0,l)}else t=[];var h=6===e?new YB:new HB;return h.checkUserPassword(t,o,a)?h.getUserKey(t,s,g):t.length&&h.checkOwnerPassword(t,A,i,r)?h.getOwnerKey(t,n,i,c):null}function qB(e,t,r,A,n,i,a,o){var s,c,g=40+r.length+e.length,u=new Uint8Array(g),l=0;if(t)for(c=Math.min(32,t.length);l>8&255,u[l++]=n>>16&255,u[l++]=n>>>24&255,s=0,c=e.length;s=4&&!o&&(u[l++]=255,u[l++]=255,u[l++]=255,u[l++]=255);var h=xB(u,0,l),I=a>>3;if(i>=3)for(s=0;s<50;++s)h=xB(h,0,I);var f,C=h.subarray(0,I);if(i>=3){for(l=0;l<32;++l)u[l]=XB._[l];for(s=0,c=e.length;s>3;if(r>=3)for(o=0;o<50;++o)c=xB(c,0,c.length);if(r>=3){s=t;var u=new Uint8Array(g);for(o=19;o>=0;o--){for(var l=0;l3&&void 0!==arguments[3]&&arguments[3],i=new Uint8Array(r.length+9),a=r.length;for(A=0;A>8&255,i[A++]=e>>16&255,i[A++]=255&t,i[A++]=t>>8&255,n&&(i[A++]=115,i[A++]=65,i[A++]=108,i[A++]=84),xB(i,0,A).subarray(0,Math.min(r.length+5,16))}function ZB(e,t,r,A,n){if(!(t instanceof Ue))throw new re("Invalid crypt filter name.");var i=this,a=e.get(t.name),o=null==a?void 0:a.get("CFM");if(!o||"None"===o.name)return function(){return new LB};if("V2"===o.name)return function(){return new FB(dB(OB,i,WB).call(i,r,A,n,!1))};if("AESV2"===o.name)return function(){return new MB(dB(OB,i,WB).call(i,r,A,n,!0))};if("AESV3"===o.name)return function(){return new JB(n)};throw new re("Unknown crypto method")}var _B,XB={_:new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122])};function VB(e){return function(e){if(Array.isArray(e))return rQ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tQ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||tQ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $B(){$B=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function eQ(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=tQ(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function tQ(e,t){if(e){if("string"==typeof e)return rQ(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rQ(e,t):void 0}}function rQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r>");case 20:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})))).apply(this,arguments)}function cQ(e,t,r){return gQ.apply(this,arguments)}function gQ(){return(gQ=nQ($B().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h,I,f,C,B;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.getBytes(),i=t.dict,e.next=4,Promise.all([i.getAsync("Filter"),i.getAsync("DecodeParms")]);case 4:if(a=e.sent,o=zB(a,2),s=o[0],c=o[1],!Array.isArray(s)){e.next=14;break}return e.next=11,i.xref.fetchIfRefAsync(s[0]);case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=s;case 15:if(g=e.t0,u=Ke(g,"FlateDecode"),!(n.length>=256||u)){e.next=37;break}return e.prev=19,l=new CompressionStream("deflate"),h=l.writable.getWriter(),e.next=24,h.ready;case 24:return h.write(n).then(nQ($B().mark((function e(){return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.ready;case 2:return e.next=4,h.close();case 4:case"end":return e.stop()}}),e)})))).catch((function(){})),e.next=27,new Response(l.readable).arrayBuffer();case 27:I=e.sent,n=new Uint8Array(I),s?u||(f=Array.isArray(s)?[Ue.get("FlateDecode")].concat(VB(s)):[Ue.get("FlateDecode"),s],c&&(C=Array.isArray(c)?[null].concat(VB(c)):[null,c])):f=Ue.get("FlateDecode"),f&&i.set("Filter",f),C&&i.set("DecodeParms",C),e.next=37;break;case 34:e.prev=34,e.t1=e.catch(19),T('writeStream - cannot compress data: "'.concat(e.t1,'".'));case 37:return B=ne(n),A&&(B=A.encryptString(B)),i.set("Length",B.length),e.next=42,oQ(i,r,A);case 42:r.push(" stream\\n",B,"\\nendstream");case 43:case"end":return e.stop()}}),e,null,[[19,34]])})))).apply(this,arguments)}function uQ(e,t,r){return lQ.apply(this,arguments)}function lQ(){return(lQ=nQ($B().mark((function e(t,r,A){var n,i,a,o;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.push("["),n=!0,i=eQ(t),e.prev=3,i.s();case 5:if((a=i.n()).done){e.next=12;break}return o=a.value,n?n=!1:r.push(" "),e.next=10,hQ(o,r,A);case 10:e.next=5;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),i.e(e.t0);case 17:return e.prev=17,i.f(),e.finish(17);case 20:r.push("]");case 21:case"end":return e.stop()}}),e,null,[[3,14,17,20]])})))).apply(this,arguments)}function hQ(e,t,r){return IQ.apply(this,arguments)}function IQ(){return(IQ=nQ($B().mark((function e(t,r,A){return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t instanceof Ue)){e.next=4;break}r.push("/".concat(Nt(t.name))),e.next=37;break;case 4:if(!(t instanceof Ye)){e.next=8;break}r.push("".concat(t.num," ").concat(t.gen," R")),e.next=37;break;case 8:if(!Array.isArray(t)&&!ArrayBuffer.isView(t)){e.next=13;break}return e.next=11,uQ(t,r,A);case 11:e.next=37;break;case 13:if("string"!=typeof t){e.next=18;break}A&&(t=A.encryptString(t)),r.push("(".concat(Lt(t),")")),e.next=37;break;case 18:if("number"!=typeof t){e.next=22;break}r.push(Tt(t)),e.next=37;break;case 22:if("boolean"!=typeof t){e.next=26;break}r.push(t.toString()),e.next=37;break;case 26:if(!(t instanceof He)){e.next=31;break}return e.next=29,oQ(t,r,A);case 29:e.next=37;break;case 31:if(!(t instanceof ze)){e.next=36;break}return e.next=34,cQ(t,r,A);case 34:e.next=37;break;case 36:null===t?r.push("null"):q("Unhandled value in writer: ".concat(typeof t,", please file a bug."));case 37:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fQ(e,t,r,A){for(var n=t+r-1;n>r-1;n--)A[n]=255&e,e>>=8;return r+t}function CQ(e,t,r){for(var A=0,n=e.length;A1&&(c=A.documentElement.searchNode([s.at(-1)],0)),c?c.childNodes=Array.isArray(o)?o.map((function(e){return new iB("value",e)})):[new iB("#text",o)]:q("Node not found for path: ".concat(a))}}}}catch(e){n.e(e)}finally{n.f()}var g=[];return A.documentElement.dump(g),g.join("")}(n.fetchIfRef(r).getString(),A));var i=n.encrypt;i&&(t=i.createCipherTransform(r.num,r.gen).encryptString(t));var a="".concat(r.num," ").concat(r.gen," obj\\n")+"<< /Type /EmbeddedFile /Length ".concat(t.length,">>\\nstream\\n")+t+"\\nendstream\\nendobj\\n";A.push({ref:r,data:a})}function dQ(e,t,r,A,n){return yQ.apply(this,arguments)}function yQ(){return(yQ=nQ($B().mark((function e(t,r,A,n,i){var a,o,s,c,g,u,l;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.push("xref\\n"),a=pQ(A),o=0,s=eQ(A);try{for(s.s();!(c=s.n()).done;)g=c.value,u=g.ref,l=g.data,u.num===a[o]&&(i.push("".concat(a[o]," ").concat(a[o+1],"\\n")),o+=2),null!==l?(i.push("".concat(r.toString().padStart(10,"0")," ").concat(Math.min(u.gen,65535).toString().padStart(5,"0")," n\\r\\n")),r+=l.length):i.push("0000000000 ".concat(Math.min(u.gen+1,65535).toString().padStart(5,"0")," f\\r\\n"))}catch(e){s.e(e)}finally{s.f()}return wQ(r,t,n),i.push("trailer\\n"),e.next=9,oQ(n,i);case 9:i.push("\\nstartxref\\n",r.toString(),"\\n%%EOF\\n");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pQ(e){var t,r=[],A=eQ(e);try{for(A.s();!(t=A.n()).done;){var n=t.value.ref;n.num===r.at(-2)+r.at(-1)?r[r.length-1]+=1:r.push(n.num,1)}}catch(e){A.e(e)}finally{A.f()}return r}function vQ(e,t,r,A,n){return mQ.apply(this,arguments)}function mQ(){return(mQ=nQ($B().mark((function e(t,r,A,n,i){var a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p,v,m,w,b,k;return $B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=[],o=0,s=0,c=eQ(A);try{for(c.s();!(g=c.n()).done;)u=g.value,l=u.ref,h=u.data,I=void 0,o=Math.max(o,r),null!==h?(I=Math.min(l.gen,65535),a.push([1,r,I]),r+=h.length):(I=Math.min(l.gen+1,65535),a.push([0,0,I])),s=Math.max(s,I)}catch(e){c.e(e)}finally{c.f()}for(n.set("Index",pQ(A)),f=Xt(o),C=Xt(s),B=[1,f,C],n.set("W",B),wQ(r,t,n),Q=B.reduce((function(e,t){return e+t}),0),E=new Uint8Array(Q*a.length),(d=new ar(E)).dict=n,y=0,p=0,v=a;p0){var A=function(e,t){for(var r=Math.floor(Date.now()/1e3),A=t.filename||"",n=[r.toString(),A,e.toString()],i=n.reduce((function(e,t){return e+t.length}),0),a=0,o=Object.values(t.info);a=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function FQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||RQ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xQ(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=RQ(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function RQ(e,t){if(e){if("string"==typeof e)return GQ(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GQ(e,t):void 0}}function GQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0||(k.parentTreeId=a++),C=!1)}catch(e){m.e(e)}finally{m.f()}case 55:t.next=46;break;case 57:t.next=62;break;case 59:t.prev=59,t.t1=t.catch(44),B.e(t.t1);case 62:return t.prev=62,B.f(),t.finish(62);case 65:if(!C){t.next=69;break}D=xQ(i.values());try{for(D.s();!(S=D.n()).done;){F=S.value,x=xQ(F);try{for(x.s();!(R=x.n()).done;)delete(G=R.value).parentTreeId,delete G.structTreeParent}catch(e){x.e(e)}finally{x.f()}}}catch(e){D.e(e)}finally{D.f()}return t.abrupt("return",!1);case 69:return t.abrupt("return",!0);case 70:case"end":return t.stop()}}),t,this,[[18,36,39,42],[44,59,62,65]])}))),function(e){return n.apply(this,arguments)})},{key:"updateStructureTree",value:(A=LQ(SQ().mark((function t(r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d;return SQ().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=r.newAnnotationsByPage,n=r.pdfManager,i=r.newRefs,a=this.dict.xref,o=this.dict.clone(),s=this.ref,(c=new Oe).put(s,o),(g=o.getRaw("ParentTree"))instanceof Ye?u=a.fetch(g):(u=g,g=a.getNewTemporaryRef(),o.set("ParentTree",g)),u=u.clone(),c.put(g,u),l=u.getRaw("Nums"),h=null,l instanceof Ye&&(h=l,l=a.fetch(h)),l=l.slice(),h||u.set("Nums",l),t.next=17,TQ.call(e,{newAnnotationsByPage:A,structTreeRootRef:s,structTreeRoot:this,kids:null,nums:l,xref:a,pdfManager:n,newRefs:i,cache:c});case 17:if(-1!==(I=t.sent)){t.next=20;break}return t.abrupt("return");case 20:o.set("ParentTreeNextKey",I),h&&c.put(h,l),f=[],C=xQ(c.items()),t.prev=24,C.s();case 26:if((B=C.n()).done){t.next=34;break}return Q=FQ(B.value,2),E=Q[0],d=Q[1],f.length=0,t.next=31,iQ(E,d,f,a);case 31:i.push({ref:E,data:f.join("")});case 32:t.next=26;break;case 34:t.next=39;break;case 36:t.prev=36,t.t0=t.catch(24),C.e(t.t0);case 39:return t.prev=39,C.f(),t.finish(39);case 42:case"end":return t.stop()}}),t,this,[[24,36,39,42]])}))),function(e){return A.apply(this,arguments)})}],[{key:"canCreateStructureTree",value:(r=LQ(SQ().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d;return SQ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.catalogRef,A=t.pdfManager,n=t.newAnnotationsByPage,r instanceof Ye){e.next=4;break}return q("Cannot save the struct tree: no catalog reference."),e.abrupt("return",!1);case 4:i=0,a=!0,o=xQ(n),e.prev=7,o.s();case 9:if((s=o.n()).done){e.next=23;break}return c=FQ(s.value,2),g=c[0],u=c[1],e.next=13,A.getPage(g);case 13:if(e.sent.ref instanceof Ye){e.next=19;break}return q("Cannot save the struct tree: page ".concat(g," has no ref.")),a=!0,e.abrupt("break",23);case 19:l=xQ(u);try{for(l.s();!(h=l.n()).done;)f=h.value,null!==(I=f.accessibilityData)&&void 0!==I&&I.type&&(f.parentTreeId=i++,a=!1)}catch(e){l.e(e)}finally{l.f()}case 21:e.next=9;break;case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(7),o.e(e.t0);case 28:return e.prev=28,o.f(),e.finish(28);case 31:if(!a){e.next=35;break}C=xQ(n.values());try{for(C.s();!(B=C.n()).done;){Q=B.value,E=xQ(Q);try{for(E.s();!(d=E.n()).done;)delete d.value.parentTreeId}catch(e){E.e(e)}finally{E.f()}}}catch(e){C.e(e)}finally{C.f()}return e.abrupt("return",!1);case 35:return e.abrupt("return",!0);case 36:case"end":return e.stop()}}),e,null,[[7,25,28,31]])}))),function(e){return r.apply(this,arguments)})},{key:"createStructureTree",value:(t=LQ(SQ().mark((function t(r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p;return SQ().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=r.newAnnotationsByPage,n=r.xref,i=r.catalogRef,a=r.pdfManager,o=r.newRefs,s=a.catalog.cloneDict(),(c=new Oe).put(i,s),g=n.getNewTemporaryRef(),s.set("StructTreeRoot",g),(u=new He(n)).set("Type",Ue.get("StructTreeRoot")),l=n.getNewTemporaryRef(),u.set("ParentTree",l),h=[],u.set("K",h),c.put(g,u),I=new He(n),f=[],I.set("Nums",f),t.next=18,YQ(e,this,TQ).call(this,{newAnnotationsByPage:A,structTreeRootRef:g,structTreeRoot:null,kids:h,nums:f,xref:n,pdfManager:a,newRefs:o,cache:c});case 18:C=t.sent,u.set("ParentTreeNextKey",C),c.put(l,I),B=[],Q=xQ(c.items()),t.prev=23,Q.s();case 25:if((E=Q.n()).done){t.next=33;break}return d=FQ(E.value,2),y=d[0],p=d[1],B.length=0,t.next=30,iQ(y,p,B,n);case 30:o.push({ref:y,data:B.join("")});case 31:t.next=25;break;case 33:t.next=38;break;case 35:t.prev=35,t.t0=t.catch(23),Q.e(t.t0);case 38:return t.prev=38,Q.f(),t.finish(38);case 41:case"end":return t.stop()}}),t,this,[[23,35,38,41]])}))),function(e){return t.apply(this,arguments)})}]);var t,r,A,n}();function KQ(e,t,r){if(e instanceof Ye&&!(t<0)){this.structParentIds||(this.structParentIds=new Oe);var A=this.structParentIds.get(e);A||(A=[],this.structParentIds.put(e,A)),A.push([t,r])}}function TQ(e){return qQ.apply(this,arguments)}function qQ(){return(qQ=LQ(SQ().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y,p,v,m,w,b,k,D,S,F,x,R,G,N,L,U,M,J;return SQ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.newAnnotationsByPage,A=t.structTreeRootRef,n=t.structTreeRoot,i=t.kids,a=t.nums,o=t.xref,s=t.pdfManager,c=t.newRefs,g=t.cache,u=Ue.get("OBJR"),l=-1,I=[],f=xQ(r),e.prev=5,f.s();case 7:if((C=f.n()).done){e.next=59;break}return B=FQ(C.value,2),Q=B[0],E=B[1],e.next=11,s.getPage(Q);case 11:d=e.sent,y=d.ref,p=y instanceof Ye,v=xQ(E),e.prev=15,v.s();case 17:if((m=v.n()).done){e.next=49;break}if(w=m.value,b=w.accessibilityData,k=w.ref,D=w.parentTreeId,S=w.structTreeParent,null!=b&&b.type){e.next=21;break}return e.abrupt("continue",47);case 21:if(F=b.structParent,!(n&&Number.isInteger(F)&&F>=0)){e.next=34;break}if(void 0===(R=(h||(h=new Map)).get(Q))&&(G=new zQ(n,d.pageDict),R=G.collectObjects(y),h.set(Q,R)),!(N=null===(x=R)||void 0===x?void 0:x.get(F))){e.next=34;break}return L=o.fetch(N).clone(),jQ.call(_B,L,b),I.length=0,e.next=32,iQ(N,L,I,o);case 32:return c.push({ref:N,data:I.join("")}),e.abrupt("continue",47);case 34:return l=Math.max(l,D),U=o.getNewTemporaryRef(),M=new He(o),jQ.call(_B,M,b),e.next=40,YQ(_B,this,ZQ).call(this,{structTreeParent:S,tagDict:M,newTagRef:U,structTreeRootRef:A,fallbackKids:i,xref:o,cache:g});case 40:J=new He(o),M.set("K",J),J.set("Type",u),p&&J.set("Pg",y),J.set("Obj",k),g.put(U,M),a.push(D,U);case 47:e.next=17;break;case 49:e.next=54;break;case 51:e.prev=51,e.t0=e.catch(15),v.e(e.t0);case 54:return e.prev=54,v.f(),e.finish(54);case 57:e.next=7;break;case 59:e.next=64;break;case 61:e.prev=61,e.t1=e.catch(5),f.e(e.t1);case 64:return e.prev=64,f.f(),e.finish(64);case 67:return e.abrupt("return",l+1);case 68:case"end":return e.stop()}}),e,this,[[5,61,64,67],[15,51,54,57]])})))).apply(this,arguments)}function jQ(e,t){var r=t.type,A=t.title,n=t.lang,i=t.alt,a=t.expanded,o=t.actualText;e.set("S",Ue.get(r)),A&&e.set("T",jt(A)),n&&e.set("Lang",jt(n)),i&&e.set("Alt",jt(i)),a&&e.set("E",jt(a)),o&&e.set("ActualText",jt(o))}function WQ(e){var t,r=e.elements,A=e.xref,n=e.pageDict,i=e.numberTree,a=new Map,o=xQ(r);try{for(o.s();!(t=o.n()).done;){var s=t.value;if(s.structTreeParentId){var c=parseInt(s.structTreeParentId.split("_mc")[1],10),g=a.get(c);g||(g=[],a.set(c,g)),g.push(s)}}}catch(e){o.e(e)}finally{o.f()}var u=n.get("StructParents");if(Number.isInteger(u)){var l,h=function(e,t,r){var n=a.get(e);if(n){var i=t.getRaw("P"),o=A.fetchIfRef(i);if(i instanceof Ye&&o instanceof He){var s,c={ref:r,dict:t},g=xQ(n);try{for(g.s();!(s=g.n()).done;)s.value.structTreeParent=c}catch(e){g.e(e)}finally{g.f()}}return!0}return!1},I=xQ(i.get(u));try{for(I.s();!(l=I.n()).done;){var f=l.value;if(f instanceof Ye){var C=A.fetch(f),B=C.get("K");if(Number.isInteger(B))h(B,C,f);else if(Array.isArray(B)){var Q,E=xQ(B);try{for(E.s();!(Q=E.n()).done;){var d=Q.value;if(d=A.fetchIfRef(d),Number.isInteger(d)&&h(d,C,f))break;if(d instanceof He){if(!Ke(d.get("Type"),"MCR"))break;var y=d.get("MCID");if(Number.isInteger(y)&&h(y,C,f))break}}}catch(e){E.e(e)}finally{E.f()}}}}}catch(e){I.e(e)}finally{I.f()}}}function ZQ(e){return _Q.apply(this,arguments)}function _Q(){return(_Q=LQ(SQ().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C;return SQ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.structTreeParent,A=t.tagDict,n=t.newTagRef,i=t.structTreeRootRef,a=t.fallbackKids,o=t.xref,s=t.cache,c=null,r?(c=r.ref,g=r.dict.getRaw("P")||i):g=i,A.set("P",g),u=o.fetchIfRef(g)){e.next=8;break}return a.push(n),e.abrupt("return");case 8:(l=s.get(g))||(l=u.clone(),s.put(g,l)),h=l.getRaw("K"),(I=h instanceof Ye?s.get(h):null)||(I=o.fetchIfRef(h),I=Array.isArray(I)?I.slice():[h],f=o.getNewTemporaryRef(),l.set("K",f),s.put(f,I)),C=I.indexOf(c),I.splice(C>=0?C+1:I.length,0,n);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}_B=OQ;var XQ=function(){return JQ((function e(t,r){UQ(this,e),this.tree=t,this.dict=r,this.kids=[],this.parseKids()}),[{key:"role",get:function(){var e=this.dict.get("S"),t=e instanceof Ue?e.name:"",r=this.tree.root;return r.roleMap.has(t)?r.roleMap.get(t):t}},{key:"parseKids",value:function(){var e=null,t=this.dict.getRaw("Pg");t instanceof Ye&&(e=t.toString());var r=this.dict.get("K");if(Array.isArray(r)){var A,n=xQ(r);try{for(n.s();!(A=n.n()).done;){var i=A.value,a=this.parseKid(e,i);a&&this.kids.push(a)}}catch(e){n.e(e)}finally{n.f()}}else{var o=this.parseKid(e,r);o&&this.kids.push(o)}}},{key:"parseKid",value:function(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new VQ({type:1,mcid:t,pageObjId:e});var r=null;if(t instanceof Ye?r=this.dict.xref.fetch(t):t instanceof He&&(r=t),!r)return null;var A=r.getRaw("Pg");A instanceof Ye&&(e=A.toString());var n=r.get("Type")instanceof Ue?r.get("Type").name:null;if("MCR"===n){if(this.tree.pageDict.objId!==e)return null;var i=r.getRaw("Stm");return new VQ({type:2,refObjId:i instanceof Ye?i.toString():null,pageObjId:e,mcid:r.get("MCID")})}if("OBJR"===n){if(this.tree.pageDict.objId!==e)return null;var a=r.getRaw("Obj");return new VQ({type:3,refObjId:a instanceof Ye?a.toString():null,pageObjId:e})}return new VQ({type:5,dict:r})}}])}(),VQ=JQ((function e(t){var r=t.type,A=t.dict,n=void 0===A?null:A,i=t.mcid,a=void 0===i?null:i,o=t.pageObjId,s=void 0===o?null:o,c=t.refObjId,g=void 0===c?null:c;UQ(this,e),this.type=r,this.dict=n,this.mcid=a,this.pageObjId=s,this.refObjId=g,this.parentNode=null})),zQ=function(){return JQ((function e(t,r){UQ(this,e),this.root=t,this.rootDict=t?t.dict:null,this.pageDict=r,this.nodes=[]}),[{key:"collectObjects",value:function(e){var t;if(!(this.root&&this.rootDict&&e instanceof Ye))return null;var r=this.rootDict.get("ParentTree");if(!r)return null;var A=null===(t=this.root.structParentIds)||void 0===t?void 0:t.get(e);if(!A)return null;var n,i=new Map,a=new MC(r,this.rootDict.xref),o=xQ(A);try{for(o.s();!(n=o.n()).done;){var s=FQ(n.value,1)[0],c=a.getRaw(s);c instanceof Ye&&i.set(s,c)}}catch(e){o.e(e)}finally{o.f()}return i}},{key:"parse",value:function(e){var t;if(this.root&&this.rootDict&&e instanceof Ye){var r=this.rootDict.get("ParentTree");if(r){var A=this.pageDict.get("StructParents"),n=null===(t=this.root.structParentIds)||void 0===t?void 0:t.get(e);if(Number.isInteger(A)||n){var i=new Map,a=new MC(r,this.rootDict.xref);if(Number.isInteger(A)){var o=a.get(A);if(Array.isArray(o)){var s,c=xQ(o);try{for(c.s();!(s=c.n()).done;){var g=s.value;g instanceof Ye&&this.addNode(this.rootDict.xref.fetch(g),i)}}catch(e){c.e(e)}finally{c.f()}}}if(n){var u,l=xQ(n);try{for(l.s();!(u=l.n()).done;){var h=FQ(u.value,2),I=h[0],f=h[1],C=a.get(I);if(C){var B,Q=this.addNode(this.rootDict.xref.fetchIfRef(C),i);1===(null==Q||null===(B=Q.kids)||void 0===B?void 0:B.length)&&3===Q.kids[0].type&&(Q.kids[0].type=f)}}}catch(e){l.e(e)}finally{l.f()}}}}}}},{key:"addNode",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(r>40)return q("StructTree MAX_DEPTH reached."),null;if(!(e instanceof He))return null;if(t.has(e))return t.get(e);var A=new XQ(this,e);t.set(e,A);var n=e.get("P");if(!n||Ke(n.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(e,A)||t.delete(e),A;var i=this.addNode(n,t,r+1);if(!i)return A;var a,o=!1,s=xQ(i.kids);try{for(s.s();!(a=s.n()).done;){var c=a.value;5===c.type&&c.dict===e&&(c.parentNode=A,o=!0)}}catch(e){s.e(e)}finally{s.f()}return o||t.delete(e),A}},{key:"addTopLevelNode",value:function(e,t){var r=this.rootDict.get("K");if(!r)return!1;if(r instanceof He)return r.objId===e.objId&&(this.nodes[0]=t,!0);if(!Array.isArray(r))return!0;for(var A=!1,n=0;n2&&void 0!==arguments[2]?arguments[2]:0;if(A>40)q("StructTree too deep to be fully serialized.");else{var n=Object.create(null);n.role=t.role,n.children=[],r.children.push(n);var i=t.dict.get("Alt");"string"!=typeof i&&(i=t.dict.get("ActualText")),"string"==typeof i&&(n.alt=Ie(i));var a=t.dict.get("A");if(a instanceof He){var o=Rt(a.getArray("BBox"),null);if(o)n.bbox=o;else{var s=a.get("Width"),c=a.get("Height");"number"==typeof s&&s>0&&"number"==typeof c&&c>0&&(n.bbox=[0,0,s,c])}}var g=t.dict.get("Lang");"string"==typeof g&&(n.lang=Ie(g));var u,l=xQ(t.kids);try{for(l.s();!(u=l.n()).done;){var h=u.value,I=5===h.type?h.parentNode:null;I?e(I,n,A+1):1===h.type||2===h.type?n.children.push({type:"content",id:"p".concat(h.pageObjId,"_mc").concat(h.mcid)}):3===h.type?n.children.push({type:"object",id:h.refObjId}):4===h.type&&n.children.push({type:"annotation",id:"".concat("pdfjs_internal_id_").concat(h.refObjId)})}}catch(e){l.e(e)}finally{l.f()}}}var t=Object.create(null);t.children=[],t.role="Root";var r,A=xQ(this.nodes);try{for(A.s();!(r=A.n()).done;){var n=r.value;n&&e(n,t)}}catch(e){A.e(e)}finally{A.f()}return t}}])}();function $Q(){$Q=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function eE(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function tE(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){eE(i,A,n,a,o,"next",e)}function o(e){eE(i,A,n,a,o,"throw",e)}a(void 0)}))}}function rE(e,t){return gE(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||sE(e,t)||oE()}function AE(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function oE(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sE(e,t){if(e){if("string"==typeof e)return cE(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cE(e,t):void 0}}function cE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r3)return!1;break;case"Fit":case"FitB":return 0===i;case"FitH":case"FitBH":case"FitV":case"FitBV":if(i>1)return!1;break;case"FitR":if(4!==i)return!1;a=!1;break;default:return!1}var o,s=aE(n);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(!("number"==typeof c||a&&null===c))return!1}}catch(e){s.e(e)}finally{s.f()}return!0}function lE(e){return e instanceof He&&(e=e.get("D")),uE(e)?e:null}function hE(e){var t=e.get("D");if(t){if(t instanceof Ue&&(t=t.name),"string"==typeof t)return Ie(t);if(uE(t))return JSON.stringify(t)}return null}var IE=new WeakSet,fE=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,IE),this.pdfManager=t,this.xref=r,this._catDict=r.getCatalogObj(),!(this._catDict instanceof He))throw new re("Catalog object is not a dictionary.");this.toplevelPagesDict,this._actualNumPages=null,this.fontCache=new Oe,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new Kh,this.pageKidsCountCache=new Oe,this.pageIndexCache=new Oe,this.pageDictCache=new Oe,this.nonBlendModesSet=new Pe,this.systemFontCache=new Map}return function(e,t,r){return t&&AE(e.prototype,t),r&&AE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"cloneDict",value:function(){return this._catDict.clone()}},{key:"version",get:function(){var e=this._catDict.get("Version");if(e instanceof Ue){if(It.test(e.name))return _(this,"version",e.name);q("Invalid PDF catalog version: ".concat(e.name))}return _(this,"version",null)}},{key:"lang",get:function(){var e=this._catDict.get("Lang");return _(this,"lang",e&&"string"==typeof e?Ie(e):null)}},{key:"needsRendering",get:function(){var e=this._catDict.get("NeedsRendering");return _(this,"needsRendering","boolean"==typeof e&&e)}},{key:"collection",get:function(){var e=null;try{var t=this._catDict.get("Collection");t instanceof He&&t.size>0&&(e=t)}catch(e){if(e instanceof Ct)throw e;T("Cannot fetch Collection entry; assuming no collection is present.")}return _(this,"collection",e)}},{key:"acroForm",get:function(){var e=null;try{var t=this._catDict.get("AcroForm");t instanceof He&&t.size>0&&(e=t)}catch(e){if(e instanceof Ct)throw e;T("Cannot fetch AcroForm entry; assuming no forms are present.")}return _(this,"acroForm",e)}},{key:"acroFormRef",get:function(){var e=this._catDict.getRaw("AcroForm");return _(this,"acroFormRef",e instanceof Ye?e:null)}},{key:"metadata",get:function(){var e=this._catDict.getRaw("Metadata");if(!(e instanceof Ye))return _(this,"metadata",null);var t=null;try{var r,A=this.xref.fetch(e,!(null!==(r=this.xref.encrypt)&&void 0!==r&&r.encryptMetadata));if(A instanceof ze&&A.dict instanceof He){var n=A.dict.get("Type"),i=A.dict.get("Subtype");if(Ke(n,"Metadata")&&Ke(i,"XML")){var a=fe(A.getString());a&&(t=new lB(a).serializable)}}}catch(e){if(e instanceof Ct)throw e;T('Skipping invalid Metadata: "'.concat(e,'".'))}return _(this,"metadata",t)}},{key:"markInfo",get:function(){var e=null;try{e=this._readMarkInfo()}catch(e){if(e instanceof Ct)throw e;q("Unable to read mark info.")}return _(this,"markInfo",e)}},{key:"_readMarkInfo",value:function(){var e=this._catDict.get("MarkInfo");if(!(e instanceof He))return null;var t={Marked:!1,UserProperties:!1,Suspects:!1};for(var r in t){var A=e.get(r);"boolean"==typeof A&&(t[r]=A)}return t}},{key:"structTreeRoot",get:function(){var e=null;try{e=this._readStructTreeRoot()}catch(e){if(e instanceof Ct)throw e;q("Unable read to structTreeRoot info.")}return _(this,"structTreeRoot",e)}},{key:"_readStructTreeRoot",value:function(){var e=this._catDict.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof He))return null;var r=new OQ(t,e);return r.init(),r}},{key:"toplevelPagesDict",get:function(){var e=this._catDict.get("Pages");if(!(e instanceof He))throw new re("Invalid top-level pages dictionary.");return _(this,"toplevelPagesDict",e)}},{key:"documentOutline",get:function(){var e=null;try{e=this._readDocumentOutline()}catch(e){if(e instanceof Ct)throw e;q("Unable to read document outline.")}return _(this,"documentOutline",e)}},{key:"_readDocumentOutline",value:function(){var t=this._catDict.get("Outlines");if(!(t instanceof He))return null;if(!((t=t.getRaw("First"))instanceof Ye))return null;var r={items:[]},A=[{obj:t,parent:r}],n=new Pe;n.put(t);for(var i=this.xref,a=new Uint8ClampedArray(3);A.length>0;){var o=A.shift(),s=i.fetchIfRef(o.obj);if(null!==s){s.has("Title")||q("Invalid outline item encountered.");var c={url:null,dest:null,action:null};e.parseDestDictionary({destDict:s,resultObj:c,docBaseUrl:this.baseUrl,docAttachments:this.attachments});var g=s.get("Title"),u=s.get("F")||0,l=s.getArray("C"),h=s.get("Count"),I=a;!St(l,3)||0===l[0]&&0===l[1]&&0===l[2]||(I=Ur.singletons.rgb.getRgb(l,0));var f={action:c.action,attachment:c.attachment,dest:c.dest,url:c.url,unsafeUrl:c.unsafeUrl,newWindow:c.newWindow,setOCGState:c.setOCGState,title:"string"==typeof g?Ie(g):"",color:I,count:Number.isInteger(h)?h:void 0,bold:!!(2&u),italic:!!(1&u),items:[]};o.parent.items.push(f),(t=s.getRaw("First"))instanceof Ye&&!n.has(t)&&(A.push({obj:t,parent:f}),n.put(t)),(t=s.getRaw("Next"))instanceof Ye&&!n.has(t)&&(A.push({obj:t,parent:o.parent}),n.put(t))}}return r.items.length>0?r.items:null}},{key:"permissions",get:function(){var e=null;try{e=this._readPermissions()}catch(e){if(e instanceof Ct)throw e;q("Unable to read permissions.")}return _(this,"permissions",e)}},{key:"_readPermissions",value:function(){var e=this.xref.trailer.get("Encrypt");if(!(e instanceof He))return null;var t=e.get("P");if("number"!=typeof t)return null;t+=Math.pow(2,32);var r=[];for(var A in y){var n=y[A];t&n&&r.push(n)}return r}},{key:"optionalContentConfig",get:function(){var e=null;try{var t=this._catDict.get("OCProperties");if(!t)return _(this,"optionalContentConfig",null);var r=t.get("D");if(!r)return _(this,"optionalContentConfig",null);var A=t.get("OCGs");if(!Array.isArray(A))return _(this,"optionalContentConfig",null);var n,i=[],a=new Pe,o=aE(A);try{for(o.s();!(n=o.n()).done;){var s=n.value;s instanceof Ye&&!a.has(s)&&(a.put(s),i.push(iE(IE,this,CE).call(this,s)))}}catch(e){o.e(e)}finally{o.f()}(e=iE(IE,this,BE).call(this,r,a)).groups=i}catch(e){if(e instanceof Ct)throw e;q("Unable to read optional content config: ".concat(e))}return _(this,"optionalContentConfig",e)}},{key:"setActualNumPages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._actualNumPages=e}},{key:"hasActualNumPages",get:function(){return null!==this._actualNumPages}},{key:"_pagesCount",get:function(){var e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new re("Page count in top-level pages dictionary is not an integer.");return _(this,"_pagesCount",e)}},{key:"numPages",get:function(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}},{key:"destinations",get:function(){var e=this._readDests(),t=Object.create(null);if(e instanceof UC){var r,A=aE(e.getAll());try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=lE(n[1]);a&&(t[Ie(i)]=a)}}catch(e){A.e(e)}finally{A.f()}}else e instanceof He&&e.forEach((function(e,r){var A=lE(r);A&&(t[e]=A)}));return _(this,"destinations",t)}},{key:"getDestination",value:function(e){var t=this._readDests();if(t instanceof UC){var r=lE(t.get(e));if(r)return r;var A=this.destinations[e];if(A)return q('Found "'.concat(e,'" at an incorrect position in the NameTree.')),A}else if(t instanceof He){var n=lE(t.get(e));if(n)return n}return null}},{key:"_readDests",value:function(){var e=this._catDict.get("Names");return null!=e&&e.has("Dests")?new UC(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}},{key:"pageLabels",get:function(){var e=null;try{e=this._readPageLabels()}catch(e){if(e instanceof Ct)throw e;q("Unable to read page labels.")}return _(this,"pageLabels",e)}},{key:"_readPageLabels",value:function(){var e=this._catDict.getRaw("PageLabels");if(!e)return null;for(var t=new Array(this.numPages),r=null,A="",n=new MC(e,this.xref).getAll(),i="",a=1,o=0,s=this.numPages;o=1))throw new re("Invalid start in PageLabel dictionary.");a=l}else a=1}switch(r){case"D":i=a;break;case"R":case"r":i=vt(a,"r"===r);break;case"A":case"a":var h="a"===r?97:65,I=a-1;i=String.fromCharCode(h+I%26).repeat(Math.floor(I/26)+1);break;default:if(r)throw new re('Invalid style "'.concat(r,'" in PageLabel dictionary.'));i=""}t[o]=A+i,a++}return t}},{key:"pageLayout",get:function(){var e=this._catDict.get("PageLayout"),t="";if(e instanceof Ue)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return _(this,"pageLayout",t)}},{key:"pageMode",get:function(){var e=this._catDict.get("PageMode"),t="UseNone";if(e instanceof Ue)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return _(this,"pageMode",t)}},{key:"viewerPreferences",get:function(){var e=this,t=this._catDict.get("ViewerPreferences");if(!(t instanceof He))return _(this,"viewerPreferences",null);var r,A=null,n=aE(t.getKeys());try{for(n.s();!(r=n.n()).done;){var i=r.value,a=t.get(i),o=void 0;switch(i){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof a&&(o=a);break;case"NonFullScreenPageMode":if(a instanceof Ue)switch(a.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":o=a.name;break;default:o="UseNone"}break;case"Direction":if(a instanceof Ue)switch(a.name){case"L2R":case"R2L":o=a.name;break;default:o="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(a instanceof Ue)switch(a.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":o=a.name;break;default:o="CropBox"}break;case"PrintScaling":if(a instanceof Ue)switch(a.name){case"None":case"AppDefault":o=a.name;break;default:o="AppDefault"}break;case"Duplex":if(a instanceof Ue)switch(a.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":o=a.name;break;default:o="None"}break;case"PrintPageRange":Array.isArray(a)&&a.length%2==0&&a.every((function(t,r,A){return Number.isInteger(t)&&t>0&&(0===r||t>=A[r-1])&&t<=e.numPages}))&&(o=a);break;case"NumCopies":Number.isInteger(a)&&a>0&&(o=a);break;default:q("Ignoring non-standard key in ViewerPreferences: ".concat(i,"."));continue}void 0!==o?(A||(A=Object.create(null)),A[i]=o):q('Bad value, for key "'.concat(i,'", in ViewerPreferences: ').concat(a,"."))}}catch(e){n.e(e)}finally{n.f()}return _(this,"viewerPreferences",A)}},{key:"openAction",get:function(){var t=this._catDict.get("OpenAction"),r=Object.create(null);if(t instanceof He){var A=new He(this.xref);A.set("A",t);var n={url:null,dest:null,action:null};e.parseDestDictionary({destDict:A,resultObj:n}),Array.isArray(n.dest)?r.dest=n.dest:n.action&&(r.action=n.action)}else Array.isArray(t)&&(r.dest=t);return _(this,"openAction",oe(r)>0?r:null)}},{key:"attachments",get:function(){var e=this._catDict.get("Names"),t=null;if(e instanceof He&&e.has("EmbeddedFiles")){var r,A=aE(new UC(e.getRaw("EmbeddedFiles"),this.xref).getAll());try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=n[1],o=new TC(a,this.xref);t||(t=Object.create(null)),t[Ie(i)]=o.serializable}}catch(e){A.e(e)}finally{A.f()}}return _(this,"attachments",t)}},{key:"xfaImages",get:function(){var e=this._catDict.get("Names"),t=null;if(e instanceof He&&e.has("XFAImages")){var r,A=aE(new UC(e.getRaw("XFAImages"),this.xref).getAll());try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=n[1];t||(t=new He(this.xref)),t.set(Ie(i),a)}}catch(e){A.e(e)}finally{A.f()}}return _(this,"xfaImages",t)}},{key:"_collectJavaScript",value:function(){var e=this._catDict.get("Names"),t=null;function r(e,r){if(r instanceof He&&Ke(r.get("S"),"JavaScript")){var A=r.get("JS");if(A instanceof ze)A=A.getString();else if("string"!=typeof A)return;(A=Ie(A).replaceAll("\\0",""))&&(t||(t=new Map)).set(e,A)}}if(e instanceof He&&e.has("JavaScript")){var A,n=aE(new UC(e.getRaw("JavaScript"),this.xref).getAll());try{for(n.s();!(A=n.n()).done;){var i=rE(A.value,2),a=i[0],o=i[1];r(Ie(a),o)}}catch(e){n.e(e)}finally{n.f()}}var s=this._catDict.get("OpenAction");return s&&r("OpenAction",s),t}},{key:"jsActions",get:function(){var e=this._collectJavaScript(),t=Mt(this.xref,this._catDict,k);if(e){t||(t=Object.create(null));var r,A=aE(e);try{for(A.s();!(r=A.n()).done;){var n=rE(r.value,2),i=n[0],a=n[1];i in t?t[i].push(a):t[i]=[a]}}catch(e){A.e(e)}finally{A.f()}}return _(this,"jsActions",t)}},{key:"fontFallback",value:(n=tE($Q().mark((function e(t,r){var A,n,i,a;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.fontCache);case 2:A=e.sent,n=aE(A),e.prev=4,n.s();case 6:if((i=n.n()).done){e.next=13;break}if((a=i.value).loadedName!==t){e.next=11;break}return a.fallback(r),e.abrupt("return");case 11:e.next=6;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(4),n.e(e.t0);case 18:return e.prev=18,n.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[4,15,18,21]])}))),function(e,t){return n.apply(this,arguments)})},{key:"cleanup",value:(A=tE($Q().mark((function e(){var t,r,A,n,i=arguments;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],JC(),this.globalImageCache.clear(t),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.pageDictCache.clear(),this.nonBlendModesSet.clear(),e.next=9,Promise.all(this.fontCache);case 9:r=e.sent,A=aE(r);try{for(A.s();!(n=A.n()).done;)delete n.value.dict.cacheKey}catch(e){A.e(e)}finally{A.f()}this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear();case 16:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getPageDict",value:(r=tE($Q().mark((function e(t){var r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[this.toplevelPagesDict],A=new Pe,(n=this._catDict.getRaw("Pages"))instanceof Ye&&A.put(n),i=this.xref,a=this.pageKidsCountCache,o=this.pageIndexCache,s=this.pageDictCache,c=0;case 6:if(!r.length){e.next=67;break}if(!((g=r.pop())instanceof Ye)){e.next=34;break}if(!((u=a.get(g))>=0&&c+u<=t)){e.next=13;break}return c+=u,e.abrupt("continue",6);case 13:if(!A.has(g)){e.next=15;break}throw new re("Pages tree contains circular reference.");case 15:return A.put(g),e.next=18,s.get(g)||i.fetchAsync(g);case 18:if(!((l=e.sent)instanceof He)){e.next=32;break}if(!((h=l.getRaw("Type"))instanceof Ye)){e.next=25;break}return e.next=24,i.fetchAsync(h);case 24:h=e.sent;case 25:if(!Ke(h,"Page")&&l.has("Kids")){e.next=32;break}if(a.has(g)||a.put(g,1),o.has(g)||o.put(g,c),c!==t){e.next=30;break}return e.abrupt("return",[l,g]);case 30:return c++,e.abrupt("continue",6);case 32:return r.push(l),e.abrupt("continue",6);case 34:if(g instanceof He){e.next=36;break}throw new re("Page dictionary kid reference points to wrong type of object.");case 36:if(I=g.objId,!((f=g.getRaw("Count"))instanceof Ye)){e.next=42;break}return e.next=41,i.fetchAsync(f);case 41:f=e.sent;case 42:if(!(Number.isInteger(f)&&f>=0)){e.next=47;break}if(I&&!a.has(I)&&a.put(I,f),!(c+f<=t)){e.next=47;break}return c+=f,e.abrupt("continue",6);case 47:if(!((C=g.getRaw("Kids"))instanceof Ye)){e.next=52;break}return e.next=51,i.fetchAsync(C);case 51:C=e.sent;case 52:if(Array.isArray(C)){e.next=64;break}if(!((B=g.getRaw("Type"))instanceof Ye)){e.next=58;break}return e.next=57,i.fetchAsync(B);case 57:B=e.sent;case 58:if(!Ke(B,"Page")&&g.has("Kids")){e.next=63;break}if(c!==t){e.next=61;break}return e.abrupt("return",[g,null]);case 61:return c++,e.abrupt("continue",6);case 63:throw new re("Page dictionary kids object is not an array.");case 64:for(Q=C.length-1;Q>=0;Q--)E=C[Q],r.push(E),g===this.toplevelPagesDict&&E instanceof Ye&&!s.has(E)&&s.put(E,i.fetchAsync(E));e.next=6;break;case 67:throw new Error("Page index ".concat(t," not found."));case 68:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getAllPageDicts",value:(t=tE($Q().mark((function e(){var t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E=arguments;return $Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=function(e){if(e instanceof Qt&&!t)throw e;t&&r&&0===c&&(q('getAllPageDicts - Skipping invalid first page: "'.concat(e,'".')),e=He.empty),a.set(c++,[e,null])},g=function(e,t){t&&!s.has(t)&&s.put(t,c),a.set(c++,[e,t])},t=E.length>0&&void 0!==E[0]&&E[0],r=this.pdfManager.evaluatorOptions.ignoreErrors,A=[{currentNode:this.toplevelPagesDict,posInKids:0}],n=new Pe,(i=this._catDict.getRaw("Pages"))instanceof Ye&&n.put(i),a=new Map,o=this.xref,s=this.pageIndexCache,c=0;case 10:if(!(A.length>0)){e.next=70;break}if(l=A.at(-1),h=l.currentNode,I=l.posInKids,!((f=h.getRaw("Kids"))instanceof Ye)){e.next=25;break}return e.prev=15,e.next=18,o.fetchAsync(f);case 18:f=e.sent,e.next=25;break;case 21:return e.prev=21,e.t0=e.catch(15),u(e.t0),e.abrupt("break",70);case 25:if(Array.isArray(f)){e.next=28;break}return u(new re("Page dictionary kids object is not an array.")),e.abrupt("break",70);case 28:if(!(I>=f.length)){e.next=31;break}return A.pop(),e.abrupt("continue",10);case 31:if(C=f[I],B=void 0,!(C instanceof Ye)){e.next=50;break}if(!n.has(C)){e.next=37;break}return u(new re("Pages tree contains circular reference.")),e.abrupt("break",70);case 37:return n.put(C),e.prev=38,e.next=41,o.fetchAsync(C);case 41:B=e.sent,e.next=48;break;case 44:return e.prev=44,e.t1=e.catch(38),u(e.t1),e.abrupt("break",70);case 48:e.next=51;break;case 50:B=C;case 51:if(B instanceof He){e.next=54;break}return u(new re("Page dictionary kid reference points to wrong type of object.")),e.abrupt("break",70);case 54:if(!((Q=B.getRaw("Type"))instanceof Ye)){e.next=66;break}return e.prev=56,e.next=59,o.fetchAsync(Q);case 59:Q=e.sent,e.next=66;break;case 62:return e.prev=62,e.t2=e.catch(56),u(e.t2),e.abrupt("break",70);case 66:Ke(Q,"Page")||!B.has("Kids")?g(B,C instanceof Ye?C:null):A.push({currentNode:B,posInKids:0}),l.posInKids++,e.next=10;break;case 70:return e.abrupt("return",a);case 71:case"end":return e.stop()}}),e,this,[[15,21],[38,44],[56,62]])}))),function(){return t.apply(this,arguments)})},{key:"getPageIndex",value:function(e){var t=this,r=this.pageIndexCache.get(e);if(void 0!==r)return Promise.resolve(r);var A=this.xref,n=0,i=function(r){return function(t){var r,n=0;return A.fetchAsync(t).then((function(A){if(je(t,e)&&!qe(A,"Page")&&!(A instanceof He&&!A.has("Type")&&A.has("Contents")))throw new re("The reference does not point to a /Page dictionary.");if(!A)return null;if(!(A instanceof He))throw new re("Node must be a dictionary.");return r=A.getRaw("Parent"),A.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof He))throw new re("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;var i,a=[],o=!1,s=aE(e);try{for(s.s();!(i=s.n()).done;){var c=i.value;if(!(c instanceof Ye))throw new re("Kid must be a reference.");if(je(c,t)){o=!0;break}a.push(A.fetchAsync(c).then((function(e){if(!(e instanceof He))throw new re("Kid node must be a dictionary.");e.has("Count")?n+=e.get("Count"):n++})))}}catch(e){s.e(e)}finally{s.f()}if(!o)throw new re("Kid reference not found in parent's kids.");return Promise.all(a).then((function(){return[n,r]}))}))}(r).then((function(r){if(!r)return t.pageIndexCache.put(e,n),n;var A=rE(r,2),a=A[0],o=A[1];return n+=a,i(o)}))};return i(e)}},{key:"baseUrl",get:function(){var e=this._catDict.get("URI");if(e instanceof He){var t=e.get("Base");if("string"==typeof t){var r=Z(t,null,{tryConvertEncoding:!0});if(r)return _(this,"baseUrl",r.href)}}return _(this,"baseUrl",this.pdfManager.docBaseUrl)}}],[{key:"parseDestDictionary",value:function(e){var t=e.destDict,r=e.resultObj,A=e.docBaseUrl,n=void 0===A?null:A,i=e.docAttachments,a=void 0===i?null:i;if(t instanceof He){var o,s,c=t.get("A");if(c instanceof He||(t.has("Dest")?c=t.get("Dest"):(c=t.get("AA"))instanceof He&&(c.has("D")?c=c.get("D"):c.has("U")&&(c=c.get("U")))),c instanceof He){var g=c.get("S");if(!(g instanceof Ue))return void q("parseDestDictionary: Invalid type in Action dictionary.");var u=g.name;switch(u){case"ResetForm":var l,h=c.get("Flags"),I=0==(1&("number"==typeof h?h:0)),f=[],C=[],B=aE(c.get("Fields")||[]);try{for(B.s();!(l=B.n()).done;){var Q=l.value;Q instanceof Ye?C.push(Q.toString()):"string"==typeof Q&&f.push(Ie(Q))}}catch(e){B.e(e)}finally{B.f()}r.resetForm={fields:f,refs:C,include:I};break;case"URI":(o=c.get("URI"))instanceof Ue&&(o="/"+o.name);break;case"GoTo":s=c.get("D");break;case"Launch":case"GoToR":var E=c.get("F");E instanceof He?o=new TC(E,null,!0).serializable.rawFilename:"string"==typeof E&&(o=E);var d=hE(c);d&&"string"==typeof o&&(o=o.split("#",1)[0]+"#"+d);var y=c.get("NewWindow");"boolean"==typeof y&&(r.newWindow=y);break;case"GoToE":var p,v=c.get("T");if(a&&v instanceof He){var m=v.get("R"),w=v.get("N");Ke(m,"C")&&"string"==typeof w&&(p=a[Ie(w)])}if(p){r.attachment=p;var b=hE(c);b&&(r.attachmentDest=b)}else q('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":var k=c.get("N");k instanceof Ue&&(r.action=k.name);break;case"SetOCGState":var D=c.get("State"),S=c.get("PreserveRB");if(!Array.isArray(D)||0===D.length)break;var F,x=[],R=aE(D);try{for(R.s();!(F=R.n()).done;){var G=F.value;if(G instanceof Ue)switch(G.name){case"ON":case"OFF":case"Toggle":x.push(G.name)}else G instanceof Ye&&x.push(G.toString())}}catch(e){R.e(e)}finally{R.f()}if(x.length!==D.length)break;r.setOCGState={state:x,preserveRB:"boolean"!=typeof S||S};break;case"JavaScript":var N,L=c.get("JS");L instanceof ze?N=L.getString():"string"==typeof L&&(N=L);var U=N&&Kt(Ie(N));if(U){o=U.url,r.newWindow=U.newWindow;break}default:if("JavaScript"===u||"SubmitForm"===u)break;q('parseDestDictionary - unsupported action: "'.concat(u,'".'))}}else t.has("Dest")&&(s=t.get("Dest"));if("string"==typeof o){var M=Z(o,n,{addDefaultProtocol:!0,tryConvertEncoding:!0});M&&(r.url=M.href),r.unsafeUrl=o}s&&(s instanceof Ue&&(s=s.name),"string"==typeof s?r.dest=Ie(s):uE(s)&&(r.dest=s))}else q("parseDestDictionary: \`destDict\` must be a dictionary.")}}]);var t,r,A,n}();function CE(e){var t=this.xref.fetch(e),r={id:e.toString(),name:null,intent:null,usage:{print:null,view:null}},A=t.get("Name");"string"==typeof A&&(r.name=Ie(A));var n=t.getArray("Intent");Array.isArray(n)||(n=[n]),n.every((function(e){return e instanceof Ue}))&&(r.intent=n.map((function(e){return e.name})));var i=t.get("Usage");if(!(i instanceof He))return r;var a=r.usage,o=i.get("Print");if(o instanceof He){var s=o.get("PrintState");if(s instanceof Ue)switch(s.name){case"ON":case"OFF":a.print={printState:s.name}}}var c=i.get("View");if(c instanceof He){var g=c.get("ViewState");if(g instanceof Ue)switch(g.name){case"ON":case"OFF":a.view={viewState:g.name}}}return r}function BE(e,t){function r(e){var r=[];if(Array.isArray(e)){var A,n=aE(e);try{for(n.s();!(A=n.n()).done;){var i=A.value;i instanceof Ye&&t.has(i)&&r.push(i.toString())}}catch(e){n.e(e)}finally{n.f()}}return r}function A(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Array.isArray(e))return null;var A,i=[],o=aE(e);try{for(o.s();!(A=o.n()).done;){var s=A.value;if(s instanceof Ye&&t.has(s))a.put(s),i.push(s.toString());else{var c=n(s,r);c&&i.push(c)}}}catch(e){o.e(e)}finally{o.f()}if(r>0)return i;var g,u=[],l=aE(t);try{for(l.s();!(g=l.n()).done;){var h=g.value;a.has(h)||u.push(h.toString())}}catch(e){l.e(e)}finally{l.f()}return u.length&&i.push({name:null,order:u}),i}function n(e,t){if(++t>o)return q("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;var r=i.fetchIfRef(e);if(!Array.isArray(r))return null;var n=i.fetchIfRef(r[0]);if("string"!=typeof n)return null;var a=A(r.slice(1),t);return a&&a.length?{name:Ie(n),order:a}:null}var i=this.xref,a=new Pe,o=10;return{name:"string"==typeof e.get("Name")?Ie(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?Ie(e.get("Creator")):null,baseState:e.get("BaseState")instanceof Ue?e.get("BaseState").name:null,on:r(e.get("ON")),off:r(e.get("OFF")),order:A(e.get("Order")),groups:null}}function QE(){QE=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function EE(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function dE(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){EE(i,A,n,a,o,"next",e)}function o(e){EE(i,A,n,a,o,"throw",e)}a(void 0)}))}}function yE(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function mE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);re.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]?arguments[1]:"0";if(t||(t="0"),!e)return ey(t);var r=e.trim().match(Zd);if(!r)return ey(t);var A=qd(r,3),n=A[1],i=A[2],a=parseFloat(n);if(isNaN(a))return ey(t);if(0===a)return 0;var o=Wd[i];return o?o(a):a}function ty(e){if(!e)return{num:1,den:1};var t=e.trim().split(/\\s*:\\s*/).map((function(e){return parseFloat(e)})).filter((function(e){return!isNaN(e)}));if(1===t.length&&t.push(1),0===t.length)return{num:1,den:1};var r=qd(t,2);return{num:r[0],den:r[1]}}function ry(e){return e?e.trim().split(/\\s+/).map((function(e){return{excluded:"-"===e[0],viewname:e.substring(1)}})):[]}var Ay=function(){function e(t,r,A,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.success=t,this.html=r,this.bbox=A,this.breakNode=n}return function(e,t,r){return t&&Kd(e.prototype,t),r&&Kd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"isBreak",value:function(){return!!this.breakNode}}],[{key:"FAILURE",get:function(){return _(this,"FAILURE",new e(!1,null,null,null))}},{key:"EMPTY",get:function(){return _(this,"EMPTY",new e(!0,null,null,null))}},{key:"breakNode",value:function(t){return new e(!1,null,null,t)}},{key:"success",value:function(t){return new e(!0,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,null)}}])}();function ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||ay(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iy(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ay(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ay(e,t){if(e){if("string"==typeof e)return oy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oy(e,t):void 0}}function oy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,A=iy(e);try{for(A.s();!(t=A.n()).done;){var n=t.value;this.addPdfFont(n)}}catch(e){A.e(e)}finally{A.f()}var i,a=iy(this.fonts.values());try{for(a.s();!(i=a.n()).done;){var o=i.value;o.regular||(o.regular=o.italic||o.bold||o.bolditalic)}}catch(e){a.e(e)}finally{a.f()}if(r&&0!==r.size){var s,c=this.fonts.get("PdfJS-Fallback-PdfJS-XFA"),g=iy(r);try{for(g.s();!(s=g.n()).done;){var u=s.value;this.fonts.set(u,c)}}catch(e){g.e(e)}finally{g.f()}}}},{key:"addPdfFont",value:function(e){var t=e.cssFontInfo,r=t.fontFamily,A=this.fonts.get(r);A||(A=Object.create(null),this.fonts.set(r,A),this.defaultFont||(this.defaultFont=A));var n,i,a,o="",s=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?o=s>=700?"bolditalic":"italic":s>=700&&(o="bold"),o||((e.name.includes("Bold")||null!==(n=e.psName)&&void 0!==n&&n.includes("Bold"))&&(o="bold"),(e.name.includes("Italic")||e.name.endsWith("It")||null!==(i=e.psName)&&void 0!==i&&i.includes("Italic")||null!==(a=e.psName)&&void 0!==a&&a.endsWith("It"))&&(o+="italic")),o||(o="regular"),A[o]=e}},{key:"getDefault",value:function(){return this.defaultFont}},{key:"find",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.fonts.get(e)||this.cache.get(e);if(r)return r;var A=/,|-|_| |bolditalic|bold|italic|regular|it/gi,n=e.replaceAll(A,"");if(r=this.fonts.get(n))return this.cache.set(e,r),r;n=n.toLowerCase();var i,a=[],o=iy(this.fonts.entries());try{for(o.s();!(i=o.n()).done;){var s=ny(i.value,2),c=s[0],g=s[1];c.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(g)}}catch(e){o.e(e)}finally{o.f()}if(0===a.length){var u,l=iy(this.fonts.entries());try{for(l.s();!(u=l.n()).done;){var h,I=ny(u.value,2)[1];null!==(h=I.regular.name)&&void 0!==h&&h.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(I)}}catch(e){l.e(e)}finally{l.f()}}if(0===a.length){n=n.replaceAll(/psmt|mt/gi,"");var f,C=iy(this.fonts.entries());try{for(C.s();!(f=C.n()).done;){var B=ny(f.value,2),Q=B[0],E=B[1];Q.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(E)}}catch(e){C.e(e)}finally{C.f()}}if(0===a.length){var d,y=iy(this.fonts.values());try{for(y.s();!(d=y.n()).done;){var p,v=d.value;null!==(p=v.regular.name)&&void 0!==p&&p.replaceAll(A,"").toLowerCase().startsWith(n)&&a.push(v)}}catch(e){y.e(e)}finally{y.f()}}return a.length>=1?(1!==a.length&&t&&q("XFA - Too many choices to guess the correct font: ".concat(e)),this.cache.set(e,a[0]),a[0]):(t&&!this.warned.has(e)&&(this.warned.add(e),q("XFA - Cannot find the font: ".concat(e))),null)}}])}();function uy(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}function ly(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Iy(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function hy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||Iy(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iy(e,t){if(e){if("string"==typeof e)return fy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fy(e,t):void 0}}function fy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);re?(A=Math.max(A,i),i=0,n+=a,a=C,t=-1,r=0,o=!0,s=!1):(a=Math.max(C,a),r=i,i+=l,t=c):i+l>e?(n+=a,a=C,-1!==t?(c=t,A=Math.max(A,r),i=0,t=-1,r=0):(A=Math.max(A,i),i=l),o=!0,s=!1):(i+=l,a=Math.max(C,a))}return{width:1.02*(A=Math.max(A,i)),height:n+=a+this.extraHeight,isBroken:o}}}])}();function vy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||my(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function my(e,t){if(e){if("string"==typeof e)return wy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wy(e,t):void 0}}function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r2&&void 0!==arguments[2])||arguments[2],A=e.match(by);if(!A)return null;for(var n,i=vy(A,1)[0],a=[{name:i,cacheName:"."+i,index:0,js:null,formCalc:null,operator:Dy.dot}],o=i.length;o4&&void 0!==arguments[4])||arguments[4],n=xy(r,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]);if(!n)return null;var i,a=Sy.get(n[0].name),o=0;a?(i=!0,e=[a(e,t)],o=1):(i=null===t,e=[t||e]);for(var s,c=function(){var r,a=n[o],s=a.name,c=a.cacheName,g=a.operator,u=a.index,l=[],h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=my(e))){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(h.s();!(r=h.n()).done;){var I=r.value;if(I.isXFAObject){var f=void 0,C=void 0;if(A&&((C=Fy.get(I))||(C=new Map,Fy.set(I,C)),f=C.get(c)),!f){switch(g){case Dy.dot:f=I[jE](s,!1);break;case Dy.dotDot:f=I[jE](s,!0);break;case Dy.dotHash:f=(f=I[qE](s)).isXFAObjectArray?f.children:[f]}A&&C.set(c,f)}f.length>0&&l.push(f)}}}catch(e){h.e(e)}finally{h.f()}if(0===l.length&&!i&&0===o){var B=t[td]();return(t=B)?(o=-1,e=[t],0):{v:null}}e=isFinite(u)?l.filter((function(e){return u=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function Ky(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ty(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Ty(e,t){if(e){if("string"==typeof e)return qy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qy(e,t):void 0}}function qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r2&&void 0!==arguments[2]&&arguments[2];jy(this,e),this[Qd]=t,this[Ed]=r,this[ap]=A,this[cp]=null,this[$y]=[],this[Yd]="".concat(r).concat(hp++),this[Ad]=null}return Zy(e,[{key:"isXFAObject",get:function(){return!0}},{key:"isXFAObjectArray",get:function(){return!1}},{key:"createNodes",value:function(e){var t,r=this,A=null,n=Ky(e);try{for(n.s();!(t=n.n()).done;){for(var i=t.value,a=i.name,o=i.index,s=0,c=isFinite(o)?o:0;s<=c;s++){var g=r[Qd]===Ip?-1:r[Qd];A=new Qp(g,a),r[SE](A)}r=A}}catch(e){n.e(e)}finally{n.f()}return A}},{key:yd,value:function(e){if(!this[ap]||!this[pd](e))return!1;var t=e[Ed],r=this[t];if(!(r instanceof Cp))return null!==r&&this[kd](r),this[t]=e,this[SE](e),!0;if(r.push(e))return this[SE](e),!0;var A="";return this.id?A=" (id: ".concat(this.id,")"):this.name&&(A=" (name: ".concat(this.name," ").concat(this.h.value,")")),q('XFA - node "'.concat(this[Ed],'"').concat(A,' has already enough "').concat(t,'"!')),!1}},{key:pd,value:function(e){return this.hasOwnProperty(e[Ed])&&e[Qd]===this[Qd]}},{key:ld,value:function(){return!1}},{key:kE,value:function(){return!1}},{key:sd,value:function(){return!1}},{key:cd,value:function(){return!1}},{key:wd,value:function(){this.para&&this[rd]()[HE].paraStack.pop()}},{key:bd,value:function(){this[rd]()[HE].paraStack.push(this.para)}},{key:xd,value:function(e){this.id&&this[Qd]===Od.template.id&&e.set(this.id,this)}},{key:rd,value:function(){return this[Ad].template}},{key:hd,value:function(){return!1}},{key:Id,value:function(){return!1}},{key:SE,value:function(e){e[cp]=this,this[$y].push(e),!e[Ad]&&this[Ad]&&(e[Ad]=this[Ad])}},{key:kd,value:function(e){var t=this[$y].indexOf(e);this[$y].splice(t,1)}},{key:nd,value:function(){return this.hasOwnProperty("value")}},{key:Gd,value:function(e){}},{key:vd,value:function(e){}},{key:YE,value:function(){}},{key:xE,value:function(e){delete this[ap],this[GE]&&(e.clean(this[GE]),delete this[GE])}},{key:ad,value:function(e){return this[$y].indexOf(e)}},{key:od,value:function(e,t){t[cp]=this,this[$y].splice(e,0,t),!t[Ad]&&this[Ad]&&(t[Ad]=this[Ad])}},{key:fd,value:function(){return!this.name}},{key:Bd,value:function(){return""}},{key:Ld,value:function(){return 0===this[$y].length?this[UE]:this[$y].map((function(e){return e[Ld]()})).join("")}},{key:zy,get:function(){var t=Object.getPrototypeOf(this);if(!t._attributes){var r,A=t._attributes=new Set,n=Ky(Object.getOwnPropertyNames(this));try{for(n.s();!(r=n.n()).done;){var i=r.value;if(null===this[i]||this[i]instanceof e||this[i]instanceof Cp)break;A.add(i)}}catch(e){n.e(e)}finally{n.f()}}return _(this,zy,t._attributes)}},{key:ud,value:function(e){for(var t=this;t;){if(t===e)return!0;t=t[td]()}return!1}},{key:td,value:function(){return this[cp]}},{key:ed,value:function(){return this[td]()}},{key:VE,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[e]:this[$y]}},{key:JE,value:function(){var t=Object.create(null);this[UE]&&(t.$content=this[UE]);var r,A=Ky(Object.getOwnPropertyNames(this));try{for(A.s();!(r=A.n()).done;){var n=r.value,i=this[n];null!==i&&(i instanceof e?t[n]=i[JE]():i instanceof Cp?i.isEmpty()||(t[n]=i.dump()):t[n]=i)}}catch(e){A.e(e)}finally{A.f()}return t}},{key:Hd,value:function(){return null}},{key:Md,value:function(){return Ay.EMPTY}},{key:zE,value:Oy().mark((function e(){var t,r,A;return Oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ky(this[VE]()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return A=r.value,e.next=7,A;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:Ap,value:Oy().mark((function e(t,r){var A,n,i,a,o;return Oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A=Ky(this[zE]()),e.prev=1,A.s();case 3:if((n=A.n()).done){e.next=13;break}if(i=n.value,t&&r!==t.has(i[Ed])){e.next=11;break}return a=this[TE](),(o=i[Md](a)).success||(this[HE].failingNode=i),e.next=11,o;case 11:e.next=3;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),A.e(e.t0);case 18:return e.prev=18,A.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[1,15,18,21]])}))},{key:PE,value:function(){return null}},{key:DE,value:function(e,t){this[HE].children.push(e)}},{key:TE,value:function(){}},{key:FE,value:function(e){var t=e.filter,r=void 0===t?null:t,A=e.include,n=void 0===A||A;if(this[HE].generator){var i=this[TE](),a=this[HE].failingNode[Md](i);if(!a.success)return a;a.html&&this[DE](a.html,a.bbox),delete this[HE].failingNode}else this[HE].generator=this[Ap](r,n);for(;;){var o=this[HE].generator.next();if(o.done)break;var s=o.value;if(!s.success)return s;s.html&&this[DE](s.html,s.bbox)}return this[HE].generator=null,Ay.EMPTY}},{key:Rd,value:function(e){this[up]=new Set(Object.keys(e))}},{key:ip,value:function(e){var t=this[zy],r=this[up];return function(e){return function(e){if(Array.isArray(e))return qy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ty(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e).filter((function(e){return t.has(e)&&!r.has(e)}))}},{key:Sd,value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,A=Ky(this[$y]);try{for(A.s();!(t=A.n()).done;)t.value[gp](e,r)}catch(e){A.e(e)}finally{A.f()}}},{key:gp,value:function(e,t){var r=this[np](e,t);r?this[Xy](r,e,t):this[Sd](e,t)}},{key:np,value:function(e,t){var r=this.use,A=this.usehref;if(!r&&!A)return null;var n=null,i=null,a=null,o=r;if(A?(o=A,A.startsWith("#som(")&&A.endsWith(")")?i=A.slice(5,-1):A.startsWith(".#som(")&&A.endsWith(")")?i=A.slice(6,-1):A.startsWith("#")?a=A.slice(1):A.startsWith(".#")&&(a=A.slice(2))):r.startsWith("#")?a=r.slice(1):i=r,this.use=this.usehref="",a?n=e.get(a):(n=Ry(e.get(Dd),this,i,!0,!1))&&(n=n[0]),!n)return q("XFA - Invalid prototype reference: ".concat(o,".")),null;if(n[Ed]!==this[Ed])return q("XFA - Incompatible prototype: ".concat(n[Ed]," !== ").concat(this[Ed],".")),null;if(t.has(n))return q("XFA - Cycle detected in prototypes use."),null;t.add(n);var s=n[np](e,t);return s&&n[Xy](s,e,t),n[Sd](e,t),t.delete(n),n}},{key:Xy,value:function(e,t,r){if(r.has(e))q("XFA - Cycle detected in prototypes use.");else{!this[UE]&&e[UE]&&(this[UE]=e[UE]),new Set(r).add(e);var A,n=Ky(this[ip](e[up]));try{for(n.s();!(A=n.n()).done;){var i=A.value;this[i]=e[i],this[up]&&this[up].add(i)}}catch(e){n.e(e)}finally{n.f()}var a,o=Ky(Object.getOwnPropertyNames(this));try{for(o.s();!(a=o.n()).done;){var s=a.value;if(!this[zy].has(s)){var c=this[s],g=e[s];if(c instanceof Cp){var u,l=Ky(c[$y]);try{for(l.s();!(u=l.n()).done;)u.value[gp](t,r)}catch(e){l.e(e)}finally{l.f()}for(var h=c[$y].length,I=g[$y].length;h0&&void 0!==arguments[0]?arguments[0]:null;return e?this[$y].filter((function(t){return t[Ed]===e})):this[$y]}},{key:qE,value:function(e){return this[e]}},{key:jE,value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Array.from(this[WE](e,t,r))}},{key:WE,value:function(e,t){var r=this,A=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Oy().mark((function n(){var i,a,o;return Oy().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("parent"!==e){n.next=4;break}return n.next=3,r[cp];case 3:return n.abrupt("return");case 4:i=Ky(r[$y]),n.prev=5,i.s();case 7:if((a=i.n()).done){n.next=19;break}if((o=a.value)[Ed]!==e){n.next=12;break}return n.next=12,o;case 12:if(o.name!==e){n.next=15;break}return n.next=15,o;case 15:if(!t&&!o[fd]()){n.next=17;break}return n.delegateYield(o[WE](e,t,!1),"t0",17);case 17:n.next=7;break;case 19:n.next=24;break;case 21:n.prev=21,n.t1=n.catch(5),i.e(n.t1);case 24:return n.prev=24,i.f(),n.finish(24);case 27:if(!A||!r[zy].has(e)){n.next=30;break}return n.next=30,new Bp(r,e,r[e]);case 30:case"end":return n.stop()}}),n,null,[[5,21,24,27]])}))()}}],[{key:ep,value:function(t){return Array.isArray(t)?t.map((function(t){return e[ep](t)})):"object"==typeof t&&null!==t?Object.assign({},t):t}}])}(),Cp=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;jy(this,e),this[op]=t,this[$y]=[]}return Zy(e,[{key:"isXFAObject",get:function(){return!1}},{key:"isXFAObjectArray",get:function(){return!0}},{key:"push",value:function(e){return this[$y].length<=this[op]?(this[$y].push(e),!0):(q('XFA - node "'.concat(e[Ed],'" accepts no more than ').concat(this[op]," children")),!1)}},{key:"isEmpty",value:function(){return 0===this[$y].length}},{key:"dump",value:function(){return 1===this[$y].length?this[$y][0][JE]():this[$y].map((function(e){return e[JE]()}))}},{key:NE,value:function(){var t=new e(this[op]);return t[$y]=this[$y].map((function(e){return e[NE]()})),t}},{key:"children",get:function(){return this[$y]}},{key:"clear",value:function(){this[$y].length=0}}])}(),Bp=function(){return Zy((function e(t,r,A){jy(this,e),this[cp]=t,this[Ed]=r,this[UE]=A,this[LE]=!1,this[Yd]="attribute".concat(hp++)}),[{key:td,value:function(){return this[cp]}},{key:gd,value:function(){return!0}},{key:ZE,value:function(){return this[UE].trim()}},{key:Gd,value:function(e){e=e.value||"",this[UE]=e.toString()}},{key:Ld,value:function(){return this[UE]}},{key:ud,value:function(e){return this[cp]===e||this[cp][ud](e)}}])}(),Qp=function(e){function t(e,r){var A,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(jy(this,t),(A=My(this,t,[e,r]))[UE]="",A[tp]=null,"#text"!==r){var i=new Map;A[Vy]=i;for(var a=0,o=Object.entries(n);a"),this[UE])"string"==typeof this[UE]?e.push(Yt(this[UE])):this[UE][Jd](e);else{var g,u=Ky(this[$y]);try{for(u.s();!(g=u.n()).done;)g.value[Jd](e)}catch(e){u.e(e)}finally{u.f()}}e.push(""))}else e.push("/>")}else e.push(Yt(this[UE]))}},{key:yd,value:function(e){if(this[UE]){var r=new t(this[Qd],"#text");this[SE](r),r[UE]=this[UE],this[UE]=""}return this[SE](e),!0}},{key:vd,value:function(e){this[UE]+=e}},{key:YE,value:function(){if(this[UE]&&this[$y].length>0){var e=new t(this[Qd],"#text");this[SE](e),e[UE]=this[UE],delete this[UE]}}},{key:Md,value:function(){return"#text"===this[Ed]?Ay.success({name:"#text",value:this[UE]}):Ay.EMPTY}},{key:VE,value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?this[$y].filter((function(t){return t[Ed]===e})):this[$y]}},{key:KE,value:function(){return this[Vy]}},{key:qE,value:function(e){var t=this[Vy].get(e);return void 0!==t?t:this[VE](e)}},{key:WE,value:Oy().mark((function(e,t){var r,A,n,i;return Oy().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(r=this[Vy].get(e))){a.next=4;break}return a.next=4,r;case 4:A=Ky(this[$y]),a.prev=5,A.s();case 7:if((n=A.n()).done){a.next=16;break}if((i=n.value)[Ed]!==e){a.next=12;break}return a.next=12,i;case 12:if(!t){a.next=14;break}return a.delegateYield(i[WE](e,t),"t0",14);case 14:a.next=7;break;case 16:a.next=21;break;case 18:a.prev=18,a.t1=a.catch(5),A.e(a.t1);case 21:return a.prev=21,A.f(),a.finish(21);case 24:case"end":return a.stop()}}),r,this,[[5,18,21,24]])}))},{key:OE,value:Oy().mark((function(e,t){var r,A,n,i;return Oy().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(r=this[Vy].get(e))||t&&r[LE]){a.next=4;break}return a.next=4,r;case 4:A=Ky(this[$y]),a.prev=5,A.s();case 7:if((n=A.n()).done){a.next=12;break}return i=n.value,a.delegateYield(i[OE](e,t),"t0",10);case 10:a.next=7;break;case 12:a.next=17;break;case 14:a.prev=14,a.t1=a.catch(5),A.e(a.t1);case 17:return a.prev=17,A.f(),a.finish(17);case 20:case"end":return a.stop()}}),r,this,[[5,14,17,20]])}))},{key:XE,value:Oy().mark((function e(t,r,A){var n,i,a;return Oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Ky(this[$y]),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=12;break}if((a=i.value)[Ed]!==t||A&&a[LE]){e.next=8;break}return e.next=8,a;case 8:if(!r){e.next=10;break}return e.delegateYield(a[XE](t,r,A),"t0",10);case 10:e.next=3;break;case 12:e.next=17;break;case 14:e.prev=14,e.t1=e.catch(1),n.e(e.t1);case 17:return e.prev=17,n.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[1,14,17,20]])}))},{key:gd,value:function(){return null===this[tp]?0===this[$y].length||this[$y][0][Qd]===Od.xhtml.id:this[tp]}},{key:ZE,value:function(){return null===this[tp]?0===this[$y].length?this[UE].trim():this[$y][0][Qd]===Od.xhtml.id?this[$y][0][Ld]().trim():null:this[UE].trim()}},{key:Gd,value:function(e){e=e.value||"",this[UE]=e.toString()}},{key:JE,value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object.create(null);e&&(t.$ns=this[Qd]),this[UE]&&(t.$content=this[UE]),t.$name=this[Ed],t.children=[];var r,A=Ky(this[$y]);try{for(A.s();!(r=A.n()).done;){var n=r.value;t.children.push(n[JE](e))}}catch(e){A.e(e)}finally{A.f()}t.attributes=Object.create(null);var i,a=Ky(this[Vy]);try{for(a.s();!(i=a.n()).done;){var o=Uy(i.value,2),s=o[0],c=o[1];t.attributes[s]=c[UE]}}catch(e){a.e(e)}finally{a.f()}return t}}])}(),Ep=function(e){function t(e,r){var A;return jy(this,t),(A=My(this,t,[e,r]))[UE]="",A}return Yy(t,fp),Zy(t,[{key:vd,value:function(e){this[UE]+=e}},{key:YE,value:function(){}}])}(),dp=function(e){function t(e,r,A){var n;return jy(this,t),(n=My(this,t,[e,r]))[sp]=A,n}return Yy(t,Ep),Zy(t,[{key:YE,value:function(){var e=this;this[UE]=zd({data:this[UE],defaultValue:this[sp][0],validate:function(t){return e[sp].includes(t)}})}},{key:xE,value:function(e){Ny(t,xE,this,3)([e]),delete this[sp]}}])}(),yp=function(e){function t(){return jy(this,t),My(this,t,arguments)}return Yy(t,Ep),Zy(t,[{key:YE,value:function(){this[UE]=this[UE].trim()}}])}(),pp=function(e){function t(e,r,A,n){var i;return jy(this,t),(i=My(this,t,[e,r]))[rp]=A,i[lp]=n,i}return Yy(t,Ep),Zy(t,[{key:YE,value:function(){this[UE]=Xd({data:this[UE],defaultValue:this[rp],validate:this[lp]})}},{key:xE,value:function(e){Ny(t,xE,this,3)([e]),delete this[rp],delete this[lp]}}])}(),vp=function(e){function t(e,r){return jy(this,t),My(this,t,[e,r,0,function(e){return 1===e}])}return Yy(t,pp),Zy(t)}(),mp=function(e){function t(e,r){return jy(this,t),My(this,t,[e,r,1,function(e){return 0===e}])}return Yy(t,pp),Zy(t)}();function wp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bp(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&(t.minWidth=kp(e.minW)),e.maxW>0&&(t.maxWidth=kp(e.maxW)),e.minH>0&&(t.minHeight=kp(e.minH)),e.maxH>0&&(t.maxHeight=kp(e.maxH)))}function Fp(e,t,r,A,n,i){var a=new py(t,r,A,n);return"string"==typeof e?a.addString(e):e[md](a),a.compute(i)}function xp(e,t){var r=null,A=null,n=!1;if((!e.w||!e.h)&&e.value){var i=0,a=0;e.margin&&(i=e.margin.leftInset+e.margin.rightInset,a=e.margin.topInset+e.margin.bottomInset);var o=null,s=null;e.para&&(s=Object.create(null),o=""===e.para.lineHeight?null:e.para.lineHeight,s.top=""===e.para.spaceAbove?0:e.para.spaceAbove,s.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow,s.left=""===e.para.marginLeft?0:e.para.marginLeft,s.right=""===e.para.marginRight?0:e.para.marginRight);var c=e.font;if(!c)for(var g=e[rd](),u=e[td]();u&&u!==g;){if(u.font){c=u.font;break}u=u[td]()}var l=(e.w||t.width)-i,h=e[Ad].fontFinder;if(e.value.exData&&e.value.exData[UE]&&"text/html"===e.value.exData.contentType){var I=Fp(e.value.exData[UE],c,s,o,h,l);A=I.width,r=I.height,n=I.isBroken}else{var f=e.value[Ld]();if(f){var C=Fp(f,c,s,o,h,l);A=C.width,r=C.height,n=C.isBroken}}null===A||e.w||(A+=i),null===r||e.h||(r+=a)}return{w:A,h:r,isBroken:n}}function Rp(e,t,r){var A;if(""!==e.w&&""!==e.h)A=[e.x,e.y,e.w,e.h];else{if(!r)return null;var n=e.w;if(""===n){if(0===e.maxW){var i=e[ed]();n="position"===i.layout&&""!==i.w?0:e.minW}else n=Math.min(e.maxW,r.width);t.attributes.style.width=kp(n)}var a=e.h;if(""===a){if(0===e.maxH){var o=e[ed]();a="position"===o.layout&&""!==o.h?0:e.minH}else a=Math.min(e.maxH,r.height);t.attributes.style.height=kp(a)}A=[e.x,e.y,n,a]}return A}function Gp(e){var t,r=e[ed]();if(null!==(t=r.layout)&&void 0!==t&&t.includes("row")){var A,n=r[HE],i=e.colSpan;A=-1===i?n.columnWidths.slice(n.currentColumn).reduce((function(e,t){return e+t}),0):n.columnWidths.slice(n.currentColumn,n.currentColumn+i).reduce((function(e,t){return e+t}),0),isNaN(A)||(e.w=A)}r.layout&&"position"!==r.layout&&(e.x=e.y=0),"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce((function(e,t){return e+t}),0))}function Np(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function Lp(e){for(var t=Object.create(null),r=arguments.length,A=new Array(r>1?r-1:0),n=1;n=0)){var r="padding"+("left"==("right"===e.textAlign?"right":"left")?"Left":"Right"),A=ey(e[r],"0px");e[r]="".concat(A-t,"px")}}function Jp(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}}function Hp(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function Yp(e){var t=e[rd]()[HE].paraStack;return t.length?t.at(-1):null}function Pp(e,t,r){var A;if(null!==(A=r.attributes.class)&&void 0!==A&&A.includes("xfaRich")){t&&(""===e.h&&(t.height="auto"),""===e.w&&(t.width="auto"));var n=Yp(e);if(n){var i=r.attributes.style;switch(i.display="flex",i.flexDirection="column",n.vAlign){case"top":i.justifyContent="start";break;case"bottom":i.justifyContent="end";break;case"middle":i.justifyContent="center"}for(var a=n[Hd](),o=0,s=Object.entries(a);oe.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(A.children);try{for(l.s();!(g=l.n()).done;)g.value.attributes.style.height=u}catch(e){l.e(e)}finally{l.f()}break;case"table":case"tb":A.width=Math.min(n.width,Math.max(A.width,s)),A.height+=c,A.children.push(t)}}function Xp(e){var t=e[HE].availableSpace,r=e.margin?e.margin.topInset+e.margin.bottomInset:0,A=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[HE].attempt?{width:t.width-A-e[HE].currentWidth,height:t.height-r-e[HE].prevHeight}:{width:t.width-A,height:t.height-r-e[HE].height};case"rl-row":case"row":return{width:e[HE].columnWidths.slice(e[HE].currentColumn).reduce((function(e,t){return e+t})),height:t.height-A};case"table":case"tb":return{width:t.width-A,height:t.height-r-e[HE].height};default:return t}}function Vp(e,t){var r;if(null===e[rd]()[HE].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;var A=e[ed](),n=(null===(r=A[HE])||void 0===r?void 0:r.attempt)||0,i=function(e){var t,r,A=""===e.w?NaN:e.w,n=""===e.h?NaN:e.h,i=0,a=0;switch(e.anchorType||""){case"bottomCenter":i=A/2,a=n;break;case"bottomLeft":i=0,a=n;break;case"bottomRight":i=A,a=n;break;case"middleCenter":i=A/2,a=n/2;break;case"middleLeft":i=0,a=n/2;break;case"middleRight":i=A,a=n/2;break;case"topCenter":i=A/2,a=0;break;case"topRight":i=A,a=0}switch(e.rotate||0){case 0:t=-i,r=-a;break;case 90:t=-a,r=i;var o=[n,-A];A=o[0],n=o[1];break;case 180:t=i,r=a;var s=[-A,-n];A=s[0],n=s[1];break;case 270:t=a,r=-i;var c=[-n,A];A=c[0],n=c[1]}return[e.x+t+Math.min(0,A),e.y+r+Math.min(0,n),Math.abs(A),Math.abs(n)]}(e),a=Tp(i,4),o=a[1],s=a[2],c=a[3];switch(A.layout){case"lr-tb":case"rl-tb":return 0===n?e[rd]()[HE].noLayoutFailure?""!==e.w?Math.round(s-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(c-t.height)>2)&&(""!==e.w?Math.round(s-t.width)<=2||0===A[HE].numberInLine&&t.height>2:t.width>2):!!e[rd]()[HE].noLayoutFailure||!(""!==e.h&&Math.round(c-t.height)>2)&&(""===e.w||Math.round(s-t.width)<=2||!A[Id]())&&t.height>2;case"table":case"tb":return!!e[rd]()[HE].noLayoutFailure||(""===e.h||e[hd]()?(""===e.w||Math.round(s-t.width)<=2||!A[Id]())&&t.height>2:Math.round(c-t.height)<=2);case"position":return!!e[rd]()[HE].noLayoutFailure||""===e.h||Math.round(c+o-t.height)<=2||c+o>e[rd]()[HE].currentContentArea.h;case"rl-row":case"row":return!!e[rd]()[HE].noLayoutFailure||""===e.h||Math.round(c-t.height)<=2;default:return!0}}function zp(e,t,r,A){var n=$p(ov(1&A?e.prototype:e),t,r);return 2&A&&"function"==typeof n?function(e){return n.apply(r,e)}:n}function $p(){return $p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var A=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ov(e)););return e}(e,t);if(A){var n=Object.getOwnPropertyDescriptor(A,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},$p.apply(null,arguments)}function ev(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||hv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tv(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}var uv=gv().mark(vv);function lv(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=hv(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function hv(e,t){if(e){if("string"==typeof e)return Iv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Iv(e,t):void 0}}function Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r180?1:0,c=50*(1+Math.cos(a)),g=50*(1-Math.sin(a)),u=50*(1+Math.cos(a+o)),l=50*(1-Math.sin(a+o));t={name:"path",attributes:{xmlns:Cv,d:"M ".concat(c," ").concat(g," A 50 50 0 ").concat(s," 0 ").concat(u," ").concat(l),vectorEffect:"non-scaling-stroke",style:n}},Object.assign(i,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}var h={name:"svg",children:[t],attributes:i};return yv(this[td]()[td]())?Ay.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[h]}):(h.attributes.style.position="absolute",Ay.success(h))}}])}(),Lv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"area",!0])).colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.id=e.id||"",r.name=e.name||"",r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.desc=null,r.extras=null,r.area=new Cp,r.draw=new Cp,r.exObject=new Cp,r.exclGroup=new Cp,r.field=new Cp,r.subform=new Cp,r.subformSet=new Cp,r}return sv(t,fp),rv(t,[{key:zE,value:gv().mark((function e(){return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(vv(this),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:fd,value:function(){return!0}},{key:cd,value:function(){return!0}},{key:DE,value:function(e,t){var r=ev(t,4),A=r[0],n=r[1],i=r[2],a=r[3];this[HE].width=Math.max(this[HE].width,A+i),this[HE].height=Math.max(this[HE].height,n+a),this[HE].children.push(e)}},{key:TE,value:function(){return this[HE].availableSpace}},{key:Md,value:function(e){var t=Lp(this,"position"),r={style:t,id:this[Yd],class:["xfaArea"]};Hp(this)&&r.class.push("xfaPrintOnly"),this.name&&(r.xfaName=this.name);var A=[];this[HE]={children:A,width:0,height:0,availableSpace:e};var n=this[FE]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!n.success)return n.isBreak()?n:(delete this[HE],Ay.FAILURE);t.width=kp(this[HE].width),t.height=kp(this[HE].height);var i={name:"div",attributes:r,children:A},a=[this.x,this.y,this[HE].width,this[HE].height];return delete this[HE],Ay.success(i,a)}}])}(),Uv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"assist",!0])).id=e.id||"",r.role=e.role||"",r.use=e.use||"",r.usehref=e.usehref||"",r.speak=null,r.toolTip=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e;return(null===(e=this.toolTip)||void 0===e?void 0:e[UE])||null}}])}(),Mv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"barcode",!0])).charEncoding=zd({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:function(e){return["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)}}),r.checksum=$d(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),r.dataColumnCount=Xd({data:e.dataColumnCount,defaultValue:-1,validate:function(e){return e>=0}}),r.dataLength=Xd({data:e.dataLength,defaultValue:-1,validate:function(e){return e>=0}}),r.dataPrep=$d(e.dataPrep,["none","flateCompress"]),r.dataRowCount=Xd({data:e.dataRowCount,defaultValue:-1,validate:function(e){return e>=0}}),r.endChar=e.endChar||"",r.errorCorrectionLevel=Xd({data:e.errorCorrectionLevel,defaultValue:-1,validate:function(e){return e>=0&&e<=8}}),r.id=e.id||"",r.moduleHeight=ey(e.moduleHeight,"5mm"),r.moduleWidth=ey(e.moduleWidth,"0.25mm"),r.printCheckDigit=Xd({data:e.printCheckDigit,defaultValue:0,validate:function(e){return 1===e}}),r.rowColumnRatio=ty(e.rowColumnRatio),r.startChar=e.startChar||"",r.textLocation=$d(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),r.truncate=Xd({data:e.truncate,defaultValue:0,validate:function(e){return 1===e}}),r.type=$d(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),r.upsMode=$d(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),r.use=e.use||"",r.usehref=e.usehref||"",r.wideNarrowRatio=ty(e.wideNarrowRatio),r.encrypt=null,r.extras=null,r}return sv(t,fp),rv(t)}(),Jv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"bind",!0])).match=$d(e.match,["once","dataRef","global","none"]),r.ref=e.ref||"",r.picture=null,r}return sv(t,fp),rv(t)}(),Hv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"bindItems"])).connection=e.connection||"",r.labelRef=e.labelRef||"",r.ref=e.ref||"",r.valueRef=e.valueRef||"",r}return sv(t,fp),rv(t)}(),Yv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"bookend"])).id=e.id||"",r.leader=e.leader||"",r.trailer=e.trailer||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),Pv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"boolean"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,vp),rv(t,[{key:Md,value:function(e){return Dv(1===this[UE]?"1":"0")}}])}(),Ov=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"border",!0])).break=$d(e.break,["close","open"]),r.hand=$d(e.hand,["even","left","right"]),r.id=e.id||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.corner=new Cp(4),r.edge=new Cp(4),r.extras=null,r.fill=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:_E,value:function(){if(!this[HE]){var e=this.edge.children.slice();if(e.length<4)for(var t=e.at(-1)||new hm({}),r=e.length;r<4;r++)e.push(t);var A=e.map((function(e){return e.thickness})),n=[0,0,0,0];this.margin&&(n[0]=this.margin.topInset,n[1]=this.margin.rightInset,n[2]=this.margin.bottomInset,n[3]=this.margin.leftInset),this[HE]={widths:A,insets:n,edges:e}}return this[HE]}},{key:Hd,value:function(){var e,t=this[_E]().edges.map((function(e){var t=e[Hd]();return t.color||(t.color="#000000"),t})),r=Object.create(null);if(this.margin&&Object.assign(r,this.margin[Hd]()),"visible"===(null===(e=this.fill)||void 0===e?void 0:e.presence)&&Object.assign(r,this.fill[Hd]()),this.corner.children.some((function(e){return 0!==e.radius}))){var A=this.corner.children.map((function(e){return e[Hd]()}));if(2===A.length||3===A.length)for(var n=A.at(-1),i=A.length;i<4;i++)A.push(n);r.borderRadius=A.map((function(e){return e.radius})).join(" ")}switch(this.presence){case"invisible":case"hidden":r.borderStyle="";break;case"inactive":r.borderStyle="none";break;default:r.borderStyle=t.map((function(e){return e.style})).join(" ")}return r.borderWidth=t.map((function(e){return e.width})).join(" "),r.borderColor=t.map((function(e){return e.color})).join(" "),r}}])}(),Kv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"break",!0])).after=$d(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),r.afterTarget=e.afterTarget||"",r.before=$d(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),r.beforeTarget=e.beforeTarget||"",r.bookendLeader=e.bookendLeader||"",r.bookendTrailer=e.bookendTrailer||"",r.id=e.id||"",r.overflowLeader=e.overflowLeader||"",r.overflowTarget=e.overflowTarget||"",r.overflowTrailer=e.overflowTrailer||"",r.startNew=Xd({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t)}(),Tv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"breakAfter",!0])).id=e.id||"",r.leader=e.leader||"",r.startNew=Xd({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),r.target=e.target||"",r.targetType=$d(e.targetType,["auto","contentArea","pageArea"]),r.trailer=e.trailer||"",r.use=e.use||"",r.usehref=e.usehref||"",r.script=null,r}return sv(t,fp),rv(t)}(),qv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"breakBefore",!0])).id=e.id||"",r.leader=e.leader||"",r.startNew=Xd({data:e.startNew,defaultValue:0,validate:function(e){return 1===e}}),r.target=e.target||"",r.targetType=$d(e.targetType,["auto","contentArea","pageArea"]),r.trailer=e.trailer||"",r.use=e.use||"",r.usehref=e.usehref||"",r.script=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){return this[HE]={},Ay.FAILURE}}])}(),jv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"button",!0])).highlight=$d(e.highlight,["inverted","none","outline","push"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r=this[td]()[td](),A={name:"button",attributes:{id:this[Yd],class:["xfaButton"],style:{}},children:[]},n=lv(r.event.children);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("click"===i.activity&&i.script){var a=Kt(i.script[UE]);if(a){var o=Kp(a.url);o&&A.children.push({name:"a",attributes:{id:"link"+this[Yd],href:o,newWindow:a.newWindow,class:["xfaLink"],style:{}},children:[]})}}}}catch(e){n.e(e)}finally{n.f()}return Ay.success(A)}}])}(),Wv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"calculate",!0])).id=e.id||"",r.override=$d(e.override,["disabled","error","ignore","warning"]),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.message=null,r.script=null,r}return sv(t,fp),rv(t)}(),Zv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"caption",!0])).id=e.id||"",r.placement=$d(e.placement,["left","bottom","inline","right","top"]),r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.reserve=Math.ceil(ey(e.reserve)),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.font=null,r.margin=null,r.para=null,r.value=null,r}return sv(t,fp),rv(t,[{key:Gd,value:function(e){pv(this,e)}},{key:_E,value:function(e){if(!this[HE]){var t=e.width,r=e.height;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":r=this.reserve<=0?r:this.reserve}this[HE]=xp(this,{width:t,height:r})}return this[HE]}},{key:Md,value:function(e){if(!this.value)return Ay.EMPTY;this[bd]();var t=this.value[Md](e).html;if(!t)return this[wd](),Ay.EMPTY;var r=this.reserve;if(this.reserve<=0){var A=this[_E](e),n=A.w,i=A.h;switch(this.placement){case"left":case"right":case"inline":this.reserve=n;break;case"top":case"bottom":this.reserve=i}}var a=[];"string"==typeof t?a.push({name:"#text",value:t}):a.push(t);var o=Lp(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(o.width=kp(this.reserve));break;case"top":case"bottom":this.reserve>0&&(o.height=kp(this.reserve))}return Pp(this,null,t),this[wd](),this.reserve=r,Ay.success({name:"div",attributes:{style:o,class:["xfaCaption"]},children:a})}}])}(),_v=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"certificate"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Xv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"certificates",!0])).credentialServerPolicy=$d(e.credentialServerPolicy,["optional","required"]),r.id=e.id||"",r.url=e.url||"",r.urlPolicy=e.urlPolicy||"",r.use=e.use||"",r.usehref=e.usehref||"",r.encryption=null,r.issuers=null,r.keyUsage=null,r.oids=null,r.signing=null,r.subjectDNs=null,r}return sv(t,fp),rv(t)}(),Vv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"checkButton",!0])).id=e.id||"",r.mark=$d(e.mark,["default","check","circle","cross","diamond","square","star"]),r.shape=$d(e.shape,["square","round"]),r.size=ey(e.size,"10pt"),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r,A,n,i=Lp("margin"),a=kp(this.size);i.width=i.height=a;var o,s,c,g=this[td]()[td](),u=g.items.children.length&&g.items.children[0][Md]().html||[],l={on:(void 0!==u[0]?u[0]:"on").toString(),off:(void 0!==u[1]?u[1]:"off").toString()},h=((null===(t=g.value)||void 0===t?void 0:t[Ld]())||"off")===l.on||void 0,I=g[ed](),f=g[Yd];I instanceof mm?(n=I[Yd],r="radio",A="xfaRadio",o=(null===(s=I[ME])||void 0===s?void 0:s[Yd])||I[Yd]):(r="checkbox",A="xfaCheckbox",o=(null===(c=g[ME])||void 0===c?void 0:c[Yd])||g[Yd]);var C={name:"input",attributes:{class:[A],style:i,fieldId:f,dataId:o,type:r,checked:h,xfaOn:l.on,xfaOff:l.off,"aria-label":kv(g),"aria-required":!1}};return n&&(C.attributes.name=n),mv(g)&&(C.attributes["aria-required"]=!0,C.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[C]})}}])}(),zv=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"choiceList",!0])).commitOn=$d(e.commitOn,["select","exit"]),r.id=e.id||"",r.open=$d(e.open,["userControl","always","multiSelect","onEntry"]),r.textEntry=Xd({data:e.textEntry,defaultValue:0,validate:function(e){return 1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r,A=Lp(this,"border","margin"),n=this[td]()[td](),i=(null===(t=n.font)||void 0===t?void 0:t.size)||10,a={fontSize:"calc(".concat(i,"px * var(--scale-factor))")},o=[];if(n.items.children.length>0){var s,c=n.items,g=0,u=0;2===c.children.length&&(u=1-(g=c.children[0].save));for(var l=c.children[g][Md]().html,h=c.children[u][Md]().html,I=!1,f=(null===(s=n.value)||void 0===s?void 0:s[Ld]())||"",C=0,B=l.length;C1&&void 0!==arguments[1]?arguments[1]:[0,0,0],3),r=t[0],A=t[1],n=t[2];if(!e)return{r,g:A,b:n};var i=e.trim().split(/\\s*,\\s*/).map((function(e){return Math.min(Math.max(0,parseInt(e.trim(),10)),255)})).map((function(e){return isNaN(e)?0:e}));if(i.length<3)return{r,g:A,b:n};var a=qd(i,3);return{r:r=a[0],g:A=a[1],b:n=a[2]}}(e.value):"",r.extras=null,r}return sv(t,fp),rv(t,[{key:nd,value:function(){return!1}},{key:Hd,value:function(){return this.value?ge.makeHexColor(this.value.r,this.value.g,this.value.b):null}}])}(),em=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"comb"])).id=e.id||"",r.numberOfCells=Xd({data:e.numberOfCells,defaultValue:0,validate:function(e){return e>=0}}),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),tm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"connect",!0])).connection=e.connection||"",r.id=e.id||"",r.ref=e.ref||"",r.usage=$d(e.usage,["exportAndImport","exportOnly","importOnly"]),r.use=e.use||"",r.usehref=e.usehref||"",r.picture=null,r}return sv(t,fp),rv(t)}(),rm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"contentArea",!0])).h=ey(e.h),r.id=e.id||"",r.name=e.name||"",r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.w=ey(e.w),r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.desc=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t={left:kp(this.x),top:kp(this.y),width:kp(this.w),height:kp(this.h)},r=["xfaContentarea"];return Hp(this)&&r.push("xfaPrintOnly"),Ay.success({name:"div",children:[],attributes:{style:t,class:r,id:this[Yd]}})}}])}(),Am=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"corner",!0])).id=e.id||"",r.inverted=Xd({data:e.inverted,defaultValue:0,validate:function(e){return 1===e}}),r.join=$d(e.join,["square","round"]),r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.radius=ey(e.radius),r.stroke=$d(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),r.thickness=ey(e.thickness,"0.5pt"),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){var e=Lp(this,"visibility");return e.radius=kp("square"===this.join?0:this.radius),e}}])}(),nm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"date"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=this[UE].trim();this[UE]=e?new Date(e):null}},{key:Md,value:function(e){return Dv(this[UE]?this[UE].toString():"")}}])}(),im=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"dateTime"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=this[UE].trim();this[UE]=e?new Date(e):null}},{key:Md,value:function(e){return Dv(this[UE]?this[UE].toString():"")}}])}(),am=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"dateTimeEdit",!0])).hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.picker=$d(e.picker,["host","none"]),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.comb=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r=Lp(this,"border","font","margin"),A=this[td]()[td](),n={name:"input",attributes:{type:"text",fieldId:A[Yd],dataId:(null===(t=A[ME])||void 0===t?void 0:t[Yd])||A[Yd],class:["xfaTextfield"],style:r,"aria-label":kv(A),"aria-required":!1}};return mv(A)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}])}(),om=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"decimal"])).fracDigits=Xd({data:e.fracDigits,defaultValue:2,validate:function(e){return!0}}),r.id=e.id||"",r.leadDigits=Xd({data:e.leadDigits,defaultValue:-1,validate:function(e){return!0}}),r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=parseFloat(this[UE].trim());this[UE]=isNaN(e)?null:e}},{key:Md,value:function(e){return Dv(null!==this[UE]?this[UE].toString():"")}}])}(),sm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"defaultUi",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t)}(),cm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"desc",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t)}(),gm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,dp),rv(t)}(),um=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"digestMethods",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.digestMethod=new Cp,r}return sv(t,fp),rv(t)}(),lm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"draw",!0])).anchorType=$d(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),r.colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.locale=e.locale||"",r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.rotate=Xd({data:e.rotate,defaultValue:0,validate:function(e){return e%90==0}}),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.border=null,r.caption=null,r.desc=null,r.extras=null,r.font=null,r.keep=null,r.margin=null,r.para=null,r.traversal=null,r.ui=null,r.value=null,r.setProperty=new Cp,r}return sv(t,fp),rv(t,[{key:Gd,value:function(e){pv(this,e)}},{key:Md,value:function(e){if(wv(this),"hidden"===this.presence||"inactive"===this.presence)return Ay.EMPTY;Gp(this),this[bd]();var t=this.w,r=this.h,A=xp(this,e),n=A.w,i=A.h,a=A.isBroken;if(n&&""===this.w){if(a&&this[ed]()[Id]())return this[wd](),Ay.FAILURE;this.w=n}if(i&&""===this.h&&(this.h=i),Sv(this),!Vp(this,e))return this.w=t,this.h=r,this[wd](),Ay.FAILURE;Fv(this);var o=Lp(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");Sp(this,o),o.margin&&(o.padding=o.margin,delete o.margin);var s=["xfaDraw"];this.font&&s.push("xfaFont"),Hp(this)&&s.push("xfaPrintOnly");var c={style:o,id:this[Yd],class:s};this.name&&(c.xfaName=this.name);var g={name:"div",attributes:c,children:[]};bv(this,c);var u=Rp(this,g,e),l=this.value?this.value[Md](e).html:null;return null===l?(this.w=t,this.h=r,this[wd](),Ay.success(Up(this,g),u)):(g.children.push(l),Pp(this,o,l),this.w=t,this.h=r,this[wd](),Ay.success(Up(this,g),u))}}])}(),hm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"edge",!0])).cap=$d(e.cap,["square","butt","round"]),r.id=e.id||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.stroke=$d(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),r.thickness=ey(e.thickness,"0.5pt"),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){var e=Lp(this,"visibility");if(Object.assign(e,{linecap:this.cap,width:kp(this.thickness),color:this.color?this.color[Hd]():"#000000",style:""}),"visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}])}(),Im=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,dp),rv(t)}(),fm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encodings",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.encoding=new Cp,r}return sv(t,fp),rv(t)}(),Cm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encrypt",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=null,r}return sv(t,fp),rv(t)}(),Bm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryptData",!0])).id=e.id||"",r.operation=$d(e.operation,["encrypt","decrypt"]),r.target=e.target||"",r.use=e.use||"",r.usehref=e.usehref||"",r.filter=null,r.manifest=null,r}return sv(t,fp),rv(t)}(),Qm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryption",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=new Cp,r}return sv(t,fp),rv(t)}(),Em=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,dp),rv(t)}(),dm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"encryptionMethods",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.encryptionMethod=new Cp,r}return sv(t,fp),rv(t)}(),ym=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"event",!0])).activity=$d(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),r.id=e.id||"",r.listen=$d(e.listen,["refOnly","refAndDescendents"]),r.name=e.name||"",r.ref=e.ref||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.encryptData=null,r.execute=null,r.script=null,r.signData=null,r.submit=null,r}return sv(t,fp),rv(t)}(),pm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"exData"])).contentType=e.contentType||"",r.href=e.href||"",r.id=e.id||"",r.maxLength=Xd({data:e.maxLength,defaultValue:-1,validate:function(e){return e>=-1}}),r.name=e.name||"",r.rid=e.rid||"",r.transferEncoding=$d(e.transferEncoding,["none","base64","package"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:sd,value:function(){return"text/html"===this.contentType}},{key:yd,value:function(e){return("text/html"===this.contentType&&e[Qd]===Od.xhtml.id||"text/xml"===this.contentType)&&(this[UE]=e,!0)}},{key:Md,value:function(e){return"text/html"===this.contentType&&this[UE]?this[UE][Md](e):Ay.EMPTY}}])}(),vm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"exObject",!0])).archive=e.archive||"",r.classId=e.classId||"",r.codeBase=e.codeBase||"",r.codeType=e.codeType||"",r.id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.exObject=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t)}(),mm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"exclGroup",!0])).access=$d(e.access,["open","nonInteractive","protected","readOnly"]),r.accessKey=e.accessKey||"",r.anchorType=$d(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),r.colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.layout=$d(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.bind=null,r.border=null,r.calculate=null,r.caption=null,r.desc=null,r.extras=null,r.margin=null,r.para=null,r.traversal=null,r.validate=null,r.connect=new Cp,r.event=new Cp,r.field=new Cp,r.setProperty=new Cp,r}return sv(t,fp),rv(t,[{key:cd,value:function(){return!0}},{key:nd,value:function(){return!0}},{key:Gd,value:function(e){var t,r=lv(this.field.children);try{for(r.s();!(t=r.n()).done;){var A=t.value;if(!A.value){var n=new Uw({});A[SE](n),A.value=n}A.value[Gd](e)}}catch(e){r.e(e)}finally{r.f()}}},{key:Id,value:function(){return this.layout.endsWith("-tb")&&0===this[HE].attempt&&this[HE].numberInLine>0||this[td]()[Id]()}},{key:hd,value:function(){var e,t=this[ed]();return!!t[hd]()&&(void 0!==this[HE]._isSplittable?this[HE]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[HE]._isSplittable=!1,!1):!(null!==(e=t.layout)&&void 0!==e&&e.endsWith("-tb")&&0!==t[HE].numberInLine||(this[HE]._isSplittable=!0,0)))}},{key:PE,value:function(){return Zp(this)}},{key:DE,value:function(e,t){_p(this,e,t)}},{key:TE,value:function(){return Xp(this)}},{key:Md,value:function(e){if(wv(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return Ay.EMPTY;Gp(this);var t=[],r={id:this[Yd],class:[]};Jp(this,r.class),this[HE]||(this[HE]=Object.create(null)),Object.assign(this[HE],{children:t,attributes:r,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});var A=this[hd]();if(A||Sv(this),!Vp(this,e))return Ay.FAILURE;var n=new Set(["field"]);if(this.layout.includes("row")){var i=this[ed]().columnWidths;Array.isArray(i)&&i.length>0&&(this[HE].columnWidths=i,this[HE].currentColumn=0)}var a=Lp(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),o=["xfaExclgroup"],s=Np(this);s&&o.push(s),Hp(this)&&o.push("xfaPrintOnly"),r.style=a,r.class=o,this.name&&(r.xfaName=this.name),this[bd]();for(var c="lr-tb"===this.layout||"rl-tb"===this.layout,g=c?2:1;this[HE].attempt=1||-1===e}}),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.locale=e.locale||"",r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.rotate=Xd({data:e.rotate,defaultValue:0,validate:function(e){return e%90==0}}),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.bind=null,r.border=null,r.calculate=null,r.caption=null,r.desc=null,r.extras=null,r.font=null,r.format=null,r.items=new Cp(2),r.keep=null,r.margin=null,r.para=null,r.traversal=null,r.ui=null,r.validate=null,r.value=null,r.bindItems=new Cp,r.connect=new Cp,r.event=new Cp,r.setProperty=new Cp,r}return sv(t,fp),rv(t,[{key:cd,value:function(){return!0}},{key:Gd,value:function(e){pv(this,e)}},{key:Md,value:function(e){var t;if(wv(this),!this.ui){var r;switch(this.ui=new Nw({}),this.ui[Ad]=this[Ad],this[SE](this.ui),this.items.children.length){case 0:r=new Dw({}),this.ui.textEdit=r;break;case 1:r=new Vv({}),this.ui.checkButton=r;break;case 2:r=new zv({}),this.ui.choiceList=r}this.ui[SE](r)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return Ay.EMPTY;this.caption&&delete this.caption[HE],this[bd]();var A=this.caption?this.caption[Md](e).html:null,n=this.w,i=this.h,a=0,o=0;this.margin&&(a=this.margin.leftInset+this.margin.rightInset,o=this.margin.topInset+this.margin.bottomInset);var s=null;if(""===this.w||""===this.h){var c=null,g=null,u=0,l=0;if(this.ui.checkButton)u=l=this.ui.checkButton.size;else{var h=xp(this,e),I=h.w,f=h.h;null!==I?(u=I,l=f):l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;if(e){var A=_d(e.typeface),n=e[Ad].fontFinder.find(A);r=uy(e,n)}if(!r)return{lineHeight:12,lineGap:2,lineNoGap:10};var i=e.size||10,a=r.lineHeight?Math.max(t?0:1.2,r.lineHeight):1.2,o=void 0===r.lineGap?.2:r.lineGap;return{lineHeight:a*i,lineGap:o*i,lineNoGap:Math.max(1,a-o)*i}}(this.font,!0).lineNoGap}if(u+=(s=dv(this.ui[_E]())).w,l+=s.h,this.caption){var C=this.caption[_E](e),B=C.w,Q=C.h;if(C.isBroken&&this[ed]()[Id]())return this[wd](),Ay.FAILURE;switch(c=B,g=Q,this.caption.placement){case"left":case"right":case"inline":c+=u;break;case"top":case"bottom":g+=l}}else c=u,g=l;c&&""===this.w&&(c+=a,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1=1&&e<=5}}),r.appearanceFilter=null,r.certificates=null,r.digestMethods=null,r.encodings=null,r.encryptionMethods=null,r.handler=null,r.lockDocument=null,r.mdp=null,r.reasons=null,r.timeStamp=null,r}return sv(t,fp),rv(t)}(),Fm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"float"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=parseFloat(this[UE].trim());this[UE]=isNaN(e)?null:e}},{key:Md,value:function(e){return Dv(null!==this[UE]?this[UE].toString():"")}}])}(),xm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"font",!0])).baselineShift=ey(e.baselineShift),r.fontHorizontalScale=Vd({data:e.fontHorizontalScale,defaultValue:100,validate:function(e){return e>=0}}),r.fontVerticalScale=Vd({data:e.fontVerticalScale,defaultValue:100,validate:function(e){return e>=0}}),r.id=e.id||"",r.kerningMode=$d(e.kerningMode,["none","pair"]),r.letterSpacing=ey(e.letterSpacing,"0"),r.lineThrough=Xd({data:e.lineThrough,defaultValue:0,validate:function(e){return 1===e||2===e}}),r.lineThroughPeriod=$d(e.lineThroughPeriod,["all","word"]),r.overline=Xd({data:e.overline,defaultValue:0,validate:function(e){return 1===e||2===e}}),r.overlinePeriod=$d(e.overlinePeriod,["all","word"]),r.posture=$d(e.posture,["normal","italic"]),r.size=ey(e.size,"10pt"),r.typeface=e.typeface||"Courier",r.underline=Xd({data:e.underline,defaultValue:0,validate:function(e){return 1===e||2===e}}),r.underlinePeriod=$d(e.underlinePeriod,["all","word"]),r.use=e.use||"",r.usehref=e.usehref||"",r.weight=$d(e.weight,["normal","bold"]),r.extras=null,r.fill=null,r}return sv(t,fp),rv(t,[{key:xE,value:function(e){zp(t,xE,this,3)([e]),this[Ad].usedTypefaces.add(this.typeface)}},{key:Hd,value:function(){var e=Lp(this,"fill"),t=e.color;return t&&("#000000"===t?delete e.color:t.startsWith("#")||(e.background=t,e.backgroundClip="text",e.color="transparent")),this.baselineShift&&(e.verticalAlign=kp(this.baselineShift)),e.fontKerning="none"===this.kerningMode?"none":"normal",e.letterSpacing=kp(this.letterSpacing),0!==this.lineThrough&&(e.textDecoration="line-through",2===this.lineThrough&&(e.textDecorationStyle="double")),0!==this.overline&&(e.textDecoration="overline",2===this.overline&&(e.textDecorationStyle="double")),e.fontStyle=this.posture,e.fontSize=kp(.99*this.size),Op(this,this,this[Ad].fontFinder,e),0!==this.underline&&(e.textDecoration="underline",2===this.underline&&(e.textDecorationStyle="double")),e.fontWeight=this.weight,e}}])}(),Rm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"format",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.picture=null,r}return sv(t,fp),rv(t)}(),Gm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"handler"])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Nm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"hyphenation"])).excludeAllCaps=Xd({data:e.excludeAllCaps,defaultValue:0,validate:function(e){return 1===e}}),r.excludeInitialCap=Xd({data:e.excludeInitialCap,defaultValue:0,validate:function(e){return 1===e}}),r.hyphenate=Xd({data:e.hyphenate,defaultValue:0,validate:function(e){return 1===e}}),r.id=e.id||"",r.pushCharacterCount=Xd({data:e.pushCharacterCount,defaultValue:3,validate:function(e){return e>=0}}),r.remainCharacterCount=Xd({data:e.remainCharacterCount,defaultValue:3,validate:function(e){return e>=0}}),r.use=e.use||"",r.usehref=e.usehref||"",r.wordCharacterCount=Xd({data:e.wordCharacterCount,defaultValue:7,validate:function(e){return e>=0}}),r}return sv(t,fp),rv(t)}(),Lm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"image"])).aspect=$d(e.aspect,["fit","actual","height","none","width"]),r.contentType=e.contentType||"",r.href=e.href||"",r.id=e.id||"",r.name=e.name||"",r.transferEncoding=$d(e.transferEncoding,["base64","none","package"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t,[{key:Md,value:function(){if(this.contentType&&!Qv.has(this.contentType.toLowerCase()))return Ay.EMPTY;var e=this[Ad].images&&this[Ad].images.get(this.href);if(!e&&(this.href||!this[UE]))return Ay.EMPTY;if(e||"base64"!==this.transferEncoding||(e=ie(atob(this[UE]))),!e)return Ay.EMPTY;if(!this.contentType){for(var t=0,r=Ev;tn.length&&n.every((function(t,r){return t===e[r]}))){this.contentType=i;break}}if(!this.contentType)return Ay.EMPTY}var a,o=new Blob([e],{type:this.contentType});switch(this.aspect){case"fit":case"actual":break;case"height":a={height:"100%",objectFit:"fill"};break;case"none":a={width:"100%",height:"100%",objectFit:"fill"};break;case"width":a={width:"100%",objectFit:"fill"}}var s=this[td]();return Ay.success({name:"img",attributes:{class:["xfaImage"],style:a,src:URL.createObjectURL(o),alt:s?kv(s[td]()):null}})}}])}(),Um=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"imageEdit",!0])).data=$d(e.data,["link","embed"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){return"embed"===this.data?Ay.success({name:"div",children:[],attributes:{}}):Ay.EMPTY}}])}(),Mm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"integer"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){var e=parseInt(this[UE].trim(),10);this[UE]=isNaN(e)?null:e}},{key:Md,value:function(e){return Dv(null!==this[UE]?this[UE].toString():"")}}])}(),Jm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"issuers",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=new Cp,r}return sv(t,fp),rv(t)}(),Hm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"items",!0])).id=e.id||"",r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.ref=e.ref||"",r.save=Xd({data:e.save,defaultValue:0,validate:function(e){return 1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e,t=[],r=lv(this[VE]());try{for(r.s();!(e=r.n()).done;){var A=e.value;t.push(A[Ld]())}}catch(e){r.e(e)}finally{r.f()}return Ay.success(t)}}])}(),Ym=function(e){function t(e){var r;nv(this,t),(r=iv(this,t,[fv,"keep",!0])).id=e.id||"";var A=["none","contentArea","pageArea"];return r.intact=$d(e.intact,A),r.next=$d(e.next,A),r.previous=$d(e.previous,A),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t)}(),Pm=function(e){function t(e){var r;nv(this,t);var A=["","yes","no"];return(r=iv(this,t,[fv,"keyUsage"])).crlSign=$d(e.crlSign,A),r.dataEncipherment=$d(e.dataEncipherment,A),r.decipherOnly=$d(e.decipherOnly,A),r.digitalSignature=$d(e.digitalSignature,A),r.encipherOnly=$d(e.encipherOnly,A),r.id=e.id||"",r.keyAgreement=$d(e.keyAgreement,A),r.keyCertSign=$d(e.keyCertSign,A),r.keyEncipherment=$d(e.keyEncipherment,A),r.nonRepudiation=$d(e.nonRepudiation,A),r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),Om=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"line",!0])).hand=$d(e.hand,["even","left","right"]),r.id=e.id||"",r.slope=$d(e.slope,["\\\\","/"]),r.use=e.use||"",r.usehref=e.usehref||"",r.edge=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e,t,r,A,n=this[td]()[td](),i=this.edge||new hm({}),a=i[Hd](),o=Object.create(null),s="visible"===i.presence?i.thickness:0;o.strokeWidth=kp(s),o.stroke=a.color;var c="100%",g="100%";n.w<=s?(e="50%",t=0,r="50%",A="100%",c=o.strokeWidth):n.h<=s?(e=0,t="50%",r="100%",A="50%",g=o.strokeWidth):"\\\\"===this.slope?(e=0,t=0,r="100%",A="100%"):(e=0,t="100%",r="100%",A=0);var u={name:"svg",children:[{name:"line",attributes:{xmlns:Cv,x1:e,y1:t,x2:r,y2:A,style:o}}],attributes:{xmlns:Cv,width:c,height:g,style:{overflow:"visible"}}};return yv(n)?Ay.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[u]}):(u.attributes.style.position="absolute",Ay.success(u))}}])}(),Km=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"linear",!0])).id=e.id||"",r.type=$d(e.type,["toRight","toBottom","toLeft","toTop"]),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){e=e?e[Hd]():"#FFFFFF";var t=this.type.replace(/([RBLT])/," $1").toLowerCase(),r=this.color?this.color[Hd]():"#000000";return"linear-gradient(".concat(t,", ").concat(e,", ").concat(r,")")}}])}(),Tm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"lockDocument"])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){this[UE]=$d(this[UE],["auto","0","1"])}}])}(),qm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"manifest",!0])).action=$d(e.action,["include","all","exclude"]),r.id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.ref=new Cp,r}return sv(t,fp),rv(t)}(),jm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"margin",!0])).bottomInset=ey(e.bottomInset,"0"),r.id=e.id||"",r.leftInset=ey(e.leftInset,"0"),r.rightInset=ey(e.rightInset,"0"),r.topInset=ey(e.topInset,"0"),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){return{margin:kp(this.topInset)+" "+kp(this.rightInset)+" "+kp(this.bottomInset)+" "+kp(this.leftInset)}}}])}(),Wm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"mdp"])).id=e.id||"",r.permissions=Xd({data:e.permissions,defaultValue:2,validate:function(e){return 1===e||3===e}}),r.signatureType=$d(e.signatureType,["filler","author"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),Zm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"medium"])).id=e.id||"",r.imagingBBox=function(e){var t=-1;if(!e)return{x:t,y:t,width:t,height:t};var r=e.trim().split(/\\s*,\\s*/).map((function(e){return ey(e,"-1")}));if(r.length<4||r[2]<0||r[3]<0)return{x:t,y:t,width:t,height:t};var A=qd(r,4);return{x:A[0],y:A[1],width:A[2],height:A[3]}}(e.imagingBBox),r.long=ey(e.long),r.orientation=$d(e.orientation,["portrait","landscape"]),r.short=ey(e.short),r.stock=e.stock||"",r.trayIn=$d(e.trayIn,["auto","delegate","pageFront"]),r.trayOut=$d(e.trayOut,["auto","delegate"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),_m=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"message",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.text=new Cp,r}return sv(t,fp),rv(t)}(),Xm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"numericEdit",!0])).hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.comb=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r=Lp(this,"border","font","margin"),A=this[td]()[td](),n={name:"input",attributes:{type:"text",fieldId:A[Yd],dataId:(null===(t=A[ME])||void 0===t?void 0:t[Yd])||A[Yd],class:["xfaTextfield"],style:r,"aria-label":kv(A),"aria-required":!1}};return mv(A)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}])}(),Vm=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"occur",!0])).id=e.id||"",r.initial=""!==e.initial?Xd({data:e.initial,defaultValue:"",validate:function(e){return!0}}):"",r.max=""!==e.max?Xd({data:e.max,defaultValue:1,validate:function(e){return!0}}):"",r.min=""!==e.min?Xd({data:e.min,defaultValue:1,validate:function(e){return!0}}):"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:xE,value:function(){var e=this[td](),t=this.min;""===this.min&&(this.min=e instanceof tw||e instanceof rw?0:1),""===this.max&&(this.max=""===t?e instanceof tw||e instanceof rw?-1:1:this.min),-1!==this.max&&this.max=0}}),r.preserve=e.preserve||"",r.radixOffset=e.radixOffset?ey(e.radixOffset,"0pt"):"",r.spaceAbove=e.spaceAbove?ey(e.spaceAbove,"0pt"):"",r.spaceBelow=e.spaceBelow?ey(e.spaceBelow,"0pt"):"",r.tabDefault=e.tabDefault?ey(r.tabDefault):"",r.tabStops=(e.tabStops||"").trim().split(/\\s+/).map((function(e,t){return t%2==1?ey(e):e})),r.textIndent=e.textIndent?ey(e.textIndent,"0pt"):"",r.use=e.use||"",r.usehref=e.usehref||"",r.vAlign=$d(e.vAlign,["top","bottom","middle"]),r.widows=Xd({data:e.widows,defaultValue:0,validate:function(e){return e>=0}}),r.hyphenation=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(){var e=Lp(this,"hAlign");return""!==this.marginLeft&&(e.paddingLeft=kp(this.marginLeft)),""!==this.marginRight&&(e.paddingight=kp(this.marginRight)),""!==this.spaceAbove&&(e.paddingTop=kp(this.spaceAbove)),""!==this.spaceBelow&&(e.paddingBottom=kp(this.spaceBelow)),""!==this.textIndent&&(e.textIndent=kp(this.textIndent),Mp(e)),this.lineHeight>0&&(e.lineHeight=kp(this.lineHeight)),""!==this.tabDefault&&(e.tabSize=kp(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(e,this.hyphenatation[Hd]()),e}}])}(),nw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"passwordEdit",!0])).hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.passwordChar=e.passwordChar||"*",r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t)}(),iw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"pattern",!0])).id=e.id||"",r.type=$d(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){e=e?e[Hd]():"#FFFFFF";var t=this.color?this.color[Hd]():"#000000",r="repeating-linear-gradient",A="".concat(e,",").concat(e," ").concat(5,"px,").concat(t," ").concat(5,"px,").concat(t," ").concat(10,"px");switch(this.type){case"crossHatch":return"".concat(r,"(to top,").concat(A,") ").concat(r,"(to right,").concat(A,")");case"crossDiagonal":return"".concat(r,"(45deg,").concat(A,") ").concat(r,"(-45deg,").concat(A,")");case"diagonalLeft":return"".concat(r,"(45deg,").concat(A,")");case"diagonalRight":return"".concat(r,"(-45deg,").concat(A,")");case"horizontal":return"".concat(r,"(to top,").concat(A,")");case"vertical":return"".concat(r,"(to right,").concat(A,")")}return""}}])}(),aw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"picture"])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),ow=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"proto",!0])).appearanceFilter=new Cp,r.arc=new Cp,r.area=new Cp,r.assist=new Cp,r.barcode=new Cp,r.bindItems=new Cp,r.bookend=new Cp,r.boolean=new Cp,r.border=new Cp,r.break=new Cp,r.breakAfter=new Cp,r.breakBefore=new Cp,r.button=new Cp,r.calculate=new Cp,r.caption=new Cp,r.certificate=new Cp,r.certificates=new Cp,r.checkButton=new Cp,r.choiceList=new Cp,r.color=new Cp,r.comb=new Cp,r.connect=new Cp,r.contentArea=new Cp,r.corner=new Cp,r.date=new Cp,r.dateTime=new Cp,r.dateTimeEdit=new Cp,r.decimal=new Cp,r.defaultUi=new Cp,r.desc=new Cp,r.digestMethod=new Cp,r.digestMethods=new Cp,r.draw=new Cp,r.edge=new Cp,r.encoding=new Cp,r.encodings=new Cp,r.encrypt=new Cp,r.encryptData=new Cp,r.encryption=new Cp,r.encryptionMethod=new Cp,r.encryptionMethods=new Cp,r.event=new Cp,r.exData=new Cp,r.exObject=new Cp,r.exclGroup=new Cp,r.execute=new Cp,r.extras=new Cp,r.field=new Cp,r.fill=new Cp,r.filter=new Cp,r.float=new Cp,r.font=new Cp,r.format=new Cp,r.handler=new Cp,r.hyphenation=new Cp,r.image=new Cp,r.imageEdit=new Cp,r.integer=new Cp,r.issuers=new Cp,r.items=new Cp,r.keep=new Cp,r.keyUsage=new Cp,r.line=new Cp,r.linear=new Cp,r.lockDocument=new Cp,r.manifest=new Cp,r.margin=new Cp,r.mdp=new Cp,r.medium=new Cp,r.message=new Cp,r.numericEdit=new Cp,r.occur=new Cp,r.oid=new Cp,r.oids=new Cp,r.overflow=new Cp,r.pageArea=new Cp,r.pageSet=new Cp,r.para=new Cp,r.passwordEdit=new Cp,r.pattern=new Cp,r.picture=new Cp,r.radial=new Cp,r.reason=new Cp,r.reasons=new Cp,r.rectangle=new Cp,r.ref=new Cp,r.script=new Cp,r.setProperty=new Cp,r.signData=new Cp,r.signature=new Cp,r.signing=new Cp,r.solid=new Cp,r.speak=new Cp,r.stipple=new Cp,r.subform=new Cp,r.subformSet=new Cp,r.subjectDN=new Cp,r.subjectDNs=new Cp,r.submit=new Cp,r.text=new Cp,r.textEdit=new Cp,r.time=new Cp,r.timeStamp=new Cp,r.toolTip=new Cp,r.traversal=new Cp,r.traverse=new Cp,r.ui=new Cp,r.validate=new Cp,r.value=new Cp,r.variables=new Cp,r}return sv(t,fp),rv(t)}(),sw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"radial",!0])).id=e.id||"",r.type=$d(e.type,["toEdge","toCenter"]),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){e=e?e[Hd]():"#FFFFFF";var t=this.color?this.color[Hd]():"#000000",r="toEdge"===this.type?"".concat(e,",").concat(t):"".concat(t,",").concat(e);return"radial-gradient(circle at center, ".concat(r,")")}}])}(),cw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"reason"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),gw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"reasons",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.reason=new Cp,r}return sv(t,fp),rv(t)}(),uw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"rectangle",!0])).hand=$d(e.hand,["even","left","right"]),r.id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.corner=new Cp(4),r.edge=new Cp(4),r.fill=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(){var e,t=this.edge.children.length?this.edge.children[0]:new hm({}),r=t[Hd](),A=Object.create(null);"visible"===(null===(e=this.fill)||void 0===e?void 0:e.presence)?Object.assign(A,this.fill[Hd]()):A.fill="transparent",A.strokeWidth=kp("visible"===t.presence?t.thickness:0),A.stroke=r.color;var n=(this.corner.children.length?this.corner.children[0]:new Am({}))[Hd](),i={name:"svg",children:[{name:"rect",attributes:{xmlns:Cv,width:"100%",height:"100%",x:0,y:0,rx:n.radius,ry:n.radius,style:A}}],attributes:{xmlns:Cv,style:{overflow:"visible"},width:"100%",height:"100%"}};return yv(this[td]()[td]())?Ay.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[i]}):(i.attributes.style.position="absolute",Ay.success(i))}}])}(),lw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"ref"])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),hw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"script"])).binding=e.binding||"",r.contentType=e.contentType||"",r.id=e.id||"",r.name=e.name||"",r.runAt=$d(e.runAt,["client","both","server"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Iw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"setProperty"])).connection=e.connection||"",r.ref=e.ref||"",r.target=e.target||"",r}return sv(t,fp),rv(t)}(),fw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"signData",!0])).id=e.id||"",r.operation=$d(e.operation,["sign","clear","verify"]),r.ref=e.ref||"",r.target=e.target||"",r.use=e.use||"",r.usehref=e.usehref||"",r.filter=null,r.manifest=null,r}return sv(t,fp),rv(t)}(),Cw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"signature",!0])).id=e.id||"",r.type=$d(e.type,["PDF1.3","PDF1.6"]),r.use=e.use||"",r.usehref=e.usehref||"",r.border=null,r.extras=null,r.filter=null,r.manifest=null,r.margin=null,r}return sv(t,fp),rv(t)}(),Bw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"signing",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.certificate=new Cp,r}return sv(t,fp),rv(t)}(),Qw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"solid",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){return e?e[Hd]():"#FFFFFF"}}])}(),Ew=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"speak"])).disable=Xd({data:e.disable,defaultValue:0,validate:function(e){return 1===e}}),r.id=e.id||"",r.priority=$d(e.priority,["custom","caption","name","toolTip"]),r.rid=e.rid||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),dw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"stipple",!0])).id=e.id||"",r.rate=Xd({data:e.rate,defaultValue:50,validate:function(e){return e>=0&&e<=100}}),r.use=e.use||"",r.usehref=e.usehref||"",r.color=null,r.extras=null,r}return sv(t,fp),rv(t,[{key:Hd,value:function(e){var t=this.rate/100;return ge.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}])}(),yw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subform",!0])).access=$d(e.access,["open","nonInteractive","protected","readOnly"]),r.allowMacro=Xd({data:e.allowMacro,defaultValue:0,validate:function(e){return 1===e}}),r.anchorType=$d(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),r.colSpan=Xd({data:e.colSpan,defaultValue:1,validate:function(e){return e>=1||-1===e}}),r.columnWidths=(e.columnWidths||"").trim().split(/\\s+/).map((function(e){return"-1"===e?-1:ey(e)})),r.h=e.h?ey(e.h):"",r.hAlign=$d(e.hAlign,["left","center","justify","justifyAll","radix","right"]),r.id=e.id||"",r.layout=$d(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),r.locale=e.locale||"",r.maxH=ey(e.maxH,"0pt"),r.maxW=ey(e.maxW,"0pt"),r.mergeMode=$d(e.mergeMode,["consumeData","matchTemplate"]),r.minH=ey(e.minH,"0pt"),r.minW=ey(e.minW,"0pt"),r.name=e.name||"",r.presence=$d(e.presence,["visible","hidden","inactive","invisible"]),r.relevant=ry(e.relevant),r.restoreState=$d(e.restoreState,["manual","auto"]),r.scope=$d(e.scope,["name","none"]),r.use=e.use||"",r.usehref=e.usehref||"",r.w=e.w?ey(e.w):"",r.x=ey(e.x,"0pt"),r.y=ey(e.y,"0pt"),r.assist=null,r.bind=null,r.bookend=null,r.border=null,r.break=null,r.calculate=null,r.desc=null,r.extras=null,r.keep=null,r.margin=null,r.occur=null,r.overflow=null,r.pageSet=null,r.para=null,r.traversal=null,r.validate=null,r.variables=null,r.area=new Cp,r.breakAfter=new Cp,r.breakBefore=new Cp,r.connect=new Cp,r.draw=new Cp,r.event=new Cp,r.exObject=new Cp,r.exclGroup=new Cp,r.field=new Cp,r.proto=new Cp,r.setProperty=new Cp,r.subform=new Cp,r.subformSet=new Cp,r}return sv(t,fp),rv(t,[{key:ed,value:function(){var e=this[td]();return e instanceof pw?e[ed]():e}},{key:cd,value:function(){return!0}},{key:Id,value:function(){return this.layout.endsWith("-tb")&&0===this[HE].attempt&&this[HE].numberInLine>0||this[td]()[Id]()}},{key:zE,value:gv().mark((function e(){return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(vv(this),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:PE,value:function(){return Zp(this)}},{key:DE,value:function(e,t){_p(this,e,t)}},{key:TE,value:function(){return Xp(this)}},{key:hd,value:function(){var e,t=this[ed]();return!!t[hd]()&&(void 0!==this[HE]._isSplittable?this[HE]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[HE]._isSplittable=!1,!1):!(null!==(e=t.layout)&&void 0!==e&&e.endsWith("-tb")&&0!==t[HE].numberInLine||(this[HE]._isSplittable=!0,0)))}},{key:Md,value:function(e){var t;if(wv(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){var r=new Tv({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});r[Ad]=this[Ad],this[SE](r),this.breakAfter.push(r)}if("auto"!==this.break.before||""!==this.break.beforeTarget){var A=new qv({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});A[Ad]=this[Ad],this[SE](A),this.breakBefore.push(A)}if(""!==this.break.overflowTarget){var n=new ew({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});n[Ad]=this[Ad],this[SE](n),this.overflow.push(n)}this[kd](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return Ay.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&q("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){var i=this.breakBefore.children[0];if(xv(i))return Ay.breakNode(i)}if(null!==(t=this[HE])&&void 0!==t&&t.afterBreakAfter)return Ay.EMPTY;Gp(this);var a=[],o={id:this[Yd],class:[]};Jp(this,o.class),this[HE]||(this[HE]=Object.create(null)),Object.assign(this[HE],{children:a,line:null,attributes:o,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});var s=this[rd](),c=s[HE].noLayoutFailure,g=this[hd]();if(g||Sv(this),!Vp(this,e))return Ay.FAILURE;var u=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){var l=this[ed]().columnWidths;Array.isArray(l)&&l.length>0&&(this[HE].columnWidths=l,this[HE].currentColumn=0)}var h=Lp(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),I=["xfaSubform"],f=Np(this);if(f&&I.push(f),o.style=h,o.class=I,this.name&&(o.xfaName=this.name),this.overflow){var C=this.overflow[_E]();C.addLeader&&(C.addLeader=!1,Rv(this,C.leader,e))}this[bd]();for(var B="lr-tb"===this.layout||"rl-tb"===this.layout,Q=B?2:1;this[HE].attempt=1){var D=this.breakAfter.children[0];if(xv(D))return this[HE].afterBreakAfter=k,Ay.breakNode(D)}return delete this[HE],k}}])}(),pw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subformSet",!0])).id=e.id||"",r.name=e.name||"",r.relation=$d(e.relation,["ordered","choice","unordered"]),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.bookend=null,r.break=null,r.desc=null,r.extras=null,r.occur=null,r.overflow=null,r.breakAfter=new Cp,r.breakBefore=new Cp,r.subform=new Cp,r.subformSet=new Cp,r}return sv(t,fp),rv(t,[{key:zE,value:gv().mark((function e(){return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(vv(this),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:ed,value:function(){for(var e=this[td]();!(e instanceof yw);)e=e[td]();return e}},{key:cd,value:function(){return!0}}])}(),vw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subjectDN"])).delimiter=e.delimiter||",",r.id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:YE,value:function(){this[UE]=new Map(this[UE].split(this.delimiter).map((function(e){return(e=e.split("=",2))[0]=e[0].trim(),e})))}}])}(),mw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"subjectDNs",!0])).id=e.id||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r.subjectDN=new Cp,r}return sv(t,fp),rv(t)}(),ww=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"submit",!0])).embedPDF=Xd({data:e.embedPDF,defaultValue:0,validate:function(e){return 1===e}}),r.format=$d(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),r.id=e.id||"",r.target=e.target||"",r.textEncoding=zd({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:function(e){return["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)}}),r.use=e.use||"",r.usehref=e.usehref||"",r.xdpContent=e.xdpContent||"",r.encrypt=null,r.encryptData=new Cp,r.signData=new Cp,r}return sv(t,fp),rv(t)}(),bw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"template",!0])).baseProfile=$d(e.baseProfile,["full","interactiveForms"]),r.extras=null,r.subform=new Cp,r}return sv(t,fp),rv(t,[{key:YE,value:function(){0===this.subform.children.length&&q("XFA - No subforms in template node."),this.subform.children.length>=2&&q("XFA - Several subforms in template node: please file a bug."),this[Nd]=5e3}},{key:hd,value:function(){return!0}},{key:Fd,value:function(e,t){return e.startsWith("#")?[this[id].get(e.slice(1))]:Ry(this,t,e,!0,!0)}},{key:Ud,value:gv().mark((function e(){var t,r,A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E=this;return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.subform.children.length){e.next=2;break}return e.abrupt("return",Ay.success({name:"div",children:[]}));case 2:this[HE]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]},(A=this.subform.children[0]).pageSet[RE](),n=A.pageSet.pageArea.children,i={name:"div",children:[]},a=null,o=null,s=null,A.breakBefore.children.length>=1?(o=A.breakBefore.children[0],s=o.target):A.subform.children.length>=1&&A.subform.children[0].breakBefore.children.length>=1?(o=A.subform.children[0].breakBefore.children[0],s=o.target):null!==(t=A.break)&&void 0!==t&&t.beforeTarget?(o=A.break,s=o.beforeTarget):A.subform.children.length>=1&&null!==(r=A.subform.children[0].break)&&void 0!==r&&r.beforeTarget&&(o=A.subform.children[0].break,s=o.beforeTarget),o&&(c=this[Fd](s,o[td]()))instanceof tw&&(a=c,o[HE]={}),a||(a=n[0]),a[HE]={numberOfUse:1},(g=a[td]())[HE]={numberOfUse:1,pageIndex:g.pageArea.children.indexOf(a),pageSetIndex:0},l=null,h=null,I=!0,f=0,C=0,B=gv().mark((function e(){var t,r,n,o,s,c,g,B,Q,d,y,p,v,m,w,b;return gv().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I){e.next=7;break}if(i.children.pop(),3!=++f){e.next=5;break}return q("XFA - Something goes wrong: please file a bug."),e.abrupt("return",{v:i});case 5:e.next=8;break;case 7:f=0;case 8:u=null,E[HE].currentPageArea=a,t=a[Md]().html,i.children.push(t),l&&(E[HE].noLayoutFailure=!0,t.children.push(l[Md](a[HE].space).html),l=null),h&&(E[HE].noLayoutFailure=!0,t.children.push(h[Md](a[HE].space).html),h=null),r=a.contentArea.children,n=t.children.filter((function(e){return e.attributes.class.includes("xfaContentarea")})),I=!1,E[HE].firstUnsplittable=null,E[HE].noLayoutFailure=!1,o=function(e){var t,r=A[PE]();r&&(I||(I=(null===(t=r.children)||void 0===t?void 0:t.length)>0),n[e].children.push(r))},s=C,c=r.length;case 21:if(!(s0),n[s].children.push(Q.html)):!I&&i.children.length>1&&i.children.pop(),e.abrupt("return",{v:i});case 31:if(!Q.isBreak()){e.next=40;break}if(y=Q.breakNode,o(s),"auto"!==y.targetType){e.next=36;break}return e.abrupt("continue",53);case 36:return y.leader&&(l=(l=E[Fd](y.leader,y[td]()))?l[0]:null),y.trailer&&(h=(h=E[Fd](y.trailer,y[td]()))?h[0]:null),"pageArea"===y.targetType?(u=y[HE].target,s=1/0):y[HE].target?(u=y[HE].target,C=y[HE].index+1,s=1/0):s=y[HE].index,e.abrupt("continue",53);case 40:if(!E[HE].overflowNode){e.next=52;break}return p=E[HE].overflowNode,E[HE].overflowNode=null,v=p[_E](),m=v.target,v.addLeader=null!==v.leader,v.addTrailer=null!==v.trailer,o(s),w=s,s=1/0,m instanceof tw?u=m:m instanceof rm&&(-1!==(b=r.indexOf(m))?b>w?s=b-1:C=b:(u=m[td](),C=u.contentArea.children.indexOf(m))),e.abrupt("continue",53);case 52:o(s);case 53:s++,e.next=21;break;case 56:return E[HE].pageNumber+=1,u&&(u[Cd]()?u[HE].numberOfUse+=1:u=null),a=u||a[$E](),e.next=61,null;case 61:case"end":return e.stop()}}),e)}));case 22:return e.delegateYield(B(),"t0",24);case 24:if(!(Q=e.t0)){e.next=27;break}return e.abrupt("return",Q.v);case 27:e.next=22;break;case 29:case"end":return e.stop()}}),e,this)}))}])}(),kw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"text"])).id=e.id||"",r.maxChars=Xd({data:e.maxChars,defaultValue:0,validate:function(e){return e>=0}}),r.name=e.name||"",r.rid=e.rid||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,Ep),rv(t,[{key:kE,value:function(){return!0}},{key:yd,value:function(e){return e[Qd]===Od.xhtml.id?(this[UE]=e,!0):(q("XFA - Invalid content in Text: ".concat(e[Ed],".")),!1)}},{key:vd,value:function(e){this[UE]instanceof fp||zp(t,vd,this,3)([e])}},{key:YE,value:function(){"string"==typeof this[UE]&&(this[UE]=this[UE].replaceAll("\\r\\n","\\n"))}},{key:_E,value:function(){return"string"==typeof this[UE]?this[UE].split(/[\\u2029\\u2028\\n]/).reduce((function(e,t){return t&&e.push(t),e}),[]).join("\\n"):this[UE][Ld]()}},{key:Md,value:function(e){if("string"==typeof this[UE]){var t=Dv(this[UE]).html;return this[UE].includes("\\u2029")?(t.name="div",t.children=[],this[UE].split("\\u2029").map((function(e){return e.split(/[\\u2028\\n]/).reduce((function(e,t){return e.push({name:"span",value:t},{name:"br"}),e}),[])})).forEach((function(e){t.children.push({name:"p",children:e})}))):/[\\u2028\\n]/.test(this[UE])&&(t.name="div",t.children=[],this[UE].split(/[\\u2028\\n]/).forEach((function(e){t.children.push({name:"span",value:e},{name:"br"})}))),Ay.success(t)}return this[UE][Md](e)}}])}(),Dw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"textEdit",!0])).allowRichText=Xd({data:e.allowRichText,defaultValue:0,validate:function(e){return 1===e}}),r.hScrollPolicy=$d(e.hScrollPolicy,["auto","off","on"]),r.id=e.id||"",r.multiLine=Xd({data:e.multiLine,defaultValue:"",validate:function(e){return 0===e||1===e}}),r.use=e.use||"",r.usehref=e.usehref||"",r.vScrollPolicy=$d(e.vScrollPolicy,["auto","off","on"]),r.border=null,r.comb=null,r.extras=null,r.margin=null,r}return sv(t,fp),rv(t,[{key:Md,value:function(e){var t,r,A,n=Lp(this,"border","font","margin"),i=this[td]()[td]();return""===this.multiLine&&(this.multiLine=i instanceof lm?1:0),t=1===this.multiLine?{name:"textarea",attributes:{dataId:(null===(r=i[ME])||void 0===r?void 0:r[Yd])||i[Yd],fieldId:i[Yd],class:["xfaTextfield"],style:n,"aria-label":kv(i),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:(null===(A=i[ME])||void 0===A?void 0:A[Yd])||i[Yd],fieldId:i[Yd],class:["xfaTextfield"],style:n,"aria-label":kv(i),"aria-required":!1}},mv(i)&&(t.attributes["aria-required"]=!0,t.attributes.required=!0),Ay.success({name:"label",attributes:{class:["xfaLabel"]},children:[t]})}}])}(),Sw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"time"])).id=e.id||"",r.name=e.name||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t,[{key:YE,value:function(){var e=this[UE].trim();this[UE]=e?new Date(e):null}},{key:Md,value:function(e){return Dv(this[UE]?this[UE].toString():"")}}])}(),Fw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"timeStamp"])).id=e.id||"",r.server=e.server||"",r.type=$d(e.type,["optional","required"]),r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,fp),rv(t)}(),xw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"toolTip"])).id=e.id||"",r.rid=e.rid||"",r.use=e.use||"",r.usehref=e.usehref||"",r}return sv(t,yp),rv(t)}(),Rw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"traversal",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.traverse=new Cp,r}return sv(t,fp),rv(t)}(),Gw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"traverse",!0])).id=e.id||"",r.operation=$d(e.operation,["next","back","down","first","left","right","up"]),r.ref=e.ref||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.script=null,r}return sv(t,fp),rv(t,[{key:"name",get:function(){return this.operation}},{key:fd,value:function(){return!1}}])}(),Nw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"ui",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.picture=null,r.barcode=null,r.button=null,r.checkButton=null,r.choiceList=null,r.dateTimeEdit=null,r.defaultUi=null,r.imageEdit=null,r.numericEdit=null,r.passwordEdit=null,r.signature=null,r.textEdit=null,r}return sv(t,fp),rv(t,[{key:_E,value:function(){if(void 0===this[HE]){var e,t=lv(Object.getOwnPropertyNames(this));try{for(t.s();!(e=t.n()).done;){var r=e.value;if("extras"!==r&&"picture"!==r){var A=this[r];if(A instanceof fp)return this[HE]=A,A}}}catch(e){t.e(e)}finally{t.f()}this[HE]=null}return this[HE]}},{key:Md,value:function(e){var t=this[_E]();return t?t[Md](e):Ay.EMPTY}}])}(),Lw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"validate",!0])).formatTest=$d(e.formatTest,["warning","disabled","error"]),r.id=e.id||"",r.nullTest=$d(e.nullTest,["disabled","error","warning"]),r.scriptTest=$d(e.scriptTest,["error","disabled","warning"]),r.use=e.use||"",r.usehref=e.usehref||"",r.extras=null,r.message=null,r.picture=null,r.script=null,r}return sv(t,fp),rv(t)}(),Uw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"value",!0])).id=e.id||"",r.override=Xd({data:e.override,defaultValue:0,validate:function(e){return 1===e}}),r.relevant=ry(e.relevant),r.use=e.use||"",r.usehref=e.usehref||"",r.arc=null,r.boolean=null,r.date=null,r.dateTime=null,r.decimal=null,r.exData=null,r.float=null,r.image=null,r.integer=null,r.line=null,r.rectangle=null,r.text=null,r.time=null,r}return sv(t,fp),rv(t,[{key:Gd,value:function(e){var t,r=this[td]();if(r instanceof km&&null!==(t=r.ui)&&void 0!==t&&t.imageEdit)return this.image||(this.image=new Lm({}),this[SE](this.image)),void(this.image[UE]=e[UE]);var A=e[Ed];if(null===this[A]){var n,i=lv(Object.getOwnPropertyNames(this));try{for(i.s();!(n=i.n()).done;){var a=n.value,o=this[a];o instanceof fp&&(this[a]=null,this[kd](o))}}catch(e){i.e(e)}finally{i.f()}this[e[Ed]]=e,this[SE](e)}else this[A][UE]=e[UE]}},{key:Ld,value:function(){if(this.exData)return"string"==typeof this.exData[UE]?this.exData[UE].trim():this.exData[UE][Ld]().trim();var e,t=lv(Object.getOwnPropertyNames(this));try{for(t.s();!(e=t.n()).done;){var r=e.value;if("image"!==r){var A=this[r];if(A instanceof fp)return(A[UE]||"").toString().trim()}}}catch(e){t.e(e)}finally{t.f()}return null}},{key:Md,value:function(e){var t,r=lv(Object.getOwnPropertyNames(this));try{for(r.s();!(t=r.n()).done;){var A=this[t.value];if(A instanceof fp)return A[Md](e)}}catch(e){r.e(e)}finally{r.f()}return Ay.EMPTY}}])}(),Mw=function(e){function t(e){var r;return nv(this,t),(r=iv(this,t,[fv,"variables",!0])).id=e.id||"",r.use=e.use||"",r.usehref=e.usehref||"",r.boolean=new Cp,r.date=new Cp,r.dateTime=new Cp,r.decimal=new Cp,r.exData=new Cp,r.float=new Cp,r.image=new Cp,r.integer=new Cp,r.manifest=new Cp,r.script=new Cp,r.text=new Cp,r.time=new Cp,r}return sv(t,fp),rv(t,[{key:fd,value:function(){return!0}}])}(),Jw=function(){function e(){nv(this,e)}return rv(e,null,[{key:Pd,value:function(t,r){if(e.hasOwnProperty(t)){var A=e[t](r);return A[Rd](r),A}}},{key:"appearanceFilter",value:function(e){return new Gv(e)}},{key:"arc",value:function(e){return new Nv(e)}},{key:"area",value:function(e){return new Lv(e)}},{key:"assist",value:function(e){return new Uv(e)}},{key:"barcode",value:function(e){return new Mv(e)}},{key:"bind",value:function(e){return new Jv(e)}},{key:"bindItems",value:function(e){return new Hv(e)}},{key:"bookend",value:function(e){return new Yv(e)}},{key:"boolean",value:function(e){return new Pv(e)}},{key:"border",value:function(e){return new Ov(e)}},{key:"break",value:function(e){return new Kv(e)}},{key:"breakAfter",value:function(e){return new Tv(e)}},{key:"breakBefore",value:function(e){return new qv(e)}},{key:"button",value:function(e){return new jv(e)}},{key:"calculate",value:function(e){return new Wv(e)}},{key:"caption",value:function(e){return new Zv(e)}},{key:"certificate",value:function(e){return new _v(e)}},{key:"certificates",value:function(e){return new Xv(e)}},{key:"checkButton",value:function(e){return new Vv(e)}},{key:"choiceList",value:function(e){return new zv(e)}},{key:"color",value:function(e){return new $v(e)}},{key:"comb",value:function(e){return new em(e)}},{key:"connect",value:function(e){return new tm(e)}},{key:"contentArea",value:function(e){return new rm(e)}},{key:"corner",value:function(e){return new Am(e)}},{key:"date",value:function(e){return new nm(e)}},{key:"dateTime",value:function(e){return new im(e)}},{key:"dateTimeEdit",value:function(e){return new am(e)}},{key:"decimal",value:function(e){return new om(e)}},{key:"defaultUi",value:function(e){return new sm(e)}},{key:"desc",value:function(e){return new cm(e)}},{key:"digestMethod",value:function(e){return new gm(e)}},{key:"digestMethods",value:function(e){return new um(e)}},{key:"draw",value:function(e){return new lm(e)}},{key:"edge",value:function(e){return new hm(e)}},{key:"encoding",value:function(e){return new Im(e)}},{key:"encodings",value:function(e){return new fm(e)}},{key:"encrypt",value:function(e){return new Cm(e)}},{key:"encryptData",value:function(e){return new Bm(e)}},{key:"encryption",value:function(e){return new Qm(e)}},{key:"encryptionMethod",value:function(e){return new Em(e)}},{key:"encryptionMethods",value:function(e){return new dm(e)}},{key:"event",value:function(e){return new ym(e)}},{key:"exData",value:function(e){return new pm(e)}},{key:"exObject",value:function(e){return new vm(e)}},{key:"exclGroup",value:function(e){return new mm(e)}},{key:"execute",value:function(e){return new wm(e)}},{key:"extras",value:function(e){return new bm(e)}},{key:"field",value:function(e){return new km(e)}},{key:"fill",value:function(e){return new Dm(e)}},{key:"filter",value:function(e){return new Sm(e)}},{key:"float",value:function(e){return new Fm(e)}},{key:"font",value:function(e){return new xm(e)}},{key:"format",value:function(e){return new Rm(e)}},{key:"handler",value:function(e){return new Gm(e)}},{key:"hyphenation",value:function(e){return new Nm(e)}},{key:"image",value:function(e){return new Lm(e)}},{key:"imageEdit",value:function(e){return new Um(e)}},{key:"integer",value:function(e){return new Mm(e)}},{key:"issuers",value:function(e){return new Jm(e)}},{key:"items",value:function(e){return new Hm(e)}},{key:"keep",value:function(e){return new Ym(e)}},{key:"keyUsage",value:function(e){return new Pm(e)}},{key:"line",value:function(e){return new Om(e)}},{key:"linear",value:function(e){return new Km(e)}},{key:"lockDocument",value:function(e){return new Tm(e)}},{key:"manifest",value:function(e){return new qm(e)}},{key:"margin",value:function(e){return new jm(e)}},{key:"mdp",value:function(e){return new Wm(e)}},{key:"medium",value:function(e){return new Zm(e)}},{key:"message",value:function(e){return new _m(e)}},{key:"numericEdit",value:function(e){return new Xm(e)}},{key:"occur",value:function(e){return new Vm(e)}},{key:"oid",value:function(e){return new zm(e)}},{key:"oids",value:function(e){return new $m(e)}},{key:"overflow",value:function(e){return new ew(e)}},{key:"pageArea",value:function(e){return new tw(e)}},{key:"pageSet",value:function(e){return new rw(e)}},{key:"para",value:function(e){return new Aw(e)}},{key:"passwordEdit",value:function(e){return new nw(e)}},{key:"pattern",value:function(e){return new iw(e)}},{key:"picture",value:function(e){return new aw(e)}},{key:"proto",value:function(e){return new ow(e)}},{key:"radial",value:function(e){return new sw(e)}},{key:"reason",value:function(e){return new cw(e)}},{key:"reasons",value:function(e){return new gw(e)}},{key:"rectangle",value:function(e){return new uw(e)}},{key:"ref",value:function(e){return new lw(e)}},{key:"script",value:function(e){return new hw(e)}},{key:"setProperty",value:function(e){return new Iw(e)}},{key:"signData",value:function(e){return new fw(e)}},{key:"signature",value:function(e){return new Cw(e)}},{key:"signing",value:function(e){return new Bw(e)}},{key:"solid",value:function(e){return new Qw(e)}},{key:"speak",value:function(e){return new Ew(e)}},{key:"stipple",value:function(e){return new dw(e)}},{key:"subform",value:function(e){return new yw(e)}},{key:"subformSet",value:function(e){return new pw(e)}},{key:"subjectDN",value:function(e){return new vw(e)}},{key:"subjectDNs",value:function(e){return new mw(e)}},{key:"submit",value:function(e){return new ww(e)}},{key:"template",value:function(e){return new bw(e)}},{key:"text",value:function(e){return new kw(e)}},{key:"textEdit",value:function(e){return new Dw(e)}},{key:"time",value:function(e){return new Sw(e)}},{key:"timeStamp",value:function(e){return new Fw(e)}},{key:"toolTip",value:function(e){return new xw(e)}},{key:"traversal",value:function(e){return new Rw(e)}},{key:"traverse",value:function(e){return new Gw(e)}},{key:"ui",value:function(e){return new Nw(e)}},{key:"validate",value:function(e){return new Lw(e)}},{key:"value",value:function(e){return new Uw(e)}},{key:"variables",value:function(e){return new Mw(e)}}])}();function Hw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||Pw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yw(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Pw(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function Pw(e,t){if(e){if("string"==typeof e)return Ow(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ow(e,t):void 0}}function Ow(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&((A=e[NE]())[kd](A.occur),A.occur=null),this._bindValue(e,t[0],r),this._setProperties(e,t[0]),this._bindItems(e,t[0]),1!==t.length)for(var n=e[td](),i=e[Ed],a=n[ad](e),o=1,s=t.length;ol?c=c.slice(0,l):0===c.length&&(c=null),c&&this._isConsumeData()&&c.forEach((function(e){e[LE]=!0}))}else{if(!i.name){this._setAndBind(i,t);continue}if(this._isConsumeData()){for(var h=[];h.length0?h:null}else{if(!(c=t[XE](i.name,!1,this.emptyMerge).next().value)){if(0===u){r.push(i);continue}var f=t[Qd]===qw?-1:t[Qd];c=i[ME]=new Qp(f,i.name),this.emptyMerge&&(c[LE]=!0),t[SE](c),this._setAndBind(i,c);continue}this.emptyMerge&&(c[LE]=!0),c=[c]}}c?this._bindOccurrences(i,c,o):u>0?this._setAndBind(i,t):r.push(i)}}else{this._mergeMode="consumeData"===i.mergeMode;var C=t[VE]();if(C.length>0)this._bindOccurrences(i,[C[0]],null);else if(this.emptyMerge){var B=t[Qd]===qw?-1:t[Qd],Q=i[ME]=new Qp(B,i.name||"root");t[SE](Q),this._bindElement(i,Q)}}}}catch(e){n.e(e)}finally{n.f()}r.forEach((function(e){return e[td]()[kd](e)}))}}])}();function Zw(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Xw(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function _w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||Xw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xw(e,t){if(e){if("string"==typeof e)return Vw(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vw(e,t):void 0}}function Vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0;){var r=t.at(-1),A=_w(r,2),n=A[0],i=A[1];if(n+1!==i.length){var a=i[++r[0]],o=e.get(a[Yd]);if(o)a[Gd](o);else{var s,c=Zw(a[KE]().values());try{for(c.s();!(s=c.n()).done;){var g=s.value,u=e.get(g[Yd]);if(u){g[Gd](u);break}}}catch(e){c.e(e)}finally{c.f()}}var l=a[VE]();l.length>0&&t.push([-1,l])}else t.pop()}var h=[''];if(this.dataset){var I,f=Zw(this.dataset[VE]());try{for(f.s();!(I=f.n()).done;){var C=I.value;"data"!==C[Ed]&&C[Jd](h)}}catch(e){f.e(e)}finally{f.f()}}return this.data[Jd](h),h.push(""),h.join("")}}])}();function tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=1&&e<=8}])}return cb(t,pp),Ab(t)}(),db=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"agent",!0])).name=e.name?e.name.trim():"",r.common=new Cp,r}return cb(t,fp),Ab(t)}(),yb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"alwaysEmbed"])}return cb(t,Ep),Ab(t)}(),pb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"amd"])}return cb(t,yp),Ab(t)}(),vb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"area"])).level=Xd({data:e.level,defaultValue:0,validate:function(e){return e>=1&&e<=3}}),r.name=$d(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"]),r}return cb(t,fp),Ab(t)}(),mb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"attributes",["preserve","delegate","ignore"]])}return cb(t,dp),Ab(t)}(),wb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"autoSave",["disabled","enabled"]])}return cb(t,dp),Ab(t)}(),bb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"base"])}return cb(t,yp),Ab(t)}(),kb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"batchOutput"])).format=$d(e.format,["none","concat","zip","zipCompress"]),r}return cb(t,fp),Ab(t)}(),Db=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"behaviorOverride"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=new Map(this[UE].trim().split(/\\s+/).filter((function(e){return e.includes(":")})).map((function(e){return e.split(":",2)})))}}])}(),Sb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"cache",!0])).templateCache=null,r}return cb(t,fp),Ab(t)}(),Fb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"change"])}return cb(t,vp),Ab(t)}(),xb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"common",!0])).data=null,r.locale=null,r.localeSet=null,r.messaging=null,r.suppressBanner=null,r.template=null,r.validationMessaging=null,r.versionControl=null,r.log=new Cp,r}return cb(t,fp),Ab(t)}(),Rb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"compress"])).scope=$d(e.scope,["imageOnly","document"]),r}return cb(t,fp),Ab(t)}(),Gb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"compressLogicalStructure"])}return cb(t,vp),Ab(t)}(),Nb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"compressObjectStream"])}return cb(t,mp),Ab(t)}(),Lb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"compression",!0])).compressLogicalStructure=null,r.compressObjectStream=null,r.level=null,r.type=null,r}return cb(t,fp),Ab(t)}(),Ub=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"config",!0])).acrobat=null,r.present=null,r.trace=null,r.agent=new Cp,r}return cb(t,fp),Ab(t)}(),Mb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"conformance",["A","B"]])}return cb(t,dp),Ab(t)}(),Jb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"contentCopy"])}return cb(t,vp),Ab(t)}(),Hb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"copies",1,function(e){return e>=1}])}return cb(t,pp),Ab(t)}(),Yb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"creator"])}return cb(t,yp),Ab(t)}(),Pb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"currentPage",0,function(e){return e>=0}])}return cb(t,pp),Ab(t)}(),Ob=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"data",!0])).adjustData=null,r.attributes=null,r.incrementalLoad=null,r.outputXSL=null,r.range=null,r.record=null,r.startNode=null,r.uri=null,r.window=null,r.xsl=null,r.excludeNS=new Cp,r.transform=new Cp,r}return cb(t,fp),Ab(t)}(),Kb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"debug",!0])).uri=null,r}return cb(t,fp),Ab(t)}(),Tb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"defaultTypeface"])).writingScript=$d(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"]),r}return cb(t,Ep),Ab(t)}(),qb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"destination",["pdf","pcl","ps","webClient","zpl"]])}return cb(t,dp),Ab(t)}(),jb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"documentAssembly"])}return cb(t,vp),Ab(t)}(),Wb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"driver",!0])).name=e.name?e.name.trim():"",r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),Zb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"]])}return cb(t,dp),Ab(t)}(),_b=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"dynamicRender",["forbidden","required"]])}return cb(t,dp),Ab(t)}(),Xb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"embed"])}return cb(t,vp),Ab(t)}(),Vb=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"encrypt"])}return cb(t,vp),Ab(t)}(),zb=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"encryption",!0])).encrypt=null,r.encryptionLevel=null,r.permissions=null,r}return cb(t,fp),Ab(t)}(),$b=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"encryptionLevel",["40bit","128bit"]])}return cb(t,dp),Ab(t)}(),ek=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"enforce"])}return cb(t,yp),Ab(t)}(),tk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"equate"])).force=Xd({data:e.force,defaultValue:1,validate:function(e){return 0===e}}),r.from=e.from||"",r.to=e.to||"",r}return cb(t,fp),Ab(t)}(),rk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"equateRange"])).from=e.from||"",r.to=e.to||"",r._unicodeRange=e.unicodeRange||"",r}return cb(t,fp),Ab(t,[{key:"unicodeRange",get:function(){var e,t=[],r=/U\\+([0-9a-fA-F]+)/,A=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this._unicodeRange.split(",").map((function(e){return e.trim()})).filter((function(e){return!!e})));try{for(A.s();!(e=A.n()).done;){var n=e.value;1===(n=n.split("-",2).map((function(e){var t=e.match(r);return t?parseInt(t[1],16):0}))).length&&n.push(n[0]),t.push(n)}}catch(e){A.e(e)}finally{A.f()}return _(this,"unicodeRange",t)}}])}(),Ak=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"exclude"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim().split(/\\s+/).filter((function(e){return e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)}))}}])}(),nk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"excludeNS"])}return cb(t,yp),Ab(t)}(),ik=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"flipLabel",["usePrinterSetting","on","off"]])}return cb(t,dp),Ab(t)}(),ak=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"fontInfo",!0])).embed=null,r.map=null,r.subsetBelow=null,r.alwaysEmbed=new Cp,r.defaultTypeface=new Cp,r.neverEmbed=new Cp,r}return cb(t,fp),Ab(t)}(),ok=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"formFieldFilling"])}return cb(t,vp),Ab(t)}(),sk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"groupParent"])}return cb(t,yp),Ab(t)}(),ck=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"ifEmpty",["dataValue","dataGroup","ignore","remove"]])}return cb(t,dp),Ab(t)}(),gk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"includeXDPContent"])}return cb(t,yp),Ab(t)}(),uk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"incrementalLoad",["none","forwardOnly"]])}return cb(t,dp),Ab(t)}(),lk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"incrementalMerge"])}return cb(t,vp),Ab(t)}(),hk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"interactive"])}return cb(t,vp),Ab(t)}(),Ik=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"jog",["usePrinterSetting","none","pageSet"]])}return cb(t,dp),Ab(t)}(),fk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"labelPrinter",!0])).name=$d(e.name,["zpl","dpl","ipl","tcpl"]),r.batchOutput=null,r.flipLabel=null,r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),Ck=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"layout",["paginate","panel"]])}return cb(t,dp),Ab(t)}(),Bk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"level",0,function(e){return e>0}])}return cb(t,pp),Ab(t)}(),Qk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"linearized"])}return cb(t,vp),Ab(t)}(),Ek=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"locale"])}return cb(t,yp),Ab(t)}(),dk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"localeSet"])}return cb(t,yp),Ab(t)}(),yk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"log",!0])).mode=null,r.threshold=null,r.to=null,r.uri=null,r}return cb(t,fp),Ab(t)}(),pk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"map",!0])).equate=new Cp,r.equateRange=new Cp,r}return cb(t,fp),Ab(t)}(),vk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"mediumInfo",!0])).map=null,r}return cb(t,fp),Ab(t)}(),mk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"message",!0])).msgId=null,r.severity=null,r}return cb(t,fp),Ab(t)}(),wk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"messaging",!0])).message=new Cp,r}return cb(t,fp),Ab(t)}(),bk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"mode",["append","overwrite"]])}return cb(t,dp),Ab(t)}(),kk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"modifyAnnots"])}return cb(t,vp),Ab(t)}(),Dk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"msgId",1,function(e){return e>=1}])}return cb(t,pp),Ab(t)}(),Sk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"nameAttr"])}return cb(t,yp),Ab(t)}(),Fk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"neverEmbed"])}return cb(t,Ep),Ab(t)}(),xk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"numberOfCopies",null,function(e){return e>=2&&e<=5}])}return cb(t,pp),Ab(t)}(),Rk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"openAction",!0])).destination=null,r}return cb(t,fp),Ab(t)}(),Gk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"output",!0])).to=null,r.type=null,r.uri=null,r}return cb(t,fp),Ab(t)}(),Nk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"outputBin"])}return cb(t,yp),Ab(t)}(),Lk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"outputXSL",!0])).uri=null,r}return cb(t,fp),Ab(t)}(),Uk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"overprint",["none","both","draw","field"]])}return cb(t,dp),Ab(t)}(),Mk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"packets"])}return cb(t,yp),Ab(t,[{key:YE,value:function(){"*"!==this[UE]&&(this[UE]=this[UE].trim().split(/\\s+/).filter((function(e){return["config","datasets","template","xfdf","xslt"].includes(e)})))}}])}(),Jk=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"pageOffset"])).x=Xd({data:e.x,defaultValue:"useXDCSetting",validate:function(e){return!0}}),r.y=Xd({data:e.y,defaultValue:"useXDCSetting",validate:function(e){return!0}}),r}return cb(t,fp),Ab(t)}(),Hk=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"pageRange"])}return cb(t,yp),Ab(t,[{key:YE,value:function(){for(var e=this[UE].trim().split(/\\s+/).map((function(e){return parseInt(e,10)})),t=[],r=0,A=e.length;r=0&&(this[UE]=e)}}])}(),aD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"relevant"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim().split(/\\s+/)}}])}(),oD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"rename"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim(),(this[UE].toLowerCase().startsWith("xml")||new RegExp("[\\\\p{L}_][\\\\p{L}\\\\d._\\\\p{M}-]*","u").test(this[UE]))&&q("XFA - Rename: invalid XFA name")}}])}(),sD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"renderPolicy",["server","client"]])}return cb(t,dp),Ab(t)}(),cD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"runScripts",["both","client","none","server"]])}return cb(t,dp),Ab(t)}(),gD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"script",!0])).currentPage=null,r.exclude=null,r.runScripts=null,r}return cb(t,fp),Ab(t)}(),uD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"scriptModel",["XFA","none"]])}return cb(t,dp),Ab(t)}(),lD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"severity",["ignore","error","information","trace","warning"]])}return cb(t,dp),Ab(t)}(),hD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"silentPrint",!0])).addSilentPrint=null,r.printerName=null,r}return cb(t,fp),Ab(t)}(),ID=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"staple"])).mode=$d(e.mode,["usePrinterSetting","on","off"]),r}return cb(t,fp),Ab(t)}(),fD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"startNode"])}return cb(t,yp),Ab(t)}(),CD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"startPage",0,function(e){return!0}])}return cb(t,pp),Ab(t)}(),BD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"submitFormat",["html","delegate","fdf","xml","pdf"]])}return cb(t,dp),Ab(t)}(),QD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"submitUrl"])}return cb(t,yp),Ab(t)}(),ED=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"subsetBelow",100,function(e){return e>=0&&e<=100}])}return cb(t,pp),Ab(t)}(),dD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"suppressBanner"])}return cb(t,vp),Ab(t)}(),yD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"tagged"])}return cb(t,vp),Ab(t)}(),pD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"template",!0])).base=null,r.relevant=null,r.startPage=null,r.uri=null,r.xsl=null,r}return cb(t,fp),Ab(t)}(),vD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"threshold",["trace","error","information","warning"]])}return cb(t,dp),Ab(t)}(),mD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"to",["null","memory","stderr","stdout","system","uri"]])}return cb(t,dp),Ab(t)}(),wD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"templateCache"])).maxEntries=Xd({data:e.maxEntries,defaultValue:5,validate:function(e){return e>=0}}),r}return cb(t,fp),Ab(t)}(),bD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"trace",!0])).area=new Cp,r}return cb(t,fp),Ab(t)}(),kD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"transform",!0])).groupParent=null,r.ifEmpty=null,r.nameAttr=null,r.picture=null,r.presence=null,r.rename=null,r.whitespace=null,r}return cb(t,fp),Ab(t)}(),DD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"]])}return cb(t,dp),Ab(t)}(),SD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"uri"])}return cb(t,yp),Ab(t)}(),FD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"validate",["preSubmit","prePrint","preExecute","preSave"]])}return cb(t,dp),Ab(t)}(),xD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"validateApprovalSignatures"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){this[UE]=this[UE].trim().split(/\\s+/).filter((function(e){return["docReady","postSign"].includes(e)}))}}])}(),RD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"]])}return cb(t,dp),Ab(t)}(),GD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"version",["1.7","1.6","1.5","1.4","1.3","1.2"]])}return cb(t,dp),Ab(t)}(),ND=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"VersionControl"])).outputBelow=$d(e.outputBelow,["warn","error","update"]),r.sourceAbove=$d(e.sourceAbove,["warn","error"]),r.sourceBelow=$d(e.sourceBelow,["update","maintain"]),r}return cb(t,fp),Ab(t)}(),LD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"viewerPreferences",!0])).ADBE_JSConsole=null,r.ADBE_JSDebugger=null,r.addViewerPreferences=null,r.duplexOption=null,r.enforce=null,r.numberOfCopies=null,r.pageRange=null,r.pickTrayByPDFSize=null,r.printScaling=null,r}return cb(t,fp),Ab(t)}(),UD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"webClient",!0])).name=e.name?e.name.trim():"",r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),MD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"whitespace",["preserve","ltrim","normalize","rtrim","trim"]])}return cb(t,dp),Ab(t)}(),JD=function(e){function t(e){return ib(this,t),ab(this,t,[ub,"window"])}return cb(t,Ep),Ab(t,[{key:YE,value:function(){var e=this[UE].trim().split(/\\s*,\\s*/,2).map((function(e){return parseInt(e,10)}));e.some((function(e){return isNaN(e)}))?this[UE]=[0,0]:(1===e.length&&e.push(e[0]),this[UE]=e)}}])}(),HD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"xdc",!0])).uri=new Cp,r.xsl=new Cp,r}return cb(t,fp),Ab(t)}(),YD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"xdp",!0])).packets=null,r}return cb(t,fp),Ab(t)}(),PD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"xsl",!0])).debug=null,r.uri=null,r}return cb(t,fp),Ab(t)}(),OD=function(e){function t(e){var r;return ib(this,t),(r=ab(this,t,[ub,"zpl",!0])).name=e.name?e.name.trim():"",r.batchOutput=null,r.flipLabel=null,r.fontInfo=null,r.xdc=null,r}return cb(t,fp),Ab(t)}(),KD=function(){function e(){ib(this,e)}return Ab(e,null,[{key:Pd,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"acrobat",value:function(e){return new lb(e)}},{key:"acrobat7",value:function(e){return new hb(e)}},{key:"ADBE_JSConsole",value:function(e){return new Ib(e)}},{key:"ADBE_JSDebugger",value:function(e){return new fb(e)}},{key:"addSilentPrint",value:function(e){return new Cb(e)}},{key:"addViewerPreferences",value:function(e){return new Bb(e)}},{key:"adjustData",value:function(e){return new Qb(e)}},{key:"adobeExtensionLevel",value:function(e){return new Eb(e)}},{key:"agent",value:function(e){return new db(e)}},{key:"alwaysEmbed",value:function(e){return new yb(e)}},{key:"amd",value:function(e){return new pb(e)}},{key:"area",value:function(e){return new vb(e)}},{key:"attributes",value:function(e){return new mb(e)}},{key:"autoSave",value:function(e){return new wb(e)}},{key:"base",value:function(e){return new bb(e)}},{key:"batchOutput",value:function(e){return new kb(e)}},{key:"behaviorOverride",value:function(e){return new Db(e)}},{key:"cache",value:function(e){return new Sb(e)}},{key:"change",value:function(e){return new Fb(e)}},{key:"common",value:function(e){return new xb(e)}},{key:"compress",value:function(e){return new Rb(e)}},{key:"compressLogicalStructure",value:function(e){return new Gb(e)}},{key:"compressObjectStream",value:function(e){return new Nb(e)}},{key:"compression",value:function(e){return new Lb(e)}},{key:"config",value:function(e){return new Ub(e)}},{key:"conformance",value:function(e){return new Mb(e)}},{key:"contentCopy",value:function(e){return new Jb(e)}},{key:"copies",value:function(e){return new Hb(e)}},{key:"creator",value:function(e){return new Yb(e)}},{key:"currentPage",value:function(e){return new Pb(e)}},{key:"data",value:function(e){return new Ob(e)}},{key:"debug",value:function(e){return new Kb(e)}},{key:"defaultTypeface",value:function(e){return new Tb(e)}},{key:"destination",value:function(e){return new qb(e)}},{key:"documentAssembly",value:function(e){return new jb(e)}},{key:"driver",value:function(e){return new Wb(e)}},{key:"duplexOption",value:function(e){return new Zb(e)}},{key:"dynamicRender",value:function(e){return new _b(e)}},{key:"embed",value:function(e){return new Xb(e)}},{key:"encrypt",value:function(e){return new Vb(e)}},{key:"encryption",value:function(e){return new zb(e)}},{key:"encryptionLevel",value:function(e){return new $b(e)}},{key:"enforce",value:function(e){return new ek(e)}},{key:"equate",value:function(e){return new tk(e)}},{key:"equateRange",value:function(e){return new rk(e)}},{key:"exclude",value:function(e){return new Ak(e)}},{key:"excludeNS",value:function(e){return new nk(e)}},{key:"flipLabel",value:function(e){return new ik(e)}},{key:"fontInfo",value:function(e){return new ak(e)}},{key:"formFieldFilling",value:function(e){return new ok(e)}},{key:"groupParent",value:function(e){return new sk(e)}},{key:"ifEmpty",value:function(e){return new ck(e)}},{key:"includeXDPContent",value:function(e){return new gk(e)}},{key:"incrementalLoad",value:function(e){return new uk(e)}},{key:"incrementalMerge",value:function(e){return new lk(e)}},{key:"interactive",value:function(e){return new hk(e)}},{key:"jog",value:function(e){return new Ik(e)}},{key:"labelPrinter",value:function(e){return new fk(e)}},{key:"layout",value:function(e){return new Ck(e)}},{key:"level",value:function(e){return new Bk(e)}},{key:"linearized",value:function(e){return new Qk(e)}},{key:"locale",value:function(e){return new Ek(e)}},{key:"localeSet",value:function(e){return new dk(e)}},{key:"log",value:function(e){return new yk(e)}},{key:"map",value:function(e){return new pk(e)}},{key:"mediumInfo",value:function(e){return new vk(e)}},{key:"message",value:function(e){return new mk(e)}},{key:"messaging",value:function(e){return new wk(e)}},{key:"mode",value:function(e){return new bk(e)}},{key:"modifyAnnots",value:function(e){return new kk(e)}},{key:"msgId",value:function(e){return new Dk(e)}},{key:"nameAttr",value:function(e){return new Sk(e)}},{key:"neverEmbed",value:function(e){return new Fk(e)}},{key:"numberOfCopies",value:function(e){return new xk(e)}},{key:"openAction",value:function(e){return new Rk(e)}},{key:"output",value:function(e){return new Gk(e)}},{key:"outputBin",value:function(e){return new Nk(e)}},{key:"outputXSL",value:function(e){return new Lk(e)}},{key:"overprint",value:function(e){return new Uk(e)}},{key:"packets",value:function(e){return new Mk(e)}},{key:"pageOffset",value:function(e){return new Jk(e)}},{key:"pageRange",value:function(e){return new Hk(e)}},{key:"pagination",value:function(e){return new Yk(e)}},{key:"paginationOverride",value:function(e){return new Pk(e)}},{key:"part",value:function(e){return new Ok(e)}},{key:"pcl",value:function(e){return new Kk(e)}},{key:"pdf",value:function(e){return new Tk(e)}},{key:"pdfa",value:function(e){return new qk(e)}},{key:"permissions",value:function(e){return new jk(e)}},{key:"pickTrayByPDFSize",value:function(e){return new Wk(e)}},{key:"picture",value:function(e){return new Zk(e)}},{key:"plaintextMetadata",value:function(e){return new _k(e)}},{key:"presence",value:function(e){return new Xk(e)}},{key:"present",value:function(e){return new Vk(e)}},{key:"print",value:function(e){return new zk(e)}},{key:"printHighQuality",value:function(e){return new $k(e)}},{key:"printScaling",value:function(e){return new eD(e)}},{key:"printerName",value:function(e){return new tD(e)}},{key:"producer",value:function(e){return new rD(e)}},{key:"ps",value:function(e){return new AD(e)}},{key:"range",value:function(e){return new nD(e)}},{key:"record",value:function(e){return new iD(e)}},{key:"relevant",value:function(e){return new aD(e)}},{key:"rename",value:function(e){return new oD(e)}},{key:"renderPolicy",value:function(e){return new sD(e)}},{key:"runScripts",value:function(e){return new cD(e)}},{key:"script",value:function(e){return new gD(e)}},{key:"scriptModel",value:function(e){return new uD(e)}},{key:"severity",value:function(e){return new lD(e)}},{key:"silentPrint",value:function(e){return new hD(e)}},{key:"staple",value:function(e){return new ID(e)}},{key:"startNode",value:function(e){return new fD(e)}},{key:"startPage",value:function(e){return new CD(e)}},{key:"submitFormat",value:function(e){return new BD(e)}},{key:"submitUrl",value:function(e){return new QD(e)}},{key:"subsetBelow",value:function(e){return new ED(e)}},{key:"suppressBanner",value:function(e){return new dD(e)}},{key:"tagged",value:function(e){return new yD(e)}},{key:"template",value:function(e){return new pD(e)}},{key:"templateCache",value:function(e){return new wD(e)}},{key:"threshold",value:function(e){return new vD(e)}},{key:"to",value:function(e){return new mD(e)}},{key:"trace",value:function(e){return new bD(e)}},{key:"transform",value:function(e){return new kD(e)}},{key:"type",value:function(e){return new DD(e)}},{key:"uri",value:function(e){return new SD(e)}},{key:"validate",value:function(e){return new FD(e)}},{key:"validateApprovalSignatures",value:function(e){return new xD(e)}},{key:"validationMessaging",value:function(e){return new RD(e)}},{key:"version",value:function(e){return new GD(e)}},{key:"versionControl",value:function(e){return new ND(e)}},{key:"viewerPreferences",value:function(e){return new LD(e)}},{key:"webClient",value:function(e){return new UD(e)}},{key:"whitespace",value:function(e){return new MD(e)}},{key:"window",value:function(e){return new JD(e)}},{key:"xdc",value:function(e){return new HD(e)}},{key:"xdp",value:function(e){return new YD(e)}},{key:"xsl",value:function(e){return new PD(e)}},{key:"zpl",value:function(e){return new OD(e)}}])}();function TD(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function $F(e,t){if(e){if("string"==typeof e)return ex(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ex(e,t):void 0}}function ex(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1]?this[rx]=!0:(e=e.replaceAll(ax,""),this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(ix," "))),e&&(this[UE]+=e)}},{key:md,value:function(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=Object.create(null),n={top:NaN,bottom:NaN,left:NaN,right:NaN},i=null,a=zF(this.style.split(";").map((function(e){return e.split(":",2)})));try{for(a.s();!(t=a.n()).done;){var o=VF(t.value,2),s=o[0],c=o[1];switch(s){case"font-family":A.typeface=_d(c);break;case"font-size":A.size=ey(c);break;case"font-weight":A.weight=c;break;case"font-style":A.posture=c;break;case"letter-spacing":A.letterSpacing=ey(c);break;case"margin":var g=c.split(/ \\t/).map((function(e){return ey(e)}));switch(g.length){case 1:n.top=n.bottom=n.left=n.right=g[0];break;case 2:n.top=n.bottom=g[0],n.left=n.right=g[1];break;case 3:n.top=g[0],n.bottom=g[2],n.left=n.right=g[1];break;case 4:n.top=g[0],n.left=g[1],n.bottom=g[2],n.right=g[3]}break;case"margin-top":n.top=ey(c);break;case"margin-bottom":n.bottom=ey(c);break;case"margin-left":n.left=ey(c);break;case"margin-right":n.right=ey(c);break;case"line-height":i=ey(c)}}}catch(e){a.e(e)}finally{a.f()}if(e.pushData(A,n,i),this[UE])e.addString(this[UE]);else{var u,l=zF(this[VE]());try{for(l.s();!(u=l.n()).done;){var h=u.value;"#text"!==h[Ed]?h[md](e):e.addString(h[UE])}}catch(e){l.e(e)}finally{l.f()}}r&&e.popFont()}},{key:Md,value:function(e){var t,r=[];return this[HE]={children:r},this[FE]({}),0!==r.length||this[UE]?(t=this[rx]?this[UE]?this[UE].replaceAll(ox,"\\n"):void 0:this[UE]||void 0,Ay.success({name:this[Ed],attributes:{href:this.href,style:sx(this.style,this,this[rx])},children:r,value:t})):Ay.EMPTY}}])}(),ux=function(e){function t(e){var r;return YF(this,t),(r=TF(this,t,[e,"a"])).href=Kp(e.href)||"",r}return _F(t,gx),OF(t)}(),lx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"b"])}return _F(t,gx),OF(t,[{key:md,value:function(e){e.pushFont({weight:"bold"}),jF(t,md,this,3)([e]),e.popFont()}}])}(),hx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"body"])}return _F(t,gx),OF(t,[{key:Md,value:function(e){var r=jF(t,Md,this,3)([e]),A=r.html;return A?(A.name="div",A.attributes.class=["xfaRich"],r):Ay.EMPTY}}])}(),Ix=function(e){function t(e){return YF(this,t),TF(this,t,[e,"br"])}return _F(t,gx),OF(t,[{key:Ld,value:function(){return"\\n"}},{key:md,value:function(e){e.addString("\\n")}},{key:Md,value:function(e){return Ay.success({name:"br"})}}])}(),fx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"html"])}return _F(t,gx),OF(t,[{key:Md,value:function(e){var t=[];if(this[HE]={children:t},this[FE]({}),0===t.length)return Ay.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[UE]||""});if(1===t.length){var r,A=t[0];if(null!==(r=A.attributes)&&void 0!==r&&r.class.includes("xfaRich"))return Ay.success(A)}return Ay.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}])}(),Cx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"i"])}return _F(t,gx),OF(t,[{key:md,value:function(e){e.pushFont({posture:"italic"}),jF(t,md,this,3)([e]),e.popFont()}}])}(),Bx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"li"])}return _F(t,gx),OF(t)}(),Qx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"ol"])}return _F(t,gx),OF(t)}(),Ex=function(e){function t(e){return YF(this,t),TF(this,t,[e,"p"])}return _F(t,gx),OF(t,[{key:md,value:function(e){jF(t,md,this,3)([e,!1]),e.addString("\\n"),e.addPara(),e.popFont()}},{key:Ld,value:function(){return this[td]()[VE]().at(-1)===this?jF(t,Ld,this,3)([]):jF(t,Ld,this,3)([])+"\\n"}}])}(),dx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"span"])}return _F(t,gx),OF(t)}(),yx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"sub"])}return _F(t,gx),OF(t)}(),px=function(e){function t(e){return YF(this,t),TF(this,t,[e,"sup"])}return _F(t,gx),OF(t)}(),vx=function(e){function t(e){return YF(this,t),TF(this,t,[e,"ul"])}return _F(t,gx),OF(t)}(),mx=function(){function e(){YF(this,e)}return OF(e,null,[{key:Pd,value:function(t,r){if(e.hasOwnProperty(t))return e[t](r)}},{key:"a",value:function(e){return new ux(e)}},{key:"b",value:function(e){return new lx(e)}},{key:"body",value:function(e){return new hx(e)}},{key:"br",value:function(e){return new Ix(e)}},{key:"html",value:function(e){return new fx(e)}},{key:"i",value:function(e){return new Cx(e)}},{key:"li",value:function(e){return new Bx(e)}},{key:"ol",value:function(e){return new Qx(e)}},{key:"p",value:function(e){return new Ex(e)}},{key:"span",value:function(e){return new dx(e)}},{key:"sub",value:function(e){return new yx(e)}},{key:"sup",value:function(e){return new px(e)}},{key:"ul",value:function(e){return new vx(e)}}])}(),wx={config:KD,connection:lS,datasets:wS,localeSet:aF,signature:BF,stylesheet:DF,template:Jw,xdp:HF,xhtml:mx};function bx(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&void 0!==arguments[0]?arguments[0]:null;Rx(this,e),this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return xx(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Fx(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object.values(Od).map((function(e){return e.id})))),this._currentNamespace=t||new Dx(++this._nextNsId)}),[{key:"buildRoot",value:function(e){return new Ox(e)}},{key:"build",value:function(e){var t=e.nsPrefix,r=e.name,A=e.attributes,n=e.namespace,i=e.prefixes,a=null!==n;if(a&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(n)),i&&this._addNamespacePrefix(i),A.hasOwnProperty(dd)){for(var o=wx.datasets,s=A[dd],c=null,g=0,u=Object.entries(s);g0}},{key:"_searchNamespace",value:function(e){var t=this._namespaces.get(e);if(t)return t;for(var r=0,A=Object.entries(Od);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var A=t.value,n=A.prefix,i=A.value,a=this._searchNamespace(i),o=this._namespacePrefixes.get(n);o||(o=[],this._namespacePrefixes.set(n,o)),o.push(a)}}catch(e){r.e(e)}finally{r.f()}}},{key:"_getNamespaceToUse",value:function(e){if(!e)return this._currentNamespace;var t=this._namespacePrefixes.get(e);return(null==t?void 0:t.length)>0?t.at(-1):(q("Unknown namespace prefix: ".concat(e,".")),null)}},{key:"clean",value:function(e){var t=this,r=e.hasNamespace,A=e.prefixes,n=e.nsAgnostic;r&&(this._currentNamespace=this._namespaceStack.pop()),A&&A.forEach((function(e){var r=e.prefix;t._namespacePrefixes.get(r).pop()})),n&&this._nsAgnosticLevel--}}])}();function qx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||jx(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jx(e,t){if(e){if("string"==typeof e)return Wx(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wx(e,t):void 0}}function Wx(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r0&&void 0!==arguments[0]?arguments[0]:null,A=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Xx(this,t))._builder=new Tx(r),e._stack=[],e._globalData={usedTypefaces:new Set},e._ids=new Map,e._current=e._builder.buildRoot(e._ids),e._errorCode=0,e._whiteRegex=/^\\s+$/,e._nbsps=/\\xa0+/g,e._richText=A,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$x(e,t)}(t,nB),function(e,t,r){return t&&Zx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"parse",value:function(e){if(this.parseXml(e),0===this._errorCode)return this._current[YE](),this._current.element}},{key:"onText",value:function(e){e=e.replace(this._nbsps,(function(e){return e.slice(1)+" "})),this._richText||this._current[kE]()?this._current[vd](e,this._richText):this._whiteRegex.test(e)||this._current[vd](e.trim())}},{key:"onCdata",value:function(e){this._current[vd](e)}},{key:"_mkAttributes",value:function(e,t){var r,A=null,n=null,i=Object.create({}),a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=jx(e))){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.name,c=o.value;if("xmlns"===s)A?q("XFA - multiple namespace definition in <".concat(t,">")):A=c;else if(s.startsWith("xmlns:")){var g=s.substring(6);n||(n=[]),n.push({prefix:g,value:c})}else{var u=s.indexOf(":");if(-1===u)i[s]=c;else{var l,h=i[dd];h||(h=i[dd]=Object.create(null));var I=[s.slice(0,u),s.slice(u+1)],f=I[0],C=I[1];((l=h)[f]||(l[f]=Object.create(null)))[C]=c}}}}catch(e){a.e(e)}finally{a.f()}return[A,n,i]}},{key:"_getNameAndPrefix",value:function(e,t){var r=e.indexOf(":");return-1===r?[e,null]:[e.substring(r+1),t?"":e.substring(0,r)]}},{key:"onBeginElement",value:function(e,t,r){var A=qx(this._mkAttributes(t,e),3),n=A[0],i=A[1],a=A[2],o=qx(this._getNameAndPrefix(e,this._builder.isNsAgnostic()),2),s=o[0],c=o[1],g=this._builder.build({nsPrefix:c,name:s,attributes:a,namespace:n,prefixes:i});if(g[Ad]=this._globalData,r)return g[YE](),this._current[yd](g)&&g[xd](this._ids),void g[xE](this._builder);this._stack.push(this._current),this._current=g}},{key:"onEndElement",value:function(e){var r=this._current;if(r[sd]()&&"string"==typeof r[UE]){var A=new t;A._globalData=this._globalData;var n=A.parse(r[UE]);r[UE]=null,r[yd](n)}r[YE](),this._current=this._stack.pop(),this._current[yd](r)&&r[xd](this._ids),r[xE](this._builder)}},{key:"onError",value:function(e){this._errorCode=e}}])}();function tR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function AR(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function nR(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){AR(i,A,n,a,o,"next",e)}function o(e){AR(i,A,n,a,o,"throw",e)}a(void 0)}))}}function iR(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this.form[Ad].usedTypefaces);try{for(A.s();!(t=A.n()).done;){var n=t.value;n=_d(n),this.form[Ad].fontFinder.find(n)||r.push(n)}}catch(e){A.e(e)}finally{A.f()}return r.length>0?r:null}},{key:"appendFonts",value:function(e,t){this.form[Ad].fontFinder.add(e,t)}},{key:"getPages",value:(e=nR(rR().mark((function e(){var t;return rR().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.pages){e.next=3;break}return e.next=3,this._createPages();case 3:return t=this.pages,this.pages=null,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"serializeData",value:function(e){return this.dataHandler.serialize(e)}}],[{key:"_createDocument",value:function(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}},{key:"getRichTextAsHtml",value:function(e){if(!e||"string"!=typeof e)return null;try{var t=new eR(mx,!0).parse(e);if(!["body","xhtml"].includes(t[Ed])){var r=mx.body({});r[SE](t),t=r}var A=t[Md]();if(!A.success)return null;var n=A.html,i=n.attributes;return i&&(i.class&&(i.class=i.class.filter((function(e){return!e.startsWith("xfa")}))),i.dir="auto"),{html:n,str:t[Ld]()}}catch(e){q("XFA - an error occurred during parsing of rich text: ".concat(e))}return null}}]);var e,t,r}();function sR(e,t,r){return e.set(cR(e,t),r),r}function cR(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function gR(e,t,r,A){var n=uR(fR(1&A?e.prototype:e),t,r);return 2&A&&"function"==typeof n?function(e){return n.apply(r,e)}:n}function uR(){return uR="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var A=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fR(e)););return e}(e,t);if(A){var n=Object.getOwnPropertyDescriptor(A,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},uR.apply(null,arguments)}function lR(e,t,r){return t=fR(t),hR(e,IR()?Reflect.construct(t,r||[],fR(e).constructor):t.apply(e,r))}function hR(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function IR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(IR=function(){return!!e})()}function fR(e){return fR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fR(e)}function CR(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BR(e,t)}function BR(e,t){return BR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BR(e,t)}function QR(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=vR(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ER(){ER=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function dR(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function yR(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){dR(i,A,n,a,o,"next",e)}function o(e){dR(i,A,n,a,o,"throw",e)}a(void 0)}))}}function pR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||vR(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vR(e,t){if(e){if("string"==typeof e)return mR(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mR(e,t):void 0}}function mR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,s=e.fetchIfRef(t);if(s instanceof He){var c=r.acroForm,g=r.pdfManager,u=t instanceof Ye?t.toString():"annot_".concat(A.createObjId()),l=s.get("Subtype"),h={xref:e,ref:t,dict:s,subtype:l=l instanceof Ue?l.name:null,id:u,annotationGlobals:r,collectFields:n,orphanFields:i,needAppearances:!n&&!0===c.get("NeedAppearances"),pageIndex:a,evaluatorOptions:g.evaluatorOptions,pageRef:o};switch(l){case"Link":return new KR(h);case"Text":return new OR(h);case"Widget":var I=yt({dict:s,key:"FT"});switch(I=I instanceof Ue?I.name:null){case"Tx":return new JR(h);case"Btn":return new HR(h);case"Ch":return new YR(h);case"Sig":return new PR(h)}return q('Unimplemented widget field type "'.concat(I,'", ')+"falling back to base field type."),new MR(h);case"Popup":return new TR(h);case"FreeText":return new qR(h);case"Line":return new jR(h);case"Square":return new WR(h);case"Circle":return new ZR(h);case"PolyLine":return new _R(h);case"Polygon":return new XR(h);case"Caret":return new VR(h);case"Ink":return new zR(h);case"Highlight":return new $R(h);case"Underline":return new eG(h);case"Squiggly":return new tG(h);case"StrikeOut":return new rG(h);case"Stamp":return new nG(h);case"FileAttachment":return new iG(h);default:return n||q(l?'Unimplemented annotation type "'.concat(l,'", ')+"falling back to base annotation.":"Annotation is missing the required /Subtype."),new NR(h)}}}},{key:"_getPageIndex",value:(r=yR(ER().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.fetchIfRefAsync(r);case 3:if((n=e.sent)instanceof He){e.next=6;break}return e.abrupt("return",-1);case 6:if(!((i=n.getRaw("P"))instanceof Ye)){e.next=18;break}return e.prev=8,e.next=11,A.ensureCatalog("getPageIndex",[i]);case 11:return a=e.sent,e.abrupt("return",a);case 15:e.prev=15,e.t0=e.catch(8),T('_getPageIndex -- not a valid page reference: "'.concat(e.t0,'".'));case 18:if(!n.has("Kids")){e.next=20;break}return e.abrupt("return",-1);case 20:return e.next=22,A.ensureDoc("numPages");case 22:o=e.sent,s=0;case 24:if(!(s1&&void 0!==arguments[1]?arguments[1]:new Uint8ClampedArray(3);if(!Array.isArray(e))return t;var r=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:return Ur.singletons.gray.getRgbItem(e,0,r,0),r;case 3:return Ur.singletons.rgb.getRgbItem(e,0,r,0),r;case 4:return Ur.singletons.cmyk.getRgbItem(e,0,r,0),r;default:return t}}function xR(e){return Array.from(e,(function(e){return e/255}))}function RR(e,t){var r=e.getArray("QuadPoints");if(!St(r,null)||0===r.length||r.length%8>0)return null;for(var A=new Float32Array(r.length),n=0,i=r.length;nt[2]||Bt[3]))return null;A.set([f,Q,C,Q,f,B,C,B],n)}return A}function GR(e,t,r){var A=pR(ge.getAxialAlignedBoundingBox(t,r),4),n=A[0],i=A[1],a=A[2],o=A[3];if(n===a||i===o)return[1,0,0,1,e[0],e[1]];var s=(e[2]-e[0])/(a-n),c=(e[3]-e[1])/(o-i);return[s,0,0,c,e[0]-n*s,e[1]-i*c]}var NR=function(){return kR((function e(t){wR(this,e);var r=t.dict,A=t.xref,n=t.annotationGlobals,i=t.ref,a=t.orphanFields,o=null==a?void 0:a.get(i);o&&r.set("Parent",o),this.setTitle(r.get("T")),this.setContents(r.get("Contents")),this.setModificationDate(r.get("M")),this.setFlags(r.get("F")),this.setRectangle(r.getArray("Rect")),this.setColor(r.getArray("C")),this.setBorderStyle(r),this.setAppearance(r),this.setOptionalContent(r);var s=r.get("MK");this.setBorderAndBackgroundColors(s),this.setRotation(s,r),this.ref=t.ref instanceof Ye?t.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);var c=!!(128&this.flags),g=!!(512&this.flags);if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:t.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:t.subtype,hasOwnCanvas:!1,noRotate:!!(16&this.flags),noHTML:c&&g,isEditable:!1,structParent:-1},n.structTreeRoot){var u=r.get("StructParent");this.data.structParent=u=Number.isInteger(u)&&u>=0?u:-1,n.structTreeRoot.addAnnotationIdToPage(t.pageRef,u)}if(t.collectFields){var l=r.get("Kids");if(Array.isArray(l)){var h,I=[],f=QR(l);try{for(f.s();!(h=f.n()).done;){var C=h.value;C instanceof Ye&&I.push(C.toString())}}catch(e){f.e(e)}finally{f.f()}0!==I.length&&(this.data.kidIds=I)}this.data.actions=Mt(A,r,b),this.data.fieldName=this._constructFieldName(r),this.data.pageIndex=t.pageIndex}var B=r.get("IT");B instanceof Ue&&(this.data.it=B.name),this._isOffscreenCanvasSupported=t.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}),[{key:"_hasFlag",value:function(e,t){return!!(e&t)}},{key:"_buildFlags",value:function(e,t){var r=this.flags;if(void 0===e){if(void 0===t)return;return t?-5&r:-3&r|4}return e?(r|=4,t?-33&r|2:-3&r|v):(r&=-35,t?-5&r:4|r)}},{key:"_isViewable",value:function(e){return!this._hasFlag(e,1)&&!this._hasFlag(e,v)}},{key:"_isPrintable",value:function(e){return this._hasFlag(e,4)&&!this._hasFlag(e,2)&&!this._hasFlag(e,1)}},{key:"mustBeViewed",value:function(e,t){var r,A=null==e||null===(r=e.get(this.data.id))||void 0===r?void 0:r.noView;return void 0!==A?!A:this.viewable&&!this._hasFlag(this.flags,2)}},{key:"mustBePrinted",value:function(e){var t,r=null==e||null===(t=e.get(this.data.id))||void 0===t?void 0:t.noPrint;return void 0!==r?!r:this.printable}},{key:"mustBeViewedWhenEditing",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?!this.data.isEditable:!(null!=t&&t.has(this.data.id))}},{key:"viewable",get:function(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}},{key:"printable",get:function(){return null!==this.data.quadPoints&&0!==this.flags&&this._isPrintable(this.flags)}},{key:"_parseStringHelper",value:function(e){var t="string"==typeof e?Ie(e):"";return{str:t,dir:t&&"rtl"===UI(t).dir?"rtl":"ltr"}}},{key:"setDefaultAppearance",value:function(e){var t=e.dict,r=e.annotationGlobals,A=yt({dict:t,key:"DA"})||r.acroForm.get("DA");this._defaultAppearance="string"==typeof A?A:"",this.data.defaultAppearanceData=dC(this._defaultAppearance)}},{key:"setTitle",value:function(e){this._title=this._parseStringHelper(e)}},{key:"setContents",value:function(e){this._contents=this._parseStringHelper(e)}},{key:"setModificationDate",value:function(e){this.modificationDate="string"==typeof e?e:null}},{key:"setFlags",value:function(e){this.flags=Number.isInteger(e)&&e>0?e:0,1&this.flags&&"Annotation"!==this.constructor.name&&(this.flags^=1)}},{key:"hasFlag",value:function(e){return this._hasFlag(this.flags,e)}},{key:"setRectangle",value:function(e){this.rectangle=Rt(e,[0,0,0,0])}},{key:"setColor",value:function(e){this.color=FR(e)}},{key:"setLineEndings",value:function(e){if(this.lineEndings=["None","None"],Array.isArray(e)&&2===e.length)for(var t=0;t<2;t++){var r=e[t];if(r instanceof Ue)switch(r.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=r.name;continue}q("Ignoring invalid lineEnding: ".concat(r))}}},{key:"setRotation",value:function(e,t){this.rotation=0;var r=e instanceof He?e.get("R")||0:t.get("Rotate")||0;Number.isInteger(r)&&0!==r&&((r%=360)<0&&(r+=360),r%90==0&&(this.rotation=r))}},{key:"setBorderAndBackgroundColors",value:function(e){e instanceof He?(this.borderColor=FR(e.getArray("BC"),null),this.backgroundColor=FR(e.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}},{key:"setBorderStyle",value:function(e){if(this.borderStyle=new LR,e instanceof He)if(e.has("BS")){var t=e.get("BS");if(t instanceof He){var r=t.get("Type");r&&!Ke(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}}else if(e.has("Border")){var A=e.getArray("Border");Array.isArray(A)&&A.length>=3&&(this.borderStyle.setHorizontalCornerRadius(A[0]),this.borderStyle.setVerticalCornerRadius(A[1]),this.borderStyle.setWidth(A[2],this.rectangle),4===A.length&&this.borderStyle.setDashArray(A[3],!0))}else this.borderStyle.setWidth(0)}},{key:"setAppearance",value:function(e){this.appearance=null;var t=e.get("AP");if(t instanceof He){var r=t.get("N");if(r instanceof ze)this.appearance=r;else if(r instanceof He){var A=e.get("AS");if(A instanceof Ue&&r.has(A.name)){var n=r.get(A.name);n instanceof ze&&(this.appearance=n)}}}}},{key:"setOptionalContent",value:function(e){this.oc=null;var t=e.get("OC");t instanceof Ue?q("setOptionalContent: Support for /Name-entry is not implemented."):t instanceof He&&(this.oc=t)}},{key:"loadResources",value:function(e,t){return t.dict.getAsync("Resources").then((function(t){if(t)return new bE(t,e,t.xref).load().then((function(){return t}))}))}},{key:"getOperatorList",value:(r=yR(ER().mark((function e(t,r,A,n){var i,a,o,s,c,g,u,l,h,I,f,B,Q;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.data,a=i.hasOwnCanvas,o=i.id,s=i.rect,c=this.appearance,!(g=!!(a&&2&A))||s[0]!==s[2]&&s[1]!==s[3]){e.next=6;break}return this.data.hasOwnCanvas=!1,e.abrupt("return",{opList:new kf,separateForm:!1,separateCanvas:!1});case 6:if(c){e.next=11;break}if(g){e.next=9;break}return e.abrupt("return",{opList:new kf,separateForm:!1,separateCanvas:!1});case 9:(c=new or("")).dict=new He;case 11:return u=c.dict,e.next=14,this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],c);case 14:if(l=e.sent,h=xt(u.getArray("BBox"),[0,0,1,1]),I=Ft(u.getArray("Matrix"),C),f=GR(s,h,I),B=new kf,!this.oc){e.next=23;break}return e.next=22,t.parseMarkedContentProps(this.oc,null);case 22:Q=e.sent;case 23:return void 0!==Q&&B.addOp(J,["OC",Q]),B.addOp(80,[o,s,f,I,g]),e.next=27,t.getOperatorList({stream:c,task:r,resources:l,operatorList:B,fallbackFontDict:this._fallbackFontDict});case 27:return B.addOp(81,[]),void 0!==Q&&B.addOp(H,[]),this.reset(),e.abrupt("return",{opList:B,separateForm:!1,separateCanvas:g});case 31:case"end":return e.stop()}}),e,this)}))),function(e,t,A,n){return r.apply(this,arguments)})},{key:"save",value:(t=yR(ER().mark((function e(t,r,A){return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)}))),function(e,r,A){return t.apply(this,arguments)})},{key:"hasTextContent",get:function(){return!1}},{key:"extractTextContent",value:(e=yR(ER().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h,I;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.appearance){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance);case 4:return n=e.sent,i=[],a=[],o=null,e.t0=Math.Infinity,u={desiredSize:e.t0,ready:!0,enqueue(e,t){s=QR(e.items);try{for(s.s();!(c=s.n()).done;)void 0!==(g=c.value).str&&(o||(o=g.transform.slice(-2)),a.push(g.str),g.hasEOL&&(i.push(a.join("").trimEnd()),a.length=0))}catch(e){s.e(e)}finally{s.f()}}},e.next=12,t.getTextContent({stream:this.appearance,task:r,resources:n,includeMarkedContent:!0,keepWhiteSpace:!0,sink:u,viewBox:A});case 12:this.reset(),a.length&&i.push(a.join("").trimEnd()),(i.length>1||i[0])&&(l=this.appearance.dict,h=xt(l.getArray("BBox"),null),I=Ft(l.getArray("Matrix"),null),this.data.textPosition=this._transformPoint(o,h,I),this.data.textContent=i);case 15:case"end":return e.stop()}}),e,this)}))),function(t,r,A){return e.apply(this,arguments)})},{key:"_transformPoint",value:function(e,t,r){var A=this.data.rect;t||(t=[0,0,1,1]),r||(r=[1,0,0,1,0,0]);var n=GR(A,t,r);return n[4]-=A[0],n[5]-=A[1],e=ge.applyTransform(e,n),ge.applyTransform(e,r)}},{key:"getFieldObject",value:function(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}},{key:"reset",value:function(){var e,t=QR(this._streams);try{for(t.s();!(e=t.n()).done;)e.value.reset()}catch(e){t.e(e)}finally{t.f()}}},{key:"_constructFieldName",value:function(e){if(!e.has("T")&&!e.has("Parent"))return q("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return Ie(e.get("T"));var t=[];e.has("T")&&t.unshift(Ie(e.get("T")));var r=e,A=new Pe;for(e.objId&&A.put(e.objId);r.has("Parent")&&(r=r.get("Parent"))instanceof He&&(!r.objId||!A.has(r.objId));)r.objId&&A.put(r.objId),r.has("T")&&t.unshift(Ie(r.get("T")));return t.join(".")}}]);var e,t,r}(),LR=function(){return kR((function e(){wR(this,e),this.width=1,this.rawWidth=1,this.style=1,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}),[{key:"setWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0];if(e instanceof Ue)this.width=0;else if("number"==typeof e){if(e>0){this.rawWidth=e;var r=(t[2]-t[0])/2,A=(t[3]-t[1])/2;r>0&&A>0&&(e>r||e>A)&&(q("AnnotationBorderStyle.setWidth - ignoring width: ".concat(e)),e=1)}this.width=e}}},{key:"setStyle",value:function(e){if(e instanceof Ue)switch(e.name){case"S":this.style=1;break;case"D":this.style=2;break;case"B":this.style=3;break;case"I":this.style=4;break;case"U":this.style=5}}},{key:"setDashArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)){var r,A=!0,n=!0,i=QR(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!(+a>=0)){A=!1;break}a>0&&(n=!1)}}catch(e){i.e(e)}finally{i.f()}0===e.length||A&&!n?(this.dashArray=e,t&&this.setStyle(Ue.get("D"))):this.width=0}else e&&(this.width=0)}},{key:"setHorizontalCornerRadius",value:function(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}},{key:"setVerticalCornerRadius",value:function(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}])}(),UR=function(e){function t(e){var r;wR(this,t),r=lR(this,t,[e]);var A=e.dict;if(A.has("IRT")){var n=A.getRaw("IRT");r.data.inReplyTo=n instanceof Ye?n.toString():null;var i=A.get("RT");r.data.replyType=i instanceof Ue?i.name:"R"}var a=null;if(r.data.replyType===p){var o=A.get("IRT");r.setTitle(o.get("T")),r.data.titleObj=r._title,r.setContents(o.get("Contents")),r.data.contentsObj=r._contents,o.has("CreationDate")?(r.setCreationDate(o.get("CreationDate")),r.data.creationDate=r.creationDate):r.data.creationDate=null,o.has("M")?(r.setModificationDate(o.get("M")),r.data.modificationDate=r.modificationDate):r.data.modificationDate=null,a=o.getRaw("Popup"),o.has("C")?(r.setColor(o.getArray("C")),r.data.color=r.color):r.data.color=null}else r.data.titleObj=r._title,r.setCreationDate(A.get("CreationDate")),r.data.creationDate=r.creationDate,a=A.getRaw("Popup"),A.has("C")||(r.data.color=null);return r.data.popupRef=a instanceof Ye?a.toString():null,A.has("RC")&&(r.data.richText=oR.getRichTextAsHtml(A.get("RC"))),r}return CR(t,NR),kR(t,[{key:"setCreationDate",value:function(e){this.creationDate="string"==typeof e?e:null}},{key:"_setDefaultAppearance",value:function(e){var t=e.xref,r=e.extra,A=e.strokeColor,n=e.fillColor,i=e.blendMode,a=e.strokeAlpha,o=e.fillAlpha,s=e.pointsCallback,c=Number.MAX_VALUE,g=Number.MAX_VALUE,u=Number.MIN_VALUE,l=Number.MIN_VALUE,h=["q"];r&&h.push(r),A&&h.push("".concat(A[0]," ").concat(A[1]," ").concat(A[2]," RG")),n&&h.push("".concat(n[0]," ").concat(n[1]," ").concat(n[2]," rg"));var I=this.data.quadPoints;I||(I=Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]));for(var f=0,C=I.length;f0?t:null}},{key:"amendSavedDict",value:function(e,t){}},{key:"save",value:(n=yR(ER().mark((function e(t,r,A){var n,i,a,o,s,c,g,u,l,h,I,f,B,Q,E,d,y,p,v,m,w,b,k,D;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==A?void 0:A.get(this.data.id),a=this._buildFlags(null==i?void 0:i.noView,null==i?void 0:i.noPrint),o=null==i?void 0:i.value,s=null==i?void 0:i.rotation,o!==this.data.fieldValue&&void 0!==o){e.next=7;break}if(this._hasValueFromXFA||void 0!==s||void 0!==a){e.next=6;break}return e.abrupt("return",null);case 6:o||(o=this.data.fieldValue);case 7:if(void 0!==s||this._hasValueFromXFA||!Array.isArray(o)||!Array.isArray(this.data.fieldValue)||!Be(o,this.data.fieldValue)||void 0!==a){e.next=9;break}return e.abrupt("return",null);case 9:if(void 0===s&&(s=this.rotation),c=null,this._needAppearances){e.next=19;break}return e.next=14,this._getAppearance(t,r,8,A);case 14:if(null!==(c=e.sent)||void 0!==a){e.next=17;break}return e.abrupt("return",null);case 17:e.next=19;break;case 19:if(g=!1,null!==(n=c)&&void 0!==n&&n.needAppearances&&(g=!0,c=null),u=t.xref,(l=u.fetchIfRef(this.ref))instanceof He){e.next=25;break}return e.abrupt("return",null);case 25:h=new He(u),I=QR(l.getKeys());try{for(I.s();!(f=I.n()).done;)"AP"!==(B=f.value)&&h.set(B,l.getRaw(B))}catch(e){I.e(e)}finally{I.f()}if(void 0!==a&&(h.set("F",a),null!==c||g||(Q=l.getRaw("AP"))&&h.set("AP",Q)),E={path:this.data.fieldName,value:o},h.set("V",Array.isArray(o)?o.map(jt):jt(o)),this.amendSavedDict(A,h),(d=this._getMKDict(s))&&h.set("MK",d),y=[],p=[{ref:this.ref,data:"",xfa:E,needAppearances:g}],null===c){e.next=53;break}return v=u.getNewTemporaryRef(),m=new He(u),h.set("AP",m),m.set("N",v),w=this._getSaveFieldResources(u),b=new or(c),(k=b.dict=new He(u)).set("Subtype",Ue.get("Form")),k.set("Resources",w),k.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]),(D=this.getRotationMatrix(A))!==C&&k.set("Matrix",D),e.next=51,iQ(v,b,y,u);case 51:p.push({ref:v,data:y.join(""),xfa:null,needAppearances:!1}),y.length=0;case 53:return h.set("M","D:".concat(Qe())),e.next=56,iQ(this.ref,h,y,u);case 56:return p[0].data=y.join(""),e.abrupt("return",p);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"_getAppearance",value:(A=yR(ER().mark((function e(r,A,n,i){var a,o,s,c,g,u,l,h,I,f,C,B,Q,d,y,p,v,w,b,k,D,S,F,x,R,G,N,L,U,M,J,H,Y,P,O,K,T,j,Z,_,X,V,z,$;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasFieldFlag(m)){e.next=3;break}return e.abrupt("return",null);case 3:if((a=null==i?void 0:i.get(this.data.id))&&(o=a.formattedValue||a.value,s=a.rotation),void 0!==s||void 0!==o||this._needAppearances){e.next=8;break}if(this._hasValueFromXFA&&!this.appearance){e.next=8;break}return e.abrupt("return",null);case 8:if(c=this.getBorderAndBackgroundAppearances(i),void 0!==o){e.next=13;break}if(o=this.data.fieldValue){e.next=13;break}return e.abrupt("return","/Tx BMC q ".concat(c,"Q EMC"));case 13:if(Array.isArray(o)&&1===o.length&&(o=o[0]),W("string"==typeof o,"Expected \`value\` to be a string."),o=o.trimEnd(),this.data.combo&&(g=this.data.options.find((function(e){var t=e.exportValue;return o===t})),o=(null==g?void 0:g.displayValue)||o),""!==o){e.next=19;break}return e.abrupt("return","/Tx BMC q ".concat(c,"Q EMC"));case 19:return void 0===s&&(s=this.rotation),u=-1,this.data.multiLine?(l=o.split(/\\r\\n?|\\n/).map((function(e){return e.normalize("NFC")})),u=l.length):l=[o.replace(/\\r\\n?|\\n/,"").normalize("NFC")],h=1,I=2,f=this.data.rect[3]-this.data.rect[1],C=this.data.rect[2]-this.data.rect[0],90!==s&&270!==s||(C=(B=[f,C])[0],f=B[1]),this._defaultAppearance||(this.data.defaultAppearanceData=dC(this._defaultAppearance="/Helvetica 0 Tf 0 g")),e.next=30,t._getFontData(r,A,this.data.defaultAppearanceData,this._fieldResources.mergedResources);case 30:Q=e.sent,v=[],w=!1,b=QR(l);try{for(b.s();!(k=b.n()).done;)D=k.value,(S=Q.encodeString(D)).length>1&&(w=!0),v.push(S.join(""))}catch(e){b.e(e)}finally{b.f()}if(!(w&&8&n)){e.next=37;break}return e.abrupt("return",{needAppearances:!0});case 37:if(!w||!this._isOffscreenCanvasSupported){e.next=59;break}if(F=this.data.comb?"monospace":"sans-serif",x=new vC(r.xref,F),R=x.createFontResources(l.join("")),G=R.getRaw("Font"),this._fieldResources.mergedResources.has("Font")){N=this._fieldResources.mergedResources.get("Font"),L=QR(G.getKeys());try{for(L.s();!(U=L.n()).done;)M=U.value,N.set(M,G.getRaw(M))}catch(e){L.e(e)}finally{L.f()}}else this._fieldResources.mergedResources.set("Font",G);return J=x.fontName.name,e.next=46,t._getFontData(r,A,{fontName:J,fontSize:0},R);case 46:for(Q=e.sent,H=0,Y=v.length;H2)){e.next=76;break}return e.abrupt("return","/Tx BMC q ".concat(c,"BT ")+d+" 1 0 0 1 ".concat(Tt(I)," ").concat(Tt(V)," Tm (").concat(Lt(v[0]),") Tj")+" ET Q EMC");case 76:return z={shift:0},$=this._renderText(v[0],Q,y,C,X,z,I,V),e.abrupt("return","/Tx BMC q ".concat(c,"BT ")+d+" 1 0 0 1 0 0 Tm ".concat($)+" ET Q EMC");case 79:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return A.apply(this,arguments)})},{key:"_getTextWidth",value:function(e,t){return t.charsToGlyphs(e).reduce((function(e,t){return e+t.width}),0)/1e3}},{key:"_computeFontSize",value:function(e,t,r,A,n){var i=this,a=this.data.defaultAppearanceData.fontSize,o=(a||12)*Q,s=Math.round(e/o);if(!a){var c=function(e){return Math.floor(100*e)/100};if(-1===n){var g=this._getTextWidth(r,A);a=c(Math.min(e/Q,t/g)),s=1}else{var u,l=r.split(/\\r\\n?|\\n/),h=[],I=QR(l);try{for(I.s();!(u=I.n()).done;){var f=u.value,C=A.encodeString(f).join(""),B=A.charsToGlyphs(C),E=A.getCharPositions(C);h.push({line:C,glyphs:B,positions:E})}}catch(e){I.e(e)}finally{I.f()}var d=function(r){for(var n=0,a=0,o=h;ae)return!0}return!1};for(s=Math.max(s,n);d(a=c((o=e/s)/Q));)s++}var y=this.data.defaultAppearanceData,p=y.fontName,v=y.fontColor;this._defaultAppearance=function(e){var t=e.fontSize,r=e.fontColor;return"/".concat(Nt(e.fontName)," ").concat(t," Tf ").concat(pC(r,!0))}({fontSize:a,fontName:p,fontColor:v})}return[this._defaultAppearance,a,e/s]}},{key:"_renderText",value:function(e,t,r,A,n,i,a,o){var s,c=Tt((s=1===n?(A-this._getTextWidth(e,t)*r)/2:2===n?A-this._getTextWidth(e,t)*r-a:a)-i.shift);return i.shift=s,o=Tt(o),"".concat(c," ").concat(o," Td (").concat(Lt(e),") Tj")}},{key:"_getSaveFieldResources",value:function(e){var t,r=this._fieldResources,A=r.localResources,n=r.appearanceResources,i=r.acroFormResources,a=null===(t=this.data.defaultAppearanceData)||void 0===t?void 0:t.fontName;if(!a)return A||He.empty;for(var o=0,s=[A,n];o2)&&(n=null),r.data.textAlignment=n;var i=yt({dict:A,key:"MaxLen"});return(!Number.isInteger(i)||i<0)&&(i=0),r.data.maxLen=i,r.data.multiLine=r.hasFieldFlag(4096),r.data.comb=r.hasFieldFlag(16777216)&&!r.hasFieldFlag(4096)&&!r.hasFieldFlag(m)&&!r.hasFieldFlag(1048576)&&0!==r.data.maxLen,r.data.doNotScroll=r.hasFieldFlag(8388608),r}return CR(t,MR),kR(t,[{key:"hasTextContent",get:function(){return!!this.appearance&&!this._needAppearances}},{key:"_getCombAppearance",value:function(e,t,r,A,n,i,a,o,s,c,g){var u,l=n/this.data.maxLen,h=this.getBorderAndBackgroundAppearances(g),I=[],f=QR(t.getCharPositions(r));try{for(f.s();!(u=f.n()).done;){var C=pR(u.value,2),B=C[0],Q=C[1];I.push("(".concat(Lt(r.substring(B,Q)),") Tj"))}}catch(e){f.e(e)}finally{f.f()}var E=I.join(" ".concat(Tt(l)," 0 Td "));return"/Tx BMC q ".concat(h,"BT ")+e+" 1 0 0 1 ".concat(Tt(a)," ").concat(Tt(o+s)," Tm ").concat(E)+" ET Q EMC"}},{key:"_getMultilineAppearance",value:function(e,t,r,A,n,i,a,o,s,c,g,u){for(var l=[],h=n-2*o,I={shift:0},f=0,C=t.length;f4&&void 0!==arguments[4]?arguments[4]:{};e=n.line||e;var i=n.glyphs||t.charsToGlyphs(e);if(i.length<=1)return[e];for(var a=n.positions||t.getCharPositions(e),o=r/1e3,s=[],c=-1,g=-1,u=-1,l=0,h=0,I=0,f=i.length;IA?(s.push(e.substring(l,B)),l=B,h=d,c=-1,u=-1):(h+=d,c=B,g=Q,u=I):h+d>A?-1!==c?(s.push(e.substring(l,g)),l=g,I=u+1,c=-1,h=0):(s.push(e.substring(l,B)),l=B,h=d):h+=d}return l0,r.data.options=[];var i=yt({dict:A,key:"Opt"});if(Array.isArray(i))for(var a=0,o=i.length;a=0&&h0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}},{key:"amendSavedDict",value:function(e,t){var r;if(this.hasIndices){var A=null==e||null===(r=e.get(this.data.id))||void 0===r?void 0:r.value;Array.isArray(A)||(A=[A]);for(var n=[],i=this.data.options,a=0,o=0,s=i.length;av&&(v=D,m=k)}catch(e){w.e(e)}finally{w.f()}S=this._computeFontSize(p,l-2*g,m,E,-1),F=pR(S,2),d=F[0],y=F[1]}if(R=((x=y*Q)-y)/2,G=Math.floor(u/x),N=0,f.length>0&&(L=Math.min.apply(Math,f),U=Math.max.apply(Math,f),(N=Math.max(0,U-G+1))>L&&(N=L)),M=Math.min(N+G+1,I),J=["/Tx BMC q","1 1 ".concat(l," ").concat(u," re W n")],f.length){J.push("0.600006 0.756866 0.854904 rg"),H=QR(f);try{for(H.s();!(Y=H.n()).done;)P=Y.value,N<=P&&P1)){e.next=25;break}return e.abrupt("return",null);case 25:x=R.join(""),D.push(x),G=0,N=f.charsToGlyphs(x),L=QR(N);try{for(L.s();!(U=L.n()).done;)M=U.value,G+=M.width*b}catch(e){L.e(e)}finally{L.f()}k=Math.max(k,G);case 32:e.next=20;break;case 34:e.next=39;break;case 36:e.prev=36,e.t0=e.catch(18),S.e(e.t0);case 39:return e.prev=39,S.f(),e.finish(39);case 42:J=1,k>p&&(J=p/k),H=1,P=1*s,(O=(Y=Q*s)*w.length)>v&&(H=v/O),K=Math.min(J,H),T=s*K,e.t1=g,e.next=0===e.t1?54:90===e.t1?58:180===e.t1?62:270===e.t1?66:70;break;case 54:return W=[1,0,0,1],j=[c[0],c[1],p,v],q=[c[0],c[3]-P],e.abrupt("break",70);case 58:return W=[0,1,-1,0],j=[c[1],-c[2],p,v],q=[c[1],-c[0]-P],e.abrupt("break",70);case 62:return W=[-1,0,0,-1],j=[-c[2],-c[3],p,v],q=[-c[2],-c[1]-P],e.abrupt("break",70);case 66:return W=[0,-1,1,0],j=[-c[3],c[0],p,v],q=[-c[3],c[2]-P],e.abrupt("break",70);case 70:for((Z=["q","".concat(W.join(" ")," 0 0 cm"),"".concat(j.join(" ")," re W n"),"BT","".concat(pC(o,!0)),"0 Tc /Helv ".concat(Tt(T)," Tf")]).push("".concat(q.join(" ")," Td (").concat(Lt(D[0]),") Tj")),_=Tt(Y),X=1,V=D.length;X1&&void 0!==arguments[1]?arguments[1]:null;return e?!!this.data.isEditable&&(sR(AG,this,this.data.hasOwnCanvas),this.data.hasOwnCanvas=!0,!0):(this.data.hasOwnCanvas=(this,(t=AG).get(cR(t,this))),!(null!=r&&r.has(this.data.id)))}}],[{key:"createImage",value:(A=yR(ER().mark((function e(t,r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E,d,y;return ER().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A=t.width,n=t.height,i=new OffscreenCanvas(A,n),(a=i.getContext("2d",{alpha:!0})).drawImage(t,0,0),o=a.getImageData(0,0,A,n).data,s=new Uint32Array(o.buffer),(c=s.some(se.isLittleEndian?function(e){return e>>>24!=255}:function(e){return 255!=(255&e)}))&&(a.fillStyle="white",a.fillRect(0,0,A,n),a.drawImage(t,0,0)),g=i.convertToBlob({type:"image/jpeg",quality:1}).then((function(e){return e.arrayBuffer()})),u=Ue.get("XObject"),l=Ue.get("Image"),(h=new He(r)).set("Type",u),h.set("Subtype",l),h.set("BitsPerComponent",8),h.set("ColorSpace",Ue.get("DeviceRGB")),h.set("Filter",Ue.get("DCTDecode")),h.set("BBox",[0,0,A,n]),h.set("Width",A),h.set("Height",n),I=null,c){if(f=new Uint8Array(s.length),se.isLittleEndian)for(C=0,B=s.length;C>>24;else for(Q=0,E=s.length;Q=0&&o<=1?o:null,r}return CR(t,UR),kR(t)}();function aG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oG(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function EG(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function dG(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){EG(i,A,n,a,o,"next",e)}function o(e){EG(i,A,n,a,o,"throw",e)}a(void 0)}))}}function yG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||pG(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pG(e,t){if(e){if("string"==typeof e)return vG(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vG(e,t):void 0}}function vG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this._persistentRefsCache);try{for(t.s();!(e=t.n()).done;){var r=yG(e.value,2),A=r[0],n=r[1];this._cacheMap.set(A,n)}}catch(e){t.e(e)}finally{t.f()}}this._persistentRefsCache=null}},{key:"setStartXRef",value:function(e){this.startXRefQueue=[e]}},{key:"parse",value:function(){var e,t,r,A=arguments.length>0&&void 0!==arguments[0]&&arguments[0];A?(q("Indexing all PDF objects"),e=this.indexObjects()):e=this.readXRef(),e.assignXref(this),this.trailer=e;try{t=e.get("Encrypt")}catch(e){if(e instanceof Ct)throw e;q('XRef.parse - Invalid "Encrypt" reference: "'.concat(e,'".'))}if(t instanceof He){var n=e.get("ID"),i=null!=n&&n.length?n[0]:"";t.suppressEncryption=!0,this.encrypt=new KB(t,i,this.pdfManager.password)}try{r=e.get("Root")}catch(e){if(e instanceof Ct)throw e;q('XRef.parse - Invalid "Root" reference: "'.concat(e,'".'))}if(r instanceof He)try{if(r.get("Pages")instanceof He)return void(this.root=r)}catch(e){if(e instanceof Ct)throw e;q('XRef.parse - Invalid "Pages" reference: "'.concat(e,'".'))}if(!A)throw new Et;throw new $("Invalid Root reference.")}},{key:"processXRefTable",value:function(e){if("tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2}),!Te(this.readXRefTable(e),"trailer"))throw new re("Invalid XRef table: could not find trailer dictionary");var t=e.getObj();if(t instanceof He||!t.dict||(t=t.dict),!(t instanceof He))throw new re("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,t}},{key:"readXRefTable",value:function(e){var t,r=e.lexer.stream,A=this.tableState;for(r.pos=A.streamPos,e.buf1=A.parserBuf1,e.buf2=A.parserBuf2;;){if(!("firstEntryNum"in A)||!("entryCount"in A)){if(Te(t=e.getObj(),"trailer"))break;A.firstEntryNum=t,A.entryCount=e.getObj()}var n=A.firstEntryNum,i=A.entryCount;if(!Number.isInteger(n)||!Number.isInteger(i))throw new re("Invalid XRef table: wrong types in subsection header");for(var a=A.entryNum;a0;){var o=yG(a,2),s=o[0],c=o[1];if(!Number.isInteger(s)||!Number.isInteger(c))throw new re("Invalid XRef range fields: ".concat(s,", ").concat(c));if(!Number.isInteger(A)||!Number.isInteger(n)||!Number.isInteger(i))throw new re("Invalid XRef entry fields length: ".concat(s,", ").concat(c));for(var g=t.entryNum;g=e.length);)r+=String.fromCharCode(A),A=e[t];return r}function t(e,t,r){for(var A=r.length,n=e.length,i=0;t=A)break;t++,i++}return i}var r=/\\b(endobj|\\d+\\s+\\d+\\s+obj|xref|trailer\\s*<<)\\b/g,A=/\\b(startxref|\\d+\\s+\\d+\\s+obj)\\b/g,n=/^(\\d+)\\s+(\\d+)\\s+obj\\b/,i=new Uint8Array([116,114,97,105,108,101,114]),a=new Uint8Array([115,116,97,114,116,120,114,101,102]),o=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();var s=this.stream;s.pos=0;for(var c=s.getBytes(),g=ne(c),u=c.length,l=s.start,h=[],I=[];l=u)break;f=c[l]}while(10!==f&&13!==f);else++l}for(var S=0,F=I;S0&&void 0!==arguments[0]&&arguments[0],t=this.stream,r=new Set;this.startXRefQueue.length;){try{var A=this.startXRefQueue[0];if(r.has(A)){q("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}r.add(A),t.pos=A+t.start;var n=new Jo({lexer:new Oo(t),xref:this,allowStreams:!0}),i=n.getObj(),a=void 0;if(Te(i,"xref")){var o;a=this.processXRefTable(n),this.topDict||(this.topDict=a),i=a.get("XRefStm"),Number.isInteger(i)&&!this._xrefStms.has(i)&&(this._xrefStms.add(i),this.startXRefQueue.push(i),null!==(o=kG(SG,this))&&void 0!==o||bG(SG,this,i))}else{if(!Number.isInteger(i))throw new re("Invalid XRef stream header");if(!(Number.isInteger(n.getObj())&&Te(n.getObj(),"obj")&&(i=n.getObj())instanceof ze))throw new re("Invalid XRef stream");if(a=this.processXRefStream(i),this.topDict||(this.topDict=a),!a)throw new re("Failed to read XRef stream")}i=a.get("Prev"),Number.isInteger(i)?this.startXRefQueue.push(i):i instanceof Ye&&this.startXRefQueue.push(i.num)}catch(e){if(e instanceof Ct)throw e;T("(while reading XRef): "+e)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!e)throw new Et}},{key:"lastXRefStreamPos",get:function(){var e;return null!==(e=kG(SG,this))&&void 0!==e?e:this._xrefStms.size>0?Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return vG(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this._xrefStms)):null}},{key:"getEntry",value:function(e){var t=this.entries[e];return t&&!t.free&&t.offset?t:null}},{key:"fetchIfRef",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e instanceof Ye?this.fetch(e,t):e}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(e instanceof Ye))throw new Error("ref object is not a reference");var r=e.num,A=this._cacheMap.get(r);if(void 0!==A)return A instanceof He&&!A.objId&&(A.objId=e.toString()),A;var n=this.getEntry(r);if(null===n)return this._cacheMap.set(r,n),n;if(this._pendingRefs.has(e))return this._pendingRefs.remove(e),q("Ignoring circular reference: ".concat(e,".")),xe;this._pendingRefs.put(e);try{n=n.uncompressed?this.fetchUncompressed(e,n,t):this.fetchCompressed(e,n,t),this._pendingRefs.remove(e)}catch(t){throw this._pendingRefs.remove(e),t}return n instanceof He?n.objId=e.toString():n instanceof ze&&(n.dict.objId=e.toString()),n}},{key:"fetchUncompressed",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=e.gen,n=e.num;if(t.gen!==A){var i="Inconsistent generation in XRef: ".concat(e);if(this._generationFallback&&t.gen=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function GG(e){return function(e){if(Array.isArray(e))return UG(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||LG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NG(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=LG(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function LG(e,t){if(e){if("string"==typeof e)return UG(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?UG(e,t):void 0}}function UG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r1&&void 0!==arguments[1]&&arguments[1],r=yt({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&r[0]instanceof He?He.merge({xref:this.xref,dictArray:r}):r[0]:r}},{key:"content",get:function(){return this.pageDict.getArray("Contents")}},{key:"resources",get:function(){var e=this._getInheritableProperty("Resources");return _(this,"resources",e instanceof He?e:He.empty)}},{key:"_getBoundingBox",value:function(e){if(this.xfaData)return this.xfaData.bbox;var t=Rt(this._getInheritableProperty(e,!0),null);if(t){if(t[2]-t[0]>0&&t[3]-t[1]>0)return t;q("Empty, or invalid, /".concat(e," entry."))}return null}},{key:"mediaBox",get:function(){return _(this,"mediaBox",this._getBoundingBox("MediaBox")||_G)}},{key:"cropBox",get:function(){return _(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}},{key:"userUnit",get:function(){var e=this.pageDict.get("UserUnit");return("number"!=typeof e||e<=0)&&(e=1),_(this,"userUnit",e)}},{key:"view",get:function(){var e=this.cropBox,t=this.mediaBox;if(e!==t&&!Be(e,t)){var r=ge.intersect(e,t);if(r&&r[2]-r[0]>0&&r[3]-r[1]>0)return _(this,"view",r);q("Empty /CropBox and /MediaBox intersection.")}return _(this,"view",t)}},{key:"rotate",get:function(){var e=this._getInheritableProperty("Rotate")||0;return e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360),_(this,"rotate",e)}},{key:"_onSubStreamError",value:function(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e;q("getContentStream - ignoring sub-stream (".concat(t,'): "').concat(e,'".'))}},{key:"getContentStream",value:function(){var e=this;return this.pdfManager.ensure(this,"content").then((function(t){return t instanceof ze?t:Array.isArray(t)?new VA(t,e._onSubStreamError.bind(e)):new sr}))}},{key:"xfaData",get:function(){return _(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}},{key:"saveNewAnnotations",value:(A=JG(RG().mark((function e(t,r,A,n){var i,a,o,s,c,g,u,l,h,I,f,C,B,Q,E;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.xfaFactory){e.next=2;break}throw new Error("XFA: Cannot save new annotations.");case 2:return i=new eC({xref:this.xref,handler:t,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),a=new Oe,o=new Pe,e.next=7,ZG(XG,this,zG).call(this,A,a,o);case 7:return s=this.pageDict,c=this.annotations.filter((function(e){return!(e instanceof Ye&&a.has(e))})),e.next=11,SR.saveNewAnnotations(i,r,A,n);case 11:g=e.sent,u=NG(g.annotations);try{for(u.s();!(l=u.n()).done;)(h=l.value.ref)instanceof Ye&&!o.has(h)&&c.push(h)}catch(e){u.e(e)}finally{u.f()}return I=s.get("Annots"),s.set("Annots",c),f=[],e.next=19,iQ(this.ref,s,f,this.xref);case 19:I&&s.set("Annots",I),(C=g.dependencies).push.apply(C,[{ref:this.ref,data:f.join("")}].concat(GG(g.annotations))),B=NG(a);try{for(B.s();!(Q=B.n()).done;)E=Q.value,C.push({ref:E,data:null})}catch(e){B.e(e)}finally{B.f()}return e.abrupt("return",C);case 25:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return A.apply(this,arguments)})},{key:"save",value:function(e,t,r){var A=new eC({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions});return this._parsedAnnotations.then((function(e){var n,i=[],a=NG(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;i.push(o.save(A,t,r).catch((function(e){return q("save - ignoring annotation data during "+'"'.concat(t.name,'" task: "').concat(e,'".')),null})))}}catch(e){a.e(e)}finally{a.f()}return Promise.all(i).then((function(e){return e.filter((function(e){return!!e}))}))}))}},{key:"loadResources",value:function(e){var t=this;return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((function(){return new bE(t.resources,e,t.xref).load()}))}},{key:"getOperatorList",value:function(e){var t=this,r=e.handler,A=e.sink,n=e.task,i=e.intent,a=e.cacheKey,o=e.annotationStorage,s=void 0===o?null:o,c=e.modifiedIds,g=void 0===c?null:c,u=this.getContentStream(),l=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),h=new eC({xref:this.xref,handler:r,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),I=this.xfaFactory?null:qt(s),f=null==I?void 0:I.get(this.pageIndex),C=Promise.resolve(null),B=null;if(f){var Q,E,y=this.pdfManager.ensureDoc("annotationGlobals"),p=new Set,v=NG(f);try{for(v.s();!(E=v.n()).done;){var m=E.value,w=m.bitmapId,b=m.bitmap;!w||b||p.has(w)||p.add(w)}}catch(e){v.e(e)}finally{v.f()}var k=this.evaluatorOptions.isOffscreenCanvasSupported;if(p.size>0){var D,S=f.slice(),F=NG(s);try{for(F.s();!(D=F.n()).done;){var x=xG(D.value,2),R=x[0],G=x[1];R.startsWith(d)&&G.bitmap&&p.has(G.bitmapId)&&S.push(G)}}catch(e){F.e(e)}finally{F.f()}Q=SR.generateImages(S,this.xref,k)}else Q=SR.generateImages(f,this.xref,k);B=new Pe,C=Promise.all([y,ZG(XG,this,zG).call(this,f,B,null)]).then((function(e){var t=xG(e,1)[0];return t?SR.printNewAnnotations(t,h,n,f,Q):null}))}var N=Promise.all([u,l]).then((function(e){var o=xG(e,1)[0],s=new kf(i,A);return r.send("StartRenderPage",{transparency:h.hasBlendModes(t.resources,t.nonBlendModesSet),pageIndex:t.pageIndex,cacheKey:a}),h.getOperatorList({stream:o,task:n,resources:t.resources,operatorList:s}).then((function(){return s}))}));return Promise.all([N,this._parsedAnnotations,C]).then((function(e){var t=xG(e,3),r=t[0],A=t[1],a=t[2];if(a){A=A.filter((function(e){return!(e.ref&&B.has(e.ref))}));for(var o=function(e,t){var r=a[e];if(r.refToReplace){var n=A.findIndex((function(e){return e.ref&&je(e.ref,r.refToReplace)}));n>=0&&(A.splice(n,1,r),a.splice(e--,1),t--)}c=e,u=t},c=0,u=a.length;c2&&void 0!==arguments[2]?arguments[2]:1024,A=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=t.length,i=e.peekBytes(r),a=i.length-n;if(a<=0)return!1;if(A)for(var o=n-1,s=i.length-1;s>=o;){for(var c=0;c=n)return e.pos+=s-o,!0;s--}else for(var g=0;g<=a;){for(var u=0;u=n)return e.pos+=g,!0;g++}return!1}var nN=new WeakSet,iN=function(){return qG((function e(t,r){if(KG(this,e),WG(this,nN),r.length<=0)throw new $("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=t,this.stream=r,this.xref=new FG(r,t),this._pagePromises=new Map,this._version=null;var A={font:0};this._globalIdFactory=function(){return qG((function e(){KG(this,e)}),null,[{key:"getDocId",value:function(){return"g_".concat(t.docId)}},{key:"createFontId",value:function(){return"f".concat(++A.font)}},{key:"createObjId",value:function(){j("Abstract method \`createObjId\` called.")}},{key:"getPageObjId",value:function(){j("Abstract method \`getPageObjId\` called.")}}])}()}),[{key:"parse",value:function(e){this.xref.parse(e),this.catalog=new fE(this.pdfManager,this.xref)}},{key:"linearization",get:function(){var e=null;try{e=Ko.create(this.stream)}catch(e){if(e instanceof Ct)throw e;T(e)}return _(this,"linearization",e)}},{key:"startXRef",get:function(){var e=this.stream,t=0;if(this.linearization){if(e.reset(),AN(e,rN)){e.skip(6);for(var r=e.peekByte();Dt(r);)e.pos++,r=e.peekByte();t=e.pos-e.start}}else{for(var A=tN.length,n=!1,i=e.end;!n&&i>0;)(i-=1024-A)<0&&(i=0),e.pos=i,n=AN(e,tN,1024,!0);if(n){var a;e.skip(9);do{a=e.getByte()}while(Dt(a));for(var o="";a>=32&&a<=57;)o+=String.fromCharCode(a),a=e.getByte();t=parseInt(o,10),isNaN(t)&&(t=0)}}return _(this,"startXRef",t)}},{key:"checkHeader",value:function(){var e=this.stream;if(e.reset(),AN(e,eN)){e.moveStart(),e.skip(eN.length);for(var t,r="";(t=e.getByte())>32&&r.length<7;)r+=String.fromCharCode(t);It.test(r)?this._version=r:q("Invalid PDF header version: ".concat(r))}}},{key:"parseStartXRef",value:function(){this.xref.setStartXRef(this.startXRef)}},{key:"numPages",get:function(){return _(this,"numPages",this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages)}},{key:"_hasOnlyDocumentSignatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!Array.isArray(e)&&e.every((function(e){if(!((e=t.xref.fetchIfRef(e))instanceof He))return!1;if(e.has("Kids"))return++r>10?(q("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):t._hasOnlyDocumentSignatures(e.get("Kids"),r);var A=Ke(e.get("FT"),"Sig"),n=e.get("Rect"),i=Array.isArray(n)&&n.every((function(e){return 0===e}));return A&&i}))}},{key:"_xfaStreams",get:function(){var e=this.catalog.acroForm;if(!e)return null;var t=e.get("XFA"),r={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(t instanceof ze&&!t.isEmpty)return r["xdp:xdp"]=t,r;if(!Array.isArray(t)||0===t.length)return null;for(var A=0,n=t.length;A0;e.hasFields=A;var n=t.get("XFA");e.hasXfa=Array.isArray(n)&&n.length>0||n instanceof ze&&!n.isEmpty;var i=!!(1&t.get("SigFlags")),a=i&&this._hasOnlyDocumentSignatures(r);e.hasAcroForm=A&&!a,e.hasSignatures=i}catch(e){if(e instanceof Ct)throw e;q('Cannot fetch form information: "'.concat(e,'".'))}return _(this,"formInfo",e)}},{key:"documentInfo",get:function(){var e,t={PDFFormatVersion:this.version,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};try{e=this.xref.trailer.get("Info")}catch(e){if(e instanceof Ct)throw e;T("The document information dictionary is invalid.")}if(!(e instanceof He))return _(this,"documentInfo",t);var r,A=NG(e.getKeys());try{for(A.s();!(r=A.n()).done;){var n=r.value,i=e.get(n);switch(n){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof i){t[n]=Ie(i);continue}break;case"Trapped":if(i instanceof Ue){t[n]=i;continue}break;default:var a=void 0;switch(typeof i){case"string":a=Ie(i);break;case"number":case"boolean":a=i;break;default:i instanceof Ue&&(a=i)}if(void 0===a){q('Bad value, for custom key "'.concat(n,'", in Info: ').concat(i,"."));continue}t.Custom||(t.Custom=Object.create(null)),t.Custom[n]=a;continue}q('Bad value, for key "'.concat(n,'", in Info: ').concat(i,"."))}}catch(e){A.e(e)}finally{A.f()}return _(this,"documentInfo",t)}},{key:"fingerprints",get:function(){function e(e){return"string"==typeof e&&e.length>0&&"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"!==e}function t(e){var t,r=[],A=NG(e);try{for(A.s();!(t=A.n()).done;){var n=t.value.toString(16);r.push(n.padStart(2,"0"))}}catch(e){A.e(e)}finally{A.f()}return r.join("")}var r,A,n=this.xref.trailer.get("ID");return Array.isArray(n)&&e(n[0])?(r=ie(n[0]),n[1]!==n[0]&&e(n[1])&&(A=ie(n[1]))):r=xB(this.stream.getByteRange(0,1024),0,1024),_(this,"fingerprints",[t(r),A?t(A):null])}},{key:"_getLinearizationPage",value:(n=JG(RG().mark((function e(t){var r,A,n,i,a,o;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.catalog,A=this.linearization,n=this.xref,i=Ye.get(A.objectNumberFirst,0),e.prev=2,e.next=5,n.fetchAsync(i);case 5:if(!((a=e.sent)instanceof He)){e.next=16;break}if(!((o=a.getRaw("Type"))instanceof Ye)){e.next=12;break}return e.next=11,n.fetchAsync(o);case 11:o=e.sent;case 12:if(!Ke(o,"Page")&&(a.has("Type")||a.has("Kids")||!a.has("Contents"))){e.next=16;break}return r.pageKidsCountCache.has(i)||r.pageKidsCountCache.put(i,1),r.pageIndexCache.has(i)||r.pageIndexCache.put(i,0),e.abrupt("return",[a,i]);case 16:throw new re("The Linearization dictionary doesn't point to a valid Page dictionary.");case 19:return e.prev=19,e.t0=e.catch(2),q('_getLinearizationPage: "'.concat(e.t0.message,'".')),e.abrupt("return",r.getPageDict(t));case 23:case"end":return e.stop()}}),e,this,[[2,19]])}))),function(e){return n.apply(this,arguments)})},{key:"getPage",value:function(e){var t=this,r=this._pagePromises.get(e);if(r)return r;var A,n=this.catalog,i=this.linearization,a=this.xfaFactory;return A=(A=a?Promise.resolve([He.empty,null]):(null==i?void 0:i.pageFirst)===e?this._getLinearizationPage(e):n.getPageDict(e)).then((function(r){var A=xG(r,2),i=A[0],o=A[1];return new VG({pdfManager:t.pdfManager,xref:t.xref,pageIndex:e,pageDict:i,ref:o,globalIdFactory:t._globalIdFactory,fontCache:n.fontCache,builtInCMapCache:n.builtInCMapCache,standardFontDataCache:n.standardFontDataCache,globalImageCache:n.globalImageCache,systemFontCache:n.systemFontCache,nonBlendModesSet:n.nonBlendModesSet,xfaFactory:a})})),this._pagePromises.set(e,A),A}},{key:"checkFirstPage",value:(A=JG(RG().mark((function e(){var t=arguments;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.length>0&&void 0!==t[0]&&t[0])){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,this.getPage(0);case 6:e.next=15;break;case 8:if(e.prev=8,e.t0=e.catch(3),!(e.t0 instanceof Qt)){e.next=15;break}return this._pagePromises.delete(0),e.next=14,this.cleanup();case 14:throw new Et;case 15:case"end":return e.stop()}}),e,this,[[3,8]])}))),function(){return A.apply(this,arguments)})},{key:"checkLastPage",value:(r=JG(RG().mark((function e(){var t,r,A,n,i,a,o,s,c,g,u,l,h,I=arguments;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=I.length>0&&void 0!==I[0]&&I[0],r=this.catalog,A=this.pdfManager,r.setActualNumPages(),e.prev=3,e.next=6,Promise.all([A.ensureDoc("xfaFactory"),A.ensureDoc("linearization"),A.ensureCatalog("numPages")]);case 6:if(!this.xfaFactory){e.next=10;break}return e.abrupt("return");case 10:n=this.linearization?this.linearization.numPages:r.numPages;case 11:if(Number.isInteger(n)){e.next=15;break}throw new re("Page count is not an integer.");case 15:if(!(n<=1)){e.next=17;break}return e.abrupt("return");case 17:return e.next=19,this.getPage(n-1);case 19:e.next=44;break;case 21:return e.prev=21,e.t0=e.catch(3),this._pagePromises.delete(n-1),e.next=26,this.cleanup();case 26:if(!(e.t0 instanceof Qt)||t){e.next=28;break}throw new Et;case 28:return q("checkLastPage - invalid /Pages tree /Count: ".concat(n,".")),e.prev=29,e.next=32,r.getAllPageDicts(t);case 32:i=e.sent,e.next=41;break;case 35:if(e.prev=35,e.t1=e.catch(29),!(e.t1 instanceof Qt)||t){e.next=39;break}throw new Et;case 39:return r.setActualNumPages(1),e.abrupt("return");case 41:a=NG(i);try{for(a.s();!(o=a.n()).done;)s=xG(o.value,2),c=s[0],g=xG(s[1],2),u=g[0],l=g[1],h=void 0,u instanceof Error?(h=Promise.reject(u)).catch((function(){})):h=Promise.resolve(new VG({pdfManager:A,xref:this.xref,pageIndex:c,pageDict:u,ref:l,globalIdFactory:this._globalIdFactory,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,standardFontDataCache:r.standardFontDataCache,globalImageCache:r.globalImageCache,systemFontCache:r.systemFontCache,nonBlendModesSet:r.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(c,h)}catch(e){a.e(e)}finally{a.f()}r.setActualNumPages(i.size);case 44:case"end":return e.stop()}}),e,this,[[3,21],[29,35]])}))),function(){return r.apply(this,arguments)})},{key:"fontFallback",value:function(e,t){return this.catalog.fontFallback(e,t)}},{key:"cleanup",value:(t=JG(RG().mark((function e(){var t,r=arguments;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],e.abrupt("return",this.catalog?this.catalog.cleanup(t):JC());case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"fieldObjects",get:function(){var e=this,t=this.pdfManager.ensureDoc("formInfo").then(function(){var t=JG(RG().mark((function t(r){var A,n,i,a,o,s,c,g,u,l,h,I,f,C,B;return RG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.hasFields){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,Promise.all([e.pdfManager.ensureDoc("annotationGlobals"),e.pdfManager.ensureCatalog("acroForm")]);case 4:if(A=t.sent,n=xG(A,2),i=n[0],a=n[1],i){t.next=10;break}return t.abrupt("return",null);case 10:return o=new Pe,s=Object.create(null),c=new Map,g=new Oe,t.t0=NG,t.next=17,a.getAsync("Fields");case 17:t.t1=t.sent,u=(0,t.t0)(t.t1),t.prev=19,u.s();case 21:if((l=u.n()).done){t.next=27;break}return h=l.value,t.next=25,ZG(nN,e,aN).call(e,"",null,h,c,i,o,g);case 25:t.next=21;break;case 27:t.next=32;break;case 29:t.prev=29,t.t2=t.catch(19),u.e(t.t2);case 32:return t.prev=32,u.f(),t.finish(32);case 35:I=[],f=NG(c),t.prev=37,B=RG().mark((function e(){var t,r,A;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=xG(C.value,2),r=t[0],A=t[1],I.push(Promise.all(A).then((function(e){(e=e.filter((function(e){return!!e}))).length>0&&(s[r]=e)})));case 2:case"end":return e.stop()}}),e)})),f.s();case 40:if((C=f.n()).done){t.next=44;break}return t.delegateYield(B(),"t3",42);case 42:t.next=40;break;case 44:t.next=49;break;case 46:t.prev=46,t.t4=t.catch(37),f.e(t.t4);case 49:return t.prev=49,f.f(),t.finish(49);case 52:return t.next=54,Promise.all(I);case 54:return t.abrupt("return",{allFields:s,orphanFields:g});case 55:case"end":return t.stop()}}),t,null,[[19,29,32,35],[37,46,49,52]])})));return function(e){return t.apply(this,arguments)}}());return _(this,"fieldObjects",t)}},{key:"hasJSActions",get:function(){return _(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}},{key:"_parseHasJSActions",value:(e=JG(RG().mark((function e(){var t,r,A,n;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);case 2:if(t=e.sent,r=xG(t,2),A=r[0],n=r[1],!A){e.next=8;break}return e.abrupt("return",!0);case 8:if(!n){e.next=10;break}return e.abrupt("return",Object.values(n.allFields).some((function(e){return e.some((function(e){return null!==e.actions}))})));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"calculationOrderIds",get:function(){var e,t=null===(e=this.catalog.acroForm)||void 0===e?void 0:e.get("CO");if(!Array.isArray(t)||0===t.length)return _(this,"calculationOrderIds",null);var r,A=[],n=NG(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;i instanceof Ye&&A.push(i.toString())}}catch(e){n.e(e)}finally{n.f()}return _(this,"calculationOrderIds",A.length?A:null)}},{key:"annotationGlobals",get:function(){return _(this,"annotationGlobals",SR.createGlobals(this.pdfManager))}}]);var e,t,r,A,n,i,a,o}();function aN(e,t,r,A,n,i,a){return oN.apply(this,arguments)}function oN(){return(oN=JG(RG().mark((function e(t,r,A,n,i,a,o){var s,c,g,u,l,h,I,f,C;return RG().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=this.xref,A instanceof Ye&&!a.has(A)){e.next=3;break}return e.abrupt("return");case 3:return a.put(A),e.next=6,s.fetchAsync(A);case 6:if((c=e.sent)instanceof He){e.next=9;break}return e.abrupt("return");case 9:if(!c.has("T")){e.next=18;break}return e.t0=Ie,e.next=13,c.getAsync("T");case 13:e.t1=e.sent,g=(0,e.t0)(e.t1),t=""===t?g:"".concat(t,".").concat(g),e.next=39;break;case 18:u=c;case 19:if(!((u=u.getRaw("Parent")||r)instanceof Ye)){e.next=27;break}if(!a.has(u)){e.next=24;break}return e.abrupt("break",39);case 24:return e.next=26,s.fetchAsync(u);case 26:u=e.sent;case 27:if(u instanceof He){e.next=29;break}return e.abrupt("break",39);case 29:if(!u.has("T")){e.next=37;break}return e.t2=Ie,e.next=33,u.getAsync("T");case 33:return e.t3=e.sent,l=(0,e.t2)(e.t3),t=""===t?l:"".concat(t,".").concat(l),e.abrupt("break",39);case 37:e.next=19;break;case 39:if(r&&!c.has("Parent")&&Ke(c.get("Subtype"),"Widget")&&o.put(A,r),n.has(t)||n.set(t,[]),n.get(t).push(SR.create(s,A,i,null,!0,o,null).then((function(e){return null==e?void 0:e.getFieldObject()})).catch((function(e){return q('#collectFieldObjects: "'.concat(e,'".')),null}))),c.has("Kids")){e.next=44;break}return e.abrupt("return");case 44:return e.next=46,c.getAsync("Kids");case 46:if(h=e.sent,!Array.isArray(h)){e.next=65;break}I=NG(h),e.prev=49,I.s();case 51:if((f=I.n()).done){e.next=57;break}return C=f.value,e.next=55,ZG(nN,this,aN).call(this,t,A,C,n,i,a,o);case 55:e.next=51;break;case 57:e.next=62;break;case 59:e.prev=59,e.t4=e.catch(49),I.e(e.t4);case 62:return e.prev=62,I.f(),e.finish(62);case 65:case"end":return e.stop()}}),e,this,[[49,59,62,65]])})))).apply(this,arguments)}function sN(e,t,r){return t=gN(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cN()?Reflect.construct(t,r||[],gN(e).constructor):t.apply(e,r))}function cN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cN=function(){return!!e})()}function gN(e){return gN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gN(e)}function uN(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lN(e,t)}function lN(e,t){return lN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lN(e,t)}function hN(){hN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function IN(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function fN(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){IN(i,A,n,a,o,"next",e)}function o(e){IN(i,A,n,a,o,"throw",e)}a(void 0)}))}}function CN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BN(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];return this.pdfDocument.cleanup(e)}},{key:"ensure",value:(e=fN(hN().mark((function e(t,r,A){return hN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j("Abstract method \`ensure\` called");case 1:case"end":return e.stop()}}),e)}))),function(t,r,A){return e.apply(this,arguments)})},{key:"requestRange",value:function(e,t){j("Abstract method \`requestRange\` called")}},{key:"requestLoadedStream",value:function(){j("Abstract method \`requestLoadedStream\` called")}},{key:"sendProgressiveData",value:function(e){j("Abstract method \`sendProgressiveData\` called")}},{key:"updatePassword",value:function(e){this._password=e}},{key:"terminate",value:function(e){j("Abstract method \`terminate\` called")}}]);var e}(),yN=function(e){function t(e){var r;CN(this,t),r=sN(this,t,[e]);var A=new ar(e.source);return r.pdfDocument=new iN(r,A),r._loadedStreamPromise=Promise.resolve(A),r}return uN(t,dN),QN(t,[{key:"ensure",value:(r=fN(hN().mark((function e(t,r,A){var n;return hN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(n=t[r])){e.next=3;break}return e.abrupt("return",n.apply(t,A));case 3:return e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)}))),function(e,t,A){return r.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return Promise.resolve()}},{key:"requestLoadedStream",value:function(){return this._loadedStreamPromise}},{key:"terminate",value:function(e){}}]);var r}(),pN=function(e){function t(e){var r;return CN(this,t),(r=sN(this,t,[e])).streamManager=new dr(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize}),r.pdfDocument=new iN(r,r.streamManager.getStream()),r}return uN(t,dN),QN(t,[{key:"ensure",value:(r=fN(hN().mark((function e(t,r,A){var n;return hN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"function"!=typeof(n=t[r])){e.next=4;break}return e.abrupt("return",n.apply(t,A));case 4:return e.abrupt("return",n);case 7:if(e.prev=7,e.t0=e.catch(0),e.t0 instanceof Ct){e.next=11;break}throw e.t0;case 11:return e.next=13,this.requestRange(e.t0.begin,e.t0.end);case 13:return e.abrupt("return",this.ensure(t,r,A));case 14:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e,t,A){return r.apply(this,arguments)})},{key:"requestRange",value:function(e,t){return this.streamManager.requestRange(e,t)}},{key:"requestLoadedStream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.streamManager.requestAllChunks(e)}},{key:"sendProgressiveData",value:function(e){this.streamManager.onReceiveData({chunk:e})}},{key:"terminate",value:function(e){this.streamManager.abort(e)}}]);var r}();function vN(){vN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function mN(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function wN(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var o=this.desiredSize;this.desiredSize-=i,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),n.postMessage({sourceName:r,targetName:A,stream:4,streamId:t,chunk:e},a)}},close(){this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:r,targetName:A,stream:3,streamId:t}),delete i.streamSinks[t])},error(e){W(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,n.postMessage({sourceName:r,targetName:A,stream:5,streamId:t,reason:DN(e)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[t]=o,new Promise((function(t){t(a(e.data,o))})).then((function(){n.postMessage({sourceName:r,targetName:A,stream:8,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:A,stream:8,streamId:t,reason:DN(e)})}))}function RN(e){var t=e.streamId,r=this.sourceName,A=e.sourceName,n=this.comObj,i=this.streamControllers[t],a=this.streamSinks[t];switch(e.stream){case 8:e.success?i.startCall.resolve():i.startCall.reject(DN(e.reason));break;case 7:e.success?i.pullCall.resolve():i.pullCall.reject(DN(e.reason));break;case 6:if(!a){n.postMessage({sourceName:r,targetName:A,stream:7,streamId:t,success:!0});break}a.desiredSize<=0&&e.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=e.desiredSize,new Promise((function(e){var t;e(null===(t=a.onPull)||void 0===t?void 0:t.call(a))})).then((function(){n.postMessage({sourceName:r,targetName:A,stream:7,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:A,stream:7,streamId:t,reason:DN(e)})}));break;case 4:if(W(i,"enqueue should have stream controller"),i.isClosed)break;i.controller.enqueue(e.chunk);break;case 3:if(W(i,"close should have stream controller"),i.isClosed)break;i.isClosed=!0,i.controller.close(),kN(SN,this,GN).call(this,i,t);break;case 5:W(i,"error should have stream controller"),i.controller.error(DN(e.reason)),kN(SN,this,GN).call(this,i,t);break;case 2:e.success?i.cancelCall.resolve():i.cancelCall.reject(DN(e.reason)),kN(SN,this,GN).call(this,i,t);break;case 1:if(!a)break;new Promise((function(t){var r;t(null===(r=a.onCancel)||void 0===r?void 0:r.call(a,DN(e.reason)))})).then((function(){n.postMessage({sourceName:r,targetName:A,stream:2,streamId:t,success:!0})}),(function(e){n.postMessage({sourceName:r,targetName:A,stream:2,streamId:t,reason:DN(e)})})),a.sinkCapability.reject(DN(e.reason)),a.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}function GN(e,t){return NN.apply(this,arguments)}function NN(){var e;return e=vN().mark((function e(t,r){var A,n,i;return vN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.allSettled([null===(A=t.startCall)||void 0===A?void 0:A.promise,null===(n=t.pullCall)||void 0===n?void 0:n.promise,null===(i=t.cancelCall)||void 0===i?void 0:i.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return e.stop()}}),e,this)})),NN=function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){mN(i,A,n,a,o,"next",e)}function o(e){mN(i,A,n,a,o,"throw",e)}a(void 0)}))},NN.apply(this,arguments)}function LN(){LN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function UN(e,t,r,A,n,i,a){try{var o=e[i](a),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(A,n)}function MN(e){return function(){var t=this,r=arguments;return new Promise((function(A,n){var i=e.apply(t,r);function a(e){UN(i,A,n,a,o,"next",e)}function o(e){UN(i,A,n,a,o,"throw",e)}a(void 0)}))}}function JN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(this._rangeRequestReaders.slice(0));try{for(A.s();!(r=A.n()).done;)r.value.cancel(e)}catch(e){A.e(e)}finally{A.f()}}}])}(),TN=function(){return PN((function e(t){var r=this;HN(this,e),this._msgHandler=t,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;var A=this._msgHandler.sendWithStream("GetReader");this._reader=A.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((function(e){r._isStreamingSupported=e.isStreamingSupported,r._isRangeSupported=e.isRangeSupported,r._contentLength=e.contentLength}))}),[{key:"headersReady",get:function(){return this._headersReady}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"read",value:(e=MN(LN().mark((function e(){var t,r;return LN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.read();case 2:if(t=e.sent,r=t.value,!t.done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return e.abrupt("return",{value:r.buffer,done:!1});case 8:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader.cancel(e)}}]);var e}(),qN=function(){return PN((function e(t,r,A){HN(this,e),this._msgHandler=A,this.onProgress=null;var n=this._msgHandler.sendWithStream("GetRangeReader",{begin:t,end:r});this._reader=n.getReader()}),[{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(e=MN(LN().mark((function e(){var t,r;return LN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.read();case 2:if(t=e.sent,r=t.value,!t.done){e.next=7;break}return e.abrupt("return",{value:void 0,done:!0});case 7:return e.abrupt("return",{value:r.buffer,done:!1});case 8:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(e){this._reader.cancel(e)}}]);var e}();function jN(){jN=function(){return t};var e,t={},r=Object.prototype,A=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function g(e,t,r,A){var i=t&&t.prototype instanceof B?t:B,a=Object.create(i.prototype),o=new F(A||[]);return n(a,"_invoke",{value:b(e,r,o)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=g;var l="suspendedStart",h="suspendedYield",I="executing",f="completed",C={};function B(){}function Q(){}function E(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,p=y&&y(y(x([])));p&&p!==r&&A.call(p,a)&&(d=p);var v=E.prototype=B.prototype=Object.create(d);function m(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(n,i,a,o){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,g=c.value;return g&&"object"==typeof g&&A.call(g,"__await")?t.resolve(g.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(g).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}var i;n(this,"_invoke",{value:function(e,A){function n(){return new t((function(t,n){r(e,A,t,n)}))}return i=i?i.then(n,n):n()}})}function b(t,r,A){var n=l;return function(i,a){if(n===I)throw Error("Generator is already running");if(n===f){if("throw"===i)throw a;return{value:e,done:!0}}for(A.method=i,A.arg=a;;){var o=A.delegate;if(o){var s=k(o,A);if(s){if(s===C)continue;return s}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(n===l)throw n=f,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n=I;var c=u(t,r,A);if("normal"===c.type){if(n=A.done?f:h,c.arg===C)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n=f,A.method="throw",A.arg=c.arg)}}}function k(t,r){var A=r.method,n=t.iterator[A];if(n===e)return r.delegate=null,"throw"===A&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==A&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+A+"' method")),C;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,C;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,C):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,C)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function x(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=A.call(a,"catchLoc"),c=A.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&A.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var A=r.completion;if("throw"===A.type){var n=A.arg;S(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,A){return this.delegate={iterator:x(t),resultName:r,nextLoc:A},"next"===this.method&&(this.arg=e),C}},t}function WN(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_N(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var A=0,n=function(){};return{s:n,n:function(){return A>=e.length?{done:!0}:{done:!1,value:e[A++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function ZN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var A,n,i,a,o=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(A=i.call(r)).done)&&(o.push(A.value),o.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e,t)||_N(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _N(e,t){if(e){if("string"==typeof e)return XN(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?XN(e,t):void 0}}function XN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,A=Array(t);r=S.INFOS?Date.now():0;r.getOperatorList({handler:I,sink:t,task:n,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage,modifiedIds:e.modifiedIds}).then((function(e){B(n),i&&T("page=".concat(A+1," - getOperatorList: time=")+"".concat(Date.now()-i,"ms, len=").concat(e.length)),t.close()}),(function(e){B(n),n.terminated||t.error(e)}))}))})),I.on("GetTextContent",(function(e,t){var A=e.pageIndex,n=e.includeMarkedContent,i=e.disableNormalization;r.getPage(A).then((function(e){var r=new nL("GetTextContent: page "+A);C(r);var o=a>=S.INFOS?Date.now():0;e.extractTextContent({handler:I,task:r,sink:t,includeMarkedContent:n,disableNormalization:i}).then((function(){B(r),o&&T("page=".concat(A+1," - getTextContent: time=")+"".concat(Date.now()-o,"ms")),t.close()}),(function(e){B(r),r.terminated||t.error(e)}))}))})),I.on("GetStructTree",(function(e){return r.getPage(e.pageIndex).then((function(e){return r.ensure(e,"getStructTree")}))})),I.on("FontFallback",(function(e){return r.fontFallback(e.id,I)})),I.on("Cleanup",(function(e){return r.cleanup(!0)})),I.on("Terminate",(function(e){A=!0;var t=[];if(r){r.terminate(new Ae("Worker was terminated."));var a=r.cleanup();t.push(a),r=null}else JC();n&&n(new Ae("Worker was terminated."));var o,s=WN(i);try{for(s.s();!(o=s.n()).done;){var c=o.value;t.push(c.finished),c.terminate()}}catch(e){s.e(e)}finally{s.f()}return Promise.all(t).then((function(){I.destroy(),I=null}))})),I.on("Ready",(function(t){!function(e){function t(e){f(),I.send("GetDoc",{pdfInfo:e})}function i(e){if(f(),e instanceof V){var t=new nL("PasswordException: response ".concat(e.code));C(t),I.sendWithPromise("PasswordRequest",e).then((function(e){var A=e.password;B(t),r.updatePassword(A),a()})).catch((function(){B(t),I.send("DocException",e)}))}else e instanceof $||e instanceof ee||e instanceof te||e instanceof z?I.send("DocException",e):I.send("DocException",new z(e.message,e.toString()))}function a(){f(),Q(!1).then(t,(function(e){f(),e instanceof Et?r.requestLoadedStream().then((function(){f(),Q(!0).then(t,i)})):i(e)}))}f(),function(e){var t,r=e.data,A=e.password,i=e.disableAutoFetch,a=e.rangeChunkSize,o=e.length,c=e.docBaseUrl,g=e.enableXfa,u=e.evaluatorOptions,l={source:null,disableAutoFetch:i,docBaseUrl:c,docId:s,enableXfa:g,evaluatorOptions:u,handler:I,length:o,password:A,rangeChunkSize:a},h=Promise.withResolvers();if(r){try{l.source=r,t=new yN(l),h.resolve(t)}catch(e){h.reject(e)}return h.promise}var C,B=[];try{C=new KN(I)}catch(e){return h.reject(e),h.promise}var Q=C.getFullReader();Q.headersReady.then((function(){if(Q.isRangeSupported){l.source=C,l.length=Q.contentLength,l.disableAutoFetch||(l.disableAutoFetch=Q.isStreamingSupported),t=new pN(l);for(var e=0,r=B;e{var n=r(3749),i=r(8055),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not a function")}},9052:(t,e,r)=>{var n=r(8413),i=r(8055),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not a constructor")}},7330:(t,e,r)=>{var n=r(4597),i=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a("Can't set "+i(t)+" as a prototype")}},4376:(t,e,r)=>{var n=r(418).has;t.exports=function(t){return n(t),t}},1458:(t,e,r)=>{var n=r(5811),i=r(5304),a=r(1601).f,o=n("unscopables"),s=Array.prototype;void 0===s[o]&&a(s,o,{configurable:!0,value:i(null)}),t.exports=function(t){s[o][t]=!0}},8149:(t,e,r)=>{var n=r(6903).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},3399:(t,e,r)=>{var n=r(6921),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},7447:(t,e,r)=>{var n=r(2674),i=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(i(t)+" is not an object")}},387:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},8242:(t,e,r)=>{var n=r(4032),i=r(5026),a=r(9872),o=n.ArrayBuffer,s=n.TypeError;t.exports=o&&i(o.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==a(t))throw new s("ArrayBuffer expected");return t.byteLength}},8102:(t,e,r)=>{var n=r(4032),i=r(2116),a=r(8242),o=n.ArrayBuffer,s=o&&o.prototype,u=s&&i(s.slice);t.exports=function(t){if(0!==a(t))return!1;if(!u)return!1;try{return u(t,0,0),!1}catch(t){return!0}}},7060:(t,e,r)=>{var n=r(3455);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},6033:(t,e,r)=>{var n=r(8102),i=TypeError;t.exports=function(t){if(n(t))throw new i("ArrayBuffer is detached");return t}},4676:(t,e,r)=>{var n=r(4032),i=r(2608),a=r(5026),o=r(9088),s=r(6033),u=r(8242),c=r(7395),l=r(6572),h=n.structuredClone,f=n.ArrayBuffer,d=n.DataView,v=Math.min,p=f.prototype,y=d.prototype,g=i(p.slice),m=a(p,"resizable","get"),b=a(p,"maxByteLength","get"),w=i(y.getInt8),k=i(y.setInt8);t.exports=(l||c)&&function(t,e,r){var n,i=u(t),a=void 0===e?i:o(e),p=!m||!m(t);if(s(t),l&&(t=h(t,{transfer:[t]}),i===a&&(r||p)))return t;if(i>=a&&(!r||p))n=g(t,0,a);else{var y=r&&!p&&b?{maxByteLength:b(t)}:void 0;n=new f(a,y);for(var x=new d(t),A=new d(n),_=v(a,i),E=0;E<_;E++)k(A,E,w(x,E))}return l||c(t),n}},4356:(t,e,r)=>{var n,i,a,o=r(387),s=r(2444),u=r(4032),c=r(3749),l=r(2674),h=r(9649),f=r(1179),d=r(8055),v=r(139),p=r(8552),y=r(8986),g=r(6921),m=r(2611),b=r(9415),w=r(5811),k=r(5936),x=r(8301),A=x.enforce,_=x.get,E=u.Int8Array,S=E&&E.prototype,O=u.Uint8ClampedArray,T=O&&O.prototype,P=E&&m(E),L=S&&m(S),M=Object.prototype,C=u.TypeError,j=w("toStringTag"),I=k("TYPED_ARRAY_TAG"),R="TypedArrayConstructor",F=o&&!!b&&"Opera"!==f(u.opera),D=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=m(t);if(l(e)){var r=_(e);return r&&h(r,R)?r[R]:B(e)}},G=function(t){if(!l(t))return!1;var e=f(t);return h(N,e)||h(W,e)};for(n in N)(a=(i=u[n])&&i.prototype)?A(a)[R]=i:F=!1;for(n in W)(a=(i=u[n])&&i.prototype)&&(A(a)[R]=i);if((!F||!c(P)||P===Function.prototype)&&(P=function(){throw new C("Incorrect invocation")},F))for(n in N)u[n]&&b(u[n],P);if((!F||!L||L===M)&&(L=P.prototype,F))for(n in N)u[n]&&b(u[n].prototype,L);if(F&&m(T)!==L&&b(T,L),s&&!h(L,j))for(n in D=!0,y(L,j,{configurable:!0,get:function(){return l(this)?this[I]:void 0}}),N)u[n]&&v(u[n],I,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:D&&I,aTypedArray:function(t){if(G(t))return t;throw new C("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||g(P,t)))return t;throw new C(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(s){if(r)for(var i in N){var a=u[i];if(a&&h(a.prototype,t))try{delete a.prototype[t]}catch(r){try{a.prototype[t]=e}catch(t){}}}L[t]&&!r||p(L,t,r?e:F&&S[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(s){if(b){if(r)for(n in N)if((i=u[n])&&h(i,t))try{delete i[t]}catch(t){}if(P[t]&&!r)return;try{return p(P,t,r?e:F&&P[t]||e)}catch(t){}}for(n in N)!(i=u[n])||i[t]&&!r||p(i,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(N,e)||h(W,e)},isTypedArray:G,TypedArray:P,TypedArrayPrototype:L}},7226:(t,e,r)=>{var n=r(4032),i=r(2608),a=r(2444),o=r(387),s=r(2542),u=r(139),c=r(8986),l=r(4183),h=r(3455),f=r(3399),d=r(1211),v=r(5806),p=r(9088),y=r(3505),g=r(1306),m=r(2611),b=r(9415),w=r(9557),k=r(4224),x=r(3951),A=r(2924),_=r(6911),E=r(8301),S=s.PROPER,O=s.CONFIGURABLE,T="ArrayBuffer",P="DataView",L="prototype",M="Wrong index",C=E.getterFor(T),j=E.getterFor(P),I=E.set,R=n[T],F=R,D=F&&F[L],N=n[P],W=N&&N[L],B=Object.prototype,G=n.Array,H=n.RangeError,U=i(w),z=i([].reverse),V=g.pack,q=g.unpack,Y=function(t){return[255&t]},X=function(t){return[255&t,t>>8&255]},K=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Q=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},J=function(t){return V(y(t),23,4)},$=function(t){return V(t,52,8)},Z=function(t,e,r){c(t[L],e,{configurable:!0,get:function(){return r(this)[e]}})},tt=function(t,e,r,n){var i=j(t),a=p(r),o=!!n;if(a+e>i.byteLength)throw new H(M);var s=i.bytes,u=a+i.byteOffset,c=k(s,u,u+e);return o?c:z(c)},et=function(t,e,r,n,i,a){var o=j(t),s=p(r),u=n(+i),c=!!a;if(s+e>o.byteLength)throw new H(M);for(var l=o.bytes,h=s+o.byteOffset,f=0;f>24)},setUint8:function(t,e){it(this,t,e<<24>>24)}},{unsafe:!0})}else D=(F=function(t){f(this,D);var e=p(t);I(this,{type:T,bytes:U(G(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[L],W=(N=function(t,e,r){f(this,W),f(t,D);var n=C(t),i=n.byteLength,o=d(e);if(o<0||o>i)throw new H("Wrong offset");if(o+(r=void 0===r?i-o:v(r))>i)throw new H("Wrong length");I(this,{type:P,buffer:t,byteLength:r,byteOffset:o,bytes:n.bytes}),a||(this.buffer=t,this.byteLength=r,this.byteOffset=o)})[L],a&&(Z(F,"byteLength",C),Z(N,"buffer",j),Z(N,"byteLength",j),Z(N,"byteOffset",j)),l(W,{getInt8:function(t){return tt(this,1,t)[0]<<24>>24},getUint8:function(t){return tt(this,1,t)[0]},getInt16:function(t){var e=tt(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=tt(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return Q(tt(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return Q(tt(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return q(tt(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return q(tt(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){et(this,1,t,Y,e)},setUint8:function(t,e){et(this,1,t,Y,e)},setInt16:function(t,e){et(this,2,t,X,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){et(this,2,t,X,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){et(this,4,t,K,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){et(this,4,t,K,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){et(this,4,t,J,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){et(this,8,t,$,e,arguments.length>2&&arguments[2])}});_(F,T),_(N,P),t.exports={ArrayBuffer:F,DataView:N}},6677:(t,e,r)=>{var n=r(4165),i=r(9002),a=r(7878),o=r(1870),s=Math.min;t.exports=[].copyWithin||function(t,e){var r=n(this),u=a(r),c=i(t,u),l=i(e,u),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?u:i(h,u))-l,u-c),d=1;for(l0;)l in r?r[c]=r[l]:o(r,c),c+=d,l+=d;return r}},9557:(t,e,r)=>{var n=r(4165),i=r(9002),a=r(7878);t.exports=function(t){for(var e=n(this),r=a(e),o=arguments.length,s=i(o>1?arguments[1]:void 0,r),u=o>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>s;)e[s++]=t;return e}},3147:(t,e,r)=>{var n=r(5645).forEach,i=r(1814)("forEach");t.exports=i?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},7434:(t,e,r)=>{var n=r(7878);t.exports=function(t,e,r){for(var i=0,a=arguments.length>2?r:n(e),o=new t(a);a>i;)o[i]=e[i++];return o}},3948:(t,e,r)=>{var n=r(4864),i=r(3453),a=r(4165),o=r(3535),s=r(993),u=r(8413),c=r(7878),l=r(3552),h=r(6961),f=r(7507),d=Array;t.exports=function(t){var e=a(t),r=u(this),v=arguments.length,p=v>1?arguments[1]:void 0,y=void 0!==p;y&&(p=n(p,v>2?arguments[2]:void 0));var g,m,b,w,k,x,A=f(e),_=0;if(!A||this===d&&s(A))for(g=c(e),m=r?new this(g):d(g);g>_;_++)x=y?p(e[_],_):e[_],l(m,_,x);else for(m=r?new this:[],k=(w=h(e,A)).next;!(b=i(k,w)).done;_++)x=y?o(w,p,[b.value,_],!0):b.value,l(m,_,x);return m.length=_,m}},7921:(t,e,r)=>{var n=r(3637),i=r(9002),a=r(7878),o=function(t){return function(e,r,o){var s=n(e),u=a(s);if(0===u)return!t&&-1;var c,l=i(o,u);if(t&&r!=r){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((t||l in s)&&s[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},767:(t,e,r)=>{var n=r(4864),i=r(9455),a=r(4165),o=r(7878),s=function(t){var e=1===t;return function(r,s,u){for(var c,l=a(r),h=i(l),f=o(h),d=n(s,u);f-- >0;)if(d(c=h[f],f,l))switch(t){case 0:return c;case 1:return f}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},5645:(t,e,r)=>{var n=r(4864),i=r(2608),a=r(9455),o=r(4165),s=r(7878),u=r(1453),c=i([].push),l=function(t){var e=1===t,r=2===t,i=3===t,l=4===t,h=6===t,f=7===t,d=5===t||h;return function(v,p,y,g){for(var m,b,w=o(v),k=a(w),x=s(k),A=n(p,y),_=0,E=g||u,S=e?E(v,x):r||f?E(v,0):void 0;x>_;_++)if((d||_ in k)&&(b=A(m=k[_],_,w),t))if(e)S[_]=b;else if(b)switch(t){case 3:return!0;case 5:return m;case 6:return _;case 2:c(S,m)}else switch(t){case 4:return!1;case 7:c(S,m)}return h?-1:i||l?l:S}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},3499:(t,e,r)=>{var n=r(3881),i=r(3637),a=r(1211),o=r(7878),s=r(1814),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=l||!h;t.exports=f?function(t){if(l)return n(c,this,arguments)||0;var e=i(this),r=o(e);if(0===r)return-1;var s=r-1;for(arguments.length>1&&(s=u(s,a(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:c},9077:(t,e,r)=>{var n=r(3455),i=r(5811),a=r(6415),o=i("species");t.exports=function(t){return a>=51||!n((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},1814:(t,e,r)=>{var n=r(3455);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},4734:(t,e,r)=>{var n=r(4186),i=r(4165),a=r(9455),o=r(7878),s=TypeError,u="Reduce of empty array with no initial value",c=function(t){return function(e,r,c,l){var h=i(e),f=a(h),d=o(h);if(n(r),0===d&&c<2)throw new s(u);var v=t?d-1:0,p=t?-1:1;if(c<2)for(;;){if(v in f){l=f[v],v+=p;break}if(v+=p,t?v<0:d<=v)throw new s(u)}for(;t?v>=0:d>v;v+=p)v in f&&(l=r(l,f[v],v,h));return l}};t.exports={left:c(!1),right:c(!0)}},7375:(t,e,r)=>{var n=r(2444),i=r(5448),a=TypeError,o=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(i(t)&&!o(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4224:(t,e,r)=>{var n=r(2608);t.exports=n([].slice)},5272:(t,e,r)=>{var n=r(4224),i=Math.floor,a=function(t,e){var r=t.length;if(r<8)for(var o,s,u=1;u0;)t[s]=t[--s];s!==u++&&(t[s]=o)}else for(var c=i(r/2),l=a(n(t,0,c),e),h=a(n(t,c),e),f=l.length,d=h.length,v=0,p=0;v{var n=r(5448),i=r(8413),a=r(2674),o=r(5811)("species"),s=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===s||n(e.prototype))||a(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?s:e}},1453:(t,e,r)=>{var n=r(2329);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},6444:(t,e,r)=>{var n=r(7878);t.exports=function(t,e){for(var r=n(t),i=new e(r),a=0;a{var n=r(7878),i=r(1211),a=RangeError;t.exports=function(t,e,r,o){var s=n(t),u=i(r),c=u<0?s+u:u;if(c>=s||c<0)throw new a("Incorrect index");for(var l=new e(s),h=0;h{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",n=e+"-_",i=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:i(r),i2cUrl:n,c2iUrl:i(n)}},3535:(t,e,r)=>{var n=r(7447),i=r(5235);t.exports=function(t,e,r,a){try{return a?e(n(r)[0],r[1]):e(r)}catch(e){i(t,"throw",e)}}},4348:(t,e,r)=>{var n=r(5811)("iterator"),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var a={};a[n]=function(){return{next:function(){return{done:r=!0}}}},t(a)}catch(t){}return r}},9872:(t,e,r)=>{var n=r(2608),i=n({}.toString),a=n("".slice);t.exports=function(t){return a(i(t),8,-1)}},1179:(t,e,r)=>{var n=r(3724),i=r(3749),a=r(9872),o=r(5811)("toStringTag"),s=Object,u="Arguments"===a(function(){return arguments}());t.exports=n?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),o))?r:u?a(e):"Object"===(n=a(e))&&i(e.callee)?"Arguments":n}},2042:(t,e,r)=>{var n=r(5304),i=r(8986),a=r(4183),o=r(4864),s=r(3399),u=r(6021),c=r(1804),l=r(656),h=r(9393),f=r(5409),d=r(2444),v=r(5227).fastKey,p=r(8301),y=p.set,g=p.getterFor;t.exports={getConstructor:function(t,e,r,l){var h=t((function(t,i){s(t,f),y(t,{type:e,index:n(null),first:null,last:null,size:0}),d||(t.size=0),u(i)||c(i,t[l],{that:t,AS_ENTRIES:r})})),f=h.prototype,p=g(e),m=function(t,e,r){var n,i,a=p(t),o=b(t,e);return o?o.value=r:(a.last=o={index:i=v(e,!0),key:e,value:r,previous:n=a.last,next:null,removed:!1},a.first||(a.first=o),n&&(n.next=o),d?a.size++:t.size++,"F"!==i&&(a.index[i]=o)),t},b=function(t,e){var r,n=p(t),i=v(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===e)return r};return a(f,{clear:function(){for(var t=p(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=n(null),d?t.size=0:this.size=0},delete:function(t){var e=this,r=p(e),n=b(e,t);if(n){var i=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=i),i&&(i.previous=a),r.first===n&&(r.first=i),r.last===n&&(r.last=a),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=p(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),a(f,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return m(this,0===t?0:t,e)}}:{add:function(t){return m(this,t=0===t?0:t,t)}}),d&&i(f,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,r){var n=e+" Iterator",i=g(e),a=g(n);l(t,e,(function(t,e){y(this,{type:n,target:t,state:i(t),kind:e,last:null})}),(function(){for(var t=a(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?h("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,h(void 0,!0))}),r?"entries":"values",!r,!0),f(e)}}},8153:(t,e,r)=>{var n=r(2608),i=r(4183),a=r(5227).getWeakData,o=r(3399),s=r(7447),u=r(6021),c=r(2674),l=r(1804),h=r(5645),f=r(9649),d=r(8301),v=d.set,p=d.getterFor,y=h.find,g=h.findIndex,m=n([].splice),b=0,w=function(t){return t.frozen||(t.frozen=new k)},k=function(){this.entries=[]},x=function(t,e){return y(t.entries,(function(t){return t[0]===e}))};k.prototype={get:function(t){var e=x(this,t);if(e)return e[1]},has:function(t){return!!x(this,t)},set:function(t,e){var r=x(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&m(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var h=t((function(t,i){o(t,d),v(t,{type:e,id:b++,frozen:null}),u(i)||l(i,t[n],{that:t,AS_ENTRIES:r})})),d=h.prototype,y=p(e),g=function(t,e,r){var n=y(t),i=a(s(e),!0);return!0===i?w(n).set(e,r):i[n.id]=r,t};return i(d,{delete:function(t){var e=y(this);if(!c(t))return!1;var r=a(t);return!0===r?w(e).delete(t):r&&f(r,e.id)&&delete r[e.id]},has:function(t){var e=y(this);if(!c(t))return!1;var r=a(t);return!0===r?w(e).has(t):r&&f(r,e.id)}}),i(d,r?{get:function(t){var e=y(this);if(c(t)){var r=a(t);if(!0===r)return w(e).get(t);if(r)return r[e.id]}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),h}}},9556:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(2608),o=r(5868),s=r(8552),u=r(5227),c=r(1804),l=r(3399),h=r(3749),f=r(6021),d=r(2674),v=r(3455),p=r(4348),y=r(6911),g=r(3951);t.exports=function(t,e,r){var m=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),w=m?"set":"add",k=i[t],x=k&&k.prototype,A=k,_={},E=function(t){var e=a(x[t]);s(x,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(o(t,!h(k)||!(b||x.forEach&&!v((function(){(new k).entries().next()})))))A=r.getConstructor(e,t,m,w),u.enable();else if(o(t,!0)){var S=new A,O=S[w](b?{}:-0,1)!==S,T=v((function(){S.has(1)})),P=p((function(t){new k(t)})),L=!b&&v((function(){for(var t=new k,e=5;e--;)t[w](e,e);return!t.has(-0)}));P||((A=e((function(t,e){l(t,x);var r=g(new k,t,A);return f(e)||c(e,r[w],{that:r,AS_ENTRIES:m}),r}))).prototype=x,x.constructor=A),(T||L)&&(E("delete"),E("has"),m&&E("get")),(L||O)&&E(w),b&&x.clear&&delete x.clear}return _[t]=A,n({global:!0,constructor:!0,forced:A!==k},_),y(A,t),b||r.setStrong(A,t,m),A}},2924:(t,e,r)=>{var n=r(9649),i=r(2919),a=r(1139),o=r(1601);t.exports=function(t,e,r){for(var s=i(e),u=o.f,c=a.f,l=0;l{var n=r(5811)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},5139:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},9393:t=>{t.exports=function(t,e){return{value:t,done:e}}},139:(t,e,r)=>{var n=r(2444),i=r(1601),a=r(4004);t.exports=n?function(t,e,r){return i.f(t,e,a(1,r))}:function(t,e,r){return t[e]=r,t}},4004:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3552:(t,e,r)=>{var n=r(2444),i=r(1601),a=r(4004);t.exports=function(t,e,r){n?i.f(t,e,a(0,r)):t[e]=r}},952:(t,e,r)=>{var n=r(7447),i=r(3118),a=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new a("Incorrect hint");return i(this,t)}},8986:(t,e,r)=>{var n=r(1147),i=r(1601);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},8552:(t,e,r)=>{var n=r(3749),i=r(1601),a=r(1147),o=r(5801);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&a(r,c,s),s.global)u?t[e]=r:o(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},4183:(t,e,r)=>{var n=r(8552);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},5801:(t,e,r)=>{var n=r(4032),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},1870:(t,e,r)=>{var n=r(8055),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+n(e)+" of "+n(t))}},2444:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},7395:(t,e,r)=>{var n,i,a,o,s=r(4032),u=r(9685),c=r(6572),l=s.structuredClone,h=s.ArrayBuffer,f=s.MessageChannel,d=!1;if(c)d=function(t){l(t,{transfer:[t]})};else if(h)try{f||(n=u("worker_threads"))&&(f=n.MessageChannel),f&&(i=new f,a=new h(2),o=function(t){i.port1.postMessage(null,[t])},2===a.byteLength&&(o(a),0===a.byteLength&&(d=o)))}catch(t){}t.exports=d},5751:(t,e,r)=>{var n=r(4032),i=r(2674),a=n.document,o=i(a)&&i(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},9573:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},4090:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},2760:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4784:(t,e,r)=>{var n=r(5751)("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i},5175:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},7085:(t,e,r)=>{var n=r(7607).match(/firefox\\/(\\d+)/i);t.exports=!!n&&+n[1]},5123:(t,e,r)=>{var n=r(7607);t.exports=/MSIE|Trident/.test(n)},9081:(t,e,r)=>{var n=r(7607);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},9352:(t,e,r)=>{var n=r(7607);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},4529:(t,e,r)=>{var n=r(7351);t.exports="NODE"===n},628:(t,e,r)=>{var n=r(7607);t.exports=/web0s(?!.*chrome)/i.test(n)},7607:(t,e,r)=>{var n=r(4032).navigator,i=n&&n.userAgent;t.exports=i?String(i):""},6415:(t,e,r)=>{var n,i,a=r(4032),o=r(7607),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(i=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\\/(\\d+)/))&&(i=+n[1]),t.exports=i},1911:(t,e,r)=>{var n=r(7607).match(/AppleWebKit\\/(\\d+)\\./);t.exports=!!n&&+n[1]},7351:(t,e,r)=>{var n=r(4032),i=r(7607),a=r(9872),o=function(t){return i.slice(0,t.length)===t};t.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},3633:(t,e,r)=>{var n=r(2608),i=Error,a=n("".replace),o=String(new i("zxcasd").stack),s=/\\n\\s*at [^:]*:[^\\n]*/,u=s.test(o);t.exports=function(t,e){if(u&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=a(t,s,"");return t}},4171:(t,e,r)=>{var n=r(139),i=r(3633),a=r(3427),o=Error.captureStackTrace;t.exports=function(t,e,r,s){a&&(o?o(t,e):n(t,"stack",i(r,s)))}},3427:(t,e,r)=>{var n=r(3455),i=r(4004);t.exports=!n((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},2912:(t,e,r)=>{var n=r(2444),i=r(3455),a=r(7447),o=r(8363),s=Error.prototype.toString,u=i((function(){if(n){var t=Object.create(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==s.call(t))return!0}return"2: 1"!==s.call({message:1,name:2})||"Error"!==s.call({})}));t.exports=u?function(){var t=a(this),e=o(t.name,"Error"),r=o(t.message);return e?r?e+": "+r:e:r}:s},5366:(t,e,r)=>{var n=r(4032),i=r(1139).f,a=r(139),o=r(8552),s=r(5801),u=r(2924),c=r(5868);t.exports=function(t,e){var r,l,h,f,d,v=t.target,p=t.global,y=t.stat;if(r=p?n:y?n[v]||s(v,{}):n[v]&&n[v].prototype)for(l in e){if(f=e[l],h=t.dontCallGetSet?(d=i(r,l))&&d.value:r[l],!c(p?l:v+(y?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;u(f,h)}(t.sham||h&&h.sham)&&a(f,"sham",!0),o(r,l,f,t)}}},3455:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},4364:(t,e,r)=>{r(2823);var n=r(3453),i=r(8552),a=r(9867),o=r(3455),s=r(5811),u=r(139),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,r,h){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!==""[t](e)})),v=d&&!o((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[f]=/./[f]),r.exec=function(){return e=!0,null},r[f](""),!e}));if(!d||!v||r){var p=/./[f],y=e(f,""[t],(function(t,e,r,i,o){var s=e.exec;return s===a||s===l.exec?d&&!o?{done:!0,value:n(p,e,r,i)}:{done:!0,value:n(t,r,e,i)}:{done:!1}}));i(String.prototype,t,y[0]),i(l,f,y[1])}h&&u(l[f],"sham",!0)}},2851:(t,e,r)=>{var n=r(5448),i=r(7878),a=r(9573),o=r(4864),s=function(t,e,r,u,c,l,h,f){for(var d,v,p=c,y=0,g=!!h&&o(h,f);y0&&n(d)?(v=i(d),p=s(t,e,d,v,p,l-1)-1):(a(p+1),t[p]=d),p++),y++;return p};t.exports=s},568:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},3881:(t,e,r)=>{var n=r(9128),i=Function.prototype,a=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(a):function(){return o.apply(a,arguments)})},4864:(t,e,r)=>{var n=r(2116),i=r(4186),a=r(9128),o=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},9128:(t,e,r)=>{var n=r(3455);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},2230:(t,e,r)=>{var n=r(2608),i=r(4186),a=r(2674),o=r(9649),s=r(4224),u=r(9128),c=Function,l=n([].concat),h=n([].join),f={};t.exports=u?c.bind:function(t){var e=i(this),r=e.prototype,n=s(arguments,1),u=function(){var r=l(n,s(arguments));return this instanceof u?function(t,e,r){if(!o(f,e)){for(var n=[],i=0;i{var n=r(9128),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},2542:(t,e,r)=>{var n=r(2444),i=r(9649),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=i(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},5026:(t,e,r)=>{var n=r(2608),i=r(4186);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},2116:(t,e,r)=>{var n=r(9872),i=r(2608);t.exports=function(t){if("Function"===n(t))return i(t)}},2608:(t,e,r)=>{var n=r(9128),i=Function.prototype,a=i.call,o=n&&i.bind.bind(a,a);t.exports=n?o:function(t){return function(){return a.apply(t,arguments)}}},9685:(t,e,r)=>{var n=r(4032),i=r(4529);t.exports=function(t){if(i){try{return n.process.getBuiltinModule(t)}catch(t){}try{return Function('return require("'+t+'")')()}catch(t){}}}},8711:(t,e,r)=>{var n=r(4032),i=r(3749);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},3447:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},1750:(t,e,r)=>{var n=r(3453),i=r(7447),a=r(3447),o=r(7507);t.exports=function(t,e){e&&"string"==typeof t||i(t);var r=o(t);return a(i(void 0!==r?n(r,t):t))}},7507:(t,e,r)=>{var n=r(1179),i=r(8622),a=r(6021),o=r(5597),s=r(5811)("iterator");t.exports=function(t){if(!a(t))return i(t,s)||i(t,"@@iterator")||o[n(t)]}},6961:(t,e,r)=>{var n=r(3453),i=r(4186),a=r(7447),o=r(8055),s=r(7507),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return a(n(r,t));throw new u(o(t)+" is not iterable")}},213:(t,e,r)=>{var n=r(2608),i=r(5448),a=r(3749),o=r(9872),s=r(687),u=n([].push);t.exports=function(t){if(a(t))return t;if(i(t)){for(var e=t.length,r=[],n=0;n{var n=r(4186),i=r(6021);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},3885:(t,e,r)=>{var n=r(4186),i=r(7447),a=r(3453),o=r(1211),s=r(3447),u="Invalid size",c=RangeError,l=TypeError,h=Math.max,f=function(t,e){this.set=t,this.size=h(e,0),this.has=n(t.has),this.keys=n(t.keys)};f.prototype={getIterator:function(){return s(i(a(this.keys,this.set)))},includes:function(t){return a(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new l(u);var r=o(e);if(r<0)throw new c(u);return new f(t,r)}},3966:(t,e,r)=>{var n=r(2608),i=r(4165),a=Math.floor,o=n("".charAt),s=n("".replace),u=n("".slice),c=/\\$([$&'\`]|\\d{1,2}|<[^>]*>)/g,l=/\\$([$&'\`]|\\d{1,2})/g;t.exports=function(t,e,r,n,h,f){var d=r+t.length,v=n.length,p=l;return void 0!==h&&(h=i(h),p=c),s(f,p,(function(i,s){var c;switch(o(s,0)){case"$":return"$";case"&":return t;case"\`":return u(e,0,r);case"'":return u(e,d);case"<":c=h[u(s,1,-1)];break;default:var l=+s;if(0===l)return i;if(l>v){var f=a(l/10);return 0===f?i:f<=v?void 0===n[f-1]?o(s,1):n[f-1]+o(s,1):i}c=n[l-1]}return void 0===c?"":c}))}},4032:function(t){var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9649:(t,e,r)=>{var n=r(2608),i=r(4165),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(i(t),e)}},2645:t=>{t.exports={}},4885:t=>{t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},3085:(t,e,r)=>{var n=r(8711);t.exports=n("document","documentElement")},8829:(t,e,r)=>{var n=r(2444),i=r(3455),a=r(5751);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},1306:t=>{var e=Array,r=Math.abs,n=Math.pow,i=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,s,u){var c,l,h,f=e(u),d=8*u-s-1,v=(1<>1,y=23===s?n(2,-24)-n(2,-77):0,g=t<0||0===t&&1/t<0?1:0,m=0;for((t=r(t))!=t||t===1/0?(l=t!=t?1:0,c=v):(c=i(a(t)/o),t*(h=n(2,-c))<1&&(c--,h*=2),(t+=c+p>=1?y/h:y*n(2,1-p))*h>=2&&(c++,h/=2),c+p>=v?(l=0,c=v):c+p>=1?(l=(t*h-1)*n(2,s),c+=p):(l=t*n(2,p-1)*n(2,s),c=0));s>=8;)f[m++]=255&l,l/=256,s-=8;for(c=c<0;)f[m++]=255&c,c/=256,d-=8;return f[m-1]|=128*g,f},unpack:function(t,e){var r,i=t.length,a=8*i-e-1,o=(1<>1,u=a-7,c=i-1,l=t[c--],h=127&l;for(l>>=7;u>0;)h=256*h+t[c--],u-=8;for(r=h&(1<<-u)-1,h>>=-u,u+=e;u>0;)r=256*r+t[c--],u-=8;if(0===h)h=1-s;else{if(h===o)return r?NaN:l?-1/0:1/0;r+=n(2,e),h-=s}return(l?-1:1)*r*n(2,h-e)}}},9455:(t,e,r)=>{var n=r(2608),i=r(3455),a=r(9872),o=Object,s=n("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===a(t)?s(t,""):o(t)}:o},3951:(t,e,r)=>{var n=r(3749),i=r(2674),a=r(9415);t.exports=function(t,e,r){var o,s;return a&&n(o=e.constructor)&&o!==r&&i(s=o.prototype)&&s!==r.prototype&&a(t,s),t}},6906:(t,e,r)=>{var n=r(2608),i=r(3749),a=r(2205),o=n(Function.toString);i(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},2483:(t,e,r)=>{var n=r(2674),i=r(139);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},5227:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(2645),o=r(2674),s=r(9649),u=r(1601).f,c=r(3408),l=r(6442),h=r(8812),f=r(5936),d=r(568),v=!1,p=f("meta"),y=0,g=function(t){u(t,p,{value:{objectID:"O"+y++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},v=!0;var t=c.f,e=i([].splice),r={};r[p]=1,t(r).length&&(c.f=function(r){for(var n=t(r),i=0,a=n.length;i{var n,i,a,o=r(6206),s=r(4032),u=r(2674),c=r(139),l=r(9649),h=r(2205),f=r(2343),d=r(2645),v="Object already initialized",p=s.TypeError,y=s.WeakMap;if(o||h.state){var g=h.state||(h.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,n=function(t,e){if(g.has(t))throw new p(v);return e.facade=t,g.set(t,e),e},i=function(t){return g.get(t)||{}},a=function(t){return g.has(t)}}else{var m=f("state");d[m]=!0,n=function(t,e){if(l(t,m))throw new p(v);return e.facade=t,c(t,m,e),e},i=function(t){return l(t,m)?t[m]:{}},a=function(t){return l(t,m)}}t.exports={set:n,get:i,has:a,enforce:function(t){return a(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw new p("Incompatible receiver, "+t+" required");return r}}}},993:(t,e,r)=>{var n=r(5811),i=r(5597),a=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[a]===t)}},5448:(t,e,r)=>{var n=r(9872);t.exports=Array.isArray||function(t){return"Array"===n(t)}},5415:(t,e,r)=>{var n=r(1179);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},3749:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},8413:(t,e,r)=>{var n=r(2608),i=r(3455),a=r(3749),o=r(1179),s=r(8711),u=r(6906),c=function(){},l=s("Reflect","construct"),h=/^\\s*(?:class|function)\\b/,f=n(h.exec),d=!h.test(c),v=function(t){if(!a(t))return!1;try{return l(c,[],t),!0}catch(t){return!1}},p=function(t){if(!a(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!f(h,u(t))}catch(t){return!0}};p.sham=!0,t.exports=!l||i((function(){var t;return v(v.call)||!v(Object)||!v((function(){t=!0}))||t}))?p:v},3007:(t,e,r)=>{var n=r(9649);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},5868:(t,e,r)=>{var n=r(3455),i=r(3749),a=/#|\\.prototype\\./,o=function(t,e){var r=u[s(t)];return r===l||r!==c&&(i(e)?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},2599:(t,e,r)=>{var n=r(2674),i=Math.floor;t.exports=Number.isInteger||function(t){return!n(t)&&isFinite(t)&&i(t)===t}},6021:t=>{t.exports=function(t){return null==t}},2674:(t,e,r)=>{var n=r(3749);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},4597:(t,e,r)=>{var n=r(2674);t.exports=function(t){return n(t)||null===t}},8507:t=>{t.exports=!1},6484:(t,e,r)=>{var n=r(2674),i=r(9872),a=r(5811)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[a])?!!e:"RegExp"===i(t))}},2277:(t,e,r)=>{var n=r(8711),i=r(3749),a=r(6921),o=r(4752),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&a(e.prototype,s(t))}},2939:(t,e,r)=>{var n=r(3453);t.exports=function(t,e,r){for(var i,a,o=r?t:t.iterator,s=t.next;!(i=n(s,o)).done;)if(void 0!==(a=e(i.value)))return a}},1804:(t,e,r)=>{var n=r(4864),i=r(3453),a=r(7447),o=r(8055),s=r(993),u=r(7878),c=r(6921),l=r(6961),h=r(7507),f=r(5235),d=TypeError,v=function(t,e){this.stopped=t,this.result=e},p=v.prototype;t.exports=function(t,e,r){var y,g,m,b,w,k,x,A=r&&r.that,_=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),O=!(!r||!r.INTERRUPTED),T=n(e,A),P=function(t){return y&&f(y,"normal",t),new v(!0,t)},L=function(t){return _?(a(t),O?T(t[0],t[1],P):T(t[0],t[1])):O?T(t,P):T(t)};if(E)y=t.iterator;else if(S)y=t;else{if(!(g=h(t)))throw new d(o(t)+" is not iterable");if(s(g)){for(m=0,b=u(t);b>m;m++)if((w=L(t[m]))&&c(p,w))return w;return new v(!1)}y=l(t,g)}for(k=E?t.next:y.next;!(x=i(k,y)).done;){try{w=L(x.value)}catch(t){f(y,"throw",t)}if("object"==typeof w&&w&&c(p,w))return w}return new v(!1)}},5235:(t,e,r)=>{var n=r(3453),i=r(7447),a=r(8622);t.exports=function(t,e,r){var o,s;i(t);try{if(!(o=a(t,"return"))){if("throw"===e)throw r;return r}o=n(o,t)}catch(t){s=!0,o=t}if("throw"===e)throw r;if(s)throw o;return i(o),r}},282:(t,e,r)=>{var n=r(2857).IteratorPrototype,i=r(5304),a=r(4004),o=r(6911),s=r(5597),u=function(){return this};t.exports=function(t,e,r,c){var l=e+" Iterator";return t.prototype=i(n,{next:a(+!c,r)}),o(t,l,!1,!0),s[l]=u,t}},2342:(t,e,r)=>{var n=r(3453),i=r(5304),a=r(139),o=r(4183),s=r(5811),u=r(8301),c=r(8622),l=r(2857).IteratorPrototype,h=r(9393),f=r(5235),d=s("toStringTag"),v="IteratorHelper",p="WrapForValidIterator",y=u.set,g=function(t){var e=u.getterFor(t?p:v);return o(i(l),{next:function(){var r=e(this);if(t)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return h(n,r.done)}catch(t){throw r.done=!0,t}},return:function(){var r=e(this),i=r.iterator;if(r.done=!0,t){var a=c(i,"return");return a?n(a,i):h(void 0,!0)}if(r.inner)try{f(r.inner.iterator,"normal")}catch(t){return f(i,"throw",t)}return f(i,"normal"),h(void 0,!0)}})},m=g(!0),b=g(!1);a(b,d,"Iterator Helper"),t.exports=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?p:v,n.nextHandler=t,n.counter=0,n.done=!1,y(this,n)};return r.prototype=e?m:b,r}},656:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(8507),o=r(2542),s=r(3749),u=r(282),c=r(2611),l=r(9415),h=r(6911),f=r(139),d=r(8552),v=r(5811),p=r(5597),y=r(2857),g=o.PROPER,m=o.CONFIGURABLE,b=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,k=v("iterator"),x="keys",A="values",_="entries",E=function(){return this};t.exports=function(t,e,r,o,v,y,S){u(r,e,o);var O,T,P,L=function(t){if(t===v&&R)return R;if(!w&&t&&t in j)return j[t];switch(t){case x:case A:case _:return function(){return new r(this,t)}}return function(){return new r(this)}},M=e+" Iterator",C=!1,j=t.prototype,I=j[k]||j["@@iterator"]||v&&j[v],R=!w&&I||L(v),F="Array"===e&&j.entries||I;if(F&&(O=c(F.call(new t)))!==Object.prototype&&O.next&&(a||c(O)===b||(l?l(O,b):s(O[k])||d(O,k,E)),h(O,M,!0,!0),a&&(p[M]=E)),g&&v===A&&I&&I.name!==A&&(!a&&m?f(j,"name",A):(C=!0,R=function(){return i(I,this)})),v)if(T={values:L(A),keys:y?R:L(x),entries:L(_)},S)for(P in T)(w||C||!(P in j))&&d(j,P,T[P]);else n({target:e,proto:!0,forced:w||C},T);return a&&!S||j[k]===R||d(j,k,R,{name:v}),p[e]=R,T}},4009:(t,e,r)=>{var n=r(3453),i=r(4186),a=r(7447),o=r(3447),s=r(2342),u=r(3535),c=s((function(){var t=this.iterator,e=a(n(this.next,t));if(!(this.done=!!e.done))return u(t,this.mapper,[e.value,this.counter++],!0)}));t.exports=function(t){return a(this),i(t),new c(o(this),{mapper:t})}},2857:(t,e,r)=>{var n,i,a,o=r(3455),s=r(3749),u=r(2674),c=r(5304),l=r(2611),h=r(8552),f=r(5811),d=r(8507),v=f("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(n=i):p=!0),!u(n)||o((function(){var t={};return n[v].call(t)!==t}))?n={}:d&&(n=c(n)),s(n[v])||h(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},5597:t=>{t.exports={}},7878:(t,e,r)=>{var n=r(5806);t.exports=function(t){return n(t.length)}},1147:(t,e,r)=>{var n=r(2608),i=r(3455),a=r(3749),o=r(9649),s=r(2444),u=r(2542).CONFIGURABLE,c=r(6906),l=r(8301),h=l.enforce,f=l.get,d=String,v=Object.defineProperty,p=n("".slice),y=n("".replace),g=n([].join),m=s&&!i((function(){return 8!==v((function(){}),"length",{value:8}).length})),b=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===p(d(e),0,7)&&(e="["+y(d(e),/^Symbol\\(([^)]*)\\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(s?v(t,"name",{value:e,configurable:!0}):t.name=e),m&&r&&o(r,"arity")&&t.length!==r.arity&&v(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?s&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=h(t);return o(n,"source")||(n.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w((function(){return a(this)&&f(this).source||c(this)}),"toString")},9676:(t,e,r)=>{var n=r(550),i=Math.abs,a=2220446049250313e-31,o=1/a;t.exports=function(t,e,r,s){var u=+t,c=i(u),l=n(u);if(cr||f!=f?l*(1/0):l*f}},3505:(t,e,r)=>{var n=r(9676);t.exports=Math.fround||function(t){return n(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},550:t=>{t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},2789:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},755:(t,e,r)=>{var n,i,a,o,s,u=r(4032),c=r(5725),l=r(4864),h=r(1369).set,f=r(3529),d=r(9352),v=r(9081),p=r(628),y=r(4529),g=u.MutationObserver||u.WebKitMutationObserver,m=u.document,b=u.process,w=u.Promise,k=c("queueMicrotask");if(!k){var x=new f,A=function(){var t,e;for(y&&(t=b.domain)&&t.exit();e=x.get();)try{e()}catch(t){throw x.head&&n(),t}t&&t.enter()};d||y||p||!g||!m?!v&&w&&w.resolve?((o=w.resolve(void 0)).constructor=w,s=l(o.then,o),n=function(){s(A)}):y?n=function(){b.nextTick(A)}:(h=l(h,u),n=function(){h(A)}):(i=!0,a=m.createTextNode(""),new g(A).observe(a,{characterData:!0}),n=function(){a.data=i=!i}),k=function(t){x.head||n(),x.add(t)}}t.exports=k},9371:(t,e,r)=>{var n=r(4186),i=TypeError,a=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new a(t)}},8363:(t,e,r)=>{var n=r(687);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},821:t=>{var e=RangeError;t.exports=function(t){if(t==t)return t;throw new e("NaN is not allowed")}},3631:(t,e,r)=>{var n=r(6484),i=TypeError;t.exports=function(t){if(n(t))throw new i("The method doesn't accept regular expressions");return t}},8069:(t,e,r)=>{var n=r(2444),i=r(2608),a=r(3453),o=r(3455),s=r(496),u=r(6005),c=r(9221),l=r(4165),h=r(9455),f=Object.assign,d=Object.defineProperty,v=i([].concat);t.exports=!f||o((function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!==f({},t)[r]||s(f({},e)).join("")!==i}))?function(t,e){for(var r=l(t),i=arguments.length,o=1,f=u.f,d=c.f;i>o;)for(var p,y=h(arguments[o++]),g=f?v(s(y),f(y)):s(y),m=g.length,b=0;m>b;)p=g[b++],n&&!a(d,y,p)||(r[p]=y[p]);return r}:f},5304:(t,e,r)=>{var n,i=r(7447),a=r(9217),o=r(5175),s=r(2645),u=r(3085),c=r(5751),l=r(2343),h="prototype",f="script",d=l("IE_PROTO"),v=function(){},p=function(t){return"<"+f+">"+t+""},y=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;g="undefined"!=typeof document?document.domain&&n?y(n):(e=c("iframe"),r="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):y(n);for(var i=o.length;i--;)delete g[h][o[i]];return g()};s[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(v[h]=i(t),r=new v,v[h]=null,r[d]=t):r=g(),void 0===e?r:a.f(r,e)}},9217:(t,e,r)=>{var n=r(2444),i=r(782),a=r(1601),o=r(7447),s=r(3637),u=r(496);e.f=n&&!i?Object.defineProperties:function(t,e){o(t);for(var r,n=s(e),i=u(e),c=i.length,l=0;c>l;)a.f(t,r=i[l++],n[r]);return t}},1601:(t,e,r)=>{var n=r(2444),i=r(8829),a=r(782),o=r(7447),s=r(6201),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=n?a?function(t,e,r){if(o(t),e=s(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=l(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:h in r?r[h]:n[h],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(o(t),e=s(e),o(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1139:(t,e,r)=>{var n=r(2444),i=r(3453),a=r(9221),o=r(4004),s=r(3637),u=r(6201),c=r(9649),l=r(8829),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=s(t),e=u(e),l)try{return h(t,e)}catch(t){}if(c(t,e))return o(!i(a.f,t,e),t[e])}},6442:(t,e,r)=>{var n=r(9872),i=r(3637),a=r(3408).f,o=r(4224),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"===n(t)?function(t){try{return a(t)}catch(t){return o(s)}}(t):a(i(t))}},3408:(t,e,r)=>{var n=r(2468),i=r(5175).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},6005:(t,e)=>{e.f=Object.getOwnPropertySymbols},2611:(t,e,r)=>{var n=r(9649),i=r(3749),a=r(4165),o=r(2343),s=r(5139),u=o("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=a(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?l:null}},8812:(t,e,r)=>{var n=r(3455),i=r(2674),a=r(9872),o=r(7060),s=Object.isExtensible,u=n((function(){s(1)}));t.exports=u||o?function(t){return!!i(t)&&(!o||"ArrayBuffer"!==a(t))&&(!s||s(t))}:s},6921:(t,e,r)=>{var n=r(2608);t.exports=n({}.isPrototypeOf)},2468:(t,e,r)=>{var n=r(2608),i=r(9649),a=r(3637),o=r(7921).indexOf,s=r(2645),u=n([].push);t.exports=function(t,e){var r,n=a(t),c=0,l=[];for(r in n)!i(s,r)&&i(n,r)&&u(l,r);for(;e.length>c;)i(n,r=e[c++])&&(~o(l,r)||u(l,r));return l}},496:(t,e,r)=>{var n=r(2468),i=r(5175);t.exports=Object.keys||function(t){return n(t,i)}},9221:(t,e)=>{var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},9415:(t,e,r)=>{var n=r(5026),i=r(2674),a=r(7222),o=r(7330);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return a(r),o(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},8885:(t,e,r)=>{var n=r(2444),i=r(3455),a=r(2608),o=r(2611),s=r(496),u=r(3637),c=a(r(9221).f),l=a([].push),h=n&&i((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),f=function(t){return function(e){for(var r,i=u(e),a=s(i),f=h&&null===o(i),d=a.length,v=0,p=[];d>v;)r=a[v++],n&&!(f?r in i:c(i,r))||l(p,t?[r,i[r]]:i[r]);return p}};t.exports={entries:f(!0),values:f(!1)}},3003:(t,e,r)=>{var n=r(3724),i=r(1179);t.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},3118:(t,e,r)=>{var n=r(3453),i=r(3749),a=r(2674),o=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&i(r=t.toString)&&!a(s=n(r,t)))return s;if(i(r=t.valueOf)&&!a(s=n(r,t)))return s;if("string"!==e&&i(r=t.toString)&&!a(s=n(r,t)))return s;throw new o("Can't convert object to primitive value")}},2919:(t,e,r)=>{var n=r(8711),i=r(2608),a=r(3408),o=r(6005),s=r(7447),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=a.f(s(t)),r=o.f;return r?u(e,r(t)):e}},1448:(t,e,r)=>{var n=r(2608),i=r(9649),a=SyntaxError,o=parseInt,s=String.fromCharCode,u=n("".charAt),c=n("".slice),l=n(/./.exec),h={'\\\\"':'"',"\\\\\\\\":"\\\\","\\\\/":"/","\\\\b":"\\b","\\\\f":"\\f","\\\\n":"\\n","\\\\r":"\\r","\\\\t":"\\t"},f=/^[\\da-f]{4}$/i,d=/^[\\u0000-\\u001F]$/;t.exports=function(t,e){for(var r=!0,n="";e{var n=r(4032);t.exports=n},6703:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},9492:(t,e,r)=>{var n=r(4032),i=r(5318),a=r(3749),o=r(5868),s=r(6906),u=r(5811),c=r(7351),l=r(8507),h=r(6415),f=i&&i.prototype,d=u("species"),v=!1,p=a(n.PromiseRejectionEvent),y=o("Promise",(function(){var t=s(i),e=t!==String(i);if(!e&&66===h)return!0;if(l&&(!f.catch||!f.finally))return!0;if(!h||h<51||!/native code/.test(t)){var r=new i((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[d]=n,!(v=r.then((function(){}))instanceof n))return!0}return!(e||"BROWSER"!==c&&"DENO"!==c||p)}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:p,SUBCLASSING:v}},5318:(t,e,r)=>{var n=r(4032);t.exports=n.Promise},1774:(t,e,r)=>{var n=r(7447),i=r(2674),a=r(9371);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=a.f(t);return(0,r.resolve)(e),r.promise}},2041:(t,e,r)=>{var n=r(5318),i=r(4348),a=r(9492).CONSTRUCTOR;t.exports=a||!i((function(t){n.all(t).then(void 0,(function(){}))}))},2848:(t,e,r)=>{var n=r(1601).f;t.exports=function(t,e,r){r in t||n(t,r,{configurable:!0,get:function(){return e[r]},set:function(t){e[r]=t}})}},3529:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},4410:(t,e,r)=>{var n=r(3453),i=r(7447),a=r(3749),o=r(9872),s=r(9867),u=TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var c=n(r,t,e);return null!==c&&i(c),c}if("RegExp"===o(t))return n(s,t,e);throw new u("RegExp#exec called on incompatible receiver")}},9867:(t,e,r)=>{var n,i,a=r(3453),o=r(2608),s=r(687),u=r(747),c=r(1837),l=r(4593),h=r(5304),f=r(8301).get,d=r(3651),v=r(9502),p=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,g=y,m=o("".charAt),b=o("".indexOf),w=o("".replace),k=o("".slice),x=(i=/b*/g,a(y,n=/a/,"a"),a(y,i,"a"),0!==n.lastIndex||0!==i.lastIndex),A=c.BROKEN_CARET,_=void 0!==/()??/.exec("")[1];(x||_||A||d||v)&&(g=function(t){var e,r,n,i,o,c,l,d=this,v=f(d),E=s(t),S=v.raw;if(S)return S.lastIndex=d.lastIndex,e=a(g,S,E),d.lastIndex=S.lastIndex,e;var O=v.groups,T=A&&d.sticky,P=a(u,d),L=d.source,M=0,C=E;if(T&&(P=w(P,"y",""),-1===b(P,"g")&&(P+="g"),C=k(E,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\\n"!==m(E,d.lastIndex-1))&&(L="(?: "+L+")",C=" "+C,M++),r=new RegExp("^(?:"+L+")",P)),_&&(r=new RegExp("^"+L+"$(?!\\\\s)",P)),x&&(n=d.lastIndex),i=a(y,T?r:d,C),T?i?(i.input=k(i.input,M),i[0]=k(i[0],M),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:x&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),_&&i&&i.length>1&&a(p,i[0],r,(function(){for(o=1;o{var n=r(7447);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4554:(t,e,r)=>{var n=r(3453),i=r(9649),a=r(6921),o=r(747),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||i(t,"flags")||!a(s,t)?e:n(o,t)}},1837:(t,e,r)=>{var n=r(3455),i=r(4032).RegExp,a=n((function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),o=a||n((function(){return!i("a","y").sticky})),s=a||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},3651:(t,e,r)=>{var n=r(3455),i=r(4032).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.test("\\n")&&"s"===t.flags)}))},9502:(t,e,r)=>{var n=r(3455),i=r(4032).RegExp;t.exports=n((function(){var t=i("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},7222:(t,e,r)=>{var n=r(6021),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},5725:(t,e,r)=>{var n=r(4032),i=r(2444),a=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return n[t];var e=a(n,t);return e&&e.value}},8550:(t,e,r)=>{var n=r(418),i=r(5605),a=n.Set,o=n.add;t.exports=function(t){var e=new a;return i(t,(function(t){o(e,t)})),e}},4656:(t,e,r)=>{var n=r(4376),i=r(418),a=r(8550),o=r(82),s=r(3885),u=r(5605),c=r(2939),l=i.has,h=i.remove;t.exports=function(t){var e=n(this),r=s(t),i=a(e);return o(e)<=r.size?u(e,(function(t){r.includes(t)&&h(i,t)})):c(r.getIterator(),(function(t){l(e,t)&&h(i,t)})),i}},418:(t,e,r)=>{var n=r(2608),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},2446:(t,e,r)=>{var n=r(4376),i=r(418),a=r(82),o=r(3885),s=r(5605),u=r(2939),c=i.Set,l=i.add,h=i.has;t.exports=function(t){var e=n(this),r=o(t),i=new c;return a(e)>r.size?u(r.getIterator(),(function(t){h(e,t)&&l(i,t)})):s(e,(function(t){r.includes(t)&&l(i,t)})),i}},4545:(t,e,r)=>{var n=r(4376),i=r(418).has,a=r(82),o=r(3885),s=r(5605),u=r(2939),c=r(5235);t.exports=function(t){var e=n(this),r=o(t);if(a(e)<=r.size)return!1!==s(e,(function(t){if(r.includes(t))return!1}),!0);var l=r.getIterator();return!1!==u(l,(function(t){if(i(e,t))return c(l,"normal",!1)}))}},7918:(t,e,r)=>{var n=r(4376),i=r(82),a=r(5605),o=r(3885);t.exports=function(t){var e=n(this),r=o(t);return!(i(e)>r.size)&&!1!==a(e,(function(t){if(!r.includes(t))return!1}),!0)}},6111:(t,e,r)=>{var n=r(4376),i=r(418).has,a=r(82),o=r(3885),s=r(2939),u=r(5235);t.exports=function(t){var e=n(this),r=o(t);if(a(e){var n=r(2608),i=r(2939),a=r(418),o=a.Set,s=a.proto,u=n(s.forEach),c=n(s.keys),l=c(new o).next;t.exports=function(t,e,r){return r?i({iterator:c(t),next:l},e):u(t,e)}},1716:(t,e,r)=>{var n=r(8711),i=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var e=n("Set");try{(new e)[t](i(0));try{return(new e)[t](i(-1)),!1}catch(t){return!0}}catch(t){return!1}}},82:(t,e,r)=>{var n=r(5026),i=r(418);t.exports=n(i.proto,"size","get")||function(t){return t.size}},5409:(t,e,r)=>{var n=r(8711),i=r(8986),a=r(5811),o=r(2444),s=a("species");t.exports=function(t){var e=n(t);o&&e&&!e[s]&&i(e,s,{configurable:!0,get:function(){return this}})}},4498:(t,e,r)=>{var n=r(4376),i=r(418),a=r(8550),o=r(3885),s=r(2939),u=i.add,c=i.has,l=i.remove;t.exports=function(t){var e=n(this),r=o(t).getIterator(),i=a(e);return s(r,(function(t){c(e,t)?l(i,t):u(i,t)})),i}},6911:(t,e,r)=>{var n=r(1601).f,i=r(9649),a=r(5811)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,a)&&n(t,a,{configurable:!0,value:e})}},9500:(t,e,r)=>{var n=r(4376),i=r(418).add,a=r(8550),o=r(3885),s=r(2939);t.exports=function(t){var e=n(this),r=o(t).getIterator(),u=a(e);return s(r,(function(t){i(u,t)})),u}},2343:(t,e,r)=>{var n=r(4593),i=r(5936),a=n("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},2205:(t,e,r)=>{var n=r(8507),i=r(4032),a=r(5801),o="__core-js_shared__",s=t.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:"3.38.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4593:(t,e,r)=>{var n=r(2205);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},1365:(t,e,r)=>{var n=r(7447),i=r(9052),a=r(6021),o=r(5811)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||a(r=n(s)[o])?e:i(r)}},6903:(t,e,r)=>{var n=r(2608),i=r(1211),a=r(687),o=r(7222),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(t){return function(e,r){var n,l,h=a(o(e)),f=i(r),d=h.length;return f<0||f>=d?t?"":void 0:(n=u(h,f))<55296||n>56319||f+1===d||(l=u(h,f+1))<56320||l>57343?t?s(h,f):n:t?c(h,f,f+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},4903:(t,e,r)=>{var n=r(7607);t.exports=/Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(n)},6437:(t,e,r)=>{var n=r(2608),i=r(5806),a=r(687),o=r(6605),s=r(7222),u=n(o),c=n("".slice),l=Math.ceil,h=function(t){return function(e,r,n){var o,h,f=a(s(e)),d=i(r),v=f.length,p=void 0===n?" ":a(n);return d<=v||""===p?f:((h=u(p,l((o=d-v)/p.length))).length>o&&(h=c(h,0,o)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},5141:(t,e,r)=>{var n=r(2608),i=2147483647,a=/[^\\0-\\u007E]/,o=/[.\\u3002\\uFF0E\\uFF61]/g,s="Overflow: input needs wider integers to process",u=RangeError,c=n(o.exec),l=Math.floor,h=String.fromCharCode,f=n("".charCodeAt),d=n([].join),v=n([].push),p=n("".replace),y=n("".split),g=n("".toLowerCase),m=function(t){return t+22+75*(t<26)},b=function(t,e,r){var n=0;for(t=r?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),n+=36;return l(n+36*t/(t+38))},w=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&i<=56319&&r=o&&nl((i-c)/k))throw new u(s);for(c+=(w-o)*k,o=w,r=0;ri)throw new u(s);if(n===o){for(var x=c,A=36;;){var _=A<=p?1:A>=p+26?26:A-p;if(x<_)break;var E=x-_,S=36-_;v(e,h(m(_+E%S))),x=l(E/S),A+=36}v(e,h(m(x))),p=b(c,k,g===y),c=0,g++}}c++,o++}return d(e,"")};t.exports=function(t){var e,r,n=[],i=y(p(g(t),o,"."),".");for(e=0;e{var n=r(1211),i=r(687),a=r(7222),o=RangeError;t.exports=function(t){var e=i(a(this)),r="",s=n(t);if(s<0||s===1/0)throw new o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(r+=e);return r}},2882:(t,e,r)=>{var n=r(9418).end,i=r(3794);t.exports=i("trimEnd")?function(){return n(this)}:"".trimEnd},3794:(t,e,r)=>{var n=r(2542).PROPER,i=r(3455),a=r(2284);t.exports=function(t){return i((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||n&&a[t].name!==t}))}},9418:(t,e,r)=>{var n=r(2608),i=r(7222),a=r(687),o=r(2284),s=n("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),l=function(t){return function(e){var r=a(i(e));return 1&t&&(r=s(r,u,"")),2&t&&(r=s(r,c,"$1")),r}};t.exports={start:l(1),end:l(2),trim:l(3)}},6572:(t,e,r)=>{var n=r(4032),i=r(3455),a=r(6415),o=r(7351),s=n.structuredClone;t.exports=!!s&&!i((function(){if("DENO"===o&&a>92||"NODE"===o&&a>94||"BROWSER"===o&&a>97)return!1;var t=new ArrayBuffer(8),e=s(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},6943:(t,e,r)=>{var n=r(6415),i=r(3455),a=r(4032).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},3042:(t,e,r)=>{var n=r(3453),i=r(8711),a=r(5811),o=r(8552);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,s=a("toPrimitive");e&&!e[s]&&o(e,s,(function(t){return n(r,this)}),{arity:1})}},8592:(t,e,r)=>{var n=r(6943);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},1369:(t,e,r)=>{var n,i,a,o,s=r(4032),u=r(3881),c=r(4864),l=r(3749),h=r(9649),f=r(3455),d=r(3085),v=r(4224),p=r(5751),y=r(7900),g=r(9352),m=r(4529),b=s.setImmediate,w=s.clearImmediate,k=s.process,x=s.Dispatch,A=s.Function,_=s.MessageChannel,E=s.String,S=0,O={},T="onreadystatechange";f((function(){n=s.location}));var P=function(t){if(h(O,t)){var e=O[t];delete O[t],e()}},L=function(t){return function(){P(t)}},M=function(t){P(t.data)},C=function(t){s.postMessage(E(t),n.protocol+"//"+n.host)};b&&w||(b=function(t){y(arguments.length,1);var e=l(t)?t:A(t),r=v(arguments,1);return O[++S]=function(){u(e,void 0,r)},i(S),S},w=function(t){delete O[t]},m?i=function(t){k.nextTick(L(t))}:x&&x.now?i=function(t){x.now(L(t))}:_&&!g?(o=(a=new _).port2,a.port1.onmessage=M,i=c(o.postMessage,o)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!f(C)?(i=C,s.addEventListener("message",M,!1)):i=T in p("script")?function(t){d.appendChild(p("script"))[T]=function(){d.removeChild(this),P(t)}}:function(t){setTimeout(L(t),0)}),t.exports={set:b,clear:w}},9002:(t,e,r)=>{var n=r(1211),i=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):a(r,e)}},1198:(t,e,r)=>{var n=r(8921),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},9088:(t,e,r)=>{var n=r(1211),i=r(5806),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=i(e);if(e!==r)throw new a("Wrong length or index");return r}},3637:(t,e,r)=>{var n=r(9455),i=r(7222);t.exports=function(t){return n(i(t))}},1211:(t,e,r)=>{var n=r(2789);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},5806:(t,e,r)=>{var n=r(1211),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},4165:(t,e,r)=>{var n=r(7222),i=Object;t.exports=function(t){return i(n(t))}},8402:(t,e,r)=>{var n=r(5590),i=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw new i("Wrong offset");return r}},5590:(t,e,r)=>{var n=r(1211),i=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw new i("The argument can't be less than 0");return e}},8921:(t,e,r)=>{var n=r(3453),i=r(2674),a=r(2277),o=r(8622),s=r(3118),u=r(5811),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,u=o(t,l);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!i(r)||a(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},6201:(t,e,r)=>{var n=r(8921),i=r(2277);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},3724:(t,e,r)=>{var n={};n[r(5811)("toStringTag")]="z",t.exports="[object z]"===String(n)},687:(t,e,r)=>{var n=r(1179),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},5215:t=>{var e=Math.round;t.exports=function(t){var r=e(t);return r<0?0:r>255?255:255&r}},8055:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},8975:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3453),o=r(2444),s=r(949),u=r(4356),c=r(7226),l=r(3399),h=r(4004),f=r(139),d=r(2599),v=r(5806),p=r(9088),y=r(8402),g=r(5215),m=r(6201),b=r(9649),w=r(1179),k=r(2674),x=r(2277),A=r(5304),_=r(6921),E=r(9415),S=r(3408).f,O=r(2291),T=r(5645).forEach,P=r(5409),L=r(8986),M=r(1601),C=r(1139),j=r(7434),I=r(8301),R=r(3951),F=I.get,D=I.set,N=I.enforce,W=M.f,B=C.f,G=i.RangeError,H=c.ArrayBuffer,U=H.prototype,z=c.DataView,V=u.NATIVE_ARRAY_BUFFER_VIEWS,q=u.TYPED_ARRAY_TAG,Y=u.TypedArray,X=u.TypedArrayPrototype,K=u.isTypedArray,Q="BYTES_PER_ELEMENT",J="Wrong length",$=function(t,e){L(t,e,{configurable:!0,get:function(){return F(this)[e]}})},Z=function(t){var e;return _(U,t)||"ArrayBuffer"===(e=w(t))||"SharedArrayBuffer"===e},tt=function(t,e){return K(t)&&!x(e)&&e in t&&d(+e)&&e>=0},et=function(t,e){return e=m(e),tt(t,e)?h(2,t[e]):B(t,e)},rt=function(t,e,r){return e=m(e),!(tt(t,e)&&k(r)&&b(r,"value"))||b(r,"get")||b(r,"set")||r.configurable||b(r,"writable")&&!r.writable||b(r,"enumerable")&&!r.enumerable?W(t,e,r):(t[e]=r.value,t)};o?(V||(C.f=et,M.f=rt,$(X,"buffer"),$(X,"byteOffset"),$(X,"byteLength"),$(X,"length")),n({target:"Object",stat:!0,forced:!V},{getOwnPropertyDescriptor:et,defineProperty:rt}),t.exports=function(t,e,r){var o=t.match(/\\d+/)[0]/8,u=t+(r?"Clamped":"")+"Array",c="get"+t,h="set"+t,d=i[u],m=d,b=m&&m.prototype,w={},x=function(t,e){W(t,e,{get:function(){return function(t,e){var r=F(t);return r.view[c](e*o+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var i=F(t);i.view[h](e*o+i.byteOffset,r?g(n):n,!0)}(this,e,t)},enumerable:!0})};V?s&&(m=e((function(t,e,r,n){return l(t,b),R(k(e)?Z(e)?void 0!==n?new d(e,y(r,o),n):void 0!==r?new d(e,y(r,o)):new d(e):K(e)?j(m,e):a(O,m,e):new d(p(e)),t,m)})),E&&E(m,Y),T(S(d),(function(t){t in m||f(m,t,d[t])})),m.prototype=b):(m=e((function(t,e,r,n){l(t,b);var i,s,u,c=0,h=0;if(k(e)){if(!Z(e))return K(e)?j(m,e):a(O,m,e);i=e,h=y(r,o);var f=e.byteLength;if(void 0===n){if(f%o)throw new G(J);if((s=f-h)<0)throw new G(J)}else if((s=v(n)*o)+h>f)throw new G(J);u=s/o}else u=p(e),i=new H(s=u*o);for(D(t,{buffer:i,byteOffset:h,byteLength:s,length:u,view:new z(i)});c{var n=r(4032),i=r(3455),a=r(4348),o=r(4356).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,u=n.Int8Array;t.exports=!o||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!a((function(t){new u,new u(null),new u(1.5),new u(t)}),!0)||i((function(){return 1!==new u(new s(2),1,void 0).length}))},85:(t,e,r)=>{var n=r(7434),i=r(580);t.exports=function(t,e){return n(i(t),e)}},2291:(t,e,r)=>{var n=r(4864),i=r(3453),a=r(9052),o=r(4165),s=r(7878),u=r(6961),c=r(7507),l=r(993),h=r(5415),f=r(4356).aTypedArrayConstructor,d=r(1198);t.exports=function(t){var e,r,v,p,y,g,m,b,w=a(this),k=o(t),x=arguments.length,A=x>1?arguments[1]:void 0,_=void 0!==A,E=c(k);if(E&&!l(E))for(b=(m=u(k,E)).next,k=[];!(g=i(b,m)).done;)k.push(g.value);for(_&&x>2&&(A=n(A,arguments[2])),r=s(k),v=new(f(w))(r),p=h(v),e=0;r>e;e++)y=_?A(k[e],e):k[e],v[e]=p?d(y):+y;return v}},580:(t,e,r)=>{var n=r(4356),i=r(1365),a=n.aTypedArrayConstructor,o=n.getTypedArrayConstructor;t.exports=function(t){return a(i(t,o(t)))}},5936:(t,e,r)=>{var n=r(2608),i=0,a=Math.random(),o=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+a,36)}},8200:(t,e,r)=>{var n=r(3455),i=r(5811),a=r(2444),o=r(8507),s=i("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),r.delete("b",void 0),o&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(o||!a)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}))},4752:(t,e,r)=>{var n=r(6943);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},782:(t,e,r)=>{var n=r(2444),i=r(3455);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7900:t=>{var e=TypeError;t.exports=function(t,r){if(t{var n=r(4032),i=r(3749),a=n.WeakMap;t.exports=i(a)&&/native code/.test(String(a))},5343:(t,e,r)=>{var n=r(8799),i=r(9649),a=r(4559),o=r(1601).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||o(e,t,{value:a.f(t)})}},4559:(t,e,r)=>{var n=r(5811);e.f=n},5811:(t,e,r)=>{var n=r(4032),i=r(4593),a=r(9649),o=r(5936),s=r(6943),u=r(4752),c=n.Symbol,l=i("wks"),h=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return a(l,t)||(l[t]=s&&a(c,t)?c[t]:h("Symbol."+t)),l[t]}},2284:t=>{t.exports="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff"},9257:(t,e,r)=>{var n=r(8711),i=r(9649),a=r(139),o=r(6921),s=r(9415),u=r(2924),c=r(2848),l=r(3951),h=r(8363),f=r(2483),d=r(4171),v=r(2444),p=r(8507);t.exports=function(t,e,r,y){var g="stackTraceLimit",m=y?2:1,b=t.split("."),w=b[b.length-1],k=n.apply(null,b);if(k){var x=k.prototype;if(!p&&i(x,"cause")&&delete x.cause,!r)return k;var A=n("Error"),_=e((function(t,e){var r=h(y?e:t,void 0),n=y?new k(t):new k;return void 0!==r&&a(n,"message",r),d(n,_,n.stack,2),this&&o(x,this)&&l(n,this,_),arguments.length>m&&f(n,arguments[m]),n}));if(_.prototype=x,"Error"!==w?s?s(_,A):u(_,A,{name:!0}):v&&g in k&&(c(_,k,g),c(_,k,"prepareStackTrace")),u(_,k),!p)try{x.name!==w&&a(x,"name",w),x.constructor=_}catch(t){}return _}}},5015:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(7226),o=r(5409),s="ArrayBuffer",u=a[s];n({global:!0,constructor:!0,forced:i[s]!==u},{ArrayBuffer:u}),o(s)},9261:(t,e,r)=>{var n=r(2444),i=r(8986),a=r(8102),o=ArrayBuffer.prototype;n&&!("detached"in o)&&i(o,"detached",{configurable:!0,get:function(){return a(this)}})},6209:(t,e,r)=>{var n=r(5366),i=r(2116),a=r(3455),o=r(7226),s=r(7447),u=r(9002),c=r(5806),l=r(1365),h=o.ArrayBuffer,f=o.DataView,d=f.prototype,v=i(h.prototype.slice),p=i(d.getUint8),y=i(d.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(v&&void 0===e)return v(s(this),t);for(var r=s(this).byteLength,n=u(t,r),i=u(void 0===e?r:e,r),a=new(l(this,h))(c(i-n)),o=new f(this),d=new f(a),g=0;n{var n=r(5366),i=r(4676);i&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},3700:(t,e,r)=>{var n=r(5366),i=r(4676);i&&n({target:"ArrayBuffer",proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},6347:(t,e,r)=>{var n=r(5366),i=r(4165),a=r(7878),o=r(1211),s=r(1458);n({target:"Array",proto:!0},{at:function(t){var e=i(this),r=a(e),n=o(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}}),s("at")},3234:(t,e,r)=>{var n=r(5366),i=r(3455),a=r(5448),o=r(2674),s=r(4165),u=r(7878),c=r(9573),l=r(3552),h=r(1453),f=r(9077),d=r(5811),v=r(6415),p=d("isConcatSpreadable"),y=v>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),g=function(t){if(!o(t))return!1;var e=t[p];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,arity:1,forced:!y||!f("concat")},{concat:function(t){var e,r,n,i,a,o=s(this),f=h(o,0),d=0;for(e=-1,n=arguments.length;e{var n=r(5366),i=r(5645).filter;n({target:"Array",proto:!0,forced:!r(9077)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},4302:(t,e,r)=>{var n=r(5366),i=r(2851),a=r(4186),o=r(4165),s=r(7878),u=r(1453);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=o(this),n=s(r);return a(t),(e=u(r,0)).length=i(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},6746:(t,e,r)=>{var n=r(5366),i=r(3948);n({target:"Array",stat:!0,forced:!r(4348)((function(t){Array.from(t)}))},{from:i})},8551:(t,e,r)=>{var n=r(5366),i=r(7921).includes,a=r(3455),o=r(1458);n({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},3276:(t,e,r)=>{var n=r(5366),i=r(2116),a=r(7921).indexOf,o=r(1814),s=i([].indexOf),u=!!s&&1/s([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:a(this,t,e)}})},9024:(t,e,r)=>{var n=r(3637),i=r(1458),a=r(5597),o=r(8301),s=r(1601).f,u=r(656),c=r(9393),l=r(8507),h=r(2444),f="Array Iterator",d=o.set,v=o.getterFor(f);t.exports=u(Array,"Array",(function(t,e){d(this,{type:f,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,c(void 0,!0);switch(t.kind){case"keys":return c(r,!1);case"values":return c(e[r],!1)}return c([r,e[r]],!1)}),"values");var p=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&h&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(t){}},3177:(t,e,r)=>{var n=r(5366),i=r(3499);n({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},5550:(t,e,r)=>{var n=r(5366),i=r(5645).map;n({target:"Array",proto:!0,forced:!r(9077)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9138:(t,e,r)=>{var n=r(5366),i=r(4165),a=r(7878),o=r(7375),s=r(9573);n({target:"Array",proto:!0,arity:1,forced:r(3455)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),r=a(e),n=arguments.length;s(r+n);for(var u=0;u{var n=r(5366),i=r(4734).left,a=r(1814),o=r(6415);n({target:"Array",proto:!0,forced:!r(4529)&&o>79&&o<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},4413:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(5448),o=i([].reverse),s=[1,2];n({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},750:(t,e,r)=>{var n=r(5366),i=r(5448),a=r(8413),o=r(2674),s=r(9002),u=r(7878),c=r(3637),l=r(3552),h=r(5811),f=r(9077),d=r(4224),v=f("slice"),p=h("species"),y=Array,g=Math.max;n({target:"Array",proto:!0,forced:!v},{slice:function(t,e){var r,n,h,f=c(this),v=u(f),m=s(t,v),b=s(void 0===e?v:e,v);if(i(f)&&(r=f.constructor,(a(r)&&(r===y||i(r.prototype))||o(r)&&null===(r=r[p]))&&(r=void 0),r===y||void 0===r))return d(f,m,b);for(n=new(void 0===r?y:r)(g(b-m,0)),h=0;m{var n=r(5366),i=r(2608),a=r(4186),o=r(4165),s=r(7878),u=r(1870),c=r(687),l=r(3455),h=r(5272),f=r(1814),d=r(7085),v=r(5123),p=r(6415),y=r(1911),g=[],m=i(g.sort),b=i(g.push),w=l((function(){g.sort(void 0)})),k=l((function(){g.sort(null)})),x=f("sort"),A=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(v)return!0;if(y)return y<603;var t,e,r,n,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)g.push({k:e+n,v:r})}for(g.sort((function(t,e){return e.v-t.v})),n=0;nc(r)?1:-1}}(t)),r=s(i),n=0;n{var n=r(5366),i=r(4165),a=r(9002),o=r(1211),s=r(7878),u=r(7375),c=r(9573),l=r(1453),h=r(3552),f=r(1870),d=r(9077)("splice"),v=Math.max,p=Math.min;n({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var r,n,d,y,g,m,b=i(this),w=s(b),k=a(t,w),x=arguments.length;for(0===x?r=n=0:1===x?(r=0,n=w-k):(r=x-2,n=p(v(o(e),0),w-k)),c(w+r-n),d=l(b,n),y=0;yw-n+r;y--)f(b,y-1)}else if(r>n)for(y=w-n;y>k;y--)m=y+r-1,(g=y+n-1)in b?b[m]=b[g]:f(b,m);for(y=0;y{r(1458)("flatMap")},6851:(t,e,r)=>{var n=r(5366),i=r(3455),a=r(4165),o=r(8921);n({target:"Date",proto:!0,arity:1,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),r=o(e,"number");return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},7316:(t,e,r)=>{var n=r(9649),i=r(8552),a=r(952),o=r(5811)("toPrimitive"),s=Date.prototype;n(s,o)||i(s,o,a)},184:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3881),o=r(9257),s="WebAssembly",u=i[s],c=7!==new Error("e",{cause:7}).cause,l=function(t,e){var r={};r[t]=o(t,e,c),n({global:!0,constructor:!0,arity:1,forced:c},r)},h=function(t,e){if(u&&u[t]){var r={};r[t]=o(s+"."+t,e,c),n({target:s,stat:!0,constructor:!0,arity:1,forced:c},r)}};l("Error",(function(t){return function(e){return a(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return a(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return a(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return a(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return a(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return a(t,this,arguments)}})),l("URIError",(function(t){return function(e){return a(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return a(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return a(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return a(t,this,arguments)}}))},8169:(t,e,r)=>{var n=r(5366),i=r(4032);n({global:!0,forced:i.globalThis!==i},{globalThis:i})},9750:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(3881),o=r(3453),s=r(2608),u=r(3455),c=r(3749),l=r(2277),h=r(4224),f=r(213),d=r(6943),v=String,p=i("JSON","stringify"),y=s(/./.exec),g=s("".charAt),m=s("".charCodeAt),b=s("".replace),w=s(1..toString),k=/[\\uD800-\\uDFFF]/g,x=/^[\\uD800-\\uDBFF]$/,A=/^[\\uDC00-\\uDFFF]$/,_=!d||u((function(){var t=i("Symbol")("stringify detection");return"[null]"!==p([t])||"{}"!==p({a:t})||"{}"!==p(Object(t))})),E=u((function(){return'"\\\\udf06\\\\ud834"'!==p("\\udf06\\ud834")||'"\\\\udead"'!==p("\\udead")})),S=function(t,e){var r=h(arguments),n=f(e);if(c(n)||void 0!==t&&!l(t))return r[1]=function(t,e){if(c(n)&&(e=o(n,this,v(t),e)),!l(e))return e},a(p,null,r)},O=function(t,e,r){var n=g(r,e-1),i=g(r,e+1);return y(x,t)&&!y(A,i)||y(A,t)&&!y(x,n)?"\\\\u"+w(m(t,0),16):t};p&&n({target:"JSON",stat:!0,arity:3,forced:_||E},{stringify:function(t,e,r){var n=h(arguments),i=a(_?S:p,null,n);return E&&"string"==typeof i?b(i,k,O):i}})},7531:(t,e,r)=>{var n=r(4032);r(6911)(n.JSON,"JSON",!0)},6539:(t,e,r)=>{r(9556)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(2042))},1425:(t,e,r)=>{r(6539)},3821:(t,e,r)=>{var n=r(5366),i=Math.hypot,a=Math.abs,o=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,i=0,s=0,u=arguments.length,c=0;s0?(n=r/c)*n:r;return c===1/0?1/0:c*o(i)}})},1999:(t,e,r)=>{r(6911)(Math,"Math",!0)},8674:(t,e,r)=>{var n=r(5366),i=r(8885).entries;n({target:"Object",stat:!0},{entries:function(t){return i(t)}})},4129:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(3552);n({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,r){a(e,t,r)}),{AS_ENTRIES:!0}),e}})},702:(t,e,r)=>{var n=r(5366),i=r(2444),a=r(2919),o=r(3637),s=r(1139),u=r(3552);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,r,n=o(t),i=s.f,c=a(n),l={},h=0;c.length>h;)void 0!==(r=i(n,e=c[h++]))&&u(l,e,r);return l}})},1309:(t,e,r)=>{var n=r(5366),i=r(6943),a=r(3455),o=r(6005),s=r(4165);n({target:"Object",stat:!0,forced:!i||a((function(){o.f(1)}))},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(s(t)):[]}})},3379:(t,e,r)=>{var n=r(3724),i=r(8552),a=r(3003);n||i(Object.prototype,"toString",a,{unsafe:!0})},482:(t,e,r)=>{var n=r(5366),i=r(8885).values;n({target:"Object",stat:!0},{values:function(t){return i(t)}})},5204:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(9371),s=r(6703),u=r(1804);n({target:"Promise",stat:!0,forced:r(2041)},{allSettled:function(t){var e=this,r=o.f(e),n=r.resolve,c=r.reject,l=s((function(){var r=a(e.resolve),o=[],s=0,c=1;u(t,(function(t){var a=s++,u=!1;c++,i(r,e,t).then((function(t){u||(u=!0,o[a]={status:"fulfilled",value:t},--c||n(o))}),(function(t){u||(u=!0,o[a]={status:"rejected",reason:t},--c||n(o))}))})),--c||n(o)}));return l.error&&c(l.value),r.promise}})},6195:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(9371),s=r(6703),u=r(1804);n({target:"Promise",stat:!0,forced:r(2041)},{all:function(t){var e=this,r=o.f(e),n=r.resolve,c=r.reject,l=s((function(){var r=a(e.resolve),o=[],s=0,l=1;u(t,(function(t){var a=s++,u=!1;l++,i(r,e,t).then((function(t){u||(u=!0,o[a]=t,--l||n(o))}),c)})),--l||n(o)}));return l.error&&c(l.value),r.promise}})},1459:(t,e,r)=>{var n=r(5366),i=r(8507),a=r(9492).CONSTRUCTOR,o=r(5318),s=r(8711),u=r(3749),c=r(8552),l=o&&o.prototype;if(n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(t){return this.then(void 0,t)}}),!i&&u(o)){var h=s("Promise").prototype.catch;l.catch!==h&&c(l,"catch",h,{unsafe:!0})}},9236:(t,e,r)=>{var n,i,a,o=r(5366),s=r(8507),u=r(4529),c=r(4032),l=r(3453),h=r(8552),f=r(9415),d=r(6911),v=r(5409),p=r(4186),y=r(3749),g=r(2674),m=r(3399),b=r(1365),w=r(1369).set,k=r(755),x=r(4885),A=r(6703),_=r(3529),E=r(8301),S=r(5318),O=r(9492),T=r(9371),P="Promise",L=O.CONSTRUCTOR,M=O.REJECTION_EVENT,C=O.SUBCLASSING,j=E.getterFor(P),I=E.set,R=S&&S.prototype,F=S,D=R,N=c.TypeError,W=c.document,B=c.process,G=T.f,H=G,U=!!(W&&W.createEvent&&c.dispatchEvent),z="unhandledrejection",V=function(t){var e;return!(!g(t)||!y(e=t.then))&&e},q=function(t,e){var r,n,i,a=e.value,o=1===e.state,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,h=t.domain;try{s?(o||(2===e.rejection&&J(e),e.rejection=1),!0===s?r=a:(h&&h.enter(),r=s(a),h&&(h.exit(),i=!0)),r===t.promise?c(new N("Promise-chain cycle")):(n=V(r))?l(n,r,u,c):u(r)):c(a)}catch(t){h&&!i&&h.exit(),c(t)}},Y=function(t,e){t.notified||(t.notified=!0,k((function(){for(var r,n=t.reactions;r=n.get();)q(r,t);t.notified=!1,e&&!t.rejection&&K(t)})))},X=function(t,e,r){var n,i;U?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!M&&(i=c["on"+t])?i(n):t===z&&x("Unhandled promise rejection",r)},K=function(t){l(w,c,(function(){var e,r=t.facade,n=t.value;if(Q(t)&&(e=A((function(){u?B.emit("unhandledRejection",n,r):X(z,r,n)})),t.rejection=u||Q(t)?2:1,e.error))throw e.value}))},Q=function(t){return 1!==t.rejection&&!t.parent},J=function(t){l(w,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):X("rejectionhandled",e,t.value)}))},$=function(t,e,r){return function(n){t(e,n,r)}},Z=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Y(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new N("Promise can't be resolved itself");var n=V(e);n?k((function(){var r={done:!1};try{l(n,e,$(tt,r,t),$(Z,r,t))}catch(e){Z(r,e,t)}})):(t.value=e,t.state=1,Y(t,!1))}catch(e){Z({done:!1},e,t)}}};if(L&&(D=(F=function(t){m(this,D),p(t),l(n,this);var e=j(this);try{t($(tt,e),$(Z,e))}catch(t){Z(e,t)}}).prototype,(n=function(t){I(this,{type:P,done:!1,notified:!1,parent:!1,reactions:new _,rejection:!1,state:0,value:null})}).prototype=h(D,"then",(function(t,e){var r=j(this),n=G(b(this,F));return r.parent=!0,n.ok=!y(t)||t,n.fail=y(e)&&e,n.domain=u?B.domain:void 0,0===r.state?r.reactions.add(n):k((function(){q(n,r)})),n.promise})),i=function(){var t=new n,e=j(t);this.promise=t,this.resolve=$(tt,e),this.reject=$(Z,e)},T.f=G=function(t){return t===F||void 0===t?new i(t):H(t)},!s&&y(S)&&R!==Object.prototype)){a=R.then,C||h(R,"then",(function(t,e){var r=this;return new F((function(t,e){l(a,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete R.constructor}catch(t){}f&&f(R,D)}o({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:F}),d(F,P,!1,!0),v(P)},2431:(t,e,r)=>{var n=r(5366),i=r(8507),a=r(5318),o=r(3455),s=r(8711),u=r(3749),c=r(1365),l=r(1774),h=r(8552),f=a&&a.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),r=u(t);return this.then(r?function(r){return l(e,t()).then((function(){return r}))}:t,r?function(r){return l(e,t()).then((function(){throw r}))}:t)}}),!i&&u(a)){var d=s("Promise").prototype.finally;f.finally!==d&&h(f,"finally",d,{unsafe:!0})}},1234:(t,e,r)=>{r(9236),r(6195),r(1459),r(5167),r(5257),r(1128)},5167:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(9371),s=r(6703),u=r(1804);n({target:"Promise",stat:!0,forced:r(2041)},{race:function(t){var e=this,r=o.f(e),n=r.reject,c=s((function(){var o=a(e.resolve);u(t,(function(t){i(o,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},5257:(t,e,r)=>{var n=r(5366),i=r(9371);n({target:"Promise",stat:!0,forced:r(9492).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return(0,e.reject)(t),e.promise}})},1128:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(8507),o=r(5318),s=r(9492).CONSTRUCTOR,u=r(1774),c=i("Promise"),l=a&&!s;n({target:"Promise",stat:!0,forced:a||s},{resolve:function(t){return u(l&&this===c?o:this,t)}})},9732:(t,e,r)=>{var n=r(5366),i=r(9371);n({target:"Promise",stat:!0},{withResolvers:function(){var t=i.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})},489:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(3881),o=r(2230),s=r(9052),u=r(7447),c=r(2674),l=r(5304),h=r(3455),f=i("Reflect","construct"),d=Object.prototype,v=[].push,p=h((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),y=!h((function(){f((function(){}))})),g=p||y;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){s(t),u(e);var r=arguments.length<3?t:s(arguments[2]);if(y&&!p)return f(t,e,r);if(t===r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return a(v,n,e),new(a(o,t,n))}var i=r.prototype,h=l(c(i)?i:d),g=a(t,h,e);return c(g)?g:h}})},7288:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(2674),o=r(7447),s=r(3007),u=r(1139),c=r(2611);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,h=arguments.length<3?e:arguments[2];return o(e)===h?e[r]:(n=u.f(e,r))?s(n)?n.value:void 0===n.get?void 0:i(n.get,h):a(l=c(e))?t(l,r,h):void 0}})},176:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(6911);n({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},4592:(t,e,r)=>{var n=r(2444),i=r(4032),a=r(2608),o=r(5868),s=r(3951),u=r(139),c=r(5304),l=r(3408).f,h=r(6921),f=r(6484),d=r(687),v=r(4554),p=r(1837),y=r(2848),g=r(8552),m=r(3455),b=r(9649),w=r(8301).enforce,k=r(5409),x=r(5811),A=r(3651),_=r(9502),E=x("match"),S=i.RegExp,O=S.prototype,T=i.SyntaxError,P=a(O.exec),L=a("".charAt),M=a("".replace),C=a("".indexOf),j=a("".slice),I=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,R=/a/g,F=/a/g,D=new S(R)!==R,N=p.MISSED_STICKY,W=p.UNSUPPORTED_Y;if(o("RegExp",n&&(!D||N||A||_||m((function(){return F[E]=!1,S(R)!==R||S(F)===F||"/a/i"!==String(S(R,"i"))}))))){for(var B=function(t,e){var r,n,i,a,o,l,p=h(O,this),y=f(t),g=void 0===e,m=[],k=t;if(!p&&y&&g&&t.constructor===B)return t;if((y||h(O,t))&&(t=t.source,g&&(e=v(k))),t=void 0===t?"":d(t),e=void 0===e?"":d(e),k=t,A&&"dotAll"in R&&(n=!!e&&C(e,"s")>-1)&&(e=M(e,/s/g,"")),r=e,N&&"sticky"in R&&(i=!!e&&C(e,"y")>-1)&&W&&(e=M(e,/y/g,"")),_&&(a=function(t){for(var e,r=t.length,n=0,i="",a=[],o=c(null),s=!1,u=!1,l=0,h="";n<=r;n++){if("\\\\"===(e=L(t,n)))e+=L(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:if(i+=e,"?:"===j(t,n+1,n+3))continue;P(I,j(t,n+1))&&(n+=2,u=!0),l++;continue;case">"===e&&u:if(""===h||b(o,h))throw new T("Invalid capture group name");o[h]=!0,a[a.length]=[h,l],u=!1,h="";continue}u?h+=e:i+=e}return[i,a]}(t),t=a[0],m=a[1]),o=s(S(t,e),p?this:O,B),(n||i||m.length)&&(l=w(o),n&&(l.dotAll=!0,l.raw=B(function(t){for(var e,r=t.length,n=0,i="",a=!1;n<=r;n++)"\\\\"!==(e=L(t,n))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\\\s\\\\S]":i+=e+L(t,++n);return i}(t),r)),i&&(l.sticky=!0),m.length&&(l.groups=m)),t!==k)try{u(o,"source",""===k?"(?:)":k)}catch(t){}return o},G=l(S),H=0;G.length>H;)y(B,S,G[H++]);O.constructor=B,B.prototype=O,g(i,"RegExp",B,{constructor:!0})}k("RegExp")},8345:(t,e,r)=>{var n=r(2444),i=r(3651),a=r(9872),o=r(8986),s=r(8301).get,u=RegExp.prototype,c=TypeError;n&&i&&o(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},2823:(t,e,r)=>{var n=r(5366),i=r(9867);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2865:(t,e,r)=>{var n=r(2444),i=r(1837).MISSED_STICKY,a=r(9872),o=r(8986),s=r(8301).get,u=RegExp.prototype,c=TypeError;n&&i&&o(u,"sticky",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},5594:(t,e,r)=>{r(2823);var n,i,a=r(5366),o=r(3453),s=r(3749),u=r(7447),c=r(687),l=(n=!1,(i=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&n),h=/./.test;a({target:"RegExp",proto:!0,forced:!l},{test:function(t){var e=u(this),r=c(t),n=e.exec;if(!s(n))return o(h,e,r);var i=o(n,e,r);return null!==i&&(u(i),!0)}})},8397:(t,e,r)=>{var n=r(2542).PROPER,i=r(8552),a=r(7447),o=r(687),s=r(3455),u=r(4554),c="toString",l=RegExp.prototype,h=l[c],f=s((function(){return"/a/b"!==h.call({source:"a",flags:"b"})})),d=n&&h.name!==c;(f||d)&&i(l,c,(function(){var t=a(this);return"/"+o(t.source)+"/"+o(u(t))}),{unsafe:!0})},4645:(t,e,r)=>{r(9556)("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(2042))},5130:(t,e,r)=>{var n=r(5366),i=r(4656);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("difference")},{difference:i})},5636:(t,e,r)=>{var n=r(5366),i=r(3455),a=r(2446);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("intersection")||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:a})},8509:(t,e,r)=>{var n=r(5366),i=r(4545);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("isDisjointFrom")},{isDisjointFrom:i})},7332:(t,e,r)=>{var n=r(5366),i=r(7918);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSubsetOf")},{isSubsetOf:i})},6555:(t,e,r)=>{var n=r(5366),i=r(6111);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("isSupersetOf")},{isSupersetOf:i})},9255:(t,e,r)=>{r(4645)},3296:(t,e,r)=>{var n=r(5366),i=r(4498);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("symmetricDifference")},{symmetricDifference:i})},4594:(t,e,r)=>{var n=r(5366),i=r(9500);n({target:"Set",proto:!0,real:!0,forced:!r(1716)("union")},{union:i})},8653:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(7222),o=r(1211),s=r(687),u=r(3455),c=i("".charAt);n({target:"String",proto:!0,forced:u((function(){return"\\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=s(a(this)),r=e.length,n=o(t),i=n>=0?n:r+n;return i<0||i>=r?void 0:c(e,i)}})},9657:(t,e,r)=>{var n,i=r(5366),a=r(2116),o=r(1139).f,s=r(5806),u=r(687),c=r(3631),l=r(7222),h=r(860),f=r(8507),d=a("".slice),v=Math.min,p=h("endsWith");i({target:"String",proto:!0,forced:!(!f&&!p&&(n=o(String.prototype,"endsWith"),n&&!n.writable)||p)},{endsWith:function(t){var e=u(l(this));c(t);var r=arguments.length>1?arguments[1]:void 0,n=e.length,i=void 0===r?n:v(s(r),n),a=u(t);return d(e,i-a.length,i)===a}})},2217:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(9002),o=RangeError,s=String.fromCharCode,u=String.fromCodePoint,c=i([].join);n({target:"String",stat:!0,arity:1,forced:!!u&&1!==u.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,i=0;n>i;){if(e=+arguments[i++],a(e,1114111)!==e)throw new o(e+" is not a valid code point");r[i]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return c(r,"")}})},2467:(t,e,r)=>{var n=r(5366),i=r(2608),a=r(3631),o=r(7222),s=r(687),u=r(860),c=i("".indexOf);n({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(o(this)),s(a(t)),arguments.length>1?arguments[1]:void 0)}})},7460:(t,e,r)=>{var n=r(6903).charAt,i=r(687),a=r(8301),o=r(656),s=r(9393),u="String Iterator",c=a.set,l=a.getterFor(u);o(String,"String",(function(t){c(this,{type:u,string:i(t),index:0})}),(function(){var t,e=l(this),r=e.string,i=e.index;return i>=r.length?s(void 0,!0):(t=n(r,i),e.index+=t.length,s(t,!1))}))},1281:(t,e,r)=>{var n=r(3453),i=r(4364),a=r(7447),o=r(6021),s=r(5806),u=r(687),c=r(7222),l=r(8622),h=r(8149),f=r(4410);i("match",(function(t,e,r){return[function(e){var r=c(this),i=o(e)?void 0:l(e,t);return i?n(i,e,r):new RegExp(e)[t](u(r))},function(t){var n=a(this),i=u(t),o=r(e,n,i);if(o.done)return o.value;if(!n.global)return f(n,i);var c=n.unicode;n.lastIndex=0;for(var l,d=[],v=0;null!==(l=f(n,i));){var p=u(l[0]);d[v]=p,""===p&&(n.lastIndex=h(i,s(n.lastIndex),c)),v++}return 0===v?null:d}]}))},4853:(t,e,r)=>{var n=r(5366),i=r(6437).end;n({target:"String",proto:!0,forced:r(4903)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},9484:(t,e,r)=>{var n=r(5366),i=r(6437).start;n({target:"String",proto:!0,forced:r(4903)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},6794:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(2608),o=r(7222),s=r(3749),u=r(6021),c=r(6484),l=r(687),h=r(8622),f=r(4554),d=r(3966),v=r(5811),p=r(8507),y=v("replace"),g=TypeError,m=a("".indexOf),b=a("".replace),w=a("".slice),k=Math.max;n({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,a,v,x,A,_,E,S,O,T=o(this),P=0,L="";if(!u(t)){if((r=c(t))&&(n=l(o(f(t))),!~m(n,"g")))throw new g("\`.replaceAll\` does not allow non-global regexes");if(a=h(t,y))return i(a,t,T,e);if(p&&r)return b(l(T),t,e)}for(v=l(T),x=l(t),(A=s(e))||(e=l(e)),_=x.length,E=k(1,_),S=m(v,x);-1!==S;)O=A?l(e(x,S,v)):d(x,v,S,[],void 0,e),L+=w(v,P,S)+O,P=S+_,S=S+E>v.length?-1:m(v,x,S+E);return P{var n=r(3881),i=r(3453),a=r(2608),o=r(4364),s=r(3455),u=r(7447),c=r(3749),l=r(6021),h=r(1211),f=r(5806),d=r(687),v=r(7222),p=r(8149),y=r(8622),g=r(3966),m=r(4410),b=r(5811)("replace"),w=Math.max,k=Math.min,x=a([].concat),A=a([].push),_=a("".indexOf),E=a("".slice),S="$0"==="a".replace(/./,"$0"),O=!!/./[b]&&""===/./[b]("a","$0");o("replace",(function(t,e,r){var a=O?"$":"$0";return[function(t,r){var n=v(this),a=l(t)?void 0:y(t,b);return a?i(a,t,n,r):i(e,d(n),t,r)},function(t,i){var o=u(this),s=d(t);if("string"==typeof i&&-1===_(i,a)&&-1===_(i,"$<")){var l=r(e,o,s,i);if(l.done)return l.value}var v=c(i);v||(i=d(i));var y,b=o.global;b&&(y=o.unicode,o.lastIndex=0);for(var S,O=[];null!==(S=m(o,s))&&(A(O,S),b);)""===d(S[0])&&(o.lastIndex=p(s,f(o.lastIndex),y));for(var T,P="",L=0,M=0;M=L&&(P+=E(s,L,I)+C,L=I+j.length)}return P+E(s,L)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!S||O)},4072:(t,e,r)=>{var n=r(3453),i=r(2608),a=r(4364),o=r(7447),s=r(6021),u=r(7222),c=r(1365),l=r(8149),h=r(5806),f=r(687),d=r(8622),v=r(4410),p=r(1837),y=r(3455),g=p.UNSUPPORTED_Y,m=Math.min,b=i([].push),w=i("".slice),k=!y((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),x="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;a("split",(function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:n(e,this,t,r)}:e;return[function(e,r){var a=u(this),o=s(e)?void 0:d(e,t);return o?n(o,e,a,r):n(i,f(a),e,r)},function(t,n){var a=o(this),s=f(t);if(!x){var u=r(i,a,s,n,i!==e);if(u.done)return u.value}var d=c(a,RegExp),p=a.unicode,y=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(g?"g":"y"),k=new d(g?"^(?:"+a.source+")":a,y),A=void 0===n?4294967295:n>>>0;if(0===A)return[];if(0===s.length)return null===v(k,s)?[s]:[];for(var _=0,E=0,S=[];E{var n,i=r(5366),a=r(2116),o=r(1139).f,s=r(5806),u=r(687),c=r(3631),l=r(7222),h=r(860),f=r(8507),d=a("".slice),v=Math.min,p=h("startsWith");i({target:"String",proto:!0,forced:!(!f&&!p&&(n=o(String.prototype,"startsWith"),n&&!n.writable)||p)},{startsWith:function(t){var e=u(l(this));c(t);var r=s(v(arguments.length>1?arguments[1]:void 0,e.length)),n=u(t);return d(e,r,r+n.length)===n}})},98:(t,e,r)=>{r(3185);var n=r(5366),i=r(2882);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},3185:(t,e,r)=>{var n=r(5366),i=r(2882);n({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},9210:(t,e,r)=>{var n=r(5366),i=r(9418).trim;n({target:"String",proto:!0,forced:r(3794)("trim")},{trim:function(){return i(this)}})},4172:(t,e,r)=>{r(5343)("asyncIterator")},2873:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3453),o=r(2608),s=r(8507),u=r(2444),c=r(6943),l=r(3455),h=r(9649),f=r(6921),d=r(7447),v=r(3637),p=r(6201),y=r(687),g=r(4004),m=r(5304),b=r(496),w=r(3408),k=r(6442),x=r(6005),A=r(1139),_=r(1601),E=r(9217),S=r(9221),O=r(8552),T=r(8986),P=r(4593),L=r(2343),M=r(2645),C=r(5936),j=r(5811),I=r(4559),R=r(5343),F=r(3042),D=r(6911),N=r(8301),W=r(5645).forEach,B=L("hidden"),G="Symbol",H="prototype",U=N.set,z=N.getterFor(G),V=Object[H],q=i.Symbol,Y=q&&q[H],X=i.RangeError,K=i.TypeError,Q=i.QObject,J=A.f,$=_.f,Z=k.f,tt=S.f,et=o([].push),rt=P("symbols"),nt=P("op-symbols"),it=P("wks"),at=!Q||!Q[H]||!Q[H].findChild,ot=function(t,e,r){var n=J(V,e);n&&delete V[e],$(t,e,r),n&&t!==V&&$(V,e,n)},st=u&&l((function(){return 7!==m($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?ot:$,ut=function(t,e){var r=rt[t]=m(Y);return U(r,{type:G,tag:t,description:e}),u||(r.description=e),r},ct=function(t,e,r){t===V&&ct(nt,e,r),d(t);var n=p(e);return d(r),h(rt,n)?(r.enumerable?(h(t,B)&&t[B][n]&&(t[B][n]=!1),r=m(r,{enumerable:g(0,!1)})):(h(t,B)||$(t,B,g(1,m(null))),t[B][n]=!0),st(t,n,r)):$(t,n,r)},lt=function(t,e){d(t);var r=v(e),n=b(r).concat(vt(r));return W(n,(function(e){u&&!a(ht,r,e)||ct(t,e,r[e])})),t},ht=function(t){var e=p(t),r=a(tt,this,e);return!(this===V&&h(rt,e)&&!h(nt,e))&&(!(r||!h(this,e)||!h(rt,e)||h(this,B)&&this[B][e])||r)},ft=function(t,e){var r=v(t),n=p(e);if(r!==V||!h(rt,n)||h(nt,n)){var i=J(r,n);return!i||!h(rt,n)||h(r,B)&&r[B][n]||(i.enumerable=!0),i}},dt=function(t){var e=Z(v(t)),r=[];return W(e,(function(t){h(rt,t)||h(M,t)||et(r,t)})),r},vt=function(t){var e=t===V,r=Z(e?nt:v(t)),n=[];return W(r,(function(t){!h(rt,t)||e&&!h(V,t)||et(n,rt[t])})),n};c||(O(Y=(q=function(){if(f(Y,this))throw new K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=C(t),r=function(t){var n=void 0===this?i:this;n===V&&a(r,nt,t),h(n,B)&&h(n[B],e)&&(n[B][e]=!1);var o=g(1,t);try{st(n,e,o)}catch(t){if(!(t instanceof X))throw t;ot(n,e,o)}};return u&&at&&st(V,e,{configurable:!0,set:r}),ut(e,t)})[H],"toString",(function(){return z(this).tag})),O(q,"withoutSetter",(function(t){return ut(C(t),t)})),S.f=ht,_.f=ct,E.f=lt,A.f=ft,w.f=k.f=dt,x.f=vt,I.f=function(t){return ut(j(t),t)},u&&(T(Y,"description",{configurable:!0,get:function(){return z(this).description}}),s||O(V,"propertyIsEnumerable",ht,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:q}),W(b(it),(function(t){R(t)})),n({target:G,stat:!0,forced:!c},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),n({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?m(t):lt(m(t),e)},defineProperty:ct,defineProperties:lt,getOwnPropertyDescriptor:ft}),n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:dt}),F(),D(q,G),M[B]=!0},4551:(t,e,r)=>{var n=r(5366),i=r(2444),a=r(4032),o=r(2608),s=r(9649),u=r(3749),c=r(6921),l=r(687),h=r(8986),f=r(2924),d=a.Symbol,v=d&&d.prototype;if(i&&u(d)&&(!("description"in v)||void 0!==d().description)){var p={},y=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=c(v,this)?new d(t):void 0===t?d():d(t);return""===t&&(p[e]=!0),e};f(y,d),y.prototype=v,v.constructor=y;var g="Symbol(description detection)"===String(d("description detection")),m=o(v.valueOf),b=o(v.toString),w=/^Symbol\\((.*)\\)[^)]+$/,k=o("".replace),x=o("".slice);h(v,"description",{configurable:!0,get:function(){var t=m(this);if(s(p,t))return"";var e=b(t),r=g?x(e,7,-1):k(e,w,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:y})}},4182:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(9649),o=r(687),s=r(4593),u=r(8592),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=o(t);if(a(c,e))return c[e];var r=i("Symbol")(e);return c[e]=r,l[r]=e,r}})},7651:(t,e,r)=>{r(2873),r(4182),r(7876),r(9750),r(1309)},7876:(t,e,r)=>{var n=r(5366),i=r(9649),a=r(2277),o=r(8055),s=r(4593),u=r(8592),c=s("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!a(t))throw new TypeError(o(t)+" is not a symbol");if(i(c,t))return c[t]}})},5268:(t,e,r)=>{var n=r(5343),i=r(3042);n("toPrimitive"),i()},5997:(t,e,r)=>{var n=r(8711),i=r(5343),a=r(6911);i("toStringTag"),a(n("Symbol"),"Symbol")},3740:(t,e,r)=>{var n=r(4356),i=r(7878),a=r(1211),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("at",(function(t){var e=o(this),r=i(e),n=a(t),s=n>=0?n:r+n;return s<0||s>=r?void 0:e[s]}))},6542:(t,e,r)=>{var n=r(2608),i=r(4356),a=n(r(6677)),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("copyWithin",(function(t,e){return a(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},5738:(t,e,r)=>{var n=r(4356),i=r(5645).every,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},2900:(t,e,r)=>{var n=r(4356),i=r(9557),a=r(1198),o=r(1179),s=r(3453),u=r(2608),c=r(3455),l=n.aTypedArray,h=n.exportTypedArrayMethod,f=u("".slice);h("fill",(function(t){var e=arguments.length;l(this);var r="Big"===f(o(this),0,3)?a(t):+t;return s(i,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},2051:(t,e,r)=>{var n=r(4356),i=r(5645).filter,a=r(85),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},4211:(t,e,r)=>{var n=r(4356),i=r(5645).findIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},5294:(t,e,r)=>{var n=r(4356),i=r(767).findLastIndex,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},9791:(t,e,r)=>{var n=r(4356),i=r(767).findLast,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},3198:(t,e,r)=>{var n=r(4356),i=r(5645).find,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},4306:(t,e,r)=>{r(8975)("Float32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},6473:(t,e,r)=>{r(8975)("Float64",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},1526:(t,e,r)=>{var n=r(4356),i=r(5645).forEach,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(t){i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},6032:(t,e,r)=>{var n=r(4356),i=r(7921).includes,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},3659:(t,e,r)=>{var n=r(4356),i=r(7921).indexOf,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},1237:(t,e,r)=>{r(8975)("Int32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},932:(t,e,r)=>{var n=r(4032),i=r(3455),a=r(2608),o=r(4356),s=r(9024),u=r(5811)("iterator"),c=n.Uint8Array,l=a(s.values),h=a(s.keys),f=a(s.entries),d=o.aTypedArray,v=o.exportTypedArrayMethod,p=c&&c.prototype,y=!i((function(){p[u].call([1])})),g=!!p&&p.values&&p[u]===p.values&&"values"===p.values.name,m=function(){return l(d(this))};v("entries",(function(){return f(d(this))}),y),v("keys",(function(){return h(d(this))}),y),v("values",m,y||!g,{name:"values"}),v(u,m,y||!g,{name:"values"})},8553:(t,e,r)=>{var n=r(4356),i=r(2608),a=n.aTypedArray,o=n.exportTypedArrayMethod,s=i([].join);o("join",(function(t){return s(a(this),t)}))},7612:(t,e,r)=>{var n=r(4356),i=r(3881),a=r(3499),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return i(a,o(this),e>1?[t,arguments[1]]:[t])}))},8579:(t,e,r)=>{var n=r(4356),i=r(5645).map,a=r(580),o=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},7576:(t,e,r)=>{var n=r(4356),i=r(4734).right,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},7719:(t,e,r)=>{var n=r(4356),i=r(4734).left,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return i(a(this),t,e,e>1?arguments[1]:void 0)}))},2891:(t,e,r)=>{var n=r(4356),i=n.aTypedArray,a=n.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,r=i(e).length,n=o(r/2),a=0;a{var n=r(4032),i=r(3453),a=r(4356),o=r(7878),s=r(8402),u=r(4165),c=r(3455),l=n.RangeError,h=n.Int8Array,f=h&&h.prototype,d=f&&f.set,v=a.aTypedArray,p=a.exportTypedArrayMethod,y=!c((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),g=y&&a.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));p("set",(function(t){v(this);var e=s(arguments.length>1?arguments[1]:void 0,1),r=u(t);if(y)return i(d,this,r,e);var n=this.length,a=o(r),c=0;if(a+e>n)throw new l("Wrong length");for(;c{var n=r(4356),i=r(580),a=r(3455),o=r(4224),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(t,e){for(var r=o(s(this),t,e),n=i(this),a=0,u=r.length,c=new n(u);u>a;)c[a]=r[a++];return c}),a((function(){new Int8Array(1).slice()})))},9637:(t,e,r)=>{var n=r(4356),i=r(5645).some,a=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},2709:(t,e,r)=>{var n=r(4032),i=r(2116),a=r(3455),o=r(4186),s=r(5272),u=r(4356),c=r(7085),l=r(5123),h=r(6415),f=r(1911),d=u.aTypedArray,v=u.exportTypedArrayMethod,p=n.Uint16Array,y=p&&i(p.prototype.sort),g=!(!y||a((function(){y(new p(2),null)}))&&a((function(){y(new p(2),{})}))),m=!!y&&!a((function(){if(h)return h<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var t,e,r=new p(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(y(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));v("sort",(function(t){return void 0!==t&&o(t),m?y(this,t):s(d(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!m||g)},8941:(t,e,r)=>{var n=r(4032),i=r(3881),a=r(4356),o=r(3455),s=r(4224),u=n.Int8Array,c=a.aTypedArray,l=a.exportTypedArrayMethod,h=[].toLocaleString,f=!!u&&o((function(){h.call(new u(1))}));l("toLocaleString",(function(){return i(h,f?s(c(this)):c(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!==new u([1,2]).toLocaleString()}))||!o((function(){u.prototype.toLocaleString.call([1,2])})))},1579:(t,e,r)=>{var n=r(6444),i=r(4356),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=i.getTypedArrayConstructor;o("toReversed",(function(){return n(a(this),s(this))}))},6236:(t,e,r)=>{var n=r(4356),i=r(2608),a=r(4186),o=r(7434),s=n.aTypedArray,u=n.getTypedArrayConstructor,c=n.exportTypedArrayMethod,l=i(n.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),r=o(u(e),e);return l(r,t)}))},7716:(t,e,r)=>{var n=r(4356).exportTypedArrayMethod,i=r(3455),a=r(4032),o=r(2608),s=a.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=o([].join);i((function(){c.call({})}))&&(c=function(){return l(this)});var h=u.toString!==c;n("toString",c,h)},2044:(t,e,r)=>{r(8975)("Uint32",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},7329:(t,e,r)=>{r(8975)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},1913:(t,e,r)=>{var n=r(920),i=r(4356),a=r(5415),o=r(1211),s=r(1198),u=i.aTypedArray,c=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var r=u(this),i=o(t),l=a(r)?s(e):+e;return n(r,c(r),i,l)}}.with,!h)},6722:(t,e,r)=>{var n,i=r(568),a=r(4032),o=r(2608),s=r(4183),u=r(5227),c=r(9556),l=r(8153),h=r(2674),f=r(8301).enforce,d=r(3455),v=r(6206),p=Object,y=Array.isArray,g=p.isExtensible,m=p.isFrozen,b=p.isSealed,w=p.freeze,k=p.seal,x=!a.ActiveXObject&&"ActiveXObject"in a,A=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},_=c("WeakMap",A,l),E=_.prototype,S=o(E.set);if(v)if(x){n=l.getConstructor(A,"WeakMap",!0),u.enable();var O=o(E.delete),T=o(E.has),P=o(E.get);s(E,{delete:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),O(this,t)||e.frozen.delete(t)}return O(this,t)},has:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),T(this,t)||e.frozen.has(t)}return T(this,t)},get:function(t){if(h(t)&&!g(t)){var e=f(this);return e.frozen||(e.frozen=new n),T(this,t)?P(this,t):e.frozen.get(t)}return P(this,t)},set:function(t,e){if(h(t)&&!g(t)){var r=f(this);r.frozen||(r.frozen=new n),T(this,t)?S(this,t,e):r.frozen.set(t,e)}else S(this,t,e);return this}})}else i&&d((function(){var t=w([]);return S(new _,t,1),!m(t)}))&&s(E,{set:function(t,e){var r;return y(t)&&(m(t)?r=w:b(t)&&(r=k)),S(this,t,e),r&&r(t),this}})},8492:(t,e,r)=>{r(6722)},1176:(t,e,r)=>{r(9556)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(8153))},7121:(t,e,r)=>{r(1176)},4192:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(3399),o=r(7447),s=r(3749),u=r(2611),c=r(8986),l=r(3552),h=r(3455),f=r(9649),d=r(5811),v=r(2857).IteratorPrototype,p=r(2444),y=r(8507),g="constructor",m="Iterator",b=d("toStringTag"),w=TypeError,k=i[m],x=y||!s(k)||k.prototype!==v||!h((function(){k({})})),A=function(){if(a(this,v),u(this)===v)throw new w("Abstract class Iterator not directly constructable")},_=function(t,e){p?c(v,t,{configurable:!0,get:function(){return e},set:function(e){if(o(this),this===v)throw new w("You can't redefine this property");f(this,t)?this[t]=e:l(this,t,e)}}):v[t]=e};f(v,b)||_(b,m),!x&&f(v,g)&&v[g]!==Object||_(g,A),A.prototype=v,n({global:!0,constructor:!0,forced:x},{Iterator:A})},7895:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(7447),o=r(3447),s=r(821),u=r(5590),c=r(2342),l=r(8507),h=c((function(){for(var t,e=this.iterator,r=this.next;this.remaining;)if(this.remaining--,t=a(i(r,e)),this.done=!!t.done)return;if(t=a(i(r,e)),!(this.done=!!t.done))return t.value}));n({target:"Iterator",proto:!0,real:!0,forced:l},{drop:function(t){a(this);var e=u(s(+t));return new h(o(this),{remaining:e})}})},463:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(4186),o=r(7447),s=r(3447);n({target:"Iterator",proto:!0,real:!0},{every:function(t){o(this),a(t);var e=s(this),r=0;return!i(e,(function(e,n){if(!t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},8856:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(7447),s=r(3447),u=r(2342),c=r(3535),l=r(8507),h=u((function(){for(var t,e,r=this.iterator,n=this.predicate,a=this.next;;){if(t=o(i(a,r)),this.done=!!t.done)return;if(e=t.value,c(r,n,[e,this.counter++],!0))return e}}));n({target:"Iterator",proto:!0,real:!0,forced:l},{filter:function(t){return o(this),a(t),new h(s(this),{predicate:t})}})},9166:(t,e,r)=>{var n=r(5366),i=r(3453),a=r(4186),o=r(7447),s=r(3447),u=r(1750),c=r(2342),l=r(5235),h=r(8507),f=c((function(){for(var t,e,r=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=o(i(e.next,e.iterator))).done)return t.value;this.inner=null}catch(t){l(r,"throw",t)}if(t=o(i(this.next,r)),this.done=!!t.done)return;try{this.inner=u(n(t.value,this.counter++),!1)}catch(t){l(r,"throw",t)}}}));n({target:"Iterator",proto:!0,real:!0,forced:h},{flatMap:function(t){return o(this),a(t),new f(s(this),{mapper:t,inner:null})}})},1565:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(4186),o=r(7447),s=r(3447);n({target:"Iterator",proto:!0,real:!0},{forEach:function(t){o(this),a(t);var e=s(this),r=0;i(e,(function(e){t(e,r++)}),{IS_RECORD:!0})}})},5342:(t,e,r)=>{var n=r(5366),i=r(4009);n({target:"Iterator",proto:!0,real:!0,forced:r(8507)},{map:i})},9582:(t,e,r)=>{var n=r(5366),i=r(1804),a=r(4186),o=r(7447),s=r(3447);n({target:"Iterator",proto:!0,real:!0},{some:function(t){o(this),a(t);var e=s(this),r=0;return i(e,(function(e,n){if(t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},31:(t,e,r)=>{var n=r(5366),i=r(2444),a=r(4032),o=r(8711),s=r(2608),u=r(3453),c=r(3749),l=r(2674),h=r(5448),f=r(9649),d=r(687),v=r(7878),p=r(3552),y=r(3455),g=r(1448),m=r(6943),b=a.JSON,w=a.Number,k=a.SyntaxError,x=b&&b.parse,A=o("Object","keys"),_=Object.getOwnPropertyDescriptor,E=s("".charAt),S=s("".slice),O=s(/./.exec),T=s([].push),P=/^\\d$/,L=/^[1-9]$/,M=/^[\\d-]$/,C=/^[\\t\\n\\r ]$/,j=function(t,e,r,n){var i,a,o,s,c,d=t[e],p=n&&d===n.value,y=p&&"string"==typeof n.source?{source:n.source}:{};if(l(d)){var g=h(d),m=p?n.nodes:g?[]:{};if(g)for(i=m.length,o=v(d),s=0;s{var n=r(5366),i=r(4032),a=r(8711),o=r(2608),s=r(3453),u=r(3455),c=r(687),l=r(7900),h=r(2996).c2i,f=/[^\\d+/a-z]/i,d=/[\\t\\n\\f\\r ]+/g,v=/[=]{1,2}$/,p=a("atob"),y=String.fromCharCode,g=o("".charAt),m=o("".replace),b=o(f.exec),w=!!p&&!u((function(){return"hi"!==p("aGk=")})),k=w&&u((function(){return""!==p(" ")})),x=w&&!u((function(){p("a")})),A=w&&!u((function(){p()})),_=w&&1!==p.length;n({global:!0,bind:!0,enumerable:!0,forced:!w||k||x||A||_},{atob:function(t){if(l(arguments.length,1),w&&!k&&!x)return s(p,i,t);var e,r,n,o=m(c(t),d,""),u="",A=0,_=0;if(o.length%4==0&&(o=m(o,v,"")),(e=o.length)%4==1||b(f,o))throw new(a("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;A>(-2*_&6)));return u}})},8316:(t,e,r)=>{var n=r(4032),i=r(2760),a=r(4784),o=r(3147),s=r(139),u=function(t){if(t&&t.forEach!==o)try{s(t,"forEach",o)}catch(e){t.forEach=o}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(a)},3577:(t,e,r)=>{var n=r(4032),i=r(2760),a=r(4784),o=r(9024),s=r(139),u=r(6911),c=r(5811)("iterator"),l=o.values,h=function(t,e){if(t){if(t[c]!==l)try{s(t,c,l)}catch(e){t[c]=l}if(u(t,e,!0),i[e])for(var r in o)if(t[r]!==o[r])try{s(t,r,o[r])}catch(e){t[r]=o[r]}}};for(var f in i)h(n[f]&&n[f].prototype,f);h(a,"DOMTokenList")},4967:(t,e,r)=>{var n=r(5366),i=r(8711),a=r(9685),o=r(3455),s=r(5304),u=r(4004),c=r(1601).f,l=r(8552),h=r(8986),f=r(9649),d=r(3399),v=r(7447),p=r(2912),y=r(8363),g=r(4090),m=r(3633),b=r(8301),w=r(2444),k=r(8507),x="DOMException",A="DATA_CLONE_ERR",_=i("Error"),E=i(x)||function(){try{(new(i("MessageChannel")||a("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===A&&25===t.code)return t.constructor}}(),S=E&&E.prototype,O=_.prototype,T=b.set,P=b.getterFor(x),L="stack"in new _(x),M=function(t){return f(g,t)&&g[t].m?g[t].c:0},C=function(){d(this,j);var t=arguments.length,e=y(t<1?void 0:arguments[0]),r=y(t<2?void 0:arguments[1],"Error"),n=M(r);if(T(this,{type:x,name:r,message:e,code:n}),w||(this.name=r,this.message=e,this.code=n),L){var i=new _(e);i.name=x,c(this,"stack",u(1,m(i.stack,1)))}},j=C.prototype=s(O),I=function(t){return{enumerable:!0,configurable:!0,get:t}},R=function(t){return I((function(){return P(this)[t]}))};w&&(h(j,"code",R("code")),h(j,"message",R("message")),h(j,"name",R("name"))),c(j,"constructor",u(1,C));var F=o((function(){return!(new E instanceof _)})),D=F||o((function(){return O.toString!==p||"2: 1"!==String(new E(1,2))})),N=F||o((function(){return 25!==new E(1,"DataCloneError").code})),W=F||25!==E[A]||25!==S[A],B=k?D||N||W:F;n({global:!0,constructor:!0,forced:B},{DOMException:B?C:E});var G=i(x),H=G.prototype;for(var U in D&&(k||E===G)&&l(H,"toString",p),N&&w&&E===G&&h(H,"code",I((function(){return M(v(this).name)}))),g)if(f(g,U)){var z=g[U],V=z.s,q=u(6,z.c);f(G,V)||c(G,V,q),f(H,V)||c(H,V,q)}},6403:(t,e,r)=>{var n=r(5366),i=r(4032),a=r(8711),o=r(4004),s=r(1601).f,u=r(9649),c=r(3399),l=r(3951),h=r(8363),f=r(4090),d=r(3633),v=r(2444),p=r(8507),y="DOMException",g=a("Error"),m=a(y),b=function(){c(this,w);var t=arguments.length,e=h(t<1?void 0:arguments[0]),r=h(t<2?void 0:arguments[1],"Error"),n=new m(e,r),i=new g(e);return i.name=y,s(n,"stack",o(1,d(i.stack,1))),l(n,this,b),n},w=b.prototype=m.prototype,k="stack"in new g(y),x="stack"in new m(1,2),A=m&&v&&Object.getOwnPropertyDescriptor(i,y),_=!(!A||A.writable&&A.configurable),E=k&&!_&&!x;n({global:!0,constructor:!0,forced:p||E},{DOMException:E?b:m});var S=a(y),O=S.prototype;if(O.constructor!==S)for(var T in p||s(O,"constructor",o(1,S)),f)if(u(f,T)){var P=f[T],L=P.s;u(S,L)||s(S,L,o(6,P.c))}},3355:(t,e,r)=>{var n=r(8711),i="DOMException";r(6911)(n(i),i)},9734:(t,e,r)=>{r(9024),r(2217);var n=r(5366),i=r(4032),a=r(5725),o=r(8711),s=r(3453),u=r(2608),c=r(2444),l=r(8200),h=r(8552),f=r(8986),d=r(4183),v=r(6911),p=r(282),y=r(8301),g=r(3399),m=r(3749),b=r(9649),w=r(4864),k=r(1179),x=r(7447),A=r(2674),_=r(687),E=r(5304),S=r(4004),O=r(6961),T=r(7507),P=r(9393),L=r(7900),M=r(5811),C=r(5272),j=M("iterator"),I="URLSearchParams",R=I+"Iterator",F=y.set,D=y.getterFor(I),N=y.getterFor(R),W=a("fetch"),B=a("Request"),G=a("Headers"),H=B&&B.prototype,U=G&&G.prototype,z=i.TypeError,V=i.encodeURIComponent,q=String.fromCharCode,Y=o("String","fromCodePoint"),X=parseInt,K=u("".charAt),Q=u([].join),J=u([].push),$=u("".replace),Z=u([].shift),tt=u([].splice),et=u("".split),rt=u("".slice),nt=u(/./.exec),it=/\\+/g,at=/^[0-9a-f]+$/i,ot=function(t,e){var r=rt(t,e,e+2);return nt(at,r)?X(r,16):NaN},st=function(t){for(var e=0,r=128;r>0&&0!=(t&r);r>>=1)e++;return e},ut=function(t){var e=null;switch(t.length){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return e>1114111?null:e},ct=function(t){for(var e=(t=$(t,it," ")).length,r="",n=0;ne){r+="%",n++;continue}var a=ot(t,n+1);if(a!=a){r+=i,n++;continue}n+=2;var o=st(a);if(0===o)i=q(a);else{if(1===o||o>4){r+="�",n++;continue}for(var s=[a],u=1;ue||"%"!==K(t,n));){var c=ot(t,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;J(s,c),n+=2,u++}if(s.length!==o){r+="�";continue}var l=ut(s);null===l?r+="�":i=Y(l)}}r+=i,n++}return r},lt=/[!'()~]|%20/g,ht={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ft=function(t){return ht[t]},dt=function(t){return $(V(t),lt,ft)},vt=p((function(t,e){F(this,{type:R,target:D(t).entries,index:0,kind:e})}),I,(function(){var t=N(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,P(void 0,!0);var n=e[r];switch(t.kind){case"keys":return P(n.key,!1);case"values":return P(n.value,!1)}return P([n.key,n.value],!1)}),!0),pt=function(t){this.entries=[],this.url=null,void 0!==t&&(A(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===K(t,0)?rt(t,1):t:_(t)))};pt.prototype={type:I,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,i,a,o,u,c=this.entries,l=T(t);if(l)for(r=(e=O(t,l)).next;!(n=s(r,e)).done;){if(a=(i=O(x(n.value))).next,(o=s(a,i)).done||(u=s(a,i)).done||!s(a,i).done)throw new z("Expected sequence with length 2");J(c,{key:_(o.value),value:_(u.value)})}else for(var h in t)b(t,h)&&J(c,{key:h,value:_(t[h])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,i=et(t,"&"),a=0;a0?arguments[0]:void 0));c||(this.size=t.entries.length)},gt=yt.prototype;if(d(gt,{append:function(t,e){var r=D(this);L(arguments.length,2),J(r.entries,{key:_(t),value:_(e)}),c||this.length++,r.updateURL()},delete:function(t){for(var e=D(this),r=L(arguments.length,1),n=e.entries,i=_(t),a=r<2?void 0:arguments[1],o=void 0===a?a:_(a),s=0;se.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=D(this).entries,n=w(t,arguments.length>1?arguments[1]:void 0),i=0;i1?wt(arguments[1]):{})}}),m(B)){var kt=function(t){return g(this,H),new B(t,arguments.length>1?wt(arguments[1]):{})};H.constructor=kt,kt.prototype=H,n({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:kt})}}t.exports={URLSearchParams:yt,getState:D}},1531:(t,e,r)=>{var n=r(8552),i=r(2608),a=r(687),o=r(7900),s=URLSearchParams,u=s.prototype,c=i(u.append),l=i(u.delete),h=i(u.forEach),f=i([].push),d=new s("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&n(u,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=[];h(this,(function(t,e){f(n,{key:e,value:t})})),o(e,1);for(var i,s=a(t),u=a(r),d=0,v=0,p=!1,y=n.length;d{var n=r(8552),i=r(2608),a=r(687),o=r(7900),s=URLSearchParams,u=s.prototype,c=i(u.getAll),l=i(u.has),h=new s("a=1");!h.has("a",2)&&h.has("a",void 0)||n(u,"has",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return l(this,t);var n=c(this,t);o(e,1);for(var i=a(r),s=0;s{r(9734)},4145:(t,e,r)=>{var n=r(2444),i=r(2608),a=r(8986),o=URLSearchParams.prototype,s=i(o.forEach);n&&!("size"in o)&&a(o,"size",{get:function(){var t=0;return s(this,(function(){t++})),t},configurable:!0,enumerable:!0})},161:(t,e,r)=>{r(7460);var n,i=r(5366),a=r(2444),o=r(8200),s=r(4032),u=r(4864),c=r(2608),l=r(8552),h=r(8986),f=r(3399),d=r(9649),v=r(8069),p=r(3948),y=r(4224),g=r(6903).codeAt,m=r(5141),b=r(687),w=r(6911),k=r(7900),x=r(9734),A=r(8301),_=A.set,E=A.getterFor("URL"),S=x.URLSearchParams,O=x.getState,T=s.URL,P=s.TypeError,L=s.parseInt,M=Math.floor,C=Math.pow,j=c("".charAt),I=c(/./.exec),R=c([].join),F=c(1..toString),D=c([].pop),N=c([].push),W=c("".replace),B=c([].shift),G=c("".split),H=c("".slice),U=c("".toLowerCase),z=c([].unshift),V="Invalid scheme",q="Invalid host",Y="Invalid port",X=/[a-z]/i,K=/[\\d+-.a-z]/i,Q=/\\d/,J=/^0x/i,$=/^[0-7]+$/,Z=/^\\d+$/,tt=/^[\\da-f]+$/i,et=/[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/,rt=/[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/,nt=/^[\\u0000-\\u0020]+/,it=/(^|[^\\u0000-\\u0020])[\\u0000-\\u0020]+$/,at=/[\\t\\n\\r]/g,ot=function(t){var e,r,n,i;if("number"==typeof t){for(e=[],r=0;r<4;r++)z(e,t%256),t=M(t/256);return R(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,i=0,a=0;a<8;a++)0!==t[a]?(i>r&&(e=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r?n:e}(t),r=0;r<8;r++)i&&0===t[r]||(i&&(i=!1),n===r?(e+=r?":":"::",i=!0):(e+=F(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},st={},ut=v({},st,{" ":1,'"':1,"<":1,">":1,"\`":1}),ct=v({},ut,{"#":1,"?":1,"{":1,"}":1}),lt=v({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var r=g(t,0);return r>32&&r<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var r;return 2===t.length&&I(X,j(t,0))&&(":"===(r=j(t,1))||!e&&"|"===r)},vt=function(t){var e;return t.length>1&&dt(H(t,0,2))&&(2===t.length||"/"===(e=j(t,2))||"\\\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===U(t)},yt={},gt={},mt={},bt={},wt={},kt={},xt={},At={},_t={},Et={},St={},Ot={},Tt={},Pt={},Lt={},Mt={},Ct={},jt={},It={},Rt={},Ft={},Dt=function(t,e,r){var n,i,a,o=b(t);if(e){if(i=this.parse(o))throw new P(i);this.searchParams=null}else{if(void 0!==r&&(n=new Dt(r,!0)),i=this.parse(o,null,n))throw new P(i);(a=O(new S)).bindURL(this),this.searchParams=a}};Dt.prototype={type:"URL",parse:function(t,e,r){var i,a,o,s,u,c=this,l=e||yt,h=0,f="",v=!1,g=!1,m=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=W(t,nt,""),t=W(t,it,"$1")),t=W(t,at,""),i=p(t);h<=i.length;){switch(a=i[h],l){case yt:if(!a||!I(X,a)){if(e)return V;l=mt;continue}f+=U(a),l=gt;break;case gt:if(a&&(I(K,a)||"+"===a||"-"===a||"."===a))f+=U(a);else{if(":"!==a){if(e)return V;f="",l=mt,h=0;continue}if(e&&(c.isSpecial()!==d(ft,f)||"file"===f&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=f,e)return void(c.isSpecial()&&ft[c.scheme]===c.port&&(c.port=null));f="","file"===c.scheme?l=Pt:c.isSpecial()&&r&&r.scheme===c.scheme?l=bt:c.isSpecial()?l=At:"/"===i[h+1]?(l=wt,h++):(c.cannotBeABaseURL=!0,N(c.path,""),l=It)}break;case mt:if(!r||r.cannotBeABaseURL&&"#"!==a)return V;if(r.cannotBeABaseURL&&"#"===a){c.scheme=r.scheme,c.path=y(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,l=Ft;break}l="file"===r.scheme?Pt:kt;continue;case bt:if("/"!==a||"/"!==i[h+1]){l=kt;continue}l=_t,h++;break;case wt:if("/"===a){l=Et;break}l=jt;continue;case kt:if(c.scheme=r.scheme,a===n)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.query=r.query;else if("/"===a||"\\\\"===a&&c.isSpecial())l=xt;else if("?"===a)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.query="",l=Rt;else{if("#"!==a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.path.length--,l=jt;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=y(r.path),c.query=r.query,c.fragment="",l=Ft}break;case xt:if(!c.isSpecial()||"/"!==a&&"\\\\"!==a){if("/"!==a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,l=jt;continue}l=Et}else l=_t;break;case At:if(l=_t,"/"!==a||"/"!==j(f,h+1))continue;h++;break;case _t:if("/"!==a&&"\\\\"!==a){l=Et;continue}break;case Et:if("@"===a){v&&(f="%40"+f),v=!0,o=p(f);for(var w=0;w65535)return Y;c.port=c.isSpecial()&&A===ft[c.scheme]?null:A,f=""}if(e)return;l=Ct;continue}return Y}f+=a;break;case Pt:if(c.scheme="file","/"===a||"\\\\"===a)l=Lt;else{if(!r||"file"!==r.scheme){l=jt;continue}switch(a){case n:c.host=r.host,c.path=y(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=y(r.path),c.query="",l=Rt;break;case"#":c.host=r.host,c.path=y(r.path),c.query=r.query,c.fragment="",l=Ft;break;default:vt(R(y(i,h),""))||(c.host=r.host,c.path=y(r.path),c.shortenPath()),l=jt;continue}}break;case Lt:if("/"===a||"\\\\"===a){l=Mt;break}r&&"file"===r.scheme&&!vt(R(y(i,h),""))&&(dt(r.path[0],!0)?N(c.path,r.path[0]):c.host=r.host),l=jt;continue;case Mt:if(a===n||"/"===a||"\\\\"===a||"?"===a||"#"===a){if(!e&&dt(f))l=jt;else if(""===f){if(c.host="",e)return;l=Ct}else{if(s=c.parseHost(f))return s;if("localhost"===c.host&&(c.host=""),e)return;f="",l=Ct}continue}f+=a;break;case Ct:if(c.isSpecial()){if(l=jt,"/"!==a&&"\\\\"!==a)continue}else if(e||"?"!==a)if(e||"#"!==a){if(a!==n&&(l=jt,"/"!==a))continue}else c.fragment="",l=Ft;else c.query="",l=Rt;break;case jt:if(a===n||"/"===a||"\\\\"===a&&c.isSpecial()||!e&&("?"===a||"#"===a)){if(".."===(u=U(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===a||"\\\\"===a&&c.isSpecial()||N(c.path,"")):pt(f)?"/"===a||"\\\\"===a&&c.isSpecial()||N(c.path,""):("file"===c.scheme&&!c.path.length&&dt(f)&&(c.host&&(c.host=""),f=j(f,0)+":"),N(c.path,f)),f="","file"===c.scheme&&(a===n||"?"===a||"#"===a))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"===a?(c.query="",l=Rt):"#"===a&&(c.fragment="",l=Ft)}else f+=ht(a,ct);break;case It:"?"===a?(c.query="",l=Rt):"#"===a?(c.fragment="",l=Ft):a!==n&&(c.path[0]+=ht(a,st));break;case Rt:e||"#"!==a?a!==n&&("'"===a&&c.isSpecial()?c.query+="%27":c.query+="#"===a?"%23":ht(a,st)):(c.fragment="",l=Ft);break;case Ft:a!==n&&(c.fragment+=ht(a,ut))}h++}},parseHost:function(t){var e,r,n;if("["===j(t,0)){if("]"!==j(t,t.length-1))return q;if(e=function(t){var e,r,n,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return j(t,h)};if(":"===f()){if(":"!==j(t,1))return;h+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(e=r=0;r<4&&I(tt,f());)e=16*e+L(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."===f()&&n<4))return;h++}if(!I(Q,f()))return;for(;I(Q,f());){if(a=L(f(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;h++}u[c]=256*u[c]+i,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;u[c++]=e}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(o=c-l,c=7;0!==c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!==c)return;return u}(H(t,1,-1)),!e)return q;this.host=e}else if(this.isSpecial()){if(t=m(t),I(et,t))return q;if(e=function(t){var e,r,n,i,a,o,s,u=G(t,".");if(u.length&&""===u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(r=[],n=0;n1&&"0"===j(i,0)&&(a=I(J,i)?16:8,i=H(i,8===a?1:2)),""===i)o=0;else{if(!I(10===a?Z:8===a?$:tt,i))return t;o=L(i,a)}N(r,o)}for(n=0;n=C(256,5-e))return null}else if(o>255)return null;for(s=D(r),n=0;n1?arguments[1]:void 0,n=_(e,new Dt(t,!1,r));a||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Wt=Nt.prototype,Bt=function(t,e){return{get:function(){return E(this)[t]()},set:e&&function(t){return E(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(h(Wt,"href",Bt("serialize","setHref")),h(Wt,"origin",Bt("getOrigin")),h(Wt,"protocol",Bt("getProtocol","setProtocol")),h(Wt,"username",Bt("getUsername","setUsername")),h(Wt,"password",Bt("getPassword","setPassword")),h(Wt,"host",Bt("getHost","setHost")),h(Wt,"hostname",Bt("getHostname","setHostname")),h(Wt,"port",Bt("getPort","setPort")),h(Wt,"pathname",Bt("getPathname","setPathname")),h(Wt,"search",Bt("getSearch","setSearch")),h(Wt,"searchParams",Bt("getSearchParams")),h(Wt,"hash",Bt("getHash","setHash"))),l(Wt,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),l(Wt,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),T){var Gt=T.createObjectURL,Ht=T.revokeObjectURL;Gt&&l(Nt,"createObjectURL",u(Gt,T)),Ht&&l(Nt,"revokeObjectURL",u(Ht,T))}w(Nt,"URL"),i({global:!0,constructor:!0,forced:!o,sham:!a},{URL:Nt})},5728:(t,e,r)=>{r(161)},4136:(t,e,r)=>{var n=r(5366),i=r(3453);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n,i=globalThis.pdfjsLib={};function a(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rY,AnnotationEditorLayer:()=>Ak,AnnotationEditorParamsType:()=>_,AnnotationEditorType:()=>A,AnnotationEditorUIManager:()=>Kn,AnnotationLayer:()=>np,AnnotationMode:()=>x,CMapCompressionType:()=>T,ColorPicker:()=>Tg,DOMSVGFactory:()=>me,DrawLayer:()=>Vk,FeatureTest:()=>J,GlobalWorkerOptions:()=>mu,ImageKind:()=>S,InvalidPDFException:()=>U,MissingPDFException:()=>z,OPS:()=>P,OutputScale:()=>Fe,PDFDataRangeTransport:()=>rf,PDFDateString:()=>Le,PDFWorker:()=>pf,PasswordResponses:()=>L,PermissionFlag:()=>E,PixelsPerInch:()=>Vt,RenderingCancelledException:()=>we,TextLayer:()=>uh,UnexpectedResponseException:()=>V,Util:()=>Z,VerbosityLevel:()=>O,XfaLayer:()=>td,build:()=>Bf,createValidAbsoluteUrl:()=>N,fetchData:()=>ve,getDocument:()=>$h,getFilenameFromUrl:()=>Ae,getPdfFilenameFromUrl:()=>_e,getXfaPageViewport:()=>Me,isDataScheme:()=>ke,isPdfFile:()=>xe,noContextMenu:()=>Te,normalizeUnicode:()=>it,setLayerDimensions:()=>Re,shadow:()=>W,version:()=>Wf}),r(8169),r(7651),r(4551),r(5268),r(184),r(3234),r(6746),r(8551),r(9024),r(9138),r(750),r(5015),r(6209),r(9261),r(3700),r(3632),r(7316),r(1425),r(3379),r(489),r(2823),r(5594),r(8397),r(2467),r(1281),r(9484),r(4672),r(6794),r(9264),r(7329),r(2044),r(3740),r(6542),r(5738),r(2900),r(2051),r(3198),r(4211),r(9791),r(5294),r(1526),r(6032),r(3659),r(932),r(8553),r(7612),r(8579),r(7719),r(7576),r(2891),r(2605),r(4863),r(9637),r(2709),r(8941),r(1579),r(6236),r(7716),r(1913),r(3577),r(5728),r(4136),r(4520),r(1531),r(3678),r(4145);var m=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),b=[1,0,0,1,0,0],w=[.001,0,0,.001,0,0],k=1.35,x={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},A={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},_={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},E={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},S={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},O={ERRORS:0,WARNINGS:1,INFOS:5},T={NONE:0,BINARY:1},P={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},L={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},M=O.WARNINGS;function C(t){Number.isInteger(t)&&(M=t)}function j(){return M}function I(t){M>=O.INFOS&&console.log("Info: ".concat(t))}function R(t){M>=O.WARNINGS&&console.log("Warning: ".concat(t))}function F(t){throw new Error(t)}function D(t,e){t||F(e)}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(r&&"string"==typeof t){if(r.addDefaultProtocol&&t.startsWith("www.")){var n=t.match(/\\./g);(null==n?void 0:n.length)>=2&&(t="http://".concat(t))}if(r.tryConvertEncoding)try{t=decodeURIComponent(escape(t))}catch(t){}}var i=e?new URL(t,e):new URL(t);if(function(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(t){}return null}function W(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!0,writable:!1}),r}var B=function(){function t(t,e){this.message=t,this.name=e}return t.prototype=new Error,t.constructor=t,t}(),G=function(t){function e(t,r){var n;return f(this,e),(n=d(this,e,[t,"PasswordException"])).code=r,n}return y(e,B),l(e)}(),H=function(t){function e(t,r){var n;return f(this,e),(n=d(this,e,[t,"UnknownErrorException"])).details=r,n}return y(e,B),l(e)}(),U=function(t){function e(t){return f(this,e),d(this,e,[t,"InvalidPDFException"])}return y(e,B),l(e)}(),z=function(t){function e(t){return f(this,e),d(this,e,[t,"MissingPDFException"])}return y(e,B),l(e)}(),V=function(t){function e(t,r){var n;return f(this,e),(n=d(this,e,[t,"UnexpectedResponseException"])).status=r,n}return y(e,B),l(e)}(),q=function(t){function e(t){return f(this,e),d(this,e,[t,"FormatError"])}return y(e,B),l(e)}(),Y=function(t){function e(t){return f(this,e),d(this,e,[t,"AbortException"])}return y(e,B),l(e)}();function X(t){"object"==typeof t&&void 0!==(null==t?void 0:t.length)||F("Invalid argument for bytesToString");var e=t.length,r=8192;if(e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}(t);try{for(n.s();!(e=n.n()).done;){var i=o(e.value,2),a=i[0],u=i[1];r[a]=u}}catch(t){n.e(t)}finally{n.f()}return r}var J=function(){return l((function t(){f(this,t)}),null,[{key:"isLittleEndian",get:function(){return W(this,"isLittleEndian",((t=new Uint8Array(4))[0]=1,1===new Uint32Array(t.buffer,0,1)[0]));var t}},{key:"isEvalSupported",get:function(){return W(this,"isEvalSupported",function(){try{return new Function(""),!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function(){return W(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function(){var t,e;return"undefined"!=typeof navigator&&"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.platform)?W(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:"string"==typeof(null===(e=navigator)||void 0===e?void 0:e.userAgent)&&navigator.userAgent.includes("Firefox")}):W(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}},{key:"isCSSRoundSupported",get:function(){var t,e;return W(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(e=t.supports)||void 0===e?void 0:e.call(t,"width: round(1.5px, 1px)"))}}])}(),$=Array.from(Array(256).keys(),(function(t){return t.toString(16).padStart(2,"0")})),Z=function(){function t(){f(this,t)}return l(t,null,[{key:"makeHexColor",value:function(t,e,r){return"#".concat($[t]).concat($[e]).concat($[r])}},{key:"scaleMinMax",value:function(t,e){var r;t[0]?(t[0]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[3],e[3]*=t[3]):(r=e[0],e[0]=e[1],e[1]=r,r=e[2],e[2]=e[3],e[3]=r,t[1]<0&&(r=e[1],e[1]=e[3],e[3]=r),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(r=e[0],e[0]=e[2],e[2]=r),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}},{key:"transform",value:function(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}},{key:"applyTransform",value:function(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}},{key:"applyInverseTransform",value:function(t,e){var r=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/r,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,e){var r=this.applyTransform(t,e),n=this.applyTransform(t.slice(2,4),e),i=this.applyTransform([t[0],t[3]],e),a=this.applyTransform([t[2],t[1]],e);return[Math.min(r[0],n[0],i[0],a[0]),Math.min(r[1],n[1],i[1],a[1]),Math.max(r[0],n[0],i[0],a[0]),Math.max(r[1],n[1],i[1],a[1])]}},{key:"inverseTransform",value:function(t){var e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}},{key:"singularValueDecompose2dScale",value:function(t){var e=[t[0],t[2],t[1],t[3]],r=t[0]*e[0]+t[1]*e[2],n=t[0]*e[1]+t[1]*e[3],i=t[2]*e[0]+t[3]*e[2],a=t[2]*e[1]+t[3]*e[3],o=(r+a)/2,s=Math.sqrt(Math.pow(r+a,2)-4*(r*a-i*n))/2,u=o+s||1,c=o-s||1;return[Math.sqrt(u),Math.sqrt(c)]}},{key:"normalizeRect",value:function(t){var e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}},{key:"intersect",value:function(t,e){var r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>n)return null;var i=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return i>a?null:[r,i,n,a]}},{key:"bezierBoundingBox",value:function(e,r,n,i,o,s,u,c,l){return l?(l[0]=Math.min(l[0],e,u),l[1]=Math.min(l[1],r,c),l[2]=Math.max(l[2],e,u),l[3]=Math.max(l[3],r,c)):l=[Math.min(e,u),Math.min(r,c),Math.max(e,u),Math.max(r,c)],a(t,this,et).call(this,e,n,o,u,r,i,s,c,3*(3*(n-o)-e+u),6*(e-2*n+o),3*(n-e),l),a(t,this,et).call(this,e,n,o,u,r,i,s,c,3*(3*(i-s)-r+c),6*(r-2*i+s),3*(i-r),l),l}}])}();function tt(t,e,r,n,i,a,o,s,u,c){if(!(u<=0||u>=1)){var l=1-u,h=u*u,f=h*u,d=l*(l*(l*t+3*u*e)+3*h*r)+f*n,v=l*(l*(l*i+3*u*a)+3*h*o)+f*s;c[0]=Math.min(c[0],d),c[1]=Math.min(c[1],v),c[2]=Math.max(c[2],d),c[3]=Math.max(c[3],v)}}function et(t,e,r,i,o,s,u,c,l,h,f,d){if(Math.abs(l)<1e-12)Math.abs(h)>=1e-12&&a(n,this,tt).call(this,t,e,r,i,o,s,u,c,-f/h,d);else{var v=Math.pow(h,2)-4*f*l;if(!(v<0)){var p=Math.sqrt(v),y=2*l;a(n,this,tt).call(this,t,e,r,i,o,s,u,c,(-h+p)/y,d),a(n,this,tt).call(this,t,e,r,i,o,s,u,c,(-h-p)/y,d)}}}n=Z;var rt=null,nt=null;function it(t){return rt||(rt=/([\\xA0\\xB5\\u037E\\u0EB3\\u2000-\\u200A\\u202F\\u2126\\uFB00-\\uFB04\\uFB06\\uFB20-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBA1\\uFBA4-\\uFBA9\\uFBAE-\\uFBB1\\uFBD3-\\uFBDC\\uFBDE-\\uFBE7\\uFBEA-\\uFBF8\\uFBFC\\uFBFD\\uFC00-\\uFC5D\\uFC64-\\uFCF1\\uFCF5-\\uFD3D\\uFD88\\uFDF4\\uFDFA\\uFDFB\\uFE71\\uFE77\\uFE79\\uFE7B\\uFE7D]+)|(\\uFB05+)/g,nt=new Map([["ſt","ſt"]])),t.replaceAll(rt,(function(t,e,r){return e?e.normalize("NFKC"):nt.get(r)}))}var at="pdfjs_internal_id_";function ot(){ot=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function st(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){st(a,n,i,o,s,"next",t)}function s(t){st(a,n,i,o,s,"throw",t)}o(void 0)}))}}function ct(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ht(t,e){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2];if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");var n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),r||(n.setAttribute("width","".concat(t,"px")),n.setAttribute("height","".concat(e,"px"))),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 ".concat(t," ").concat(e)),n}},{key:"createElement",value:function(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}},{key:"_createSVG",value:function(t){F("Abstract method \`_createSVG\` called.")}}])}();function kt(){kt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function xt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=St(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function At(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function _t(t){return function(t){if(Array.isArray(t))return Ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||St(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||St(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function St(t,e){if(t){if("string"==typeof t)return Ot(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ot(t,e):void 0}}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]&&arguments[0]&&0!==Rt(Zt,this,re).size||(Ft(Xt,this)&&(Ft(Xt,this).parentNode.parentNode.remove(),Dt(Xt,this,null)),Ft(Yt,this)&&(Ft(Yt,this).clear(),Dt(Yt,this,null)),Dt($t,this,0))}}])}();function ee(t){return Ft(Yt,t)||Dt(Yt,t,new Map)}function re(t){return Ft(Jt,t)||Dt(Jt,t,new Map)}function ne(t){if(!Ft(Xt,t)){var e=Ft(Qt,t).createElement("div"),r=e.style;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;var n=Ft(Qt,t).createElementNS(zt,"svg");n.setAttribute("width",0),n.setAttribute("height",0),Dt(Xt,t,Ft(Qt,t).createElementNS(zt,"defs")),e.append(n),n.append(Ft(Xt,t)),Ft(Qt,t).body.append(e)}return Ft(Xt,t)}function ie(t){if(1===t.length){for(var e=t[0],r=new Array(256),n=0;n<256;n++)r[n]=e[n]/255;var i=r.join(",");return[i,i,i]}for(var a=Et(t,3),o=a[0],s=a[1],u=a[2],c=new Array(256),l=new Array(256),h=new Array(256),f=0;f<256;f++)c[f]=o[f]/255,l[f]=s[f]/255,h[f]=u[f]/255;return[c.join(","),l.join(","),h.join(",")]}function ae(t){if(void 0===Ft(qt,this)){Dt(qt,this,"");var e=Ft(Qt,this).URL;e!==Ft(Qt,this).baseURI&&(ke(e)?R('#createUrl: ignore "data:"-URL for performance reasons.'):Dt(qt,this,e.split("#",1)[0]))}return"url(".concat(Ft(qt,this),"#").concat(t,")")}function oe(t){var e=Ft(Qt,this).createElementNS(zt,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(e)}function se(t){var e=Ft(Qt,this).createElementNS(zt,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(e)}function ue(t){var e=Ft(Qt,this).createElementNS(zt,"filter");return e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("id",t),Rt(Zt,this,ne).append(e),e}function ce(t,e,r){var n=Ft(Qt,this).createElementNS(zt,e);n.setAttribute("type","discrete"),n.setAttribute("tableValues",r),t.append(n)}function le(t,e,r,n){var i=Ft(Qt,this).createElementNS(zt,"feComponentTransfer");n.append(i),Nt(Zt,this,ce).call(this,i,"feFuncR",t),Nt(Zt,this,ce).call(this,i,"feFuncG",e),Nt(Zt,this,ce).call(this,i,"feFuncB",r)}function he(t,e){var r=Ft(Qt,this).createElementNS(zt,"feComponentTransfer");e.append(r),Nt(Zt,this,ce).call(this,r,"feFuncA",t)}function fe(t){return Rt(Zt,this,ne).style.color=t,Ce(getComputedStyle(Rt(Zt,this,ne)).getPropertyValue("color"))}var de=function(t){function e(t){var r,n=t.ownerDocument,i=void 0===n?globalThis.document:n,a=t.enableHWA,o=void 0!==a&&a;return Gt(this,e),(r=Tt(this,e,[{enableHWA:o}]))._document=i,r}return Mt(e,gt),Bt(e,[{key:"_createCanvas",value:function(t,e){var r=this._document.createElement("canvas");return r.width=t,r.height=e,r}}])}();function ve(t){return pe.apply(this,arguments)}function pe(){var t;return t=kt().mark((function t(e){var r,n,i=arguments;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.length>1&&void 0!==i[1]?i[1]:"text",!Oe(e,document.baseURI)){t.next=14;break}return t.next=4,fetch(e);case 4:if((n=t.sent).ok){t.next=7;break}throw new Error(n.statusText);case 7:t.t0=r,t.next="arraybuffer"===t.t0?10:"blob"===t.t0?11:"json"===t.t0?12:13;break;case 10:return t.abrupt("return",n.arrayBuffer());case 11:return t.abrupt("return",n.blob());case 12:return t.abrupt("return",n.json());case 13:return t.abrupt("return",n.text());case 14:return t.abrupt("return",new Promise((function(t,n){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType=r,i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE)if(200!==i.status&&0!==i.status)n(new Error(i.statusText));else{switch(r){case"arraybuffer":case"blob":case"json":return void t(i.response)}t(i.responseText)}},i.send(null)})));case 15:case"end":return t.stop()}}),t)})),pe=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){At(a,n,i,o,s,"next",t)}function s(t){At(a,n,i,o,s,"throw",t)}o(void 0)}))},pe.apply(this,arguments)}var ye=function(t){function e(){return Gt(this,e),Tt(this,e,arguments)}return Mt(e,mt),Bt(e,[{key:"_fetchData",value:function(t,e){return ve(t,this.isCompressed?"arraybuffer":"text").then((function(t){return{cMapData:t instanceof ArrayBuffer?new Uint8Array(t):K(t),compressionType:e}}))}}])}(),ge=function(t){function e(){return Gt(this,e),Tt(this,e,arguments)}return Mt(e,bt),Bt(e,[{key:"_fetchData",value:function(t){return ve(t,"arraybuffer").then((function(t){return new Uint8Array(t)}))}}])}(),me=function(t){function e(){return Gt(this,e),Tt(this,e,arguments)}return Mt(e,wt),Bt(e,[{key:"_createSVG",value:function(t){return document.createElementNS(zt,t)}}])}(),be=function(){function t(e){var r=e.viewBox,n=e.scale,i=e.rotation,a=e.offsetX,o=void 0===a?0:a,s=e.offsetY,u=void 0===s?0:s,c=e.dontFlip,l=void 0!==c&&c;Gt(this,t),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=o,this.offsetY=u;var h,f,d,v,p,y,g,m,b=(r[2]+r[0])/2,w=(r[3]+r[1])/2;switch((i%=360)<0&&(i+=360),i){case 180:h=-1,f=0,d=0,v=1;break;case 90:h=0,f=1,d=1,v=0;break;case 270:h=0,f=-1,d=-1,v=0;break;case 0:h=1,f=0,d=0,v=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}l&&(d=-d,v=-v),0===h?(p=Math.abs(w-r[1])*n+o,y=Math.abs(b-r[0])*n+u,g=(r[3]-r[1])*n,m=(r[2]-r[0])*n):(p=Math.abs(b-r[0])*n+o,y=Math.abs(w-r[1])*n+u,g=(r[2]-r[0])*n,m=(r[3]-r[1])*n),this.transform=[h*n,f*n,d*n,v*n,p-h*n*b-d*n*w,y-f*n*b-v*n*w],this.width=g,this.height=m}return Bt(t,[{key:"rawDims",get:function(){var t=this.viewBox;return W(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.scale,n=void 0===r?this.scale:r,i=e.rotation,a=void 0===i?this.rotation:i,o=e.offsetX,s=void 0===o?this.offsetX:o,u=e.offsetY,c=void 0===u?this.offsetY:u,l=e.dontFlip,h=void 0!==l&&l;return new t({viewBox:this.viewBox.slice(),scale:n,rotation:a,offsetX:s,offsetY:c,dontFlip:h})}},{key:"convertToViewportPoint",value:function(t,e){return Z.applyTransform([t,e],this.transform)}},{key:"convertToViewportRectangle",value:function(t){var e=Z.applyTransform([t[0],t[1]],this.transform),r=Z.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(t,e){return Z.applyInverseTransform([t,e],this.transform)}}])}(),we=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Gt(this,e),(r=Tt(this,e,[t,"RenderingCancelledException"])).extraDelay=n,r}return Mt(e,B),Bt(e)}();function ke(t){for(var e=t.length,r=0;r1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof t)return e;if(ke(t))return R('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;var r=/[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i,n=/^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/.exec(t),i=r.exec(n[1])||r.exec(n[2])||r.exec(n[3]);if(i&&(i=i[0]).includes("%"))try{i=r.exec(decodeURIComponent(i))[0]}catch(t){}return i||e}var Ee,Se=function(){return Bt((function t(){Gt(this,t),Ht(this,"started",Object.create(null)),Ht(this,"times",[])}),[{key:"time",value:function(t){t in this.started&&R("Timer is already running for ".concat(t)),this.started[t]=Date.now()}},{key:"timeEnd",value:function(t){t in this.started||R("Timer has not been started for ".concat(t)),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}},{key:"toString",value:function(){var t,e=[],r=0,n=xt(this.times);try{for(n.s();!(t=n.n()).done;){var i=t.value.name;r=Math.max(i.length,r)}}catch(t){n.e(t)}finally{n.f()}var a,o=xt(this.times);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=s.name,c=s.start,l=s.end;e.push("".concat(u.padEnd(r)," ").concat(l-c,"ms\\n"))}}catch(t){o.e(t)}finally{o.f()}return e.join("")}}])}();function Oe(t,e){try{var r=(e?new URL(t,e):new URL(t)).protocol;return"http:"===r||"https:"===r}catch(t){return!1}}function Te(t){t.preventDefault()}function Pe(t){console.log("Deprecated API usage: "+t)}var Le=function(){return Bt((function t(){Gt(this,t)}),null,[{key:"toDateObject",value:function(t){if(!t||"string"!=typeof t)return null;Ee||(Ee=new RegExp("^D:(\\\\d{4})(\\\\d{2})?(\\\\d{2})?(\\\\d{2})?(\\\\d{2})?(\\\\d{2})?([Z|+|-])?(\\\\d{2})?'?(\\\\d{2})?'?"));var e=Ee.exec(t);if(!e)return null;var r=parseInt(e[1],10),n=parseInt(e[2],10);n=n>=1&&n<=12?n-1:0;var i=parseInt(e[3],10);i=i>=1&&i<=31?i:1;var a=parseInt(e[4],10);a=a>=0&&a<=23?a:0;var o=parseInt(e[5],10);o=o>=0&&o<=59?o:0;var s=parseInt(e[6],10);s=s>=0&&s<=59?s:0;var u=e[7]||"Z",c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;var l=parseInt(e[9],10)||0;return l=l>=0&&l<=59?l:0,"-"===u?(a+=c,o+=l):"+"===u&&(a-=c,o-=l),new Date(Date.UTC(r,n,i,a,o,s))}}])}();function Me(t,e){var r=e.scale,n=void 0===r?1:r,i=e.rotation,a=void 0===i?0:i,o=t.attributes.style,s=o.width,u=o.height,c=[0,0,parseInt(s),parseInt(u)];return new be({viewBox:c,scale:n,rotation:a})}function Ce(t){if(t.startsWith("#")){var e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map((function(t){return parseInt(t)})):t.startsWith("rgba(")?t.slice(5,-1).split(",").map((function(t){return parseInt(t)})).slice(0,3):(R('Not a valid color format: "'.concat(t,'"')),[0,0,0])}function je(t){var e=t.getTransform();return[e.a,e.b,e.c,e.d,e.e,e.f]}function Ie(t){var e=t.getTransform().invertSelf();return[e.a,e.b,e.c,e.d,e.e,e.f]}function Re(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof be){var i=e.rawDims,a=i.pageWidth,o=i.pageHeight,s=t.style,u=J.isCSSRoundSupported,c="var(--scale-factor) * ".concat(a,"px"),l="var(--scale-factor) * ".concat(o,"px"),h=u?"round(down, ".concat(c,", var(--scale-round-x, 1px))"):"calc(".concat(c,")"),f=u?"round(down, ".concat(l,", var(--scale-round-y, 1px))"):"calc(".concat(l,")");r&&e.rotation%180!=0?(s.width=f,s.height=h):(s.width=h,s.height=f)}n&&t.setAttribute("data-main-rotation",e.rotation)}var Fe=function(){return Bt((function t(){Gt(this,t);var e=window.devicePixelRatio||1;this.sx=e,this.sy=e}),[{key:"scaled",get:function(){return 1!==this.sx||1!==this.sy}},{key:"symmetric",get:function(){return this.sx===this.sy}}])}();function De(t,e){if(t){if("string"==typeof t)return Ne(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ne(t,e):void 0}}function Ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Be(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Ge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function He(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.y+o.height;if(!(sn?(i=u,n=s):e?u>i&&(i=u):u=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Er(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Sr(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Er(a,n,i,o,s,"next",t)}function s(t){Er(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Or(t,e){jr(t,e),e.add(t)}function Tr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pr(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Nr(t,e){if(t){if("string"==typeof t)return Wr(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wr(t,e):void 0}}function Wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:128;Tr(this,t),Cr(this,Qr,[]),Cr(this,Jr,!1),Cr(this,$r,void 0),Cr(this,Zr,-1),Rr($r,this,e)}),[{key:"add",value:function(t){var e=t.cmd,r=t.undo,n=t.post,i=t.mustExec,a=t.type,o=void 0===a?NaN:a,s=t.overwriteIfSameType,u=void 0!==s&&s,c=t.keepUndo,l=void 0!==c&&c;if(i&&e(),!Ir(Jr,this)){var h={cmd:e,undo:r,post:n,type:o};if(-1===Ir(Zr,this))return Ir(Qr,this).length>0&&(Ir(Qr,this).length=0),Rr(Zr,this,0),void Ir(Qr,this).push(h);if(u&&Ir(Qr,this)[Ir(Zr,this)].type===o)return l&&(h.undo=Ir(Qr,this)[Ir(Zr,this)].undo),void(Ir(Qr,this)[Ir(Zr,this)]=h);var f=Ir(Zr,this)+1;f===Ir($r,this)?Ir(Qr,this).splice(0,1):(Rr(Zr,this,f),f1&&void 0!==arguments[1]&&arguments[1];null===(e=Ir(hn,this))||void 0===e||e.editAltText(this,t,r)}},{key:"switchToMode",value:function(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}},{key:"setPreference",value:function(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}},{key:"onSetPreference",value:function(t){var e=t.name,r=t.value;"enableNewAltTextWhenAddingImage"===e&&Rr(An,this,r)}},{key:"onPageChanging",value:function(t){var e=t.pageNumber;Rr(yn,this,e-1)}},{key:"focusMainContainer",value:function(){Ir(Vn,this).focus()}},{key:"findParent",value:function(t,e){var r,n=Dr(Ir(ln,this).values());try{for(n.s();!(r=n.n()).done;){var i=r.value,a=i.div.getBoundingClientRect(),o=a.x,s=a.y,u=a.width,c=a.height;if(t>=o&&t<=o+u&&e>=s&&e<=s+c)return i}}catch(t){n.e(t)}finally{n.f()}return null}},{key:"disableUserSelect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ir(qn,this).classList.toggle("noUserSelect",t)}},{key:"addShouldRescale",value:function(t){Ir(wn,this).add(t)}},{key:"removeShouldRescale",value:function(t){Ir(wn,this).delete(t)}},{key:"onScaleChanging",value:function(t){var e=t.scale;this.commitOrRemove(),this.viewParameters.realScale=e*Vt.PDF_TO_CSS_UNITS;var r,n=Dr(Ir(wn,this));try{for(n.s();!(r=n.n()).done;)r.value.onScaleChanging()}catch(t){n.e(t)}finally{n.f()}}},{key:"onRotationChanging",value:function(t){var e=t.pagesRotation;this.commitOrRemove(),this.viewParameters.rotation=e}},{key:"highlightSelection",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=document.getSelection();if(r&&!r.isCollapsed){var n=r.anchorNode,i=r.anchorOffset,a=r.focusNode,o=r.focusOffset,s=r.toString(),u=Fr(Xn,this,Qn).call(this,r).closest(".textLayer"),c=this.getSelectionBoxes(u);if(c){r.empty();var l=Fr(Xn,this,Jn).call(this,u),h=Ir(Dn,this)===A.NONE,f=function(){null==l||l.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:c,anchorNode:n,anchorOffset:i,focusNode:a,focusOffset:o,text:s}),h&&t.showAllEditors("highlight",!0,!0)};h?this.switchToMode(A.HIGHLIGHT,f):f()}}}},{key:"addToAnnotationStorage",value:function(t){t.isEmpty()||!Ir(fn,this)||Ir(fn,this).has(t.id)||Ir(fn,this).setValue(t.id,t)}},{key:"blur",value:function(){if(this.isShiftKeyDown=!1,Ir(Tn,this)&&(Rr(Tn,this,!1),Fr(Xn,this,ti).call(this,"main_toolbar")),this.hasSelection){var t,e=document.activeElement,r=Dr(Ir(Nn,this));try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n.div.contains(e)){Rr(In,this,[n,e]),n._focusEventsAllowed=!1;break}}}catch(t){r.e(t)}finally{r.f()}}}},{key:"focus",value:function(){if(Ir(In,this)){var t=Ar(Ir(In,this),2),e=t[0],r=t[1];Rr(In,this,null),r.addEventListener("focusin",(function(){e._focusEventsAllowed=!0}),{once:!0,signal:this._signal}),r.focus()}}},{key:"addEditListeners",value:function(){Fr(Xn,this,ii).call(this),Fr(Xn,this,oi).call(this)}},{key:"removeEditListeners",value:function(){Fr(Xn,this,ai).call(this),Fr(Xn,this,si).call(this)}},{key:"dragOver",value:function(t){var e,r=Dr(t.dataTransfer.items);try{for(r.s();!(e=r.n()).done;){var n,i=e.value.type,a=Dr(Ir(bn,this));try{for(a.s();!(n=a.n()).done;)if(n.value.isHandlingMimeForPasting(i))return t.dataTransfer.dropEffect="copy",void t.preventDefault()}catch(t){a.e(t)}finally{a.f()}}}catch(t){r.e(t)}finally{r.f()}}},{key:"drop",value:function(t){var e,r=Dr(t.dataTransfer.items);try{for(r.s();!(e=r.n()).done;){var n,i=e.value,a=Dr(Ir(bn,this));try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.isHandlingMimeForPasting(i.type))return o.paste(i,this.currentLayer),void t.preventDefault()}}catch(t){a.e(t)}finally{a.f()}}}catch(t){r.e(t)}finally{r.f()}}},{key:"copy",value:function(t){var e;if(t.preventDefault(),null===(e=Ir(un,this))||void 0===e||e.commitOrRemove(),this.hasSelection){var r,n=[],i=Dr(Ir(Nn,this));try{for(i.s();!(r=i.n()).done;){var a=r.value.serialize(!0);a&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}0!==n.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(n))}}},{key:"cut",value:function(t){this.copy(t),this.delete()}},{key:"paste",value:(r=Sr(_r().mark((function t(e){var r,n,i,a,o,s,u,c,l,h,f,d,v,p,y,g,m=this;return _r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.preventDefault(),r=e.clipboardData,n=Dr(r.items),t.prev=3,n.s();case 5:if((i=n.n()).done){t.next=27;break}a=i.value,o=Dr(Ir(bn,this)),t.prev=8,o.s();case 10:if((s=o.n()).done){t.next=17;break}if(!(u=s.value).isHandlingMimeForPasting(a.type)){t.next=15;break}return u.paste(a,this.currentLayer),t.abrupt("return");case 15:t.next=10;break;case 17:t.next=22;break;case 19:t.prev=19,t.t0=t.catch(8),o.e(t.t0);case 22:return t.prev=22,o.f(),t.finish(22);case 25:t.next=5;break;case 27:t.next=32;break;case 29:t.prev=29,t.t1=t.catch(3),n.e(t.t1);case 32:return t.prev=32,n.f(),t.finish(32);case 35:if(c=r.getData("application/pdfjs")){t.next=38;break}return t.abrupt("return");case 38:t.prev=38,c=JSON.parse(c),t.next=46;break;case 42:return t.prev=42,t.t2=t.catch(38),R('paste: "'.concat(t.t2.message,'".')),t.abrupt("return");case 46:if(Array.isArray(c)){t.next=48;break}return t.abrupt("return");case 48:this.unselectAll(),l=this.currentLayer,t.prev=50,h=[],f=Dr(c),t.prev=53,f.s();case 55:if((d=f.n()).done){t.next=65;break}return v=d.value,t.next=59,l.deserialize(v);case 59:if(p=t.sent){t.next=62;break}return t.abrupt("return");case 62:h.push(p);case 63:t.next=55;break;case 65:t.next=70;break;case 67:t.prev=67,t.t3=t.catch(53),f.e(t.t3);case 70:return t.prev=70,f.f(),t.finish(70);case 73:y=function(){for(var t=0,e=h;t1&&void 0!==c[1]?c[1]:null,n=c.length>2&&void 0!==c[2]&&c[2],Ir(Dn,this)!==e){t.next=4;break}return t.abrupt("return");case 4:if(!Ir(Yn,this)){t.next=9;break}return t.next=7,Ir(Yn,this).promise;case 7:if(Ir(Yn,this)){t.next=9;break}return t.abrupt("return");case 9:if(Rr(Yn,this,Promise.withResolvers()),Rr(Dn,this,e),e!==A.NONE){t.next=16;break}return this.setEditingState(!1),Fr(Xn,this,di).call(this),Ir(Yn,this).resolve(),t.abrupt("return");case 16:return this.setEditingState(!0),t.next=19,Fr(Xn,this,hi).call(this);case 19:this.unselectAll(),i=Dr(Ir(ln,this).values());try{for(i.s();!(a=i.n()).done;)a.value.updateMode(e)}catch(t){i.e(t)}finally{i.f()}if(r){t.next=26;break}return n&&this.addNewEditorFromKeyboard(),Ir(Yn,this).resolve(),t.abrupt("return");case 26:o=Dr(Ir(cn,this).values());try{for(o.s();!(s=o.n()).done;)(u=s.value).annotationElementId===r?(this.setSelected(u),u.enterInEditMode()):u.unselect()}catch(t){o.e(t)}finally{o.f()}Ir(Yn,this).resolve();case 29:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"addNewEditorFromKeyboard",value:function(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}},{key:"updateToolbar",value:function(t){t!==Ir(Dn,this)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}},{key:"updateParams",value:function(t,e){var r;if(Ir(bn,this)){switch(t){case _.CREATE:return void this.currentLayer.addNewEditor();case _.HIGHLIGHT_DEFAULT_COLOR:null===(r=Ir(Rn,this))||void 0===r||r.updateColor(e);break;case _.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(Ir(Gn,this)||Rr(Gn,this,new Map)).set(t,e),this.showAllEditors("highlight",e)}var n,i=Dr(Ir(Nn,this));try{for(i.s();!(n=i.n()).done;)n.value.updateParams(t,e)}catch(t){i.e(t)}finally{i.f()}var a,o=Dr(Ir(bn,this));try{for(o.s();!(a=o.n()).done;)a.value.updateDefaultParams(t,e)}catch(t){o.e(t)}finally{o.f()}}}},{key:"showAllEditors",value:function(t,e){var r,n,i,a=Dr(Ir(cn,this).values());try{for(a.s();!(i=a.n()).done;){var o=i.value;o.editorType===t&&o.show(e)}}catch(t){a.e(t)}finally{a.f()}(null===(r=null===(n=Ir(Gn,this))||void 0===n?void 0:n.get(_.HIGHLIGHT_SHOW_ALL))||void 0===r||r)!==e&&Fr(Xn,this,li).call(this,[[_.HIGHLIGHT_SHOW_ALL,e]])}},{key:"enableWaiting",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Ir(Cn,this)!==t){Rr(Cn,this,t);var e,r=Dr(Ir(ln,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;t?n.disableClick():n.enableClick(),n.div.classList.toggle("waiting",t)}}catch(t){r.e(t)}finally{r.f()}}}},{key:"getEditors",value:function(t){var e,r=[],n=Dr(Ir(cn,this).values());try{for(n.s();!(e=n.n()).done;){var i=e.value;i.pageIndex===t&&r.push(i)}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"getEditor",value:function(t){return Ir(cn,this).get(t)}},{key:"addEditor",value:function(t){Ir(cn,this).set(t.id,t)}},{key:"removeEditor",value:function(t){var e,r=this;t.div.contains(document.activeElement)&&(Ir(En,this)&&clearTimeout(Ir(En,this)),Rr(En,this,setTimeout((function(){r.focusMainContainer(),Rr(En,r,null)}),0))),Ir(cn,this).delete(t.id),this.unselect(t),t.annotationElementId&&Ir(gn,this).has(t.annotationElementId)||null===(e=Ir(fn,this))||void 0===e||e.remove(t.id)}},{key:"addDeletedAnnotationElement",value:function(t){Ir(gn,this).add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}},{key:"isDeletedAnnotationElement",value:function(t){return Ir(gn,this).has(t)}},{key:"removeDeletedAnnotationElement",value:function(t){Ir(gn,this).delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}},{key:"setActiveEditor",value:function(t){Ir(un,this)!==t&&(Rr(un,this,t),t&&Fr(Xn,this,li).call(this,t.propertiesToUpdate))}},{key:"updateUI",value:function(t){(function(t){var e,r=null,n=Dr(Ir(Nn,t));try{for(n.s();!(e=n.n()).done;)r=e.value}catch(t){n.e(t)}finally{n.f()}return r})(Fr(Xn,this))===t&&Fr(Xn,this,li).call(this,t.propertiesToUpdate)}},{key:"toggleSelected",value:function(t){if(Ir(Nn,this).has(t))return Ir(Nn,this).delete(t),t.unselect(),void Fr(Xn,this,ci).call(this,{hasSelectedEditor:this.hasSelection});Ir(Nn,this).add(t),t.select(),Fr(Xn,this,li).call(this,t.propertiesToUpdate),Fr(Xn,this,ci).call(this,{hasSelectedEditor:!0})}},{key:"setSelected",value:function(t){var e,r=Dr(Ir(Nn,this));try{for(r.s();!(e=r.n()).done;){var n=e.value;n!==t&&n.unselect()}}catch(t){r.e(t)}finally{r.f()}Ir(Nn,this).clear(),Ir(Nn,this).add(t),t.select(),Fr(Xn,this,li).call(this,t.propertiesToUpdate),Fr(Xn,this,ci).call(this,{hasSelectedEditor:!0})}},{key:"isSelected",value:function(t){return Ir(Nn,this).has(t)}},{key:"firstSelectedEditor",get:function(){return Ir(Nn,this).values().next().value}},{key:"unselect",value:function(t){t.unselect(),Ir(Nn,this).delete(t),Fr(Xn,this,ci).call(this,{hasSelectedEditor:this.hasSelection})}},{key:"hasSelection",get:function(){return 0!==Ir(Nn,this).size}},{key:"isEnterHandled",get:function(){return 1===Ir(Nn,this).size&&this.firstSelectedEditor.isEnterHandled}},{key:"undo",value:function(){Ir(vn,this).undo(),Fr(Xn,this,ci).call(this,{hasSomethingToUndo:Ir(vn,this).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Fr(Xn,this,pi).call(this)})}},{key:"redo",value:function(){Ir(vn,this).redo(),Fr(Xn,this,ci).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:Ir(vn,this).hasSomethingToRedo(),isEmpty:Fr(Xn,this,pi).call(this)})}},{key:"addCommands",value:function(t){Ir(vn,this).add(t),Fr(Xn,this,ci).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Fr(Xn,this,pi).call(this)})}},{key:"delete",value:function(){var t=this;if(this.commitOrRemove(),this.hasSelection){var e=xr(Ir(Nn,this));this.addCommands({cmd:function(){var t,r=Dr(e);try{for(r.s();!(t=r.n()).done;)t.value.remove()}catch(t){r.e(t)}finally{r.f()}},undo:function(){var r,n=Dr(e);try{for(n.s();!(r=n.n()).done;){var i=r.value;Fr(Xn,t,vi).call(t,i)}}catch(t){n.e(t)}finally{n.f()}},mustExec:!0})}}},{key:"commitOrRemove",value:function(){var t;null===(t=Ir(un,this))||void 0===t||t.commitOrRemove()}},{key:"hasSomethingToControl",value:function(){return Ir(un,this)||this.hasSelection}},{key:"selectAll",value:function(){var t,e=Dr(Ir(Nn,this));try{for(e.s();!(t=e.n()).done;)t.value.commit()}catch(t){e.e(t)}finally{e.f()}Fr(Xn,this,yi).call(this,Ir(cn,this).values())}},{key:"unselectAll",value:function(){if((!Ir(un,this)||(Ir(un,this).commitOrRemove(),Ir(Dn,this)===A.NONE))&&this.hasSelection){var t,e=Dr(Ir(Nn,this));try{for(e.s();!(t=e.n()).done;)t.value.unselect()}catch(t){e.e(t)}finally{e.f()}Ir(Nn,this).clear(),Fr(Xn,this,ci).call(this,{hasSelectedEditor:!1})}}},{key:"translateSelectedEditors",value:function(t,e){var r=this;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),this.hasSelection){Ir(Un,this)[0]+=t,Ir(Un,this)[1]+=e;var n=Ar(Ir(Un,this),2),i=n[0],a=n[1],o=xr(Ir(Nn,this));Ir(zn,this)&&clearTimeout(Ir(zn,this)),Rr(zn,this,setTimeout((function(){Rr(zn,r,null),Ir(Un,r)[0]=Ir(Un,r)[1]=0,r.addCommands({cmd:function(){var t,e=Dr(o);try{for(e.s();!(t=e.n()).done;){var n=t.value;Ir(cn,r).has(n.id)&&n.translateInPage(i,a)}}catch(t){e.e(t)}finally{e.f()}},undo:function(){var t,e=Dr(o);try{for(e.s();!(t=e.n()).done;){var n=t.value;Ir(cn,r).has(n.id)&&n.translateInPage(-i,-a)}}catch(t){e.e(t)}finally{e.f()}},mustExec:!1})}),1e3));var s,u=Dr(o);try{for(u.s();!(s=u.n()).done;)s.value.translateInPage(t,e)}catch(t){u.e(t)}finally{u.f()}}}},{key:"setUpDragSession",value:function(){if(this.hasSelection){this.disableUserSelect(!0),Rr(mn,this,new Map);var t,e=Dr(Ir(Nn,this));try{for(e.s();!(t=e.n()).done;){var r=t.value;Ir(mn,this).set(r,{savedX:r.x,savedY:r.y,savedPageIndex:r.pageIndex,newX:0,newY:0,newPageIndex:-1})}}catch(t){e.e(t)}finally{e.f()}}}},{key:"endDragSession",value:function(){var t=this;if(!Ir(mn,this))return!1;this.disableUserSelect(!1);var e=Ir(mn,this);Rr(mn,this,null);var r,n=!1,i=Dr(e);try{for(i.s();!(r=i.n()).done;){var a=Ar(r.value,2),o=a[0],s=o.x,u=o.y,c=o.pageIndex,l=a[1];l.newX=s,l.newY=u,l.newPageIndex=c,n||(n=s!==l.savedX||u!==l.savedY||c!==l.savedPageIndex)}}catch(t){i.e(t)}finally{i.f()}if(!n)return!1;var h=function(e,r,n,i){if(Ir(cn,t).has(e.id)){var a=Ir(ln,t).get(i);a?e._setParentAndPosition(a,r,n):(e.pageIndex=i,e.x=r,e.y=n)}};return this.addCommands({cmd:function(){var t,r=Dr(e);try{for(r.s();!(t=r.n()).done;){var n=Ar(t.value,2),i=n[0],a=n[1],o=a.newX,s=a.newY,u=a.newPageIndex;h(i,o,s,u)}}catch(t){r.e(t)}finally{r.f()}},undo:function(){var t,r=Dr(e);try{for(r.s();!(t=r.n()).done;){var n=Ar(t.value,2),i=n[0],a=n[1],o=a.savedX,s=a.savedY,u=a.savedPageIndex;h(i,o,s,u)}}catch(t){r.e(t)}finally{r.f()}},mustExec:!0}),!0}},{key:"dragSelectedEditors",value:function(t,e){if(Ir(mn,this)){var r,n=Dr(Ir(mn,this).keys());try{for(n.s();!(r=n.n()).done;)r.value.drag(t,e)}catch(t){n.e(t)}finally{n.f()}}}},{key:"rebuild",value:function(t){if(null===t.parent){var e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}},{key:"isEditorHandlingKeyboard",get:function(){var t;return(null===(t=this.getActive())||void 0===t?void 0:t.shouldGetKeyboardEvents())||1===Ir(Nn,this).size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}},{key:"isActive",value:function(t){return Ir(un,this)===t}},{key:"getActive",value:function(){return Ir(un,this)}},{key:"getMode",value:function(){return Ir(Dn,this)}},{key:"imageManager",get:function(){return W(this,"imageManager",new Yr)}},{key:"getSelectionBoxes",value:function(t){if(!t)return null;for(var e=document.getSelection(),r=0,n=e.rangeCount;r0&&void 0!==arguments[0]?arguments[0]:"";Ir(Dn,this)===A.HIGHLIGHT?this.highlightSelection(t):Ir(kn,this)&&Fr(Xn,this,$n).call(this)}function ei(){document.addEventListener("selectionchange",Fr(Xn,this,Zn).bind(this),{signal:this._signal})}function ri(){if(!Ir(Sn,this)){Rr(Sn,this,new AbortController);var t=this.combinedSignal(Ir(Sn,this));window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}}function ni(){var t;null===(t=Ir(Sn,this))||void 0===t||t.abort(),Rr(Sn,this,null)}function ii(){if(!Ir(jn,this)){Rr(jn,this,new AbortController);var t=this.combinedSignal(Ir(jn,this));window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}}function ai(){var t;null===(t=Ir(jn,this))||void 0===t||t.abort(),Rr(jn,this,null)}function oi(){if(!Ir(pn,this)){Rr(pn,this,new AbortController);var t=this.combinedSignal(Ir(pn,this));document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}}function si(){var t;null===(t=Ir(pn,this))||void 0===t||t.abort(),Rr(pn,this,null)}function ui(){var t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}function ci(t){var e=this;Object.entries(t).some((function(t){var r=Ar(t,2),n=r[0],i=r[1];return Ir(Hn,e)[n]!==i}))&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(Ir(Hn,this),t)}),Ir(Dn,this)===A.HIGHLIGHT&&!1===t.hasSelectedEditor&&Fr(Xn,this,li).call(this,[[_.HIGHLIGHT_FREE,!0]]))}function li(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}function hi(){return fi.apply(this,arguments)}function fi(){return(fi=Sr(_r().mark((function t(){var e,r,n,i,a,o;return _r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ir(Mn,this)){t.next=9;break}Rr(Mn,this,!0),e=[],r=Dr(Ir(ln,this).values());try{for(r.s();!(n=r.n()).done;)i=n.value,e.push(i.enable())}catch(t){r.e(t)}finally{r.f()}return t.next=7,Promise.all(e);case 7:a=Dr(Ir(cn,this).values());try{for(a.s();!(o=a.n()).done;)o.value.enable()}catch(t){a.e(t)}finally{a.f()}case 9:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function di(){if(this.unselectAll(),Ir(Mn,this)){Rr(Mn,this,!1);var t,e=Dr(Ir(ln,this).values());try{for(e.s();!(t=e.n()).done;)t.value.disable()}catch(t){e.e(t)}finally{e.f()}var r,n=Dr(Ir(cn,this).values());try{for(n.s();!(r=n.n()).done;)r.value.disable()}catch(t){n.e(t)}finally{n.f()}}}function vi(t){var e=Ir(ln,this).get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}function pi(){if(0===Ir(cn,this).size)return!0;if(1===Ir(cn,this).size){var t,e=Dr(Ir(cn,this).values());try{for(e.s();!(t=e.n()).done;)return t.value.isEmpty()}catch(t){e.e(t)}finally{e.f()}}return!1}function yi(t){var e,r=Dr(Ir(Nn,this));try{for(r.s();!(e=r.n()).done;)e.value.unselect()}catch(t){r.e(t)}finally{r.f()}Ir(Nn,this).clear();var n,i=Dr(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.isEmpty()||(Ir(Nn,this).add(a),a.select())}}catch(t){i.e(t)}finally{i.f()}Fr(Xn,this,ci).call(this,{hasSelectedEditor:this.hasSelection})}function gi(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mi(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function mi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function wi(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ki(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){wi(a,n,i,o,s,"next",t)}function s(t){wi(a,n,i,o,s,"throw",t)}o(void 0)}))}}function xi(t,e){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];if(!Oi(Bi,this)||Oi(Li,this))return null===(t=Oi(Fi,this))||void 0===t||t.remove(),void Ti(Fi,this,null);if(!Oi(Fi,this)){var r=Ti(Fi,this,document.createElement("div"));r.className="noAltTextBadge",Oi(Di,this).div.append(r)}Oi(Fi,this).classList.toggle("hidden",!e)}},{key:"serialize",value:function(t){var e=Oi(Li,this);return t||Oi(Ni,this)!==e||(e=Oi(Wi,this)),{altText:e,decorative:Oi(Mi,this),guessedText:Oi(Ni,this),textWithDisclaimer:Oi(Wi,this)}}},{key:"data",get:function(){return{altText:Oi(Li,this),decorative:Oi(Mi,this)}},set:function(t){var e=t.altText,r=t.decorative,n=t.guessedText,i=t.textWithDisclaimer,a=t.cancel,o=void 0!==a&&a;n&&(Ti(Ni,this,n),Ti(Wi,this,i)),Oi(Li,this)===e&&Oi(Mi,this)===r||(o||(Ti(Li,this,e),Ti(Mi,this,r)),Pi(Gi,this,zi).call(this))}},{key:"toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Oi(Ci,this)&&(!t&&Oi(Ii,this)&&(clearTimeout(Oi(Ii,this)),Ti(Ii,this,null)),Oi(Ci,this).disabled=!t)}},{key:"shown",value:function(){Oi(Di,this)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:Si(Gi,this,Ui)}})}},{key:"destroy",value:function(){var t,e;null===(t=Oi(Ci,this))||void 0===t||t.remove(),Ti(Ci,this,null),Ti(ji,this,null),null===(e=Oi(Fi,this))||void 0===e||e.remove(),Ti(Fi,this,null)}}],n=[{key:"initialize",value:function(e){t._l10nPromise||(t._l10nPromise=e)}}],r&&xi(e.prototype,r),n&&xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,n,i}();function Ui(t){return(Oi(Li,t)?"added":null===Oi(Li,t)&&t.guessedText&&"review")||"missing"}function zi(){return Vi.apply(this,arguments)}function Vi(){return(Vi=ki(bi().mark((function t(){var e,r,n,i,a,o,s=this;return bi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=Oi(Ci,this)){t.next=3;break}return t.abrupt("return");case 3:if(!Oi(Bi,this)){t.next=11;break}if(e.classList.toggle("done",!!Oi(Li,this)),on._l10nPromise.get(Ki._[Si(Gi,this,Ui)]).then((function(t){e.setAttribute("aria-label",t);var r,n=gi(e.childNodes);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(i.nodeType===Node.TEXT_NODE){i.textContent=t;break}}}catch(t){n.e(t)}finally{n.f()}})),Oi(Li,this)){t.next=9;break}return null===(r=Oi(ji,this))||void 0===r||r.remove(),t.abrupt("return");case 9:t.next=17;break;case 11:if(Oi(Li,this)||Oi(Mi,this)){t.next=15;break}return e.classList.remove("done"),null===(n=Oi(ji,this))||void 0===n||n.remove(),t.abrupt("return");case 15:e.classList.add("done"),on._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then((function(t){e.setAttribute("aria-label",t)}));case 17:if((i=Oi(ji,this))||(Ti(ji,this,i=document.createElement("span")),i.className="tooltip",i.setAttribute("role","tooltip"),i.id="alt-text-tooltip-".concat(Oi(Di,this).id),(a=Oi(Di,this)._uiManager._signal).addEventListener("abort",(function(){clearTimeout(Oi(Ii,s)),Ti(Ii,s,null)}),{once:!0}),e.addEventListener("mouseenter",(function(){Ti(Ii,s,setTimeout((function(){Ti(Ii,s,null),Oi(ji,s).classList.add("show"),Oi(Di,s)._reportTelemetry({action:"alt_text_tooltip"})}),100))}),{signal:a}),e.addEventListener("mouseleave",(function(){var t;Oi(Ii,s)&&(clearTimeout(Oi(Ii,s)),Ti(Ii,s,null)),null===(t=Oi(ji,s))||void 0===t||t.classList.remove("show")}),{signal:a})),!Oi(Mi,this)){t.next=25;break}return t.next=22,on._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip");case 22:t.t0=t.sent,t.next=26;break;case 25:t.t0=Oi(Li,this);case 26:i.innerText=t.t0,i.parentNode||e.append(i),null==(o=Oi(Di,this).getImageForAltText())||o.setAttribute("aria-describedby",i.id);case 30:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}on=Hi;var qi,Yi,Xi,Ki={_:null};function Qi(t,e,r){return e=$i(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ji()?Reflect.construct(e,r||[],$i(t).constructor):e.apply(t,r))}function Ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ji=function(){return!!t})()}function $i(t){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$i(t)}function Zi(t,e){return Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zi(t,e)}function ta(t){return function(t){if(Array.isArray(t))return sa(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||oa(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ea(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=oa(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function ra(){ra=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function na(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ia(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){na(a,n,i,o,s,"next",t)}function s(t){na(a,n,i,o,s,"throw",t)}o(void 0)}))}}function aa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||oa(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oa(t,e){if(t){if("string"==typeof t)return sa(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sa(t,e):void 0}}function sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1||this.y<0||this.y>1)){var a=this.div.getBoundingClientRect(),o=a.x,s=a.y;this.parent.findNewParent(this,o,s)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}var u=this.x,c=this.y,l=aa(this.getBaseTranslation(),2);u+=l[0],c+=l[1],this.div.style.left="".concat((100*u).toFixed(2),"%"),this.div.style.top="".concat((100*c).toFixed(2),"%"),this.div.scrollIntoView({block:"nearest"})}},{key:"_hasBeenMoved",get:function(){return!!ya(Ta,this)&&(ya(Ta,this)[0]!==this.x||ya(Ta,this)[1]!==this.y)}},{key:"getBaseTranslation",value:function(){var e=aa(this.parentDimensions,2),r=e[0],n=e[1],i=t._borderLineWidth,a=i/r,o=i/n;switch(this.rotation){case 90:return[-a,o];case 180:return[a,o];case 270:return[a,-o];default:return[-a,-o]}}},{key:"_mustFixPosition",get:function(){return!0}},{key:"fixAndSetPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rotation,e=aa(this.pageDimensions,2),r=e[0],n=e[1],i=this.x,a=this.y,o=this.width,s=this.height;if(o*=r,s*=n,i*=r,a*=n,this._mustFixPosition)switch(t){case 0:i=Math.max(0,Math.min(r-o,i)),a=Math.max(0,Math.min(n-s,a));break;case 90:i=Math.max(0,Math.min(r-s,i)),a=Math.min(n,Math.max(o,a));break;case 180:i=Math.min(r,Math.max(o,i)),a=Math.min(n,Math.max(s,a));break;case 270:i=Math.min(r,Math.max(s,i)),a=Math.max(0,Math.min(n-o,a))}this.x=i/=r,this.y=a/=n;var u=aa(this.getBaseTranslation(),2);i+=u[0],a+=u[1];var c=this.div.style;c.left="".concat((100*i).toFixed(2),"%"),c.top="".concat((100*a).toFixed(2),"%"),this.moveInDOM()}},{key:"screenToPageTranslation",value:function(e,r){return Ga.call(t,e,r,this.parentRotation)}},{key:"pageTranslationToScreen",value:function(e,r){return Ga.call(t,e,r,360-this.parentRotation)}},{key:"parentScale",get:function(){return this._uiManager.viewParameters.realScale}},{key:"parentRotation",get:function(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}},{key:"parentDimensions",get:function(){var t=this.parentScale,e=aa(this.pageDimensions,2);return[e[0]*t,e[1]*t]}},{key:"setDims",value:function(t,e){var r=aa(this.parentDimensions,2),n=r[0],i=r[1];this.div.style.width="".concat((100*t/n).toFixed(2),"%"),ya(xa,this)||(this.div.style.height="".concat((100*e/i).toFixed(2),"%"))}},{key:"fixDims",value:function(){var t=this.div.style,e=t.height,r=t.width,n=r.endsWith("%"),i=!ya(xa,this)&&e.endsWith("%");if(!n||!i){var a=aa(this.parentDimensions,2),o=a[0],s=a[1];n||(t.width="".concat((100*parseFloat(r)/o).toFixed(2),"%")),ya(xa,this)||i||(t.height="".concat((100*parseFloat(e)/s).toFixed(2),"%"))}}},{key:"getInitialTranslation",value:function(){return[0,0]}},{key:"altTextFinish",value:function(){var t;null===(t=ya(wa,this))||void 0===t||t.finish()}},{key:"addEditToolbar",value:(i=ia(ra().mark((function t(){return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._editToolbar&&!ya(La,this)){t.next=2;break}return t.abrupt("return",this._editToolbar);case 2:if(this._editToolbar=new ir(this),this.div.append(this._editToolbar.render()),!ya(wa,this)){t.next=7;break}return t.next=7,this._editToolbar.addAltText(ya(wa,this));case 7:return t.abrupt("return",this._editToolbar);case 8:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"removeEditToolbar",value:function(){var t;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,null===(t=ya(wa,this))||void 0===t||t.destroy())}},{key:"addContainer",value:function(t){var e,r=null===(e=this._editToolbar)||void 0===e?void 0:e.div;r?r.before(t):this.div.append(t)}},{key:"getClientDimensions",value:function(){return this.div.getBoundingClientRect()}},{key:"addAltTextButton",value:(n=ia(ra().mark((function e(){return ra().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ya(wa,this)){e.next=2;break}return e.abrupt("return");case 2:return Hi.initialize(t._l10nPromise),pa(wa,this,new Hi(this)),ya(ma,this)&&(ya(wa,this).data=ya(ma,this),pa(ma,this,null)),e.next=7,this.addEditToolbar();case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"altTextData",get:function(){var t;return null===(t=ya(wa,this))||void 0===t?void 0:t.data},set:function(t){ya(wa,this)&&(ya(wa,this).data=t)}},{key:"guessedAltText",get:function(){var t;return null===(t=ya(wa,this))||void 0===t?void 0:t.guessedText}},{key:"setGuessedAltText",value:(r=ia(ra().mark((function t(e){var r;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(r=ya(wa,this))||void 0===r?void 0:r.setGuessedText(e);case 2:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"serializeAltText",value:function(t){var e;return null===(e=ya(wa,this))||void 0===e?void 0:e.serialize(t)}},{key:"hasAltText",value:function(){return!!ya(wa,this)&&!ya(wa,this).isEmpty()}},{key:"hasAltTextData",value:function(){var t,e;return null!==(t=null===(e=ya(wa,this))||void 0===e?void 0:e.hasData())&&void 0!==t&&t}},{key:"render",value:function(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=ya(ka,this)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),ga(Na,this,Ka).call(this);var t=aa(this.parentDimensions,2),e=t[0],r=t[1];this.parentRotation%180!=0&&(this.div.style.maxWidth="".concat((100*r/e).toFixed(2),"%"),this.div.style.maxHeight="".concat((100*e/r).toFixed(2),"%"));var n=aa(this.getInitialTranslation(),2),i=n[0],a=n[1];return this.translate(i,a),Br(this,this.div,["pointerdown"]),this.div}},{key:"pointerdown",value:function(t){var e=J.platform.isMac;0!==t.button||t.ctrlKey&&e?t.preventDefault():(pa(Oa,this,!0),this._isDraggable?ga(Na,this,Xa).call(this,t):ga(Na,this,Ya).call(this,t))}},{key:"isSelected",get:function(){return this._uiManager.isSelected(this)}},{key:"moveInDOM",value:function(){var t=this;ya(Ca,this)&&clearTimeout(ya(Ca,this)),pa(Ca,this,setTimeout((function(){var e;pa(Ca,t,null),null===(e=t.parent)||void 0===e||e.moveEditorInDOM(t)}),0))}},{key:"_setParentAndPosition",value:function(t,e,r){t.changeParent(this),this.x=e,this.y=r,this.fixAndSetPosition()}},{key:"getRect",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.rotation,n=this.parentScale,i=aa(this.pageDimensions,2),a=i[0],o=i[1],s=aa(this.pageTranslation,2),u=s[0],c=s[1],l=t/n,h=e/n,f=this.x*a,d=this.y*o,v=this.width*a,p=this.height*o;switch(r){case 0:return[f+l+u,o-d-h-p+c,f+l+v+u,o-d-h+c];case 90:return[f+h+u,o-d+l+c,f+h+p+u,o-d+l+v+c];case 180:return[f-l-v+u,o-d+h+c,f-l+u,o-d+h+p+c];case 270:return[f-h-p+u,o-d-l-v+c,f-h+u,o-d-l+c];default:throw new Error("Invalid rotation")}}},{key:"getRectInCurrentCoords",value:function(t,e){var r=aa(t,4),n=r[0],i=r[1],a=r[2],o=r[3],s=a-n,u=o-i;switch(this.rotation){case 0:return[n,e-o,s,u];case 90:return[n,e-i,u,s];case 180:return[a,e-i,s,u];case 270:return[a,e-o,u,s];default:throw new Error("Invalid rotation")}}},{key:"onceAdded",value:function(){}},{key:"isEmpty",value:function(){return!1}},{key:"enableEditMode",value:function(){pa(La,this,!0)}},{key:"disableEditMode",value:function(){pa(La,this,!1)}},{key:"isInEditMode",value:function(){return ya(La,this)}},{key:"shouldGetKeyboardEvents",value:function(){return ya(Ma,this)}},{key:"needsToBeRebuilt",value:function(){return this.div&&!this.isAttachedToDOM}},{key:"rebuild",value:function(){ga(Na,this,Ka).call(this)}},{key:"rotate",value:function(t){}},{key:"serializeDeleted",value:function(){var t;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:(null===(t=this._initialData)||void 0===t?void 0:t.popupRef)||""}}},{key:"serialize",value:function(){F("An editor must be serializable")}},{key:"hasBeenModified",get:function(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}},{key:"remove",value:function(){var t;if(null===(t=ya(Ea,this))||void 0===t||t.abort(),pa(Ea,this,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),ya(Ca,this)&&(clearTimeout(ya(Ca,this)),pa(Ca,this,null)),ga(Na,this,to).call(this),this.removeEditToolbar(),ya(Ra,this)){var e,r=ea(ya(Ra,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;clearTimeout(n)}}catch(t){r.e(t)}finally{r.f()}pa(Ra,this,null)}this.parent=null}},{key:"isResizable",get:function(){return!1}},{key:"makeResizable",value:function(){this.isResizable&&(ga(Na,this,Ua).call(this),ya(Aa,this).classList.remove("hidden"),Br(this,this.div,["keydown"]))}},{key:"toolbarPosition",get:function(){return null}},{key:"keydown",value:function(e){if(this.isResizable&&e.target===this.div&&"Enter"===e.key){this._uiManager.setSelected(this),pa(_a,this,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});var r=ya(Aa,this).children;if(!ya(ba,this)){pa(ba,this,Array.from(r));var n,i=ga(Na,this,Qa).bind(this),a=ga(Na,this,Ja).bind(this),o=this._uiManager._signal,s=ea(ya(ba,this));try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.getAttribute("data-resizer-name");u.setAttribute("role","spinbutton"),u.addEventListener("keydown",i,{signal:o}),u.addEventListener("blur",a,{signal:o}),u.addEventListener("focus",ga(Na,this,$a).bind(this,c),{signal:o}),u.setAttribute("data-l10n-id",t._l10nResizer[c])}}catch(t){s.e(t)}finally{s.f()}}var l,h=ya(ba,this)[0],f=0,d=ea(r);try{for(d.s();!(l=d.n()).done&&l.value!==h;)f++}catch(t){d.e(t)}finally{d.f()}var v=(360-this.rotation+this.parentRotation)%360/90*(ya(ba,this).length/4);if(v!==f){if(vf)for(var y=0;y1&&void 0!==arguments[1]&&arguments[1]){ya(Ra,this)||pa(Ra,this,new Map);var n=e.action,i=ya(Ra,this).get(n);return i&&clearTimeout(i),i=setTimeout((function(){r._reportTelemetry(e),ya(Ra,r).delete(n),0===ya(Ra,r).size&&pa(Ra,r,null)}),t._telemetryTimeout),void ya(Ra,this).set(n,i)}e.type||(e.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;this.div.classList.toggle("hidden",!t),this._isVisible=t}},{key:"enable",value:function(){this.div&&(this.div.tabIndex=0),pa(ka,this,!1)}},{key:"disable",value:function(){this.div&&(this.div.tabIndex=-1),pa(ka,this,!0)}},{key:"renderAnnotationElement",value:function(t){var e=t.container.querySelector(".annotationContent");if(e){if("CANVAS"===e.nodeName){var r=e;(e=document.createElement("div")).classList.add("annotationContent",this.editorType),r.before(e)}}else(e=document.createElement("div")).classList.add("annotationContent",this.editorType),t.container.prepend(e);return e}},{key:"resetAnnotationElement",value:function(t){var e=t.container.firstChild;"DIV"===(null==e?void 0:e.nodeName)&&e.classList.contains("annotationContent")&&e.remove()}}],[{key:"_resizerKeyboardManager",get:function(){var e=t.prototype._resizeWithKeyboard,r=Kn.TRANSLATE_SMALL,n=Kn.TRANSLATE_BIG;return W(this,"_resizerKeyboardManager",new rn([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-r,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[r,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-r]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,r]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,n]}],[["Escape","mac+Escape"],t.prototype._stopResizingWithKeyboard]]))}},{key:"_defaultLineColor",get:function(){return W(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}},{key:"deleteAnnotationElement",value:function(t){var e=new eo({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}},{key:"initialize",value:function(e,r,n){if(t._l10nResizer||(t._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),t._l10nPromise||(t._l10nPromise=new Map([].concat(ta(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-new-alt-text-added-button-label","pdfjs-editor-new-alt-text-missing-button-label","pdfjs-editor-new-alt-text-to-review-button-label"].map((function(t){return[t,e.get(t)]}))),ta(["pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer"].map((function(t){return[t,e.get.bind(e,t)]})))))),null!=n&&n.strings){var i,a=ea(n.strings);try{for(a.s();!(i=a.n()).done;){var o=i.value;t._l10nPromise.set(o,e.get(o))}}catch(t){a.e(t)}finally{a.f()}}if(-1===t._borderLineWidth){var s=getComputedStyle(document.documentElement);t._borderLineWidth=parseFloat(s.getPropertyValue("--outline-width"))||0}}},{key:"updateDefaultParams",value:function(t,e){}},{key:"defaultPropertiesToUpdate",get:function(){return[]}},{key:"isHandlingMimeForPasting",value:function(t){return!1}},{key:"paste",value:function(t,e){F("Not implemented")}},{key:"deserialize",value:(e=ia(ra().mark((function t(e,r,n){var i,a,o,s,u,c,l,h,f,d;return ra().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=new this.prototype.constructor({parent:r,id:r.getNextId(),uiManager:n})).rotation=e.rotation,pa(ma,i,e.accessibilityData),a=aa(i.pageDimensions,2),o=a[0],s=a[1],u=i.getRectInCurrentCoords(e.rect,s),c=aa(u,4),l=c[0],h=c[1],f=c[2],d=c[3],i.x=l/o,i.y=h/s,i.width=f/o,i.height=d/s,t.abrupt("return",i);case 10:case"end":return t.stop()}}),t,this)}))),function(t,r,n){return e.apply(this,arguments)})},{key:"MIN_SIZE",get:function(){return 16}},{key:"canCreateNewEmptyEditor",value:function(){return!0}}]);var e,r,n,i}();function Ba(t,e,r){var n=aa(t,2),i=n[0],a=n[1],o=aa(this.screenToPageTranslation(e,r),2);e=o[0],r=o[1],this.x+=e/i,this.y+=r/a,this.fixAndSetPosition()}function Ga(t,e,r){switch(r){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}function Ha(t){switch(t){case 90:var e=aa(this.pageDimensions,2),r=e[0],n=e[1];return[0,-r/n,n/r,0];case 180:return[-1,0,0,-1];case 270:var i=aa(this.pageDimensions,2),a=i[0],o=i[1];return[0,a/o,-o/a,0];default:return[1,0,0,1]}}function Ua(){if(!ya(Aa,this)){pa(Aa,this,document.createElement("div")),ya(Aa,this).classList.add("resizers");for(var t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal,r=0,n=t;r>>8,e[r++]=255&a)}}else{if(!ArrayBuffer.isView(t))throw new Error("Invalid data format, must be a string or TypedArray.");r=(e=t.slice()).byteLength}for(var o=r>>2,s=r-4*o,u=new Uint32Array(e.buffer,0,o),c=0,l=0,h=this.h1,f=this.h2,d=3432918353,v=461845907,p=11601,y=13715,g=0;g>>17)*v&ao|c*y&oo)<<13|h>>>19)+3864292196:f=5*(f=(f^=l=(l=(l=(l=u[g])*d&ao|l*p&oo)<<15|l>>>17)*v&ao|l*y&oo)<<13|f>>>19)+3864292196;switch(c=0,s){case 3:c^=e[4*o+2]<<16;case 2:c^=e[4*o+1]<<8;case 1:c=(c=(c=(c^=e[4*o])*d&ao|c*p&oo)<<15|c>>>17)*v&ao|c*y&oo,1&o?h^=c:f^=c}this.h1=h,this.h2=f}},{key:"hexdigest",value:function(){var t=this.h1,e=this.h2;return t=3981806797*(t^=e>>>1)&ao|36045*t&oo,t=444984403*(t^=(e=4283543511*e&ao|(2950163797*(e<<16|t>>>16)&ao)>>>16)>>>1)&ao|60499*t&oo,((t^=(e=3301882366*e&ao|(3120437893*(e<<16|t>>>16)&ao)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}])}();function uo(t,e,r){return e=lo(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,co()?Reflect.construct(e,r||[],lo(t).constructor):e.apply(t,r))}function co(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(co=function(){return!!t})()}function lo(t){return lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}function fo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||po(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=po(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function po(t,e){if(t){if("string"==typeof t)return yo(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yo(t,e):void 0}}function yo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0?Q(_o(Po,this)):null}},{key:"setAll",value:function(t){for(var e=0,r=Object.entries(t);e0?{map:e,hash:r.hexdigest(),transfer:n}:So}},{key:"editorStats",get:function(){var t,e=null,r=new Map,n=vo(_o(Po,this).values());try{for(n.s();!(t=n.n()).done;){var i,a=t.value;if(a instanceof Wa){var o=a.telemetryFinalData;if(o){var s=o.type;r.has(s)||r.set(s,Object.getPrototypeOf(a).constructor),e||(e=Object.create(null));for(var u=(i=e)[s]||(i[s]=new Map),c=0,l=Object.entries(o);c=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Do(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function No(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Do(a,n,i,o,s,"next",t)}function s(t){Do(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Wo(t,e){if(t){if("string"==typeof t)return Bo(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bo(t,e):void 0}}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this.nativeFontFaces);try{for(e.s();!(t=e.n()).done;){var r=t.value;this._document.fonts.delete(r)}}catch(t){e.e(t)}finally{e.f()}this.nativeFontFaces.clear(),Vo(qo,this).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"loadSystemFont",value:(e=No(Fo().mark((function t(e){var r,n,i,a,o,s;return Fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.systemFontInfo,n=e._inspectFont,r&&!Vo(qo,this).has(r.loadedName)){t.next=3;break}return t.abrupt("return");case 3:if(D(!this.disableFontFace,"loadSystemFont shouldn't be called when \`disableFontFace\` is set."),!this.isFontLoadingAPISupported){t.next=20;break}return i=r.loadedName,a=r.src,o=r.style,s=new FontFace(i,a,o),this.addNativeFontFace(s),t.prev=8,t.next=11,s.load();case 11:Vo(qo,this).add(i),null==n||n(r),t.next=19;break;case 15:t.prev=15,t.t0=t.catch(8),R("Cannot load system font: ".concat(r.baseFontName,", installing it could help to improve PDF rendering.")),this.removeNativeFontFace(s);case 19:return t.abrupt("return");case 20:F("Not implemented: loadSystemFont without the Font Loading API.");case 21:case"end":return t.stop()}}),t,this,[[8,15]])}))),function(t){return e.apply(this,arguments)})},{key:"bind",value:(t=No(Fo().mark((function t(e){var r,n,i=this;return Fo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.attached||e.missingFile&&!e.systemFontInfo)){t.next=2;break}return t.abrupt("return");case 2:if(e.attached=!0,!e.systemFontInfo){t.next=7;break}return t.next=6,this.loadSystemFont(e);case 6:case 21:return t.abrupt("return");case 7:if(!this.isFontLoadingAPISupported){t.next=22;break}if(!(r=e.createNativeFontFace())){t.next=21;break}return this.addNativeFontFace(r),t.prev=11,t.next=14,r.loaded;case 14:t.next=21;break;case 16:throw t.prev=16,t.t0=t.catch(11),R("Failed to load font '".concat(r.family,"': '").concat(t.t0,"'.")),e.disableFontFace=!0,t.t0;case 22:if(!(n=e.createFontFaceRule())){t.next=29;break}if(this.insertRule(n),!this.isSyncFontLoadingSupported){t.next=27;break}return t.abrupt("return");case 27:return t.next=29,new Promise((function(t){var r=i._queueLoadingCallback(t);i._prepareFontLoadEvent(e,r)}));case 29:case"end":return t.stop()}}),t,this,[[11,16]])}))),function(e){return t.apply(this,arguments)})},{key:"isFontLoadingAPISupported",get:function(){var t;return W(this,"isFontLoadingAPISupported",!(null===(t=this._document)||void 0===t||!t.fonts))}},{key:"isSyncFontLoadingSupported",get:function(){var t,e=!1;return(m||"undefined"!=typeof navigator&&"string"==typeof(null===(t=navigator)||void 0===t?void 0:t.userAgent)&&/Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),W(this,"isSyncFontLoadingSupported",e)}},{key:"_queueLoadingCallback",value:function(t){var e=this.loadingRequests,r={done:!1,complete:function(){for(D(!r.done,"completeRequest() cannot be called twice."),r.done=!0;e.length>0&&e[0].done;){var t=e.shift();setTimeout(t.callback,0)}},callback:t};return e.push(r),r}},{key:"_loadTestFont",get:function(){return W(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}},{key:"_prepareFontLoadEvent",value:function(t,e){function r(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function n(t,e,r,n){return t.substring(0,e)+n+t.substring(e+r)}var i,a,o=this._document.createElement("canvas");o.width=1,o.height=1;var s,u=o.getContext("2d"),c=0,l="lt".concat(Date.now()).concat(this.loadTestFontId++),h=this._loadTestFont,f=1482184792,d=r(h=n(h,976,l.length,l),16);for(i=0,a=l.length-3;i>24&255,s>>16&255,s>>8&255,255&s)));var v="url(data:font/opentype;base64,".concat(btoa(h),");"),p='@font-face {font-family:"'.concat(l,'";src:').concat(v,"}");this.insertRule(p);var y=this._document.createElement("div");y.style.visibility="hidden",y.style.width=y.style.height="10px",y.style.position="absolute",y.style.top=y.style.left="0px";for(var g=0,m=[t.loadedName,l];g30)return R("Load test font never loaded."),void r();u.font="30px "+e,u.fillText(".",0,20),u.getImageData(0,0,1,1).data[3]>0?r():setTimeout(t.bind(null,e,r))}(l,(function(){y.remove(),e.complete()}))}}]);var t,e}(),Xo=function(){return Uo((function t(e,r){var n=r.disableFontFace,i=void 0!==n&&n,a=r.inspectFont,o=void 0===a?null:a;for(var s in Go(this,t),this.compiledGlyphs=Object.create(null),e)this[s]=e[s];this.disableFontFace=!0===i,this._inspectFont=o}),[{key:"createNativeFontFace",value:function(){var t,e;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),e=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}else e=new FontFace(this.loadedName,this.data,{});return null===(t=this._inspectFont)||void 0===t||t.call(this,this),e}},{key:"createFontFaceRule",value:function(){var t;if(!this.data||this.disableFontFace)return null;var e,r=X(this.data),n="url(data:".concat(this.mimetype,";base64,").concat(btoa(r),");");if(this.cssFontInfo){var i="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(i+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),e='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(i,"src:").concat(n,"}")}else e='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(n,"}");return null===(t=this._inspectFont)||void 0===t||t.call(this,this,n),e}},{key:"getPathGenerator",value:function(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];var r;try{r=t.get(this.loadedName+"_path_"+e)}catch(t){R('getPathGenerator - ignoring character: "'.concat(t,'".'))}if(!Array.isArray(r)||0===r.length)return this.compiledGlyphs[e]=function(t,e){};for(var n=[],i=function(t){switch(r[t++]){case 0:var e=Ro(r.slice(t,t+6),6),i=e[0],o=e[1],s=e[2],u=e[3],c=e[4],l=e[5];n.push((function(t){return t.bezierCurveTo(i,o,s,u,c,l)})),t+=6;break;case 1:var h=Ro(r.slice(t,t+2),2),f=h[0],d=h[1];n.push((function(t){return t.moveTo(f,d)})),t+=2;break;case 2:var v=Ro(r.slice(t,t+2),2),p=v[0],y=v[1];n.push((function(t){return t.lineTo(p,y)})),t+=2;break;case 3:var g=Ro(r.slice(t,t+4),4),m=g[0],b=g[1],w=g[2],k=g[3];n.push((function(t){return t.quadraticCurveTo(m,b,w,k)})),t+=4;break;case 4:n.push((function(t){return t.restore()}));break;case 5:n.push((function(t){return t.save()}));break;case 6:D(2===n.length,"Scale command is only valid at the third position.");break;case 7:var x=Ro(r.slice(t,t+6),6),A=x[0],_=x[1],E=x[2],S=x[3],O=x[4],T=x[5];n.push((function(t){return t.transform(A,_,E,S,O,T)})),t+=6;break;case 8:var P=Ro(r.slice(t,t+2),2),L=P[0],M=P[1];n.push((function(t){return t.translate(L,M)})),t+=2}a=t},a=0,o=r.length;a=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function as(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}if(m){var os=Promise.withResolvers(),ss=null,us=function(){var t,e=(t=is().mark((function t(){var e,r,n,i,a,o;return is().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,import("fs");case 2:return e=t.sent,t.next=5,import("http");case 5:return r=t.sent,t.next=8,import("https");case 8:return n=t.sent,t.next=11,import("url");case 11:return i=t.sent,t.prev=12,t.next=15,import("canvas");case 15:a=t.sent,t.next=20;break;case 18:t.prev=18,t.t0=t.catch(12);case 20:return t.prev=20,t.next=23,import("path2d");case 23:o=t.sent,t.next=28;break;case 26:t.prev=26,t.t1=t.catch(20);case 28:return t.abrupt("return",new Map(Object.entries({fs:e,http:r,https:n,url:i,canvas:a,path2d:o})));case 29:case"end":return t.stop()}}),t,null,[[12,18],[20,26]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){as(a,n,i,o,s,"next",t)}function s(t){as(a,n,i,o,s,"throw",t)}o(void 0)}))});return function(){return e.apply(this,arguments)}}();us().then((function(t){if(ss=t,os.resolve(),!globalThis.DOMMatrix){var e,r=null===(e=t.get("canvas"))||void 0===e?void 0:e.DOMMatrix;r?globalThis.DOMMatrix=r:R("Cannot polyfill \`DOMMatrix\`, rendering may be broken.")}if(!globalThis.Path2D){var n,i,a,o=null===(n=t.get("canvas"))||void 0===n?void 0:n.CanvasRenderingContext2D,s=null===(i=t.get("path2d"))||void 0===i?void 0:i.applyPath2DToCanvasRenderingContext,u=null===(a=t.get("path2d"))||void 0===a?void 0:a.Path2D;o&&s&&u?(s(o),globalThis.Path2D=u):R("Cannot polyfill \`Path2D\`, rendering may be broken.")}}),(function(t){R("loadPackages: ".concat(t)),ss=new Map,os.resolve()}))}var cs=function(){return rs((function t(){ts(this,t)}),null,[{key:"promise",get:function(){return os.promise}},{key:"get",value:function(t){var e;return null===(e=ss)||void 0===e?void 0:e.get(t)}}])}(),ls=function(t){return cs.get("fs").promises.readFile(t).then((function(t){return new Uint8Array(t)}))},hs=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,pt),rs(e)}(),fs=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,gt),rs(e,[{key:"_createCanvas",value:function(t,e){return cs.get("canvas").createCanvas(t,e)}}])}(),ds=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,mt),rs(e,[{key:"_fetchData",value:function(t,e){return ls(t).then((function(t){return{cMapData:t,compressionType:e}}))}}])}(),vs=function(t){function e(){return ts(this,e),Ko(this,e,arguments)}return $o(e,bt),rs(e,[{key:"_fetchData",value:function(t){return ls(t)}}])}();function ps(t){return function(t){if(Array.isArray(t))return ms(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gs(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ys(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gs(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function gs(t,e){if(t){if("string"==typeof t)return ms(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ms(t,e):void 0}}function ms(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rc[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u),c[n+1]>c[i+1]&&(u=n,n=i,i=u,u=o,o=s,s=u),c[r+1]>c[n+1]&&(u=r,r=n,n=u,u=a,a=o,o=u);var d=(c[r]+e.offsetX)*e.scaleX,v=(c[r+1]+e.offsetY)*e.scaleY,p=(c[n]+e.offsetX)*e.scaleX,y=(c[n+1]+e.offsetY)*e.scaleY,g=(c[i]+e.offsetX)*e.scaleX,m=(c[i+1]+e.offsetY)*e.scaleY;if(!(v>=m))for(var b,w,k,x,A,_,E,S,O=l[a],T=l[a+1],P=l[a+2],L=l[o],M=l[o+1],C=l[o+2],j=l[s],I=l[s+1],R=l[s+2],F=Math.round(v),D=Math.round(m),N=F;N<=D;N++){if(Nm?1:y===m?0:(y-N)/(y-m)),w=L-(L-j)*B,k=M-(M-I)*B,x=C-(C-R)*B}var G=void 0;A=d-(d-g)*(G=Nm?1:(v-N)/(v-m)),_=O-(O-j)*G,E=T-(T-I)*G,S=P-(P-R)*G;for(var H=Math.round(Math.min(b,A)),U=Math.round(Math.max(b,A)),z=f*N+4*H,V=H;V<=U;V++)(G=(b-V)/(b-A))<0?G=0:G>1&&(G=1),h[z++]=w-(w-_)*G|0,h[z++]=k-(k-E)*G|0,h[z++]=x-(x-S)*G|0,h[z++]=255}}function Rs(t,e,r){var n,i,a=e.coords,o=e.colors;switch(e.type){case"lattice":var s=e.verticesPerRow,u=Math.floor(a.length/s)-1,c=s-1;for(n=0;n=Math.ceil(d*g)?b=s:k=!0,_>=Math.ceil(v*m)?w=u:x=!0;var E=this.getSizeAndScale(b,this.ctx.canvas.width,g),S=this.getSizeAndScale(w,this.ctx.canvas.height,m),O=t.cachedCanvases.getCanvas("pattern",E.size,S.size),T=O.context,P=o.createCanvasGraphics(T);if(P.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(P,n,a),T.translate(-E.scale*c,-S.scale*l),P.transform(E.scale,0,0,S.scale,0,0),T.save(),this.clipBbox(P,c,l,h,f),P.baseTransform=je(P.ctx),P.executeOperatorList(r),P.endDrawing(),T.restore(),k||x){var L=O.canvas;k&&(b=s),x&&(w=u);for(var M=this.getSizeAndScale(b,this.ctx.canvas.width,g),C=this.getSizeAndScale(w,this.ctx.canvas.height,m),j=M.size,R=C.size,F=t.cachedCanvases.getCanvas("pattern-workaround",j,R),D=F.context,N=k?Math.floor(d/s):0,W=x?Math.floor(v/u):0,B=0;B<=N;B++)for(var G=0;G<=W;G++)D.drawImage(L,j*B,R*G,j,R,0,0,j,R);return{canvas:F.canvas,scaleX:M.scale,scaleY:C.scale,offsetX:c,offsetY:l}}return{canvas:O.canvas,scaleX:E.scale,scaleY:S.scale,offsetX:c,offsetY:l}}},{key:"getSizeAndScale",value:function(e,r,n){var i=Math.max(t.MAX_PATTERN_SIZE,r),a=Math.ceil(e*n);return a>=i?a=i:n=a/e,{scale:n,size:a}}},{key:"clipBbox",value:function(t,e,r,n,i){var a=n-e,o=i-r;t.ctx.rect(e,r,a,o),t.current.updateRectMinMax(je(t.ctx),[e,r,n,i]),t.clip(),t.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function(t,e,r){var n=t.ctx,i=t.current;switch(e){case 1:var a=this.ctx;n.fillStyle=a.fillStyle,n.strokeStyle=a.strokeStyle,i.fillColor=a.fillStyle,i.strokeColor=a.strokeStyle;break;case 2:var o=Z.makeHexColor(r[0],r[1],r[2]);n.fillStyle=o,n.strokeStyle=o,i.fillColor=o,i.strokeColor=o;break;default:throw new q("Unsupported paint type: ".concat(e))}}},{key:"getPattern",value:function(t,e,r,n){var i=r;n!==Ls&&(i=Z.transform(i,e.baseTransform),this.matrix&&(i=Z.transform(i,this.matrix)));var a=this.createPatternCanvas(e),o=new DOMMatrix(i);o=(o=o.translate(a.offsetX,a.offsetY)).scale(1/a.scaleX,1/a.scaleY);var s=t.createPattern(a.canvas,"repeat");return s.setTransform(o),s}}])}();function Ws(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r>3,y=7&a,g=e.length;i=new Uint32Array(i.buffer);for(var m=0,b=0;b=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function zs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Vs(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vs(t,e){if(t){if("string"==typeof t)return qs(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qs(t,e):void 0}}function qs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:Ts,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[this.minX,this.minY,this.maxX,this.maxY];if(t===Ps){e||F("Stroke bounding box must include transform.");var n=Z.singularValueDecompose2dScale(e),i=n[0]*this.lineWidth/2,a=n[1]*this.lineWidth/2;r[0]-=i,r[1]-=a,r[2]+=i,r[3]+=a}return r}},{key:"updateClipFromPath",value:function(){var t=Z.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}},{key:"isEmptyClip",value:function(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ts,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Z.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}])}();function eu(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData)t.putImageData(e,0,0);else{var r,n,i,a,o,s=e.height,u=e.width,c=s%Js,l=(s-c)/Js,h=0===c?l:l+1,f=t.createImageData(u,Js),d=0,v=e.data,p=f.data;if(e.kind===S.GRAYSCALE_1BPP){var y=v.byteLength,g=new Uint32Array(p.buffer,0,p.byteLength>>2),m=g.length,b=u+7>>3,w=4294967295,k=J.isLittleEndian?4278190080:255;for(n=0;nb?u:8*x-7,E=-8&_,O=0,T=0;A>=1}for(;r=l&&(o=u*(a=c)),r=0,i=o;i--;)p[r++]=v[d++],p[r++]=v[d++],p[r++]=v[d++],p[r++]=255;t.putImageData(f,0,n*Js)}}}}function ru(t,e){if(e.bitmap)t.drawImage(e.bitmap,0,0);else for(var r=e.height,n=e.width,i=r%Js,a=(r-i)/Js,o=0===i?a:a+1,s=t.createImageData(n,Js),u=0,c=e.data,l=s.data,h=0;h1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):e}},{key:"beginDrawing",value:function(t){var e,r,n=t.transform,i=t.viewport,a=t.transparency,o=void 0!==a&&a,s=t.background,u=void 0===s?null:s,c=this.ctx.canvas.width,l=this.ctx.canvas.height,h=this.ctx.fillStyle;if(this.ctx.fillStyle=u||"#ffffff",this.ctx.fillRect(0,0,c,l),this.ctx.fillStyle=h,o){var f,d=this.cachedCanvases.getCanvas("transparent",c,l);this.compositeCtx=this.ctx,this.transparentCanvas=d.canvas,this.ctx=d.context,this.ctx.save(),(f=this.ctx).transform.apply(f,Gs(je(this.compositeCtx)))}this.ctx.save(),iu(this.ctx),n&&((r=this.ctx).transform.apply(r,Gs(n)),this.outputScaleX=n[0],this.outputScaleY=n[0]),(e=this.ctx).transform.apply(e,Gs(i.transform)),this.viewportScale=i.scale,this.baseTransform=je(this.ctx)}},{key:"executeOperatorList",value:function(t,e,r,n){var i=t.argsArray,a=t.fnArray,o=e||0,s=i.length;if(s===o)return o;for(var u,c=s-o>10&&"function"==typeof r,l=c?Date.now()+15:0,h=0,f=this.commonObjs,d=this.objs;;){if(void 0!==n&&o===n.nextBreakPoint)return n.breakIt(o,r),o;if((u=a[o])!==P.dependency)this[u].apply(this,i[o]);else{var v,p=Us(i[o]);try{for(p.s();!(v=p.n()).done;){var y=v.value,g=y.startsWith("g_")?f:d;if(!g.has(y))return g.get(y,r),o}}catch(t){p.e(t)}finally{p.f()}}if(++o===s)return o;if(c&&++h>10){if(Date.now()>l)return r(),o;h=0}}}},{key:"endDrawing",value:function(){Hs(lu,this,fu).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();var t,e=Us(this._cachedBitmapsMap.values());try{for(e.s();!(t=e.n()).done;){var r,n=t.value,i=Us(n.values());try{for(i.s();!(r=i.n()).done;){var a=r.value;"undefined"!=typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement&&(a.width=a.height=0)}}catch(t){i.e(t)}finally{i.f()}n.clear()}}catch(t){e.e(t)}finally{e.f()}this._cachedBitmapsMap.clear(),Hs(lu,this,du).call(this)}},{key:"_scaleImage",value:function(t,e){for(var r,n,i=t.width,a=t.height,o=Math.max(Math.hypot(e[0],e[1]),1),s=Math.max(Math.hypot(e[2],e[3]),1),u=i,c=a,l="prescale1";o>2&&u>1||s>2&&c>1;){var h=u,f=c;o>2&&u>1&&(o/=u/(h=u>=16384?Math.floor(u/2)-1||1:Math.ceil(u/2))),s>2&&c>1&&(s/=c/(f=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2)),(n=(r=this.cachedCanvases.getCanvas(l,h,f)).context).clearRect(0,0,h,f),n.drawImage(t,0,0,u,c,0,0,h,f),t=r.canvas,u=h,c=f,l="prescale1"===l?"prescale2":"prescale1"}return{img:t,paintWidth:u,paintHeight:c}}},{key:"_createMaskCanvas",value:function(t){var e,r,n,i,a=this.ctx,o=t.width,s=t.height,u=this.current.fillColor,c=this.current.patternFill,l=je(a);if((t.bitmap||t.data)&&t.count>1){var h=t.bitmap||t.data.buffer;r=JSON.stringify(c?l:[l.slice(0,4),u]),(e=this._cachedBitmapsMap.get(h))||(e=new Map,this._cachedBitmapsMap.set(h,e));var f=e.get(r);if(f&&!c)return{canvas:f,offsetX:Math.round(Math.min(l[0],l[2])+l[4]),offsetY:Math.round(Math.min(l[1],l[3])+l[5])};n=f}n||ru((i=this.cachedCanvases.getCanvas("maskCanvas",o,s)).context,t);var d=Z.transform(l,[1/o,0,0,-1/s,0,0]);d=Z.transform(d,[1,0,0,1,0,-s]);var v=zs(Z.getAxialAlignedBoundingBox([0,0,o,s],d),4),p=v[0],y=v[1],g=v[2],m=v[3],b=Math.round(g-p)||1,w=Math.round(m-y)||1,k=this.cachedCanvases.getCanvas("fillCanvas",b,w),x=k.context,A=p,_=y;x.translate(-A,-_),x.transform.apply(x,Gs(d)),n||(n=(n=this._scaleImage(i.canvas,Ie(x))).img,e&&c&&e.set(r,n)),x.imageSmoothingEnabled=au(je(x),t.interpolate),Zs(x,n,0,0,n.width,n.height,0,0,o,s),x.globalCompositeOperation="source-in";var E=Z.transform(Ie(x),[1,0,0,1,-A,-_]);return x.fillStyle=c?u.getPattern(a,this,E,Ts):u,x.fillRect(0,0,o,s),e&&!c&&(this.cachedCanvases.delete("fillCanvas"),e.set(r,k.canvas)),{canvas:k.canvas,offsetX:Math.round(A),offsetY:Math.round(_)}}},{key:"setLineWidth",value:function(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}},{key:"setLineCap",value:function(t){this.ctx.lineCap=ou[t]}},{key:"setLineJoin",value:function(t){this.ctx.lineJoin=su[t]}},{key:"setMiterLimit",value:function(t){this.ctx.miterLimit=t}},{key:"setDash",value:function(t,e){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(t),r.lineDashOffset=e)}},{key:"setRenderingIntent",value:function(t){}},{key:"setFlatness",value:function(t){}},{key:"setGState",value:function(t){var e,r=Us(t);try{for(r.s();!(e=r.n()).done;){var n=zs(e.value,2),i=n[0],a=n[1];switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=a;break;case"ca":this.current.fillAlpha=a,this.ctx.globalAlpha=a;break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask=a?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(a)}}}catch(t){r.e(t)}finally{r.f()}}},{key:"inSMaskMode",get:function(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function(){var t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var t=this.ctx.canvas.width,e=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,n=this.cachedCanvases.getCanvas(r,t,e);this.suspendedCtx=this.ctx,this.ctx=n.context;var i=this.ctx;i.setTransform.apply(i,Gs(je(this.suspendedCtx))),nu(this.suspendedCtx,i),function(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=function(){t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(t,r){e.translate(t,r),this.__originalTranslate(t,r)},t.scale=function(t,r){e.scale(t,r),this.__originalScale(t,r)},t.transform=function(t,r,n,i,a,o){e.transform(t,r,n,i,a,o),this.__originalTransform(t,r,n,i,a,o)},t.setTransform=function(t,r,n,i,a,o){e.setTransform(t,r,n,i,a,o),this.__originalSetTransform(t,r,n,i,a,o)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(t){e.rotate(t),this.__originalRotate(t)},t.clip=function(t){e.clip(t),this.__originalClip(t)},t.moveTo=function(t,r){e.moveTo(t,r),this.__originalMoveTo(t,r)},t.lineTo=function(t,r){e.lineTo(t,r),this.__originalLineTo(t,r)},t.bezierCurveTo=function(t,r,n,i,a,o){e.bezierCurveTo(t,r,n,i,a,o),this.__originalBezierCurveTo(t,r,n,i,a,o)},t.rect=function(t,r,n,i){e.rect(t,r,n,i),this.__originalRect(t,r,n,i)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(i,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),nu(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}},{key:"compose",value:function(t){if(this.current.activeSMask){t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var e=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}},{key:"composeSMask",value:function(t,e,r,n){var i=n[0],a=n[1],o=n[2]-i,s=n[3]-a;0!==o&&0!==s&&(this.genericComposeSMask(e.context,r,o,s,e.subtype,e.backdrop,e.transferMap,i,a,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(r.canvas,0,0),t.restore())}},{key:"genericComposeSMask",value:function(t,e,r,n,i,a,o,s,u,c,l){var h=t.canvas,f=s-c,d=u-l;if(a)if(f<0||d<0||f+r>h.width||d+n>h.height){var v=this.cachedCanvases.getCanvas("maskExtension",r,n),p=v.context;p.drawImage(h,-f,-d),a.some((function(t){return 0!==t}))&&(p.globalCompositeOperation="destination-atop",p.fillStyle=Z.makeHexColor.apply(Z,Gs(a)),p.fillRect(0,0,r,n),p.globalCompositeOperation="source-over"),h=v.canvas,f=d=0}else if(a.some((function(t){return 0!==t}))){t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);var y=new Path2D;y.rect(f,d,r,n),t.clip(y),t.globalCompositeOperation="destination-atop",t.fillStyle=Z.makeHexColor.apply(Z,Gs(a)),t.fillRect(f,d,r,n),t.restore()}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),"Alpha"===i&&o?e.filter=this.filterFactory.addAlphaFilter(o):"Luminosity"===i&&(e.filter=this.filterFactory.addLuminosityFilter(o));var g=new Path2D;g.rect(s,u,r,n),e.clip(g),e.globalCompositeOperation="destination-in",e.drawImage(h,f,d,r,n,s,u,r,n),e.restore()}},{key:"save",value:function(){this.inSMaskMode?(nu(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();var t=this.current;this.stateStack.push(t),this.current=t.clone()}},{key:"restore",value:function(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),nu(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function(t,e,r,n,i,a){this.ctx.transform(t,e,r,n,i,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function(t,e,r){for(var n,i,a=this.ctx,o=this.current,s=o.x,u=o.y,c=je(a),l=0===c[0]&&0===c[3]||0===c[1]&&0===c[2],h=l?r.slice(0):null,f=0,d=0,v=t.length;f0&&void 0!==arguments[0])||arguments[0],e=this.ctx,r=this.current.strokeColor;e.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof r&&null!=r&&r.getPattern?(e.save(),e.strokeStyle=r.getPattern(e,this,Ie(e),Ps),this.rescaleAndStroke(!1),e.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),e.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function(){this.closePath(),this.stroke()}},{key:"fill",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(e.save(),e.fillStyle=r.getPattern(e,this,Ie(e),Ts),n=!0);var i=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==i&&(this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill()),n&&e.restore(),t&&this.consumePath(i)}},{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=uu}},{key:"eoClip",value:function(){this.pendingClip=cu}},{key:"beginText",value:function(){this.current.textMatrix=b,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function(){var t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();var r,n=Us(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;e.setTransform.apply(e,Gs(i.transform)),e.translate(i.x,i.y),i.addToPath(e,i.fontSize)}}catch(t){n.e(t)}finally{n.f()}e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()}},{key:"setCharSpacing",value:function(t){this.current.charSpacing=t}},{key:"setWordSpacing",value:function(t){this.current.wordSpacing=t}},{key:"setHScale",value:function(t){this.current.textHScale=t/100}},{key:"setLeading",value:function(t){this.current.leading=-t}},{key:"setFont",value:function(t,e){var r,n=this.commonObjs.get(t),i=this.current;if(!n)throw new Error("Can't find font for ".concat(t));if(i.fontMatrix=n.fontMatrix||w,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||R("Invalid font matrix for font "+t),e<0?(e=-e,i.fontDirection=-1):i.fontDirection=1,this.current.font=n,this.current.fontSize=e,!n.isType3Font){var a=n.loadedName||"sans-serif",o=(null===(r=n.systemFontInfo)||void 0===r?void 0:r.css)||'"'.concat(a,'", ').concat(n.fallbackName),s="normal";n.black?s="900":n.bold&&(s="bold");var u=n.italic?"italic":"normal",c=e;e<16?c=16:e>100&&(c=100),this.current.fontSizeScale=e/c,this.ctx.font="".concat(u," ").concat(s," ").concat(c,"px ").concat(o)}}},{key:"setTextRenderingMode",value:function(t){this.current.textRenderingMode=t}},{key:"setTextRise",value:function(t){this.current.textRise=t}},{key:"moveText",value:function(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e}},{key:"setLeadingMoveText",value:function(t,e){this.setLeading(-e),this.moveText(t,e)}},{key:"setTextMatrix",value:function(t,e,r,n,i,a){this.current.textMatrix=[t,e,r,n,i,a],this.current.textMatrixScale=Math.hypot(t,e),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(t,e,r,n){var i,a=this.ctx,o=this.current,s=o.font,u=o.textRenderingMode,c=o.fontSize/o.fontSizeScale,l=3&u,h=!!(4&u),f=o.patternFill&&!s.missingFile;(s.disableFontFace||h||f)&&(i=s.getPathGenerator(this.commonObjs,t)),s.disableFontFace||f?(a.save(),a.translate(e,r),a.beginPath(),i(a,c),n&&a.setTransform.apply(a,Gs(n)),0!==l&&2!==l||a.fill(),1!==l&&2!==l||a.stroke(),a.restore()):(0!==l&&2!==l||a.fillText(t,e,r),1!==l&&2!==l||a.strokeText(t,e,r)),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:je(a),x:e,y:r,fontSize:c,addToPath:i})}},{key:"isFontSubpixelAAEnabled",get:function(){var t=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;t.scale(1.5,1),t.fillText("I",0,10);for(var e=t.getImageData(0,0,10,10).data,r=!1,n=3;n0&&e[n]<255){r=!0;break}return W(this,"isFontSubpixelAAEnabled",r)}},{key:"showText",value:function(t){var e=this.current,r=e.font;if(r.isType3Font)return this.showType3Text(t);var n=e.fontSize;if(0!==n){var i,a=this.ctx,o=e.fontSizeScale,s=e.charSpacing,u=e.wordSpacing,c=e.fontDirection,l=e.textHScale*c,h=t.length,f=r.vertical,d=f?1:-1,v=r.defaultVMetrics,p=n*e.fontMatrix[0],y=0===e.textRenderingMode&&!r.disableFontFace&&!e.patternFill;if(a.save(),a.transform.apply(a,Gs(e.textMatrix)),a.translate(e.x,e.y+e.textRise),c>0?a.scale(l,-1):a.scale(l,1),e.patternFill){a.save();var g=e.fillColor.getPattern(a,this,Ie(a),Ts);i=je(a),a.restore(),a.fillStyle=g}var m=e.lineWidth,b=e.textMatrixScale;if(0===b||0===m){var w=3&e.textRenderingMode;1!==w&&2!==w||(m=this.getSinglePixelWidth())}else m/=b;if(1!==o&&(a.scale(o,o),m/=o),a.lineWidth=m,r.isInvalidPDFjsFont){var k,x=[],A=0,_=Us(t);try{for(_.s();!(k=_.n()).done;){var E=k.value;x.push(E.unicode),A+=E.width}}catch(t){_.e(t)}finally{_.f()}return a.fillText(x.join(""),0,0),e.x+=A*p*l,a.restore(),void this.compose()}var S,O=0;for(S=0;S0){var W=1e3*a.measureText(M).width/n*o;if(R1&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(t)?e=this.cachedPatterns.get(t):(e=function(t){switch(t[0]){case"RadialAxial":return new js(t);case"Mesh":return new Fs(t);case"Dummy":return new Ds}throw new Error("Unknown IR type: ".concat(t[0]))}(this.getObject(t)),this.cachedPatterns.set(t,e)),r&&(e.matrix=r),e}},{key:"shadingFill",value:function(t){if(this.contentVisible){var e=this.ctx;this.save();var r=this._getPattern(t);e.fillStyle=r.getPattern(e,this,Ie(e),Ls);var n=Ie(e);if(n){var i=e.canvas,a=i.width,o=i.height,s=zs(Z.getAxialAlignedBoundingBox([0,0,a,o],n),4),u=s[0],c=s[1],l=s[2],h=s[3];this.ctx.fillRect(u,c,l-u,h-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}},{key:"beginInlineImage",value:function(){F("Should not call beginInlineImage")}},{key:"beginImageData",value:function(){F("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function(t,e){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform.apply(this,Gs(t)),this.baseTransform=je(this.ctx),e)){var r=e[2]-e[0],n=e[3]-e[1];this.ctx.rect(e[0],e[1],r,n),this.current.updateRectMinMax(je(this.ctx),e),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function(t){if(this.contentVisible){this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);var e=this.ctx;t.isolated||I("TODO: Support non-isolated groups."),t.knockout&&R("Knockout groups not supported.");var r=je(e);if(t.matrix&&e.transform.apply(e,Gs(t.matrix)),!t.bbox)throw new Error("Bounding box is required.");var n=Z.getAxialAlignedBoundingBox(t.bbox,je(e)),i=[0,0,e.canvas.width,e.canvas.height];n=Z.intersect(n,i)||[0,0,0,0];var a=Math.floor(n[0]),o=Math.floor(n[1]),s=Math.max(Math.ceil(n[2])-a,1),u=Math.max(Math.ceil(n[3])-o,1);this.current.startNewPathAndClipBox([0,0,s,u]);var c="groupAt"+this.groupLevel;t.smask&&(c+="_smask_"+this.smaskCounter++%2);var l=this.cachedCanvases.getCanvas(c,s,u),h=l.context;h.translate(-a,-o),h.transform.apply(h,Gs(r)),t.smask?this.smaskStack.push({canvas:l.canvas,context:h,offsetX:a,offsetY:o,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(a,o),e.save()),nu(e,h),this.ctx=h,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++}}},{key:"endGroup",value:function(t){if(this.contentVisible){this.groupLevel--;var e=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{var n;this.ctx.restore();var i=je(this.ctx);this.restore(),this.ctx.save(),(n=this.ctx).setTransform.apply(n,Gs(i));var a=Z.getAxialAlignedBoundingBox([0,0,e.canvas.width,e.canvas.height],i);this.ctx.drawImage(e.canvas,0,0),this.ctx.restore(),this.compose(a)}}}},{key:"beginAnnotation",value:function(t,e,r,n,i){var a;if(Hs(lu,this,fu).call(this),iu(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&(a=this.ctx).setTransform.apply(a,Gs(this.baseTransform)),e){var o=e[2]-e[0],s=e[3]-e[1];if(i&&this.annotationCanvasMap){(r=r.slice())[4]-=e[0],r[5]-=e[1],(e=e.slice())[0]=e[1]=0,e[2]=o,e[3]=s;var u=zs(Z.singularValueDecompose2dScale(je(this.ctx)),2),c=u[0],l=u[1],h=this.viewportScale,f=Math.ceil(o*this.outputScaleX*h),d=Math.ceil(s*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(f,d);var v=this.annotationCanvas,p=v.canvas,y=v.context;this.annotationCanvasMap.set(t,p),this.annotationCanvas.savedCtx=this.ctx,this.ctx=y,this.ctx.save(),this.ctx.setTransform(c,0,0,-l,0,s*l),iu(this.ctx)}else iu(this.ctx),this.endPath(),this.ctx.rect(e[0],e[1],o,s),this.ctx.clip(),this.ctx.beginPath()}this.current=new tu(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,Gs(r)),this.transform.apply(this,Gs(n))}},{key:"endAnnotation",value:function(){this.annotationCanvas&&(this.ctx.restore(),Hs(lu,this,du).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}},{key:"paintImageMaskXObject",value:function(t){if(this.contentVisible){var e=t.count;(t=this.getObject(t.data,t)).count=e;var r=this.ctx,n=this.processingType3;if(n&&(void 0===n.compiled&&(n.compiled=function(t){var e=t.width,r=t.height;if(e>1e3||r>1e3)return null;var n,i,a,o,s=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),u=e+1,c=new Uint8Array(u*(r+1)),l=e+7&-8,h=new Uint8Array(l*r),f=0,d=Us(t.data);try{for(d.s();!(o=d.n()).done;)for(var v=o.value,p=128;p>0;)h[f++]=v&p?0:255,p>>=1}catch(t){d.e(t)}finally{d.f()}var y=0;for(0!==h[f=0]&&(c[0]=1,++y),i=1;i>2)+(h[f+1]?4:0)+(h[f-l+1]?8:0)]&&(c[a+i]=s[g],++y),f++;if(h[f-l]!==h[f]&&(c[a+i]=h[f]?2:4,++y),y>1e3)return null}for(a=n*u,0!==h[f=l*(r-1)]&&(c[a]=8,++y),i=1;i1e3)return null;var m=new Int32Array([0,u,-1,0,-u,0,0,0,1]),b=new Path2D;for(n=0;y&&n<=r;n++){for(var w=n*u,k=w+e;w>4,c[w]&=A>>2|A<<2),b.lineTo(w%u,w/u|0),c[w]||--y}while(x!==w);--n}}return h=null,c=null,function(t){t.save(),t.scale(1/e,-1/r),t.translate(0,-r),t.fill(b),t.beginPath(),t.restore()}}(t)),n.compiled))n.compiled(r);else{var i=this._createMaskCanvas(t),a=i.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(a,i.offsetX,i.offsetY),r.restore(),this.compose()}}}},{key:"paintImageMaskXObjectRepeat",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){t=this.getObject(t.data,t);var o=this.ctx;o.save();var s=je(o);o.transform(e,r,n,i,0,0);var u=this._createMaskCanvas(t);o.setTransform(1,0,0,1,u.offsetX-s[4],u.offsetY-s[5]);for(var c=0,l=a.length;cy?p/y:1,e=v>y?v/y:1}}this._cachedScaleForStroking[0]=t,this._cachedScaleForStroking[1]=e}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function(t){var e=this.ctx,r=this.current.lineWidth,n=zs(this.getScaleForStroking(),2),i=n[0],a=n[1];if(e.lineWidth=r||1,1!==i||1!==a){var o=e.getLineDash();if(t&&e.save(),e.scale(i,a),o.length>0){var s=Math.max(i,a);e.setLineDash(o.map((function(t){return t/s}))),e.lineDashOffset/=s}e.stroke(),t&&e.restore()}else e.stroke()}},{key:"isContentVisible",value:function(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}])}();function fu(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,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)}function du(){if(this.pageColors){var t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){var e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}}for(var vu in P)void 0!==hu.prototype[vu]&&(hu.prototype[P[vu]]=hu.prototype[vu]);function pu(t,e){for(var r=0;r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function xu(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Au(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var s=this.desiredSize;this.desiredSize-=a,s>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:n,stream:4,streamId:e,chunk:t},o)}},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:3,streamId:e}),delete a.streamSinks[e])},error(t){D(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:5,streamId:e,reason:Su(t)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};s.sinkCapability.resolve(),s.ready=s.sinkCapability.promise,this.streamSinks[e]=s,new Promise((function(e){e(o(t.data,s))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:8,streamId:e,success:!0})}),(function(t){i.postMessage({sourceName:r,targetName:n,stream:8,streamId:e,reason:Su(t)})}))}function Lu(t){var e=t.streamId,r=this.sourceName,n=t.sourceName,i=this.comObj,a=this.streamControllers[e],o=this.streamSinks[e];switch(t.stream){case 8:t.success?a.startCall.resolve():a.startCall.reject(Su(t.reason));break;case 7:t.success?a.pullCall.resolve():a.pullCall.reject(Su(t.reason));break;case 6:if(!o){i.postMessage({sourceName:r,targetName:n,stream:7,streamId:e,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,new Promise((function(t){var e;t(null===(e=o.onPull)||void 0===e?void 0:e.call(o))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:7,streamId:e,success:!0})}),(function(t){i.postMessage({sourceName:r,targetName:n,stream:7,streamId:e,reason:Su(t)})}));break;case 4:if(D(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(t.chunk);break;case 3:if(D(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),Eu(Ou,this,Mu).call(this,a,e);break;case 5:D(a,"error should have stream controller"),a.controller.error(Su(t.reason)),Eu(Ou,this,Mu).call(this,a,e);break;case 2:t.success?a.cancelCall.resolve():a.cancelCall.reject(Su(t.reason)),Eu(Ou,this,Mu).call(this,a,e);break;case 1:if(!o)break;new Promise((function(e){var r;e(null===(r=o.onCancel)||void 0===r?void 0:r.call(o,Su(t.reason)))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:2,streamId:e,success:!0})}),(function(t){i.postMessage({sourceName:r,targetName:n,stream:2,streamId:e,reason:Su(t)})})),o.sinkCapability.reject(Su(t.reason)),o.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}function Mu(t,e){return Cu.apply(this,arguments)}function Cu(){var t;return t=ku().mark((function t(e,r){var n,i,a;return ku().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.allSettled([null===(n=e.startCall)||void 0===n?void 0:n.promise,null===(i=e.pullCall)||void 0===i?void 0:i.promise,null===(a=e.cancelCall)||void 0===a?void 0:a.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return t.stop()}}),t,this)})),Cu=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){xu(a,n,i,o,s,"next",t)}function s(t){xu(a,n,i,o,s,"throw",t)}o(void 0)}))},Cu.apply(this,arguments)}function ju(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function zu(t,e){if(t){if("string"==typeof t)return Vu(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vu(t,e):void 0}}function Vu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r2&&void 0!==arguments[2]&&arguments[2];t!==ec&&F("Internal method \`_setVisible\` called."),Zu(ic,this,r),Zu(ac,this,e)}}])}(),sc=new WeakMap,uc=new WeakMap,cc=new WeakMap,lc=new WeakMap,hc=new WeakSet,fc=function(){return Xu((function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(qu(this,t),function(t,e){Ju(t,e),e.add(t)}(this,hc),Qu(this,sc,null),Qu(this,uc,new Map),Qu(this,cc,null),Qu(this,lc,null),this.renderingIntent=r,this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,Zu(lc,this,e.order);var n,i=Uu(e.groups);try{for(i.s();!(n=i.n()).done;){var a=n.value;$u(uc,this).set(a.id,new oc(r,a))}}catch(t){i.e(t)}finally{i.f()}if("OFF"===e.baseState){var o,s=Uu($u(uc,this).values());try{for(s.s();!(o=s.n()).done;)o.value._setVisible(ec,!1)}catch(t){s.e(t)}finally{s.f()}}var u,c=Uu(e.on);try{for(c.s();!(u=c.n()).done;){var l=u.value;$u(uc,this).get(l)._setVisible(ec,!0)}}catch(t){c.e(t)}finally{c.f()}var h,f=Uu(e.off);try{for(f.s();!(h=f.n()).done;){var d=h.value;$u(uc,this).get(d)._setVisible(ec,!1)}}catch(t){f.e(t)}finally{f.f()}Zu(cc,this,this.getHash())}}),[{key:"isVisible",value:function(t){if(0===$u(uc,this).size)return!0;if(!t)return I("Optional content group not defined."),!0;if("OCG"===t.type)return $u(uc,this).has(t.id)?$u(uc,this).get(t.id).visible:(R("Optional content group not found: ".concat(t.id)),!0);if("OCMD"===t.type){if(t.expression)return tc(hc,this,dc).call(this,t.expression);if(!t.policy||"AnyOn"===t.policy){var e,r=Uu(t.ids);try{for(r.s();!(e=r.n()).done;){var n=e.value;if(!$u(uc,this).has(n))return R("Optional content group not found: ".concat(n)),!0;if($u(uc,this).get(n).visible)return!0}}catch(t){r.e(t)}finally{r.f()}return!1}if("AllOn"===t.policy){var i,a=Uu(t.ids);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(!$u(uc,this).has(o))return R("Optional content group not found: ".concat(o)),!0;if(!$u(uc,this).get(o).visible)return!1}}catch(t){a.e(t)}finally{a.f()}return!0}if("AnyOff"===t.policy){var s,u=Uu(t.ids);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(!$u(uc,this).has(c))return R("Optional content group not found: ".concat(c)),!0;if(!$u(uc,this).get(c).visible)return!0}}catch(t){u.e(t)}finally{u.f()}return!1}if("AllOff"===t.policy){var l,h=Uu(t.ids);try{for(h.s();!(l=h.n()).done;){var f=l.value;if(!$u(uc,this).has(f))return R("Optional content group not found: ".concat(f)),!0;if($u(uc,this).get(f).visible)return!1}}catch(t){h.e(t)}finally{h.f()}return!0}return R("Unknown optional content policy ".concat(t.policy,".")),!0}return R("Unknown group type ".concat(t.type,".")),!0}},{key:"setVisibility",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=$u(uc,this).get(t);r?(r._setVisible(ec,!!e,!0),Zu(sc,this,null)):R("Optional content group not found: ".concat(t))}},{key:"setOCGState",value:function(t){var e,r,n=t.state,i=(t.preserveRB,Uu(n));try{for(i.s();!(r=i.n()).done;){var a=r.value;switch(a){case"ON":case"OFF":case"Toggle":e=a;continue}var o=$u(uc,this).get(a);if(o)switch(e){case"ON":o._setVisible(ec,!0);break;case"OFF":o._setVisible(ec,!1);break;case"Toggle":o._setVisible(ec,!o.visible)}}}catch(t){i.e(t)}finally{i.f()}Zu(sc,this,null)}},{key:"hasInitialVisibility",get:function(){return null===$u(cc,this)||this.getHash()===$u(cc,this)}},{key:"getOrder",value:function(){return $u(uc,this).size?$u(lc,this)?$u(lc,this).slice():function(t){return function(t){if(Array.isArray(t))return Vu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||zu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}($u(uc,this).keys()):null}},{key:"getGroups",value:function(){return $u(uc,this).size>0?Q($u(uc,this)):null}},{key:"getGroup",value:function(t){return $u(uc,this).get(t)||null}},{key:"getHash",value:function(){if(null!==$u(sc,this))return $u(sc,this);var t,e=new so,r=Uu($u(uc,this));try{for(r.s();!(t=r.n()).done;){var n=Hu(t.value,2),i=n[0],a=n[1];e.update("".concat(i,":").concat(a.visible))}}catch(t){r.e(t)}finally{r.f()}return Zu(sc,this,e.hexdigest())}}])}();function dc(t){var e=t.length;if(e<2)return!0;for(var r=t[0],n=1;n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function pc(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function yc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){pc(a,n,i,o,s,"next",t)}function s(t){pc(a,n,i,o,s,"throw",t)}o(void 0)}))}}function gc(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mc(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function mc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0){var f=c instanceof Uint8Array&&c.byteLength===c.buffer.byteLength?c.buffer:new Uint8Array(c).buffer;this._queuedChunks.push(f)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!s,this._isRangeSupported=!a,this._contentLength=u,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((function(t,e){n._onReceiveData({begin:t,chunk:e})})),e.addProgressListener((function(t,e){n._onProgress({loaded:t,total:e})})),e.addProgressiveReadListener((function(t){n._onReceiveData({chunk:t})})),e.addProgressiveDoneListener((function(){n._onProgressiveDone()})),e.transportReady()}),[{key:"_onReceiveData",value:function(t){var e=t.begin,r=t.chunk,n=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;void 0===e?this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n):D(this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(n),!0)})),"_onReceiveData - no \`PDFDataTransportStreamRangeReader\` instance found.")}},{key:"_progressiveDataLength",get:function(){var t,e;return null!==(t=null===(e=this._fullRequestReader)||void 0===e?void 0:e._loaded)&&void 0!==t?t:0}},{key:"_onProgress",value:function(t){var e,r,n,i;void 0===t.total?null===(e=this._rangeReaders[0])||void 0===e||null===(r=e.onProgress)||void 0===r||r.call(e,{loaded:t.loaded}):null===(n=this._fullRequestReader)||void 0===n||null===(i=n.onProgress)||void 0===i||i.call(n,{loaded:t.loaded,total:t.total})}},{key:"_onProgressiveDone",value:function(){var t;null===(t=this._fullRequestReader)||void 0===t||t.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function(t){var e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}},{key:"getFullReader",value:function(){D(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;return this._queuedChunks=null,new _c(this,t,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function(t,e){if(e<=this._progressiveDataLength)return null;var r=new Ec(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(r),r}},{key:"cancelAllRequests",value:function(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);var r,n=gc(this._rangeReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}this._pdfDataRangeTransport.abort()}}])}(),_c=function(){return kc((function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;bc(this,t),this._stream=e,this._done=n||!1,this._filename=xe(i)?i:null,this._queuedChunks=r||[],this._loaded=0;var a,o=gc(this._queuedChunks);try{for(o.s();!(a=o.n()).done;){var s=a.value;this._loaded+=s.byteLength}}catch(t){o.e(t)}finally{o.f()}this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}),[{key:"_enqueue",value:function(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.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:(t=yc(vc().mark((function t(){var e,r;return vc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._queuedChunks.length>0)){t.next=3;break}return e=this._queuedChunks.shift(),t.abrupt("return",{value:e,done:!1});case 3:if(!this._done){t.next=5;break}return t.abrupt("return",{value:void 0,done:!0});case 5:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 8:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0;var e,r=gc(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0}},{key:"progressiveDone",value:function(){this._done||(this._done=!0)}}]);var t}(),Ec=function(){return kc((function t(e,r,n){bc(this,t),this._stream=e,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}),[{key:"_enqueue",value:function(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});var e,r=gc(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=yc(vc().mark((function t(){var e,r;return vc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._queuedChunk){t.next=4;break}return e=this._queuedChunk,this._queuedChunk=null,t.abrupt("return",{value:e,done:!1});case 4:if(!this._done){t.next=6;break}return t.abrupt("return",{value:void 0,done:!0});case 6:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 9:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0;var e,r=gc(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]);var t}();function Sc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Oc(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oc(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Ic(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Rc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Ic(a,n,i,o,s,"next",t)}function s(t){Ic(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Fc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}}}])}(),zc=function(){return Wc((function t(e){var r=this;Dc(this,t),this._stream=e,this._reader=null,this._loaded=0,this._filename=null;var n=e.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=Promise.withResolvers(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange;var i=new Headers(e.headers),a=n.url;fetch(a,Gc(i,this._withCredentials,this._abortController)).then((function(t){if(!Cc(t.status))throw Mc(t.status,a);r._reader=t.body.getReader(),r._headersCapability.resolve();var n=t.headers,i=Pc({responseHeaders:n,isHttp:e.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),o=i.allowRangeRequests,s=i.suggestedLength;r._isRangeSupported=o,r._contentLength=s||r._contentLength,r._filename=Lc(n),!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new Y("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}),[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=Rc(jc().mark((function t(){var e,r,n,i;return jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._headersCapability.promise;case 2:return t.next=4,this._reader.read();case 4:if(r=t.sent,n=r.value,!(i=r.done)){t.next=9;break}return t.abrupt("return",{value:n,done:i});case 9:return this._loaded+=n.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),t.abrupt("return",{value:Hc(n),done:!1});case 12:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){var e;null===(e=this._reader)||void 0===e||e.cancel(t),this._abortController.abort()}}]);var t}(),Vc=function(){return Wc((function t(e,r,n){var i=this;Dc(this,t),this._stream=e,this._reader=null,this._loaded=0;var a=e.source;this._withCredentials=a.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!a.disableStream,this._abortController=new AbortController;var o=new Headers(e.headers);o.append("Range","bytes=".concat(r,"-").concat(n-1));var s=a.url;fetch(s,Gc(o,this._withCredentials,this._abortController)).then((function(t){if(!Cc(t.status))throw Mc(t.status,s);i._readCapability.resolve(),i._reader=t.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}),[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=Rc(jc().mark((function t(){var e,r,n,i;return jc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._readCapability.promise;case 2:return t.next=4,this._reader.read();case 4:if(r=t.sent,n=r.value,!(i=r.done)){t.next=9;break}return t.abrupt("return",{value:n,done:i});case 9:return this._loaded+=n.byteLength,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),t.abrupt("return",{value:Hc(n),done:!1});case 12:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){var e;null===(e=this._reader)||void 0===e||e.cancel(t),this._abortController.abort()}}]);var t}();function qc(){qc=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Yc(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Xc(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Yc(a,n,i,o,s,"next",t)}function s(t){Yc(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Kc(t,e){return Jc(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Zc(t,e)||Qc()}function Qc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jc(t){if(Array.isArray(t))return t}function $c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Zc(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Zc(t,e){if(t){if("string"==typeof t)return tl(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tl(t,e):void 0}}function tl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&t in this.pendingRequests)if(delete this.pendingRequests[t],0===n.status&&this.isHttp){var i;null===(i=r.onError)||void 0===i||i.call(r,n.status)}else{var a=n.status||200;if(200===a&&206===r.expectedStatus||a===r.expectedStatus){var o=function(t){var e=t.response;return"string"!=typeof e?e:K(e).buffer}(n);if(206===a){var s=n.getResponseHeader("Content-Range"),u=/bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(s);r.onDone({begin:parseInt(u[1],10),chunk:o})}else if(o)r.onDone({begin:0,chunk:o});else{var c;null===(c=r.onError)||void 0===c||c.call(r,n.status)}}else{var l;null===(l=r.onError)||void 0===l||l.call(r,n.status)}}}}},{key:"getRequestXhr",value:function(t){return this.pendingRequests[t].xhr}},{key:"isPendingRequest",value:function(t){return t in this.pendingRequests}},{key:"abortRequest",value:function(t){var e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}])}(),ol=function(){return nl((function t(e){el(this,t),this._source=e,this._manager=new al(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}),[{key:"_onRangeRequestReaderClosed",value:function(t){var e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}},{key:"getFullReader",value:function(){return D(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new sl(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function(t,e){var r=new ul(this._manager,t,e);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(t){var e;null===(e=this._fullRequestReader)||void 0===e||e.cancel(t);var r,n=$c(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}}}])}(),sl=function(){return nl((function t(e,r){el(this,t),this._manager=e;var n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=e.requestFull(n),this._headersCapability=Promise.withResolvers(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.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}),[{key:"_onHeadersReceived",value:function(){var t=this._fullRequestId,e=this._manager.getRequestXhr(t),r=new Headers(e.getAllResponseHeaders().trim().split(/[\\r\\n]+/).map((function(t){var e=function(t){return Jc(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Zc(t)||Qc()}(t.split(": "));return[e[0],e.slice(1).join(": ")]}))),n=Pc({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),i=n.allowRangeRequests,a=n.suggestedLength;i&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=Lc(r),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}},{key:"_onDone",value:function(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0}}},{key:"_onError",value:function(t){this._storedError=Mc(t,this._url),this._headersCapability.reject(this._storedError);var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.reject(this._storedError)}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function(t){var e;null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:t.loaded,total:t.lengthComputable?t.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._headersCapability.promise}},{key:"read",value:(t=Xc(qc().mark((function t(){var e,r;return qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._storedError){t.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){t.next=5;break}return e=this._cachedChunks.shift(),t.abrupt("return",{value:e,done:!1});case 5:if(!this._done){t.next=7;break}return t.abrupt("return",{value:void 0,done:!0});case 7:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 10:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0,this._headersCapability.reject(t);var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]);var t}(),ul=function(){return nl((function t(e,r,n){el(this,t),this._manager=e;var i={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(r,n,i),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}),[{key:"_close",value:function(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}},{key:"_onDone",value:function(t){var e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;var r,n=$c(this._requests);try{for(n.s();!(r=n.n()).done;)r.value.resolve({value:void 0,done:!0})}catch(t){n.e(t)}finally{n.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function(t){this._storedError=Mc(t,this._url);var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.reject(this._storedError)}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function(t){var e;this.isStreamingSupported||null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:t.loaded})}},{key:"isStreamingSupported",get:function(){return!1}},{key:"read",value:(t=Xc(qc().mark((function t(){var e,r;return qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._storedError){t.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){t.next=6;break}return e=this._queuedChunk,this._queuedChunk=null,t.abrupt("return",{value:e,done:!1});case 6:if(!this._done){t.next=8;break}return t.abrupt("return",{value:void 0,done:!0});case 8:return r=Promise.withResolvers(),this._requests.push(r),t.abrupt("return",r.promise);case 11:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._done=!0;var e,r=$c(this._requests);try{for(r.s();!(e=r.n()).done;)e.value.resolve({value:void 0,done:!0})}catch(t){r.e(t)}finally{r.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]);var t}();function cl(t,e,r){return e=hl(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ll()?Reflect.construct(e,r||[],hl(t).constructor):e.apply(t,r))}function ll(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ll=function(){return!!t})()}function hl(t){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hl(t)}function fl(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dl(t,e)}function dl(t,e){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dl(t,e)}function vl(){vl=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function pl(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function yl(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){pl(a,n,i,o,s,"next",t)}function s(t){pl(a,n,i,o,s,"throw",t)}o(void 0)}))}}function gl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(this._rangeRequestReaders.slice(0));try{for(n.s();!(r=n.n()).done;)r.value.cancel(t)}catch(t){n.e(t)}finally{n.f()}}}])}(),Sl=function(){return wl((function t(e){ml(this,t),this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;var r=e.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}),[{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"filename",get:function(){return this._filename}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=yl(vl().mark((function t(){var e,r,n;return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._readCapability.promise;case 2:if(!this._done){t.next=4;break}return t.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){t.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){t.next=10;break}return this._readCapability=Promise.withResolvers(),t.abrupt("return",this.read());case 10:return this._loaded+=r.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded,total:this._contentLength}),n=new Uint8Array(r).buffer,t.abrupt("return",{value:n,done:!1});case 14:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function(t){this._storedError=t,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(t){var e=this;this._readableStream=t,t.on("readable",(function(){e._readCapability.resolve()})),t.on("end",(function(){t.destroy(),e._done=!0,e._readCapability.resolve()})),t.on("error",(function(t){e._error(t)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Y("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t}(),Ol=function(){return wl((function t(e){ml(this,t),this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();var r=e.source;this._isStreamingSupported=!r.disableStream}),[{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}},{key:"read",value:(t=yl(vl().mark((function t(){var e,r,n;return vl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._readCapability.promise;case 2:if(!this._done){t.next=4;break}return t.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){t.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){t.next=10;break}return this._readCapability=Promise.withResolvers(),t.abrupt("return",this.read());case 10:return this._loaded+=r.length,null===(e=this.onProgress)||void 0===e||e.call(this,{loaded:this._loaded}),n=new Uint8Array(r).buffer,t.abrupt("return",{value:n,done:!1});case 14:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"cancel",value:function(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function(t){this._storedError=t,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(t){var e=this;this._readableStream=t,t.on("readable",(function(){e._readCapability.resolve()})),t.on("end",(function(){t.destroy(),e._done=!0,e._readCapability.resolve()})),t.on("error",(function(t){e._error(t)})),this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t}(),Tl=function(t){function e(t){var r;ml(this,e),r=cl(this,e,[t]);var n=Object.fromEntries(t.headers);return r._request=Al(r._url,n,(function(e){if(404===e.statusCode){var n=new z('Missing PDF "'.concat(r._url,'".'));return r._storedError=n,void r._headersCapability.reject(n)}r._headersCapability.resolve(),r._setReadableStream(e);var i=new Headers(r._readableStream.headers),a=Pc({responseHeaders:i,isHttp:t.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),o=a.allowRangeRequests,s=a.suggestedLength;r._isRangeSupported=o,r._contentLength=s||r._contentLength,r._filename=Lc(i)})),r._request.on("error",(function(t){r._storedError=t,r._headersCapability.reject(t)})),r._request.end(),r}return fl(e,Sl),wl(e)}(),Pl=function(t){function e(t,r,n){var i;ml(this,e),i=cl(this,e,[t]);var a=Object.fromEntries(t.headers);return a.Range="bytes=".concat(r,"-").concat(n-1),i._request=Al(i._url,a,(function(t){if(404!==t.statusCode)i._setReadableStream(t);else{var e=new z('Missing PDF "'.concat(i._url,'".'));i._storedError=e}})),i._request.on("error",(function(t){i._storedError=t})),i._request.end(),i}return fl(e,Ol),wl(e)}(),Ll=function(t){function e(t){var r;ml(this,e),r=cl(this,e,[t]);var n=cs.get("fs");return n.promises.lstat(r._url).then((function(t){r._contentLength=t.size,r._setReadableStream(n.createReadStream(r._url)),r._headersCapability.resolve()}),(function(t){"ENOENT"===t.code&&(t=new z('Missing PDF "'.concat(r._url,'".'))),r._storedError=t,r._headersCapability.reject(t)})),r}return fl(e,Sl),wl(e)}(),Ml=function(t){function e(t,r,n){var i;ml(this,e),i=cl(this,e,[t]);var a=cs.get("fs");return i._setReadableStream(a.createReadStream(i._url,{start:r,end:n-1})),i}return fl(e,Ol),wl(e)}();function Cl(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return jl(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function jl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0)){Bl(t,this,yh)._.clear();var e,r=Cl(Bl(t,this,gh)._.values());try{for(r.s();!(e=r.n()).done;)e.value.canvas.remove()}catch(t){r.e(t)}finally{r.f()}Bl(t,this,gh)._.clear()}}}])}();function ch(t){var e,r;if(!Nl(Vl,this)){null!==(r=(e=Nl(Xl,this)).ctx)&&void 0!==r||(e.ctx=fh.call(_l,Nl(Yl,this)));var n,i=Nl(ih,this),a=Nl(rh,this),o=Cl(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(i.length>1e5)return R("Ignoring additional textDivs for performance reasons."),void Wl(Vl,this,!0);if(void 0!==s.str)a.push(s.str),Bl(sh,this,lh).call(this,s);else if("beginMarkedContentProps"===s.type||"beginMarkedContent"===s.type){var u=Nl(zl,this);Wl(zl,this,document.createElement("span")),Nl(zl,this).classList.add("markedContent"),null!==s.id&&Nl(zl,this).setAttribute("id","".concat(s.id)),u.append(Nl(zl,this))}else"endMarkedContent"===s.type&&Wl(zl,this,Nl(zl,this).parentNode)}}catch(t){o.e(t)}finally{o.f()}}}function lh(t){var e=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};Nl(ih,this).push(e);var n=Z.transform(Nl(oh,this),t.transform),i=Math.atan2(n[1],n[0]),a=Nl(eh,this)[t.fontName];a.vertical&&(i+=Math.PI/2);var o=Nl(ql,this)&&a.fontSubstitution||a.fontFamily;o=_l.fontFamilyMap.get(o)||o;var s,u,c=Math.hypot(n[2],n[3]),l=c*ph.call(_l,o,Nl(Yl,this));0===i?(s=n[4],u=n[5]-l):(s=n[4]+l*Math.sin(i),u=n[5]-l*Math.cos(i));var h="calc(var(--scale-factor)*",f=e.style;Nl(zl,this)===Nl($l,this)?(f.left="".concat((100*s/Nl(Ql,this)).toFixed(2),"%"),f.top="".concat((100*u/Nl(Kl,this)).toFixed(2),"%")):(f.left="".concat(h).concat(s.toFixed(2),"px)"),f.top="".concat(h).concat(u.toFixed(2),"px)")),f.fontSize="".concat(h).concat((bh._*c).toFixed(2),"px)"),f.fontFamily=o,r.fontSize=c,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,Nl(ql,this)&&(e.dataset.fontName=a.fontSubstitutionLoadedName||t.fontName),0!==i&&(r.angle=i*(180/Math.PI));var d=!1;if(t.str.length>1)d=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){var v=Math.abs(t.transform[0]),p=Math.abs(t.transform[3]);v!==p&&Math.max(v,p)/Math.min(v,p)>1.5&&(d=!0)}if(d&&(r.canvasWidth=a.vertical?t.height:t.width),Nl(ah,this).set(e,r),Nl(Xl,this).div=e,Nl(Xl,this).properties=r,Bl(sh,this,hh).call(this,Nl(Xl,this)),r.hasText&&Nl(zl,this).append(e),r.hasEOL){var y=document.createElement("br");y.setAttribute("role","presentation"),Nl(zl,this).append(y)}}function hh(t){var e=t.div,r=t.properties,n=t.ctx,i=e.style,a="";if(bh._>1&&(a="scale(".concat(1/bh._,")")),0!==r.canvasWidth&&r.hasText){var o=i.fontFamily,s=r.canvasWidth,u=r.fontSize;dh.call(_l,n,u*Nl(th,this),o);var c=n.measureText(e.textContent).width;c>0&&(a="scaleX(".concat(s*Nl(th,this)/c,") ").concat(a))}0!==r.angle&&(a="rotate(".concat(r.angle,"deg) ").concat(a)),a.length>0&&(i.transform=a)}function fh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=Bl(_l,this,gh)._.get(t||(t=""));if(!e){var r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=t,document.body.append(r),e=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),Bl(_l,this,gh)._.set(t,e),Bl(_l,this,mh)._.set(e,{size:0,family:""})}return e}function dh(t,e,r){var n=Bl(_l,this,mh)._.get(t);e===n.size&&r===n.family||(t.font="".concat(e,"px ").concat(r),n.size=e,n.family=r)}function vh(){if(null===Bl(_l,this,bh)._){var t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),bh._=Bl(_l,this,t.getBoundingClientRect().height),t.remove()}}function ph(t,e){var r=Bl(_l,this,yh)._.get(t);if(r)return r;var n=Bl(_l,this,fh).call(this,e);n.canvas.width=n.canvas.height=Gl,Bl(_l,this,dh).call(this,n,Gl,t);var i=n.measureText(""),a=i.fontBoundingBoxAscent,o=Math.abs(i.fontBoundingBoxDescent);if(a){var s=a/(a+o);return Bl(_l,this,yh)._.set(t,s),n.canvas.width=n.canvas.height=0,s}n.strokeStyle="red",n.clearRect(0,0,Gl,Gl),n.strokeText("g",0,0);var u=n.getImageData(0,0,Gl,Gl).data;o=0;for(var c=u.length-1-3;c>=0;c-=4)if(u[c]>0){o=Math.ceil(c/4/Gl);break}n.clearRect(0,0,Gl,Gl),n.strokeText("A",0,Gl),a=0;for(var l=0,h=(u=n.getImageData(0,0,Gl,Gl).data).length;l0){a=Gl-Math.floor(l/4/Gl);break}n.canvas.width=n.canvas.height=0;var f=a?a/(a+o):Hl;return Bl(_l,this,yh)._.set(t,f),f}_l=uh;var yh={_:new Map},gh={_:new Map},mh={_:new WeakMap},bh={_:null},wh={_:new Set};function kh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(n.children);try{for(u.s();!(s=u.n()).done;)e(s.value)}catch(t){u.e(t)}finally{u.f()}}}}(e),n}},{key:"shouldBuildText",value:function(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}])}();function Sh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Oh(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Nh(t,e){if(t){if("string"==typeof t)return Wh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wh(t,e):void 0}}function Wh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Gh(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Hh(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Gh(a,n,i,o,s,"next",t)}function s(t){Gh(a,n,i,o,s,"throw",t)}o(void 0)}))}}function Uh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zh(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};"string"==typeof r||r instanceof URL?r={url:r}:(r instanceof ArrayBuffer||ArrayBuffer.isView(r))&&(r={data:r});var n=new tf,i=n.docId,a=r.url?function(t){if(t instanceof URL)return t.href;try{return new URL(t,window.location).href}catch(e){if(m&&"string"==typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(r.url):null,o=r.data?function(t){if(m&&"undefined"!=typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as \`Uint8Array\`, rather than \`Buffer\`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"==typeof t)return K(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||"object"==typeof t&&!isNaN(null==t?void 0:t.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(r.data):null,s=r.httpHeaders||null,u=!0===r.withCredentials,c=null!==(t=r.password)&&void 0!==t?t:null,l=r.range instanceof rf?r.range:null,h=Number.isInteger(r.rangeChunkSize)&&r.rangeChunkSize>0?r.rangeChunkSize:Yh,f=r.worker instanceof pf?r.worker:null,d=r.verbosity,v="string"!=typeof r.docBaseUrl||ke(r.docBaseUrl)?null:r.docBaseUrl,p="string"==typeof r.cMapUrl?r.cMapUrl:null,y=!1!==r.cMapPacked,g=r.CMapReaderFactory||Kh,b="string"==typeof r.standardFontDataUrl?r.standardFontDataUrl:null,w=r.StandardFontDataFactory||Jh,k=!0!==r.stopAtErrors,x=Number.isInteger(r.maxImageSize)&&r.maxImageSize>-1?r.maxImageSize:-1,A=!1!==r.isEvalSupported,_="boolean"==typeof r.isOffscreenCanvasSupported?r.isOffscreenCanvasSupported:!m,E=Number.isInteger(r.canvasMaxAreaInBytes)?r.canvasMaxAreaInBytes:-1,S="boolean"==typeof r.disableFontFace?r.disableFontFace:m,O=!0===r.fontExtraProperties,T=!0===r.enableXfa,P=r.ownerDocument||globalThis.document,L=!0===r.disableRange,M=!0===r.disableStream,j=!0===r.disableAutoFetch,I=!0===r.pdfBug,R=r.CanvasFactory||Xh,F=r.FilterFactory||Qh,D=!0===r.enableHWA,N=l?l.length:null!==(e=r.length)&&void 0!==e?e:NaN,W="boolean"==typeof r.useSystemFonts?r.useSystemFonts:!m&&!S,B="boolean"==typeof r.useWorkerFetch?r.useWorkerFetch:g===ye&&w===ge&&p&&b&&Oe(p,document.baseURI)&&Oe(b,document.baseURI);r.canvasFactory&&Pe("\`canvasFactory\`-instance option, please use \`CanvasFactory\` instead."),r.filterFactory&&Pe("\`filterFactory\`-instance option, please use \`FilterFactory\` instead."),C(d);var G={canvasFactory:new R({ownerDocument:P,enableHWA:D}),filterFactory:new F({docId:i,ownerDocument:P}),cMapReaderFactory:B?null:new g({baseUrl:p,isCompressed:y}),standardFontDataFactory:B?null:new w({baseUrl:b})};if(!f){var H={verbosity:d,port:mu.workerPort};f=H.port?pf.fromPort(H):new pf(H),n._worker=f}var U={docId:i,apiVersion:"4.7.0",data:o,password:c,disableAutoFetch:j,rangeChunkSize:h,length:N,docBaseUrl:v,enableXfa:T,evaluatorOptions:{maxImageSize:x,disableFontFace:S,ignoreErrors:k,isEvalSupported:A,isOffscreenCanvasSupported:_,canvasMaxAreaInBytes:E,fontExtraProperties:O,useSystemFonts:W,cMapUrl:B?p:null,standardFontDataUrl:B?b:null}},z={disableFontFace:S,fontExtraProperties:O,ownerDocument:P,pdfBug:I,styleElement:null,loadingParams:{disableAutoFetch:j,enableXfa:T}};return f.promise.then((function(){if(n.destroyed)throw new Error("Loading aborted");if(f.destroyed)throw new Error("Worker was destroyed");var t,e=f.messageHandler.sendWithPromise("GetDocRequest",U,o?[o.buffer]:null);if(l)t=new Ac(l,{disableRange:L,disableStream:M});else if(!o){if(!a)throw new Error("getDocument - no \`url\` parameter provided.");var r;r=m?"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&Oe(a)?Uc:El:Oe(a)?Uc:ol,t=new r({url:a,length:N,httpHeaders:s,withCredentials:u,rangeChunkSize:h,disableRange:L,disableStream:M})}return e.then((function(e){if(n.destroyed)throw new Error("Loading aborted");if(f.destroyed)throw new Error("Worker was destroyed");var r=new Tu(i,e,f.port),a=new Of(r,n,t,z,G);n._transport=a,r.send("Ready",null)}))})).catch(n._capability.reject),n}function Zh(t){return"object"==typeof t&&Number.isInteger(null==t?void 0:t.num)&&t.num>=0&&Number.isInteger(null==t?void 0:t.gen)&&t.gen>=0}var tf=function(){return Vh((function t(){var e,r;Uh(this,t),this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId="d".concat((ef._=(e=ef._,r=e++,e),r)),this.destroyed=!1,this.onPassword=null,this.onProgress=null}),[{key:"promise",get:function(){return this._capability.promise}},{key:"destroy",value:(t=Hh(Bh().mark((function t(){var e,r,n;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.destroyed=!0,t.prev=1,null!==(e=this._worker)&&void 0!==e&&e.port&&(this._worker._pendingDestroy=!0),t.next=5,null===(r=this._transport)||void 0===r?void 0:r.destroy();case 5:t.next=11;break;case 7:throw t.prev=7,t.t0=t.catch(1),null!==(n=this._worker)&&void 0!==n&&n.port&&delete this._worker._pendingDestroy,t.t0;case 11:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 13:case"end":return t.stop()}}),t,this,[[1,7]])}))),function(){return t.apply(this,arguments)})}]);var t}(),ef={_:0},rf=function(){return Vh((function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;Uh(this,t),this.length=e,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}),[{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,e){var r,n=Dh(this._rangeListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(t,e)}catch(t){n.e(t)}finally{n.f()}}},{key:"onDataProgress",value:function(t,e){var r=this;this._readyCapability.promise.then((function(){var n,i=Dh(r._progressListeners);try{for(i.s();!(n=i.n()).done;)(0,n.value)(t,e)}catch(t){i.e(t)}finally{i.f()}}))}},{key:"onDataProgressiveRead",value:function(t){var e=this;this._readyCapability.promise.then((function(){var r,n=Dh(e._progressiveReadListeners);try{for(n.s();!(r=n.n()).done;)(0,r.value)(t)}catch(t){n.e(t)}finally{n.f()}}))}},{key:"onDataProgressiveDone",value:function(){var t=this;this._readyCapability.promise.then((function(){var e,r=Dh(t._progressiveDoneListeners);try{for(r.s();!(e=r.n()).done;)(0,e.value)()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"transportReady",value:function(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function(t,e){F("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function(){}}])}(),nf=function(){return Vh((function t(e,r){Uh(this,t),this._pdfInfo=e,this._transport=r}),[{key:"annotationStorage",get:function(){return this._transport.annotationStorage}},{key:"canvasFactory",get:function(){return this._transport.canvasFactory}},{key:"filterFactory",get:function(){return this._transport.filterFactory}},{key:"numPages",get:function(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function(){return W(this,"isPureXfa",!!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:"getJSActions",value:function(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,e=void 0===t?"display":t,r=this._transport.getRenderingIntent(e).renderingIntent;return this._transport.getOptionalContentConfig(r)}},{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:"saveDocument",value:function(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function(){return this.loadingTask.destroy()}},{key:"cachedPageNumber",value:function(t){return this._transport.cachedPageNumber(t)}},{key:"loadingParams",get:function(){return this._transport.loadingParams}},{key:"loadingTask",get:function(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function(){return this._transport.getCalculationOrderIds()}}])}(),af=new WeakMap,of=new WeakMap,sf=new WeakSet,uf=function(){return Vh((function t(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Uh(this,t),Mh(this,sf),Ch(this,af,null),Ch(this,of,!1),this._pageIndex=e,this._pageInfo=r,this._transport=n,this._stats=i?new Se:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new Cf,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}),[{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&&void 0!==arguments[0]?arguments[0]:{},e=t.scale,r=t.rotation,n=void 0===r?this.rotate:r,i=t.offsetX,a=void 0===i?0:i,o=t.offsetY,s=void 0===o?0:o,u=t.dontFlip,c=void 0!==u&&u;return new be({viewBox:this.view,scale:e,rotation:n,offsetX:a,offsetY:s,dontFlip:c})}},{key:"getAnnotations",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,e=void 0===t?"display":t,r=this._transport.getRenderingIntent(e).renderingIntent;return this._transport.getAnnotations(this._pageIndex,r)}},{key:"getJSActions",value:function(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"filterFactory",get:function(){return this._transport.filterFactory}},{key:"isPureXfa",get:function(){return W(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:(t=Hh(Bh().mark((function t(){var e;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(null===(e=this._transport._htmlForXfa)||void 0===e?void 0:e.children[this._pageIndex])||null);case 1:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(t){var e,r,n=this,i=t.canvasContext,a=t.viewport,o=t.intent,s=void 0===o?"display":o,u=t.annotationMode,c=void 0===u?x.ENABLE:u,l=t.transform,h=void 0===l?null:l,f=t.background,d=void 0===f?null:f,v=t.optionalContentConfigPromise,p=void 0===v?null:v,y=t.annotationCanvasMap,g=void 0===y?null:y,m=t.pageColors,b=void 0===m?null:m,w=t.printAnnotationStorage,k=void 0===w?null:w,A=t.isEditing,_=void 0!==A&&A;null===(e=this._stats)||void 0===e||e.time("Overall");var E=this._transport.getRenderingIntent(s,c,k,_),S=E.renderingIntent,O=E.cacheKey;Rh(of,this,!1),Fh(sf,this,lf).call(this),p||(p=this._transport.getOptionalContentConfig(S));var T=this._intentStates.get(O);T||(T=Object.create(null),this._intentStates.set(O,T)),T.streamReaderCancelTimeout&&(clearTimeout(T.streamReaderCancelTimeout),T.streamReaderCancelTimeout=null);var P,L=!!(4&S);T.displayReadyCapability||(T.displayReadyCapability=Promise.withResolvers(),T.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(P=this._stats)||void 0===P||P.time("Page Request"),this._pumpOperatorList(E));var M=function(t){var e;T.renderTasks.delete(C),(n._maybeCleanupAfterRender||L)&&Rh(of,n,!0),Fh(sf,n,cf).call(n,!L),t?(C.capability.reject(t),n._abortOperatorList({intentState:T,reason:t instanceof Error?t:new Error(t)})):C.capability.resolve(),n._stats&&(n._stats.timeEnd("Rendering"),n._stats.timeEnd("Overall"),null!==(e=globalThis.Stats)&&void 0!==e&&e.enabled&&globalThis.Stats.add(n.pageNumber,n._stats))},C=new Df({callback:M,params:{canvasContext:i,viewport:a,transform:h,background:d},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:g,operatorList:T.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!L,pdfBug:this._pdfBug,pageColors:b});((r=T).renderTasks||(r.renderTasks=new Set)).add(C);var j=C.task;return Promise.all([T.displayReadyCapability.promise,p]).then((function(t){var e,r=Lh(t,2),i=r[0],a=r[1];if(n.destroyed)M();else{if(null===(e=n._stats)||void 0===e||e.time("Rendering"),!(a.renderingIntent&S))throw new Error("Must use the same \`intent\`-argument when calling the \`PDFPageProxy.render\` and \`PDFDocumentProxy.getOptionalContentConfig\` methods.");C.initializeGraphics({transparency:i,optionalContentConfig:a}),C.operatorListChanged()}})).catch(M),j}},{key:"getOperatorList",value:function(){var t,e,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.intent,a=void 0===i?"display":i,o=n.annotationMode,s=void 0===o?x.ENABLE:o,u=n.printAnnotationStorage,c=void 0===u?null:u,l=n.isEditing,h=void 0!==l&&l,f=this._transport.getRenderingIntent(a,s,c,h,!0),d=this._intentStates.get(f.cacheKey);return d||(d=Object.create(null),this._intentStates.set(f.cacheKey,d)),d.opListReadCapability||((t=Object.create(null)).operatorListChanged=function(){d.operatorList.lastChunk&&(d.opListReadCapability.resolve(d.operatorList),d.renderTasks.delete(t))},d.opListReadCapability=Promise.withResolvers(),((e=d).renderTasks||(e.renderTasks=new Set)).add(t),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},null===(r=this._stats)||void 0===r||r.time("Page Request"),this._pumpOperatorList(f)),d.opListReadCapability.promise}},{key:"streamTextContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.includeMarkedContent,r=void 0!==e&&e,n=t.disableNormalization,i=void 0!==n&&n;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===r,disableNormalization:!0===i},{highWaterMark:100,size:t=>t.items.length})}},{key:"getTextContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(t){return Eh.textContent(t)}));var e=this.streamTextContent(t);return new Promise((function(t,r){var n=e.getReader(),i={items:[],styles:Object.create(null),lang:null};!function e(){n.read().then((function(r){var n,a,o=r.value;r.done?t(i):(null!==(n=i.lang)&&void 0!==n||(i.lang=o.lang),Object.assign(i.styles,o.styles),(a=i.items).push.apply(a,function(t){return function(t){if(Array.isArray(t))return Wh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nh(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.items)),e())}),r)}()}))}},{key:"getStructTree",value:function(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function(){this.destroyed=!0;var t,e=[],r=Dh(this._intentStates.values());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability){var i,a=Dh(n.renderTasks);try{for(a.s();!(i=a.n()).done;){var o=i.value;e.push(o.completed),o.cancel()}}catch(t){a.e(t)}finally{a.f()}}}}catch(t){r.e(t)}finally{r.f()}return this.objs.clear(),Rh(of,this,!1),Fh(sf,this,lf).call(this),Promise.all(e)}},{key:"cleanup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Rh(of,this,!0);var e=Fh(sf,this,cf).call(this,!1);return t&&e&&this._stats&&(this._stats=new Se),e}},{key:"_startRenderPage",value:function(t,e){var r,n,i=this._intentStates.get(e);i&&(null===(r=this._stats)||void 0===r||r.timeEnd("Page Request"),null===(n=i.displayReadyCapability)||void 0===n||n.resolve(t))}},{key:"_renderPageChunk",value:function(t,e){for(var r=0,n=t.length;r0)return;if(n instanceof we){var o=100;return n.extraDelay>0&&n.extraDelay<1e3&&(o+=n.extraDelay),void(r.streamReaderCancelTimeout=setTimeout((function(){r.streamReaderCancelTimeout=null,e._abortOperatorList({intentState:r,reason:n,force:!0})}),o))}}if(r.streamReader.cancel(new Y(n.message)).catch((function(){})),r.streamReader=null,!this._transport.destroyed){var s,u=Dh(this._intentStates);try{for(u.s();!(s=u.n()).done;){var c=Lh(s.value,2),l=c[0];if(c[1]===r){this._intentStates.delete(l);break}}}catch(t){u.e(t)}finally{u.f()}this.cleanup()}}}},{key:"stats",get:function(){return this._stats}}]);var t}();function cf(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Fh(sf,this,lf).call(this),!Ih(of,this)||this.destroyed)return!1;if(e)return Rh(af,this,setTimeout((function(){Rh(af,t,null),Fh(sf,t,cf).call(t,!1)}),5e3)),!1;var r,n=Dh(this._intentStates.values());try{for(n.s();!(r=n.n()).done;){var i=r.value,a=i.renderTasks,o=i.operatorList;if(a.size>0||!o.lastChunk)return!1}}catch(t){n.e(t)}finally{n.f()}return this._intentStates.clear(),this.objs.clear(),Rh(of,this,!1),!0}function lf(){Ih(af,this)&&(clearTimeout(Ih(af,this)),Rh(af,this,null))}var hf=new WeakMap,ff=new WeakMap,df=function(){return Vh((function t(){Uh(this,t),Ch(this,hf,new Set),Ch(this,ff,Promise.resolve())}),[{key:"postMessage",value:function(t,e){var r=this,n={data:structuredClone(t,e?{transfer:e}:null)};Ih(ff,this).then((function(){var t,e=Dh(Ih(hf,r));try{for(e.s();!(t=e.n()).done;)t.value.call(r,n)}catch(t){e.e(t)}finally{e.f()}}))}},{key:"addEventListener",value:function(t,e){Ih(hf,this).add(e)}},{key:"removeEventListener",value:function(t,e){Ih(hf,this).delete(e)}},{key:"terminate",value:function(){Ih(hf,this).clear()}}])}(),vf=new WeakSet,pf=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.name,n=void 0===r?null:r,i=e.port,a=void 0===i?null:i,o=e.verbosity,s=void 0===o?j():o;if(Uh(this,t),Mh(this,vf),this.name=n,this.destroyed=!1,this.verbosity=s,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,a){var u;if(null!==(u=wf._)&&void 0!==u&&u.has(a))throw new Error("Cannot use more than one PDFWorker per port.");return(wf._||(wf._=new WeakMap)).set(a,this),void this._initializeFromPort(a)}this._initialize()}return Vh(t,[{key:"promise",get:function(){return m?Promise.all([cs.promise,this._readyCapability.promise]):this._readyCapability.promise}},{key:"port",get:function(){return this._port}},{key:"messageHandler",get:function(){return this._messageHandler}},{key:"_initializeFromPort",value:function(t){this._port=t,this._messageHandler=new Tu("main","worker",t),this._messageHandler.on("ready",(function(){})),Fh(vf,this,yf).call(this)}},{key:"_initialize",value:function(){var e=this;if(bf._||gf())this._setupFakeWorker();else{var r=t.workerSrc;try{t._isSameOrigin(window.location.href,r)||(r=t._createCDNWrapper(new URL(r,window.location).href));var n=new Worker(r,{type:"module"}),i=new Tu("main","worker",n),a=function(){o.abort(),i.destroy(),n.terminate(),e.destroyed?e._readyCapability.reject(new Error("Worker was destroyed")):e._setupFakeWorker()},o=new AbortController;n.addEventListener("error",(function(){e._webWorker||a()}),{signal:o.signal}),i.on("test",(function(t){o.abort(),!e.destroyed&&t?(e._messageHandler=i,e._port=n,e._webWorker=n,Fh(vf,e,yf).call(e)):a()})),i.on("ready",(function(t){if(o.abort(),e.destroyed)a();else try{s()}catch(t){e._setupFakeWorker()}}));var s=function(){var t=new Uint8Array;i.send("test",t,[t.buffer])};return void s()}catch(t){I("The worker has been disabled.")}this._setupFakeWorker()}}},{key:"_setupFakeWorker",value:function(){var e=this;bf._||(R("Setting up fake worker."),bf._=!0),t._setupFakeWorkerGlobal.then((function(t){var r,n;if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var i=new df;e._port=i;var a="fake".concat((mf._=(r=mf._,n=r++,r),n)),o=new Tu(a+"_worker",a,i);t.setup(o,i),e._messageHandler=new Tu(a,a+"_worker",i),Fh(vf,e,yf).call(e)}})).catch((function(t){e._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(t.message,'".')))}))}},{key:"destroy",value:function(){var t;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),null===(t=wf._)||void 0===t||t.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"fromPort",value:function(e){var r;if(null==e||!e.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var n=null===(r=Fh(t,this,wf)._)||void 0===r?void 0:r.get(e.port);if(n){if(n._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\\nPlease remember to await \`PDFDocumentLoadingTask.destroy()\`-calls.");return n}return new t(e)}},{key:"workerSrc",get:function(){if(mu.workerSrc)return mu.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_setupFakeWorkerGlobal",get:function(){var e=this,r=function(){var r=Hh(Bh().mark((function r(){var n;return Bh().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Ph(t,e,gf)){r.next=2;break}return r.abrupt("return",Ph(t,e,gf));case 2:return r.next=4,import(e.workerSrc);case 4:return n=r.sent,r.abrupt("return",n.WorkerMessageHandler);case 6:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();return W(this,"_setupFakeWorkerGlobal",r())}}])}();function yf(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}function gf(t){try{var e;return(null===(e=globalThis.pdfjsWorker)||void 0===e?void 0:e.WorkerMessageHandler)||null}catch(t){return null}}_h=pf;var mf={_:0},bf={_:!1},wf={_:void 0};m&&(bf._=Fh(_h,_h,!0),mu.workerSrc||(mu.workerSrc="./pdf.worker.mjs")),_h._isSameOrigin=function(t,e){var r;try{if(!(r=new URL(t)).origin||"null"===r.origin)return!1}catch(t){return!1}var n=new URL(e,r);return r.origin===n.origin},_h._createCDNWrapper=function(t){var e='await import("'.concat(t,'");');return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))};var kf=new WeakMap,xf=new WeakMap,Af=new WeakMap,_f=new WeakMap,Ef=new WeakMap,Sf=new WeakSet,Of=function(){return Vh((function t(e,r,n,i,a){Uh(this,t),Mh(this,Sf),Ch(this,kf,new Map),Ch(this,xf,new Map),Ch(this,Af,new Map),Ch(this,_f,new Map),Ch(this,Ef,null),this.messageHandler=e,this.loadingTask=r,this.commonObjs=new Cf,this.fontLoader=new Yo({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=a.canvasFactory,this.filterFactory=a.filterFactory,this.cMapReaderFactory=a.cMapReaderFactory,this.standardFontDataFactory=a.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}),[{key:"annotationStorage",get:function(){return W(this,"annotationStorage",new Mo)}},{key:"getRenderingIntent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.ENABLE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=2,o=So;switch(t){case"any":a=1;break;case"display":break;case"print":a=4;break;default:R("getRenderingIntent - invalid intent: ".concat(t))}var s=4&a&&r instanceof Io?r:this.annotationStorage;switch(e){case x.DISABLE:a+=64;break;case x.ENABLE:break;case x.ENABLE_FORMS:a+=16;break;case x.ENABLE_STORAGE:a+=32,o=s.serializable;break;default:R("getRenderingIntent - invalid annotationMode: ".concat(e))}n&&(a+=128),i&&(a+=256);var u=s.modifiedIds,c=u.ids,l=u.hash;return{renderingIntent:a,cacheKey:[a,o.hash,l].join("_"),annotationStorageSerializable:o,modifiedIds:c}}},{key:"destroy",value:function(){var t,e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),null===(t=Ih(Ef,this))||void 0===t||t.reject(new Error("Worker was destroyed during onPassword callback"));var r,n=[],i=Dh(Ih(xf,this).values());try{for(i.s();!(r=i.n()).done;){var a=r.value;n.push(a._destroy())}}catch(t){i.e(t)}finally{i.f()}Ih(xf,this).clear(),Ih(Af,this).clear(),Ih(_f,this).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var o=this.messageHandler.sendWithPromise("Terminate",null);return n.push(o),Promise.all(n).then((function(){var t;e.commonObjs.clear(),e.fontLoader.clear(),Ih(kf,e).clear(),e.filterFactory.destroy(),uh.cleanup(),null===(t=e._networkStream)||void 0===t||t.cancelAllRequests(new Y("Worker was terminated.")),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function(){var t=this,e=this.messageHandler,r=this.loadingTask;e.on("GetReader",(function(e,r){D(t._networkStream,"GetReader - no \`IPDFStream\` instance available."),t._fullReader=t._networkStream.getFullReader(),t._fullReader.onProgress=function(e){t._lastProgress={loaded:e.loaded,total:e.total}},r.onPull=function(){t._fullReader.read().then((function(t){var e=t.value;t.done?r.close():(D(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(e),1,[e]))})).catch((function(t){r.error(t)}))},r.onCancel=function(e){t._fullReader.cancel(e),r.ready.catch((function(e){if(!t.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(function(e){var n=Promise.withResolvers(),i=t._fullReader;return i.headersReady.then((function(){var e;i.isStreamingSupported&&i.isRangeSupported||(t._lastProgress&&(null===(e=r.onProgress)||void 0===e||e.call(r,t._lastProgress)),i.onProgress=function(t){var e;null===(e=r.onProgress)||void 0===e||e.call(r,{loaded:t.loaded,total:t.total})});n.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})}),n.reject),n.promise})),e.on("GetRangeReader",(function(e,r){D(t._networkStream,"GetRangeReader - no \`IPDFStream\` instance available.");var n=t._networkStream.getRangeReader(e.begin,e.end);n?(r.onPull=function(){n.read().then((function(t){var e=t.value;t.done?r.close():(D(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),r.enqueue(new Uint8Array(e),1,[e]))})).catch((function(t){r.error(t)}))},r.onCancel=function(e){n.cancel(e),r.ready.catch((function(e){if(!t.destroyed)throw e}))}):r.close()})),e.on("GetDoc",(function(e){var n=e.pdfInfo;t._numPages=n.numPages,t._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,r._capability.resolve(new nf(n,t))})),e.on("DocException",(function(t){var e;switch(t.name){case"PasswordException":e=new G(t.message,t.code);break;case"InvalidPDFException":e=new U(t.message);break;case"MissingPDFException":e=new z(t.message);break;case"UnexpectedResponseException":e=new V(t.message,t.status);break;case"UnknownErrorException":e=new H(t.message,t.details);break;default:F("DocException - expected a valid Error.")}r._capability.reject(e)})),e.on("PasswordRequest",(function(e){if(Rh(Ef,t,Promise.withResolvers()),r.onPassword)try{r.onPassword((function(e){e instanceof Error?Ih(Ef,t).reject(e):Ih(Ef,t).resolve({password:e})}),e.code)}catch(e){Ih(Ef,t).reject(e)}else Ih(Ef,t).reject(new G(e.message,e.code));return Ih(Ef,t).promise})),e.on("DataLoaded",(function(e){var n;null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:e.length,total:e.length}),t.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(function(e){t.destroyed||Ih(xf,t).get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(function(r){var n,i=Lh(r,3),a=i[0],o=i[1],s=i[2];if(t.destroyed)return null;if(t.commonObjs.has(a))return null;switch(o){case"Font":var u=t._params,c=u.disableFontFace,l=u.fontExtraProperties,h=u.pdfBug;if("error"in s){var f=s.error;R("Error during font loading: ".concat(f)),t.commonObjs.resolve(a,f);break}var d=h&&null!==(n=globalThis.FontInspector)&&void 0!==n&&n.enabled?function(t,e){return globalThis.FontInspector.fontAdded(t,e)}:null,v=new Xo(s,{disableFontFace:c,inspectFont:d});t.fontLoader.bind(v).catch((function(){return e.sendWithPromise("FontFallback",{id:a})})).finally((function(){!l&&v.data&&(v.data=null),t.commonObjs.resolve(a,v)}));break;case"CopyLocalImage":var p=s.imageRef;D(p,"The imageRef must be defined.");var y,g=Dh(Ih(xf,t).values());try{for(g.s();!(y=g.n()).done;){var m,b=Dh(y.value.objs);try{for(b.s();!(m=b.n()).done;){var w=Lh(m.value,2)[1];if((null==w?void 0:w.ref)===p)return w.dataLen?(t.commonObjs.resolve(a,structuredClone(w)),w.dataLen):null}}catch(t){b.e(t)}finally{b.f()}}}catch(t){g.e(t)}finally{g.f()}break;case"FontPath":case"Image":case"Pattern":t.commonObjs.resolve(a,s);break;default:throw new Error("Got unknown common object type ".concat(o))}return null})),e.on("obj",(function(e){var r=Lh(e,4),n=r[0],i=r[1],a=r[2],o=r[3];if(!t.destroyed){var s,u=Ih(xf,t).get(i);if(!u.objs.has(n))if(0!==u._intentStates.size)switch(a){case"Image":u.objs.resolve(n,o),(null==o?void 0:o.dataLen)>1e7&&(u._maybeCleanupAfterRender=!0);break;case"Pattern":u.objs.resolve(n,o);break;default:throw new Error("Got unknown object type ".concat(a))}else null==o||null===(s=o.bitmap)||void 0===s||s.close()}})),e.on("DocProgress",(function(e){var n;t.destroyed||null===(n=r.onProgress)||void 0===n||n.call(r,{loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(function(e){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.cMapReaderFactory?t.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the \`useWorkerFetch\` parameter."))})),e.on("FetchStandardFontData",(function(e){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.standardFontDataFactory?t.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the \`useWorkerFetch\` parameter."))}))}},{key:"getData",value:function(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function(){var t,e,r=this;this.annotationStorage.size<=0&&R("saveDocument called while \`annotationStorage\` is empty, please use the getData-method instead.");var n=this.annotationStorage.serializable,i=n.map,a=n.transfer;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:i,filename:null!==(t=null===(e=this._fullReader)||void 0===e?void 0:e.filename)&&void 0!==t?t:null},a).finally((function(){r.annotationStorage.resetModified()}))}},{key:"getPage",value:function(t){var e=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));var r=t-1,n=Ih(Af,this).get(r);if(n)return n;var i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then((function(n){if(e.destroyed)throw new Error("Transport destroyed");n.refStr&&Ih(_f,e).set(n.refStr,t);var i=new uf(r,n,e,e._params.pdfBug);return Ih(xf,e).set(r,i),i}));return Ih(Af,this).set(r,i),i}},{key:"getPageIndex",value:function(t){return Zh(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}},{key:"getAnnotations",value:function(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}},{key:"getFieldObjects",value:function(){return Fh(Sf,this,Tf).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function(){return Fh(Sf,this,Tf).call(this,"HasJSActions")}},{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"string"!=typeof t?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:"getDocJSActions",value:function(){return Fh(Sf,this,Tf).call(this,"GetDocJSActions")}},{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(t){return Fh(Sf,this,Tf).call(this,"GetOptionalContentConfig").then((function(e){return new fc(e,t)}))}},{key:"getPermissions",value:function(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function(){var t=this,e="GetMetadata",r=Ih(kf,this).get(e);if(r)return r;var n=this.messageHandler.sendWithPromise(e,null).then((function(e){var r,n,i,a;return{info:e[0],metadata:e[1]?new Gu(e[1]):null,contentDispositionFilename:null!==(r=null===(n=t._fullReader)||void 0===n?void 0:n.filename)&&void 0!==r?r:null,contentLength:null!==(i=null===(a=t._fullReader)||void 0===a?void 0:a.contentLength)&&void 0!==i?i:null}}));return Ih(kf,this).set(e,n),n}},{key:"getMarkInfo",value:function(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=Hh(Bh().mark((function t(){var e,r,n,i,a=arguments;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=a.length>0&&void 0!==a[0]&&a[0],!this.destroyed){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.messageHandler.sendWithPromise("Cleanup",null);case 5:r=Dh(Ih(xf,this).values()),t.prev=6,r.s();case 8:if((n=r.n()).done){t.next=15;break}if((i=n.value).cleanup()){t.next=13;break}throw new Error("startCleanup: Page ".concat(i.pageNumber," is currently rendering."));case 13:t.next=8;break;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(6),r.e(t.t0);case 20:return t.prev=20,r.f(),t.finish(20);case 23:this.commonObjs.clear(),e||this.fontLoader.clear(),Ih(kf,this).clear(),this.filterFactory.destroy(!0),uh.cleanup();case 28:case"end":return t.stop()}}),t,this,[[6,17,20,23]])}))),function(){return t.apply(this,arguments)})},{key:"cachedPageNumber",value:function(t){var e;if(!Zh(t))return null;var r=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);return null!==(e=Ih(_f,this).get(r))&&void 0!==e?e:null}}]);var t}();function Tf(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Ih(kf,this).get(t);if(r)return r;var n=this.messageHandler.sendWithPromise(t,e);return Ih(kf,this).set(t,n),n}var Pf=Symbol("INITIAL_DATA"),Lf=new WeakMap,Mf=new WeakSet,Cf=function(){return Vh((function t(){Uh(this,t),Mh(this,Mf),Ch(this,Lf,Object.create(null))}),[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var r=Fh(Mf,this,jf).call(this,t);return r.promise.then((function(){return e(r.data)})),null}var n=Ih(Lf,this)[t];if(!n||n.data===Pf)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return n.data}},{key:"has",value:function(t){var e=Ih(Lf,this)[t];return!!e&&e.data!==Pf}},{key:"resolve",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Fh(Mf,this,jf).call(this,t);r.data=e,r.resolve()}},{key:"clear",value:function(){for(var t in Ih(Lf,this)){var e,r=Ih(Lf,this)[t].data;null==r||null===(e=r.bitmap)||void 0===e||e.close()}Rh(Lf,this,Object.create(null))}},{key:Symbol.iterator,value:Bh().mark((function t(){var e,r;return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=Bh().keys(Ih(Lf,this));case 1:if((t.t1=t.t0()).done){t.next=10;break}if(e=t.t1.value,(r=Ih(Lf,this)[e].data)!==Pf){t.next=6;break}return t.abrupt("continue",1);case 6:return t.next=8,[e,r];case 8:t.next=1;break;case 10:case"end":return t.stop()}}),t,this)}))}])}();function jf(t){var e;return(e=Ih(Lf,this))[t]||(e[t]=Oh(Oh({},Promise.withResolvers()),{},{data:Pf}))}var If=new WeakMap,Rf=function(){return Vh((function t(e){Uh(this,t),Ch(this,If,null),Rh(If,this,e),this.onContinue=null}),[{key:"promise",get:function(){return Ih(If,this).capability.promise}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Ih(If,this).cancel(null,t)}},{key:"separateAnnots",get:function(){var t=Ih(If,this).operatorList.separateAnnots;if(!t)return!1;var e=Ih(If,this).annotationCanvasMap;return t.form||t.canvas&&(null==e?void 0:e.size)>0}}])}(),Ff=new WeakMap,Df=function(){return Vh((function t(e){var r=e.callback,n=e.params,i=e.objs,a=e.commonObjs,o=e.annotationCanvasMap,s=e.operatorList,u=e.pageIndex,c=e.canvasFactory,l=e.filterFactory,h=e.useRequestAnimationFrame,f=void 0!==h&&h,d=e.pdfBug,v=void 0!==d&&d,p=e.pageColors,y=void 0===p?null:p;Uh(this,t),Ch(this,Ff,null),this.callback=r,this.params=n,this.objs=i,this.commonObjs=a,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=u,this.canvasFactory=c,this.filterFactory=l,this._pdfBug=v,this.pageColors=y,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===f&&"undefined"!=typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new Rf(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=n.canvasContext.canvas}),[{key:"completed",get:function(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function(t){var e,r,n=t.transparency,i=void 0!==n&&n,a=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(Nf._.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.");Nf._.add(this._canvas)}this._pdfBug&&null!==(e=globalThis.StepperManager)&&void 0!==e&&e.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var o=this.params,s=o.canvasContext,u=o.viewport,c=o.transform,l=o.background;this.gfx=new hu(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:a},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:c,viewport:u,transparency:i,background:l}),this.operatorListIdx=0,this.graphicsReady=!0,null===(r=this.graphicsReadyCallback)||void 0===r||r.call(this)}}},{key:"cancel",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,null===(t=this.gfx)||void 0===t||t.endDrawing(),Ih(Ff,this)&&(window.cancelAnimationFrame(Ih(Ff,this)),Rh(Ff,this,null)),Nf._.delete(this._canvas),this.callback(e||new we("Rendering cancelled, page ".concat(this._pageIndex+1),r))}},{key:"operatorListChanged",value:function(){var t;this.graphicsReady?(null===(t=this.stepper)||void 0===t||t.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{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?Rh(Ff,this,window.requestAnimationFrame((function(){Rh(Ff,t,null),t._nextBound().catch(t._cancelBound)}))):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}},{key:"_next",value:(t=Hh(Bh().mark((function t(){return Bh().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.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(),Nf._.delete(this._canvas),this.callback()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return t.apply(this,arguments)})}]);var t}(),Nf={_:new WeakSet},Wf="4.7.0",Bf="";function Gf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hf(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Qf(t,e){if(t){if("string"==typeof t)return Jf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jf(t,e):void 0}}function Jf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0;){var f,d,v=Xf(h.at(-1),3),p=v[0],y=v[1],g=v[2];if(y+1!==p.children.length){var m=p.children[++h.at(-1)[1]];if(null!==m){var b=m.name;if("#text"!==b){var w=null!=m&&null!==(f=m.attributes)&&void 0!==f&&f.xmlns?document.createElementNS(m.attributes.xmlns,b):document.createElement(b);if(g.append(w),m.attributes&&this.setAttributes({html:w,element:m,storage:e,intent:i,linkService:r}),(null===(d=m.children)||void 0===d?void 0:d.length)>0)h.push([m,-1,w]);else if(m.value){var k=document.createTextNode(m.value);o&&Eh.shouldBuildText(b)&&c.push(k),w.append(k)}}else{var x=document.createTextNode(m.value);c.push(x),g.append(x)}}}else h.pop()}var A,_=Kf(s.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(_.s();!(A=_.n()).done;)A.value.setAttribute("readOnly",!0)}catch(t){_.e(t)}finally{_.f()}return{textDivs:c}}},{key:"update",value:function(t){var e="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=e,t.div.hidden=!1}}])}();function ed(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rd(t,e,r){return(e=Td(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nd(){nd=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function id(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ad(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){id(a,n,i,o,s,"next",t)}function s(t){id(a,n,i,o,s,"throw",t)}o(void 0)}))}}function od(t,e,r){e||(e=[]);var n=e.length++;return Object.defineProperty({},"_",{set:function(i){e[n]=i,t.apply(r,e)}})}function sd(t,e,r){return r(_d(t,e))}function ud(){return ud="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fd(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ud.apply(null,arguments)}function cd(t){return function(t){if(Array.isArray(t))return md(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gd(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ld(t,e,r){return e=fd(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hd()?Reflect.construct(e,r||[],fd(t).constructor):e.apply(t,r))}function hd(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hd=function(){return!!t})()}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fd(t)}function dd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vd(t,e)}function vd(t,e){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vd(t,e)}function pd(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gd(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function yd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||gd(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gd(t,e){if(t){if("string"==typeof t)return md(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?md(t,e):void 0}}function md(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:{},n=r.isRenderable,i=void 0!==n&&n,a=r.ignoreBorder,o=void 0!==a&&a,s=r.createQuadrilaterals,u=void 0!==s&&s;Ed(this,t),bd(this,Fd),wd(this,jd,null),wd(this,Id,!1),wd(this,Rd,null),this.isRenderable=i,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,i&&(this.container=this._createContainer(o)),u&&this._createQuadrilaterals()}return Od(t,[{key:"_isEditable",get:function(){return this.data.isEditable}},{key:"hasPopupData",get:function(){return t._hasPopupData(this.data)}},{key:"updateEdited",value:function(t){var e;if(this.container){Ad(jd,this)||xd(jd,this,{rect:this.data.rect.slice(0)});var r=t.rect;r&&_d(Fd,this,Nd).call(this,r),null===(e=Ad(Rd,this))||void 0===e||e.popup.updateEdited(t)}}},{key:"resetEdited",value:function(){var t;Ad(jd,this)&&(_d(Fd,this,Nd).call(this,Ad(jd,this).rect),null===(t=Ad(Rd,this))||void 0===t||t.popup.resetEdited(),xd(jd,this,null))}},{key:"_createContainer",value:function(t){var e=this.data,r=this.parent,n=r.page,i=r.viewport,a=document.createElement("section");a.setAttribute("data-annotation-id",e.id),this instanceof Vd||(a.tabIndex=Pd);var o=a.style;if(o.zIndex=this.parent.zIndex++,e.popupRef&&a.setAttribute("aria-haspopup","dialog"),e.alternativeText&&(a.title=e.alternativeText),e.noRotate&&a.classList.add("norotate"),!e.rect||this instanceof $d){var s=e.rotation;return e.hasOwnCanvas||0===s||this.setRotation(s,a),a}var u=Md(e.rect),c=u.width,l=u.height;if(!t&&e.borderStyle.width>0){o.borderWidth="".concat(e.borderStyle.width,"px");var h=e.borderStyle.horizontalCornerRadius,f=e.borderStyle.verticalCornerRadius;if(h>0||f>0){var d="calc(".concat(h,"px * var(--scale-factor)) / calc(").concat(f,"px * var(--scale-factor))");o.borderRadius=d}else if(this instanceof Kd){var v="calc(".concat(c,"px * var(--scale-factor)) / calc(").concat(l,"px * var(--scale-factor))");o.borderRadius=v}switch(e.borderStyle.style){case 1:o.borderStyle="solid";break;case 2:o.borderStyle="dashed";break;case 3:R("Unimplemented border style: beveled");break;case 4:R("Unimplemented border style: inset");break;case 5:o.borderBottomStyle="solid"}var p=e.borderColor||null;p?(xd(Id,this,!0),o.borderColor=Z.makeHexColor(0|p[0],0|p[1],0|p[2])):o.borderWidth=0}var y=Z.normalizeRect([e.rect[0],n.view[3]-e.rect[1]+n.view[1],e.rect[2],n.view[3]-e.rect[3]+n.view[1]]),g=i.rawDims,m=g.pageWidth,b=g.pageHeight,w=g.pageX,k=g.pageY;o.left="".concat(100*(y[0]-w)/m,"%"),o.top="".concat(100*(y[1]-k)/b,"%");var x=e.rotation;return e.hasOwnCanvas||0===x?(o.width="".concat(100*c/m,"%"),o.height="".concat(100*l/b,"%")):this.setRotation(x,a),a}},{key:"setRotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(this.data.rect){var r,n,i=this.parent.viewport.rawDims,a=i.pageWidth,o=i.pageHeight,s=Md(this.data.rect),u=s.width,c=s.height;t%180==0?(r=100*u/a,n=100*c/o):(r=100*c/a,n=100*u/o),e.style.width="".concat(r,"%"),e.style.height="".concat(n,"%"),e.setAttribute("data-main-rotation",(360-t)%360)}}},{key:"_commonActions",get:function(){var t=this,e=function(e,r,n){var i=n.detail[e],a=i[0],o=i.slice(1);n.target.style[r]=Yf["".concat(a,"_HTML")](o),t.annotationStorage.setValue(t.data.id,{[r]:Yf["".concat(a,"_rgb")](o)})};return W(this,"_commonActions",{display:function(e){var r=e.detail.display,n=r%2==1;t.container.style.visibility=n?"hidden":"visible",t.annotationStorage.setValue(t.data.id,{noView:n,noPrint:1===r||2===r})},print:function(e){t.annotationStorage.setValue(t.data.id,{noPrint:!e.detail.print})},hidden:function(e){var r=e.detail.hidden;t.container.style.visibility=r?"hidden":"visible",t.annotationStorage.setValue(t.data.id,{noPrint:r,noView:r})},focus:function(t){setTimeout((function(){return t.target.focus({preventScroll:!1})}),0)},userName:function(t){t.target.title=t.detail.userName},readonly:function(t){t.target.disabled=t.detail.readonly},required:function(e){t._setRequired(e.target,e.detail.required)},bgColor:function(t){e("bgColor","backgroundColor",t)},fillColor:function(t){e("fillColor","backgroundColor",t)},fgColor:function(t){e("fgColor","color",t)},textColor:function(t){e("textColor","color",t)},borderColor:function(t){e("borderColor","borderColor",t)},strokeColor:function(t){e("strokeColor","borderColor",t)},rotation:function(e){var r=e.detail.rotation;t.setRotation(r),t.annotationStorage.setValue(t.data.id,{rotation:r})}})}},{key:"_dispatchEventFromSandbox",value:function(t,e){for(var r=this._commonActions,n=0,i=Object.keys(e.detail);n','')],this.container.classList.add("hasBorder")}var y=a-n,g=o-i,m=this.svgFactory,b=m.createElement("svg");b.classList.add("quadrilateralsContainer"),b.setAttribute("width",0),b.setAttribute("height",0);var w=m.createElement("defs");b.append(w);var k=m.createElement("clipPath"),x="clippath_".concat(this.data.id);k.setAttribute("id",x),k.setAttribute("clipPathUnits","objectBoundingBox"),w.append(k);for(var A=2,_=t.length;A<_;A+=8){var E,S=t[A],O=t[A+1],T=t[A+2],P=t[A+3],L=m.createElement("rect"),M=(T-n)/y,C=(o-O)/g,j=(S-T)/y,I=(O-P)/g;L.setAttribute("x",M),L.setAttribute("y",C),L.setAttribute("width",j),L.setAttribute("height",I),k.append(L),null===(E=f)||void 0===E||E.push(''))}Ad(Id,this)&&(f.push("')"),d.backgroundImage=f.join("")),this.container.append(b),this.container.style.clipPath="url(#".concat(x,")")}}}},{key:"_createPopup",value:function(){var t=this.container,e=this.data;t.setAttribute("aria-haspopup","dialog");var r=xd(Rd,this,new $d({data:{color:e.color,titleObj:e.titleObj,modificationDate:e.modificationDate,contentsObj:e.contentsObj,richText:e.richText,parentRect:e.rect,borderStyle:0,id:"popup_".concat(e.id),rotation:e.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(r.render())}},{key:"render",value:function(){F("Abstract method \`AnnotationElement.render\` called")}},{key:"_getElementsByName",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[];if(this._fieldObjects){var n=this._fieldObjects[t];if(n){var i,a=pd(n);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=o.page,u=o.id,c=o.exportValues;if(-1!==s&&u!==e){var l="string"==typeof c?c:null,h=document.querySelector('[data-element-id="'.concat(u,'"]'));!h||Ld.has(h)?r.push({id:u,exportValue:l,domElement:h}):R("_getElementsByName - element not allowed: ".concat(u))}}}catch(t){a.e(t)}finally{a.f()}}return r}var f,d=pd(document.getElementsByName(t));try{for(d.s();!(f=d.n()).done;){var v=f.value,p=v.exportValue,y=v.getAttribute("data-element-id");y!==e&&Ld.has(v)&&r.push({id:y,exportValue:p,domElement:v})}}catch(t){d.e(t)}finally{d.f()}return r}},{key:"show",value:function(){var t;this.container&&(this.container.hidden=!1),null===(t=this.popup)||void 0===t||t.maybeShow()}},{key:"hide",value:function(){var t;this.container&&(this.container.hidden=!0),null===(t=this.popup)||void 0===t||t.forceHide()}},{key:"getElementsToTriggerPopup",value:function(){return this.container}},{key:"addHighlightArea",value:function(){var t=this.getElementsToTriggerPopup();if(Array.isArray(t)){var e,r=pd(t);try{for(r.s();!(e=r.n()).done;)e.value.classList.add("highlightArea")}catch(t){r.e(t)}finally{r.f()}}else t.classList.add("highlightArea")}},{key:"_editOnDoubleClick",value:function(){var t=this;if(this._isEditable){var e=this.annotationEditorType,r=this.data.id;this.container.addEventListener("dblclick",(function(){var n;null===(n=t.linkService.eventBus)||void 0===n||n.dispatch("switchannotationeditormode",{source:t,mode:e,editId:r})}))}}}],[{key:"_hasPopupData",value:function(t){var e=t.titleObj,r=t.contentsObj,n=t.richText;return!!(null!=e&&e.str||null!=r&&r.str||null!=n&&n.str)}}])}();function Nd(t){var e=this.container.style,r=this.data,n=r.rect,i=r.rotation,a=this.parent.viewport.rawDims,o=a.pageWidth,s=a.pageHeight,u=a.pageX,c=a.pageY;null==n||n.splice.apply(n,[0,4].concat(cd(t)));var l=Md(t),h=l.width,f=l.height;e.left="".concat(100*(t[0]-u)/o,"%"),e.top="".concat(100*(s-t[3]+c)/s,"%"),0===i?(e.width="".concat(100*h/o,"%"),e.height="".concat(100*f/s,"%")):this.setRotation(i)}var Wd=new WeakSet,Bd=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Ed(this,e),bd(r=ld(this,e,[t,{isRenderable:!0,ignoreBorder:!(null==n||!n.ignoreBorder),createQuadrilaterals:!0}]),Wd),r.isTooltipOnly=t.data.isTooltipOnly,r}return dd(e,Dd),Od(e,[{key:"render",value:function(){var t=this.data,e=this.linkService,r=document.createElement("a");r.setAttribute("data-element-id",t.id);var n=!1;return t.url?(e.addLinkAttributes(r,t.url,t.newWindow),n=!0):t.action?(this._bindNamedAction(r,t.action),n=!0):t.attachment?(_d(Wd,this,Hd).call(this,r,t.attachment,t.attachmentDest),n=!0):t.setOCGState?(_d(Wd,this,Ud).call(this,r,t.setOCGState),n=!0):t.dest?(this._bindLink(r,t.dest),n=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,t),n=!0),t.resetForm?(this._bindResetFormAction(r,t.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(r,""),n=!0)),this.container.classList.add("linkAnnotation"),n&&this.container.append(r),this.container}},{key:"_bindLink",value:function(t,e){var r=this;t.href=this.linkService.getDestinationHash(e),t.onclick=function(){return e&&r.linkService.goToDestination(e),!1},(e||""===e)&&_d(Wd,this,Gd).call(this)}},{key:"_bindNamedAction",value:function(t,e){var r=this;t.href=this.linkService.getAnchorUrl(""),t.onclick=function(){return r.linkService.executeNamedAction(e),!1},_d(Wd,this,Gd).call(this)}},{key:"_bindJSAction",value:function(t,e){var r=this;t.href=this.linkService.getAnchorUrl("");for(var n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),i=function(){var i=o[a],s=n.get(i);if(!s)return 1;t[s]=function(){var t;return null===(t=r.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:r,detail:{id:e.id,name:i}}),!1}},a=0,o=Object.keys(e.actions);a2&&void 0!==arguments[2]?arguments[2]:null;t.href=this.linkService.getAnchorUrl(""),e.description&&(t.title=e.description),t.onclick=function(){var t;return null===(t=r.downloadManager)||void 0===t||t.openOrDownloadData(e.content,e.filename,n),!1},_d(Wd,this,Gd).call(this)}function Ud(t,e){var r=this;t.href=this.linkService.getAnchorUrl(""),t.onclick=function(){return r.linkService.executeSetOCGState(e),!1},_d(Wd,this,Gd).call(this)}var zd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:!0}])}return dd(e,Dd),Od(e,[{key:"render",value:function(){this.container.classList.add("textAnnotation");var t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}])}(),Vd=function(t){function e(){return Ed(this,e),ld(this,e,arguments)}return dd(e,Dd),Od(e,[{key:"render",value:function(){return this.container}},{key:"showElementAndHideCanvas",value:function(t){var e;this.data.hasOwnCanvas&&("CANVAS"===(null===(e=t.previousSibling)||void 0===e?void 0:e.nodeName)&&(t.previousSibling.hidden=!0),t.hidden=!1)}},{key:"_getKeyModifier",value:function(t){return J.platform.isMac?t.metaKey:t.ctrlKey}},{key:"_setEventListener",value:function(t,e,r,n,i){var a=this;r.includes("mouse")?t.addEventListener(r,(function(t){var e;null===(e=a.linkService.eventBus)||void 0===e||e.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:n,value:i(t),shift:t.shiftKey,modifier:a._getKeyModifier(t)}})})):t.addEventListener(r,(function(t){var o;if("blur"===r){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===r){if(e.focused)return;e.focused=!0}i&&(null===(o=a.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:a,detail:{id:a.data.id,name:n,value:i(t)}}))}))}},{key:"_setEventListeners",value:function(t,e,r,n){var i,a=pd(r);try{for(a.s();!(i=a.n()).done;){var o,s,u,c=yd(i.value,2),l=c[0],h=c[1];("Action"===h||null!==(o=this.data.actions)&&void 0!==o&&o[h])&&("Focus"!==h&&"Blur"!==h||e||(e={focused:!1}),this._setEventListener(t,e,l,h,n),"Focus"!==h||null!==(s=this.data.actions)&&void 0!==s&&s.Blur?"Blur"!==h||null!==(u=this.data.actions)&&void 0!==u&&u.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null))}}catch(t){a.e(t)}finally{a.f()}}},{key:"_setBackgroundColor",value:function(t){var e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":Z.makeHexColor(e[0],e[1],e[2])}},{key:"_setTextStyle",value:function(t){var e,r=this.data.defaultAppearanceData.fontColor,n=this.data.defaultAppearanceData.fontSize||9,i=t.style,a=function(t){return Math.round(10*t)/10};if(this.data.multiLine){var o=Math.abs(this.data.rect[3]-this.data.rect[1]-2),s=o/(Math.round(o/(k*n))||1);e=Math.min(n,a(s/k))}else{var u=Math.abs(this.data.rect[3]-this.data.rect[1]-2);e=Math.min(n,a(u/k))}i.fontSize="calc(".concat(e,"px * var(--scale-factor))"),i.color=Z.makeHexColor(r[0],r[1],r[2]),null!==this.data.textAlignment&&(i.textAlign=["left","center","right"][this.data.textAlignment])}},{key:"_setRequired",value:function(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}])}(),qd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue}])}return dd(e,Vd),Od(e,[{key:"setPropertyOnSiblings",value:function(t,e,r,n){var i,a=this.annotationStorage,o=pd(this._getElementsByName(t.name,t.id));try{for(o.s();!(i=o.n()).done;){var s=i.value;s.domElement&&(s.domElement[e]=r),a.setValue(s.id,{[n]:r})}}catch(t){o.e(t)}finally{o.f()}}},{key:"render",value:function(){var t=this,e=this.annotationStorage,r=this.data.id;this.container.classList.add("textWidgetAnnotation");var n=null;if(this.renderForms){var i,a=e.getValue(r,{value:this.data.fieldValue}),o=a.value||"",s=e.getValue(r,{charLimit:this.data.maxLen}).charLimit;s&&o.length>s&&(o=o.slice(0,s));var u=a.formattedValue||(null===(i=this.data.textContent)||void 0===i?void 0:i.join("\\n"))||null;u&&this.data.comb&&(u=u.replaceAll(/\\s+/g,""));var c,l,h={userValue:o,formattedValue:u,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?((n=document.createElement("textarea")).textContent=null!==(c=u)&&void 0!==c?c:o,this.data.doNotScroll&&(n.style.overflowY="hidden")):((n=document.createElement("input")).type="text",n.setAttribute("value",null!==(l=u)&&void 0!==l?l:o),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),Ld.add(n),n.setAttribute("data-element-id",r),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=Pd,this._setRequired(n,this.data.required),s&&(n.maxLength=s),n.addEventListener("input",(function(i){e.setValue(r,{value:i.target.value}),t.setPropertyOnSiblings(n,"value",i.target.value,"value"),h.formattedValue=null})),n.addEventListener("resetform",(function(e){var r,i=null!==(r=t.data.defaultFieldValue)&&void 0!==r?r:"";n.value=h.userValue=i,h.formattedValue=null}));var f=function(t){var e=h.formattedValue;null!=e&&(t.target.value=e),t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){var d;n.addEventListener("focus",(function(e){var r;if(!h.focused){var n=e.target;h.userValue&&(n.value=h.userValue),h.lastCommittedValue=n.value,h.commitKey=1,null!==(r=t.data.actions)&&void 0!==r&&r.Focus||(h.focused=!0)}})),n.addEventListener("updatefromsandbox",(function(n){t.showElementAndHideCanvas(n.target);var i={value(t){var n;h.userValue=null!==(n=t.detail.value)&&void 0!==n?n:"",e.setValue(r,{value:h.userValue.toString()}),t.target.value=h.userValue},formattedValue(t){var n=t.detail.formattedValue;h.formattedValue=n,null!=n&&t.target!==document.activeElement&&(t.target.value=n),e.setValue(r,{formattedValue:n})},selRange(t){var e;(e=t.target).setSelectionRange.apply(e,cd(t.detail.selRange))},charLimit:function(n){var i,a=n.detail.charLimit,o=n.target;if(0!==a){o.setAttribute("maxLength",a);var s=h.userValue;!s||s.length<=a||(s=s.slice(0,a),o.value=h.userValue=s,e.setValue(r,{value:s}),null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:o.selectionStart,selEnd:o.selectionEnd}}))}else o.removeAttribute("maxLength")}};t._dispatchEventFromSandbox(i,n)})),n.addEventListener("keydown",(function(e){var n;h.commitKey=1;var i=-1;if("Escape"===e.key?i=0:"Enter"!==e.key||t.data.multiLine?"Tab"===e.key&&(h.commitKey=3):i=2,-1!==i){var a=e.target.value;h.lastCommittedValue!==a&&(h.lastCommittedValue=a,h.userValue=a,null===(n=t.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:a,willCommit:!0,commitKey:i,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}}));var v=f;f=null,n.addEventListener("blur",(function(e){var n;if(h.focused&&e.relatedTarget){null!==(n=t.data.actions)&&void 0!==n&&n.Blur||(h.focused=!1);var i,a=e.target.value;h.userValue=a,h.lastCommittedValue!==a&&(null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:a,willCommit:!0,commitKey:h.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}})),v(e)}})),null!==(d=this.data.actions)&&void 0!==d&&d.Keystroke&&n.addEventListener("beforeinput",(function(e){var n;h.lastCommittedValue=null;var i=e.data,a=e.target,o=a.value,s=a.selectionStart,u=a.selectionEnd,c=s,l=u;switch(e.inputType){case"deleteWordBackward":var f=o.substring(0,s).match(/\\w*[^\\w]*$/);f&&(c-=f[0].length);break;case"deleteWordForward":var d=o.substring(s).match(/^[^\\w]*\\w*/);d&&(l+=d[0].length);break;case"deleteContentBackward":s===u&&(c-=1);break;case"deleteContentForward":s===u&&(l+=1)}e.preventDefault(),null===(n=t.linkService.eventBus)||void 0===n||n.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:o,change:i||"",willCommit:!1,selStart:c,selEnd:l}})})),this._setEventListeners(n,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.value}))}if(f&&n.addEventListener("blur",f),this.data.comb){var p=(this.data.rect[2]-this.data.rect[0])/s;n.classList.add("comb"),n.style.letterSpacing="calc(".concat(p,"px * var(--scale-factor) - 1ch)")}}else(n=document.createElement("div")).textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}])}(),Yd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:!!t.data.hasOwnCanvas}])}return dd(e,Vd),Od(e)}(),Xd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms}])}return dd(e,Vd),Od(e,[{key:"render",value:function(){var t=this,e=this.annotationStorage,r=this.data,n=r.id,i=e.getValue(n,{value:r.exportValue===r.fieldValue}).value;"string"==typeof i&&(i="Off"!==i,e.setValue(n,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var a=document.createElement("input");return Ld.add(a),a.setAttribute("data-element-id",n),a.disabled=r.readOnly,this._setRequired(a,this.data.required),a.type="checkbox",a.name=r.fieldName,i&&a.setAttribute("checked",!0),a.setAttribute("exportValue",r.exportValue),a.tabIndex=Pd,a.addEventListener("change",(function(i){var a,o=i.target,s=o.name,u=o.checked,c=pd(t._getElementsByName(s,n));try{for(c.s();!(a=c.n()).done;){var l=a.value,h=u&&l.exportValue===r.exportValue;l.domElement&&(l.domElement.checked=h),e.setValue(l.id,{value:h})}}catch(t){c.e(t)}finally{c.f()}e.setValue(n,{value:u})})),a.addEventListener("resetform",(function(t){var e=r.defaultFieldValue||"Off";t.target.checked=e===r.exportValue})),this.enableScripting&&this.hasJSActions&&(a.addEventListener("updatefromsandbox",(function(r){var i={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(n,{value:t.target.checked})}};t._dispatchEventFromSandbox(i,r)})),this._setEventListeners(a,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}])}(),Kd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms}])}return dd(e,Vd),Od(e,[{key:"render",value:function(){var t=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var e=this.annotationStorage,r=this.data,n=r.id,i=e.getValue(n,{value:r.fieldValue===r.buttonValue}).value;if("string"==typeof i&&(i=i!==r.buttonValue,e.setValue(n,{value:i})),i){var a,o=pd(this._getElementsByName(r.fieldName,n));try{for(o.s();!(a=o.n()).done;){var s=a.value;e.setValue(s.id,{value:!1})}}catch(t){o.e(t)}finally{o.f()}}var u=document.createElement("input");if(Ld.add(u),u.setAttribute("data-element-id",n),u.disabled=r.readOnly,this._setRequired(u,this.data.required),u.type="radio",u.name=r.fieldName,i&&u.setAttribute("checked",!0),u.tabIndex=Pd,u.addEventListener("change",(function(r){var i,a=r.target,o=a.name,s=a.checked,u=pd(t._getElementsByName(o,n));try{for(u.s();!(i=u.n()).done;){var c=i.value;e.setValue(c.id,{value:!1})}}catch(t){u.e(t)}finally{u.f()}e.setValue(n,{value:s})})),u.addEventListener("resetform",(function(t){var e=r.defaultFieldValue;t.target.checked=null!=e&&e===r.buttonValue})),this.enableScripting&&this.hasJSActions){var c=r.buttonValue;u.addEventListener("updatefromsandbox",(function(r){var i={value:function(r){var i,a=c===r.detail.value,o=pd(t._getElementsByName(r.target.name));try{for(o.s();!(i=o.n()).done;){var s=i.value,u=a&&s.id===n;s.domElement&&(s.domElement.checked=u),e.setValue(s.id,{value:u})}}catch(t){o.e(t)}finally{o.f()}}};t._dispatchEventFromSandbox(i,r)})),this._setEventListeners(u,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}return this._setBackgroundColor(u),this._setDefaultPropertiesFromJS(u),this.container.append(u),this.container}}])}(),Qd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{ignoreBorder:t.data.hasAppearance}])}return dd(e,Bd),Od(e,[{key:"render",value:function(){var t=this,r=function(t,e,r,n){var i=ud(fd(t.prototype),"render",r);return"function"==typeof i?function(t){return i.apply(r,t)}:i}(e,0,this)([]);r.classList.add("buttonWidgetAnnotation","pushButton");var n=r.lastChild;return this.enableScripting&&this.hasJSActions&&n&&(this._setDefaultPropertiesFromJS(n),n.addEventListener("updatefromsandbox",(function(e){t._dispatchEventFromSandbox({},e)}))),r}}])}(),Jd=function(t){function e(t){return Ed(this,e),ld(this,e,[t,{isRenderable:t.renderForms}])}return dd(e,Vd),Od(e,[{key:"render",value:function(){var t=this;this.container.classList.add("choiceWidgetAnnotation");var e=this.annotationStorage,r=this.data.id,n=e.getValue(r,{value:this.data.fieldValue}),i=document.createElement("select");Ld.add(i),i.setAttribute("data-element-id",r),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=Pd;var a=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",(function(e){var r,n=t.data.defaultFieldValue,a=pd(i.options);try{for(a.s();!(r=a.n()).done;){var o=r.value;o.selected=o.value===n}}catch(t){a.e(t)}finally{a.f()}}));var o,s=pd(this.data.options);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=document.createElement("option");c.textContent=u.displayValue,c.value=u.exportValue,n.value.includes(u.exportValue)&&(c.setAttribute("selected",!0),a=!1),i.append(c)}}catch(t){s.e(t)}finally{s.f()}var l=null;if(a){var h=document.createElement("option");h.value=" ",h.setAttribute("hidden",!0),h.setAttribute("selected",!0),i.prepend(h),l=function(){h.remove(),i.removeEventListener("input",l),l=null},i.addEventListener("input",l)}var f=function(t){var e=t?"value":"textContent",r=i.options;return i.multiple?Array.prototype.filter.call(r,(function(t){return t.selected})).map((function(t){return t[e]})):-1===r.selectedIndex?null:r[r.selectedIndex][e]},d=f(!1),v=function(t){var e=t.target.options;return Array.prototype.map.call(e,(function(t){return{displayValue:t.textContent,exportValue:t.value}}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",(function(n){var a={value(t){var n;null===(n=l)||void 0===n||n();var a,o=t.detail.value,s=new Set(Array.isArray(o)?o:[o]),u=pd(i.options);try{for(u.s();!(a=u.n()).done;){var c=a.value;c.selected=s.has(c.value)}}catch(t){u.e(t)}finally{u.f()}e.setValue(r,{value:f(!0)}),d=f(!1)},multipleSelection(t){i.multiple=!0},remove(t){var n=i.options,a=t.detail.remove;if(n[a].selected=!1,i.remove(a),n.length>0){var o=Array.prototype.findIndex.call(n,(function(t){return t.selected}));-1===o&&(n[0].selected=!0)}e.setValue(r,{value:f(!0),items:v(t)}),d=f(!1)},clear(t){for(;0!==i.length;)i.remove(0);e.setValue(r,{value:null,items:[]}),d=f(!1)},insert(t){var n=t.detail.insert,a=n.index,o=n.displayValue,s=n.exportValue,u=i.children[a],c=document.createElement("option");c.textContent=o,c.value=s,u?u.before(c):i.append(c),e.setValue(r,{value:f(!0),items:v(t)}),d=f(!1)},items(t){for(var n=t.detail.items;0!==i.length;)i.remove(0);var a,o=pd(n);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=s.displayValue,c=s.exportValue,l=document.createElement("option");l.textContent=u,l.value=c,i.append(l)}}catch(t){o.e(t)}finally{o.f()}i.options.length>0&&(i.options[0].selected=!0),e.setValue(r,{value:f(!0),items:v(t)}),d=f(!1)},indices(t){var n,i=new Set(t.detail.indices),a=pd(t.target.options);try{for(a.s();!(n=a.n()).done;){var o=n.value;o.selected=i.has(o.index)}}catch(t){a.e(t)}finally{a.f()}e.setValue(r,{value:f(!0)}),d=f(!1)},editable(t){t.target.disabled=!t.detail.editable}};t._dispatchEventFromSandbox(a,n)})),i.addEventListener("input",(function(n){var i,a=f(!0),o=f(!1);e.setValue(r,{value:a}),n.preventDefault(),null===(i=t.linkService.eventBus)||void 0===i||i.dispatch("dispatcheventinsandbox",{source:t,detail:{id:r,name:"Keystroke",value:d,change:o,changeEx:a,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(i,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(function(t){return t.target.value}))):i.addEventListener("input",(function(t){e.setValue(r,{value:f(!0)})})),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}])}(),$d=function(t){function e(t){var r;Ed(this,e);var n=t.data,i=t.elements;return(r=ld(this,e,[t,{isRenderable:Dd._hasPopupData(n)}])).elements=i,r.popup=null,r}return dd(e,Dd),Od(e,[{key:"render",value:function(){this.container.classList.add("popupAnnotation");var t,e=this.popup=new bv({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),r=[],n=pd(this.elements);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.popup=e,r.push(i.data.id),i.addHighlightArea()}}catch(t){n.e(t)}finally{n.f()}return this.container.setAttribute("aria-controls",r.map((function(t){return"".concat(at).concat(t)})).join(",")),this.container}}])}(),Zd=new WeakMap,tv=new WeakMap,ev=new WeakMap,rv=new WeakMap,nv=new WeakMap,iv=new WeakMap,av=new WeakMap,ov=new WeakMap,sv=new WeakMap,uv=new WeakMap,cv=new WeakMap,lv=new WeakMap,hv=new WeakMap,fv=new WeakMap,dv=new WeakMap,vv=new WeakMap,pv=new WeakMap,yv=new WeakMap,gv=new WeakMap,mv=new WeakSet,bv=function(){return Od((function t(e){var r=e.container,n=e.color,i=e.elements,a=e.titleObj,o=e.modificationDate,s=e.contentsObj,u=e.richText,c=e.parent,l=e.rect,h=e.parentRect,f=e.open;Ed(this,t),bd(this,mv),wd(this,Zd,_d(mv,this,_v).bind(this)),wd(this,tv,_d(mv,this,Tv).bind(this)),wd(this,ev,_d(mv,this,Ov).bind(this)),wd(this,rv,_d(mv,this,Sv).bind(this)),wd(this,nv,null),wd(this,iv,null),wd(this,av,null),wd(this,ov,null),wd(this,sv,null),wd(this,uv,null),wd(this,cv,null),wd(this,lv,!1),wd(this,hv,null),wd(this,fv,null),wd(this,dv,null),wd(this,vv,null),wd(this,pv,null),wd(this,yv,null),wd(this,gv,!1),xd(iv,this,r),xd(pv,this,a),xd(av,this,s),xd(vv,this,u),xd(uv,this,c),xd(nv,this,n),xd(dv,this,l),xd(cv,this,h),xd(sv,this,i),xd(ov,this,Le.toDateObject(o)),this.trigger=i.flatMap((function(t){return t.getElementsToTriggerPopup()}));var d,v=pd(this.trigger);try{for(v.s();!(d=v.n()).done;){var p=d.value;p.addEventListener("click",Ad(rv,this)),p.addEventListener("mouseenter",Ad(ev,this)),p.addEventListener("mouseleave",Ad(tv,this)),p.classList.add("popupTriggerArea")}}catch(t){v.e(t)}finally{v.f()}var y,g=pd(i);try{for(g.s();!(y=g.n()).done;){var m;null===(m=y.value.container)||void 0===m||m.addEventListener("keydown",Ad(Zd,this))}}catch(t){g.e(t)}finally{g.f()}Ad(iv,this).hidden=!0,f&&_d(mv,this,Sv).call(this)}),[{key:"render",value:function(){if(!Ad(hv,this)){var t=xd(hv,this,document.createElement("div"));if(t.className="popup",Ad(nv,this)){var e=t.style.outlineColor=Z.makeHexColor.apply(Z,cd(Ad(nv,this)));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?t.style.backgroundColor="color-mix(in srgb, ".concat(e," 30%, white)"):t.style.backgroundColor=Z.makeHexColor.apply(Z,cd(Ad(nv,this).map((function(t){return Math.floor(.7*(255-t)+t)}))))}var r=document.createElement("span");r.className="header";var n=document.createElement("h1");r.append(n);var i=Ad(pv,this);if(n.dir=i.dir,n.textContent=i.str,t.append(r),Ad(ov,this)){var a=document.createElement("span");a.classList.add("popupDate"),a.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),a.setAttribute("data-l10n-args",JSON.stringify({dateObj:Ad(ov,this).valueOf()})),r.append(a)}var o=sd(mv,this,wv);if(o)td.render({xfaHtml:o,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{var s=this._formatContents(Ad(av,this));t.append(s)}Ad(iv,this).append(t)}}},{key:"_formatContents",value:function(t){var e=t.str,r=t.dir,n=document.createElement("p");n.classList.add("popupContent"),n.dir=r;for(var i=e.split(/(?:\\r\\n?|\\n)/),a=0,o=i.length;a0}},{key:"render",value:function(){var t=ad(nd().mark((function t(e){var r,n,i,a,o,s,u,c,l,h,f,d,v,p,y,g;return nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.annotations,Re(n=this.div,this.viewport),i=new Map,a={data:null,layer:n,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new me,annotationStorage:e.annotationStorage||new Mo,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null},o=pd(r),t.prev=6,o.s();case 8:if((s=o.n()).done){t.next=35;break}if(!(u=s.value).noHTML){t.next=12;break}return t.abrupt("continue",33);case 12:if(c=16===u.annotationType){t.next=19;break}if(l=Md(u.rect),h=l.width,f=l.height,!(h<=0||f<=0)){t.next=17;break}return t.abrupt("continue",33);case 17:t.next=23;break;case 19:if(d=i.get(u.id)){t.next=22;break}return t.abrupt("continue",33);case 22:a.elements=d;case 23:if(a.data=u,(v=Cd.create(a)).isRenderable){t.next=27;break}return t.abrupt("continue",33);case 27:return!c&&u.popupRef&&((p=i.get(u.popupRef))?p.push(v):i.set(u.popupRef,[v])),y=v.render(),u.hidden&&(y.style.visibility="hidden"),t.next=32,_d(rp,this,ip).call(this,y,u.id);case 32:v._isEditable&&(Ad(tp,this).set(v.data.id,v),null===(g=this._annotationEditorUIManager)||void 0===g||g.renderAnnotationElement(v));case 33:t.next=8;break;case 35:t.next=40;break;case 37:t.prev=37,t.t0=t.catch(6),o.e(t.t0);case 40:return t.prev=40,o.f(),t.finish(40);case 43:_d(rp,this,op).call(this);case 44:case"end":return t.stop()}}),t,this,[[6,37,40,43]])})));return function(e){return t.apply(this,arguments)}}()},{key:"update",value:function(t){var e=t.viewport,r=this.div;this.viewport=e,Re(r,{rotation:e.rotation}),_d(rp,this,op).call(this),r.hidden=!1}},{key:"getEditableAnnotations",value:function(){return Array.from(Ad(tp,this).values())}},{key:"getEditableAnnotation",value:function(t){return Ad(tp,this).get(t)}}])}();function ip(t,e){return ap.apply(this,arguments)}function ap(){return(ap=ad(nd().mark((function t(e,r){var n,i,a,o,s,u,c,l,h,f;return nd().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.firstChild||e,o=a.id="".concat(at).concat(r),t.next=4,null===(n=Ad(ep,this))||void 0===n?void 0:n.getAriaAttributes(o);case 4:if(s=t.sent){u=pd(s);try{for(u.s();!(c=u.n()).done;)l=yd(c.value,2),h=l[0],f=l[1],a.setAttribute(h,f)}catch(t){u.e(t)}finally{u.f()}}this.div.append(e),null===(i=Ad($v,this))||void 0===i||i.moveElementInDOM(this.div,e,a,!1);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function op(){if(Ad(Zv,this)){var t,e=this.div,r=pd(Ad(Zv,this));try{for(r.s();!(t=r.n()).done;){var n=yd(t.value,2),i=n[0],a=n[1],o=e.querySelector('[data-annotation-id="'.concat(i,'"]'));if(o){a.className="annotationContent";var s=o.firstChild;s?"CANVAS"===s.nodeName?s.replaceWith(a):s.classList.contains("annotationContent")?s.after(a):s.before(a):o.append(a)}}}catch(t){r.e(t)}finally{r.f()}Ad(Zv,this).clear()}}function sp(){sp=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function up(t){return function(t){if(Array.isArray(t))return dp(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fp(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cp(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function lp(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=fp(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function hp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||fp(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fp(t,e){if(t){if("string"==typeof t)return dp(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dp(t,e):void 0}}function dp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();var r=e._internalPadding*this.parentScale,n=this.getRect(r,r),i=Wa._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:Op(Mp,this)),a={annotationType:A.FREETEXT,color:i,fontSize:Op(Rp,this),value:Pp(Fp,this,zp).call(this),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?a:this.annotationElementId&&!Pp(Fp,this,qp).call(this,a)?null:(a.id=this.annotationElementId,a)}},{key:"renderAnnotationElement",value:function(t){var r=bp(e,"renderAnnotationElement",this,3)([t]);if(this.deleted)return r;var n=r.style;n.fontSize="calc(".concat(Op(Rp,this),"px * var(--scale-factor))"),n.color=Op(Mp,this),r.replaceChildren();var i,a=lp(Op(Cp,this).split("\\n"));try{for(a.s();!(i=a.n()).done;){var o=i.value,s=document.createElement("div");s.append(o?document.createTextNode(o):document.createElement("br")),r.append(s)}}catch(t){a.e(t)}finally{a.f()}var u=e._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(u,u),popupContent:Op(Cp,this)}),r}},{key:"resetAnnotationElement",value:function(t){bp(e,"resetAnnotationElement",this,3)([t]),t.resetEdited()}}],[{key:"_keyboardManager",get:function(){var t=e.prototype,r=function(t){return t.isEmpty()},n=Kn.TRANSLATE_SMALL,i=Kn.TRANSLATE_BIG;return W(this,"_keyboardManager",new rn([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[n,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[i,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,n],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,i],checker:r}]]))}},{key:"initialize",value:function(t,e){Wa.initialize(t,e,{strings:["pdfjs-free-text-default-content"]});var r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function(t,r){switch(t){case _.FREETEXT_SIZE:e._defaultFontSize=r;break;case _.FREETEXT_COLOR:e._defaultColor=r}}},{key:"defaultPropertiesToUpdate",get:function(){return[[_.FREETEXT_SIZE,e._defaultFontSize],[_.FREETEXT_COLOR,e._defaultColor||Wa._defaultLineColor]]}},{key:"deserialize",value:(r=sp().mark((function t(r,n,i){var a,o,s,u,c,l,h,f,d,v,p,y,g,m;return sp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,!(r instanceof Pv)){t.next=6;break}if(s=(o=r).data,u=s.defaultAppearanceData,c=u.fontSize,l=u.fontColor,h=s.rect,f=s.rotation,d=s.id,v=s.popupRef,p=o.textContent,y=o.textPosition,g=o.parent.page.pageNumber,p&&0!==p.length){t.next=5;break}return t.abrupt("return",null);case 5:a=r={annotationType:A.FREETEXT,color:Array.from(l),fontSize:c,value:p.join("\\n"),position:y,pageIndex:g-1,rect:h.slice(0),rotation:f,id:d,deleted:!1,popupRef:v};case 6:return t.next=8,bp(e,"deserialize",this,2)([r,n,i]);case 8:return m=t.sent,Tp(Rp,m,r.fontSize),Tp(Mp,m,Z.makeHexColor.apply(Z,up(r.color))),Tp(Cp,m,Vp.call(e,r.value)),m.annotationElementId=r.id||null,m._initialData=a,t.abrupt("return",m);case 15:case"end":return t.stop()}}),t,this)})),n=function(){var t=this,e=arguments;return new Promise((function(n,i){var a=r.apply(t,e);function o(t){cp(a,n,i,o,s,"next",t)}function s(t){cp(a,n,i,o,s,"throw",t)}o(void 0)}))},function(t,e,r){return n.apply(this,arguments)})}]);var r,n}();function Np(t){var e=this,r=function(t){e.editorDiv.style.fontSize="calc(".concat(t,"px * var(--scale-factor))"),e.translate(0,-(t-Op(Rp,e))*e.parentScale),Tp(Rp,e,t),Pp(Fp,e,Gp).call(e)},n=Op(Rp,this);this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function Wp(t){var e=this,r=function(t){Tp(Mp,e,e.editorDiv.style.color=t)},n=Op(Mp,this);this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function Bp(){var t=[];this.editorDiv.normalize();var e,r=null,n=lp(this.editorDiv.childNodes);try{for(n.s();!(e=n.n()).done;){var i,a=e.value;(null===(i=r)||void 0===i?void 0:i.nodeType)===Node.TEXT_NODE&&"BR"===a.nodeName||(t.push(Hp.call(Jv,a)),r=a)}}catch(t){n.e(t)}finally{n.f()}return t.join("\\n")}function Gp(){var t,e=hp(this.parentDimensions,2),r=e[0],n=e[1];if(this.isAttachedToDOM)t=this.div.getBoundingClientRect();else{var i=this.currentLayer,a=this.div,o=a.style.display,s=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",i.div.append(this.div),t=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",s)}this.rotation%180==this.parentRotation%180?(this.width=t.width/r,this.height=t.height/n):(this.width=t.height/r,this.height=t.width/n),this.fixAndSetPosition()}function Hp(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(Lp,"")}function Up(){if(this.editorDiv.replaceChildren(),Op(Cp,this)){var t,e=lp(Op(Cp,this).split("\\n"));try{for(e.s();!(t=e.n()).done;){var r=t.value,n=document.createElement("div");n.append(r?document.createTextNode(r):document.createElement("br")),this.editorDiv.append(n)}}catch(t){e.e(t)}finally{e.f()}}}function zp(){return Op(Cp,this).replaceAll(" "," ")}function Vp(t){return t.replaceAll(" "," ")}function qp(t){var e=this._initialData,r=e.value,n=e.fontSize,i=e.color,a=e.pageIndex;return this._hasBeenMoved||t.value!==r||t.fontSize!==n||t.color.some((function(t,e){return t!==i[e]}))||t.pageIndex!==a}function Yp(t,e,r){return e=Kp(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xp()?Reflect.construct(e,r||[],Kp(t).constructor):e.apply(t,r))}function Xp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xp=function(){return!!t})()}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}function Qp(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jp(t,e)}function Jp(t,e){return Jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jp(t,e)}function $p(t){return function(t){if(Array.isArray(t))return ry(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ey(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||ey(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ty(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ey(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function ey(t,e){if(t){if("string"==typeof t)return ry(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ry(t,e):void 0}}function ry(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];ny(this,t),sy(this,yy),uy(this,dy,void 0),uy(this,vy,[]),uy(this,py,[]);var a,o=1/0,s=-1/0,u=1/0,c=-1/0,l=Math.pow(10,-4),h=ty(e);try{for(h.s();!(a=h.n()).done;){var f=a.value,d=f.x,v=f.y,p=f.width,y=f.height,g=Math.floor((d-r)/l)*l,m=Math.ceil((d+p+r)/l)*l,b=Math.floor((v-r)/l)*l,w=Math.ceil((v+y+r)/l)*l,k=[g,b,w,!0],x=[m,b,w,!1];hy(vy,this).push(k,x),o=Math.min(o,g),s=Math.max(s,m),u=Math.min(u,b),c=Math.max(c,w)}}catch(t){h.e(t)}finally{h.f()}var A,_=s-o+2*n,E=c-u+2*n,S=o-n,O=u-n,T=hy(vy,this).at(i?-1:-2),P=[T[0],T[2]],L=ty(hy(vy,this));try{for(L.s();!(A=L.n()).done;){var M=A.value,C=Zp(M,3),j=C[0],I=C[1],R=C[2];M[0]=(j-S)/_,M[1]=(I-O)/E,M[2]=(R-O)/E}}catch(t){L.e(t)}finally{L.f()}ly(dy,this,{x:S,y:O,width:_,height:E,lastPoint:P})}),[{key:"getOutlines",value:function(){hy(vy,this).sort((function(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}));var t,e=[],r=ty(hy(vy,this));try{for(r.s();!(t=r.n()).done;){var n=t.value;n[3]?(e.push.apply(e,$p(fy(yy,this,xy).call(this,n))),fy(yy,this,wy).call(this,n)):(fy(yy,this,ky).call(this,n),e.push.apply(e,$p(fy(yy,this,xy).call(this,n))))}}catch(t){r.e(t)}finally{r.f()}return fy(yy,this,my).call(this,e)}}])}();function my(t){var e,r=[],n=new Set,i=ty(t);try{for(i.s();!(e=i.n()).done;){var a=e.value,o=Zp(a,3),s=o[0],u=o[1],c=o[2];r.push([s,u,a],[s,c,a])}}catch(t){i.e(t)}finally{i.f()}r.sort((function(t,e){return t[1]-e[1]||t[0]-e[0]}));for(var l=0,h=r.length;l0;){var y=n.values().next().value,g=Zp(y,5),m=g[0],b=g[1],w=g[2],k=g[3],x=g[4];n.delete(y);var A=m,_=b;for(v=[m,w],p.push(v);;){var E=void 0;if(n.has(k))E=k;else{if(!n.has(x))break;E=x}n.delete(E);var S=Zp(E,5);m=S[0],b=S[1],w=S[2],k=S[3],x=S[4],A!==m&&(v.push(A,_,m,_===b?b:w),A=m),_=_===b?w:b}v.push(A,_)}return new Sy(p,hy(dy,this))}function by(t){for(var e=hy(py,this),r=0,n=e.length-1;r<=n;){var i=r+n>>1,a=e[i][0];if(a===t)return i;a=0;c--){var l=Zp(hy(py,this)[c],2),h=l[0],f=l[1];if(h!==r)break;if(h===r&&f===n)return void hy(py,this).splice(c,1)}}function xy(t){for(var e=Zp(t,3),r=e[0],n=e[1],i=e[2],a=[[r,n,i]],o=fy(yy,this,by).call(this,i),s=0;s=c)if(p>l)a[h][1]=l;else{if(1===f)return[];a.splice(h,1),h--,f--}else a[h][2]=c,p>l&&a.push([r,l,p])}return a}var Ay=function(){return ay((function t(){ny(this,t)}),[{key:"toSVGPath",value:function(){throw new Error("Abstract method \`toSVGPath\` must be implemented.")}},{key:"box",get:function(){throw new Error("Abstract getter \`box\` must be implemented.")}},{key:"serialize",value:function(t,e){throw new Error("Abstract method \`serialize\` must be implemented.")}},{key:"free",get:function(){return this instanceof tg}}])}(),_y=new WeakMap,Ey=new WeakMap,Sy=function(t){function e(t,r){var n;return ny(this,e),uy(n=Yp(this,e),_y,void 0),uy(n,Ey,void 0),ly(Ey,n,t),ly(_y,n,r),n}return Qp(e,Ay),ay(e,[{key:"toSVGPath",value:function(){var t,e=[],r=ty(hy(Ey,this));try{for(r.s();!(t=r.n()).done;){var n=t.value,i=Zp(n,2),a=i[0],o=i[1];e.push("M".concat(a," ").concat(o));for(var s=2;s5&&void 0!==arguments[5]?arguments[5]:0;ny(this,t),sy(this,By),uy(this,Oy,void 0),uy(this,Ty,[]),uy(this,Py,void 0),uy(this,Ly,void 0),uy(this,My,[]),uy(this,Cy,new Float64Array(18)),uy(this,jy,void 0),uy(this,Iy,void 0),uy(this,Ry,void 0),uy(this,Fy,void 0),uy(this,Dy,void 0),uy(this,Ny,void 0),uy(this,Wy,[]),ly(Oy,this,r),ly(Ny,this,i*n),ly(Ly,this,a),hy(Cy,this).set([NaN,NaN,NaN,NaN,o,s],6),ly(Py,this,u),ly(Fy,this,zy._*n),ly(Ry,this,Vy._*n),ly(Dy,this,n),hy(Wy,this).push(o,s)}),[{key:"free",get:function(){return!0}},{key:"isEmpty",value:function(){return isNaN(hy(Cy,this)[8])}},{key:"add",value:function(t){var e,r=t.x,n=t.y;ly(jy,this,r),ly(Iy,this,n);var i=Zp(hy(Oy,this),4),a=i[0],o=i[1],s=i[2],u=i[3],c=Zp(hy(Cy,this).subarray(8,12),4),l=c[0],h=c[1],f=c[2],d=c[3],v=r-f,p=n-d,y=Math.hypot(v,p);if(y=6;y-=6)isNaN(e[y])?v.push("L".concat(e[y+4]," ").concat(e[y+5])):v.push("C".concat(e[y]," ").concat(e[y+1]," ").concat(e[y+2]," ").concat(e[y+3]," ").concat(e[y+4]," ").concat(e[y+5]));return v.push("L".concat(e[4]," ").concat(e[5]," Z")),v.join(" ")}},{key:"getOutlines",value:function(){for(var t,e,r=hy(My,this),n=hy(Ty,this),i=hy(Cy,this),a=i.subarray(4,6),o=i.subarray(16,18),s=Zp(hy(Oy,this),4),u=s[0],c=s[1],l=s[2],h=s[3],f=new Float64Array((null!==(t=null===(e=hy(Wy,this))||void 0===e?void 0:e.length)&&void 0!==t?t:0)+2),d=0,v=f.length-2;d=6;_-=6)for(var E=0;E<6;E+=2)isNaN(n[_+E])?(k[x]=k[x+1]=NaN,x+=2):(k[x]=n[_+E],k[x+1]=n[_+E+1],x+=2);return k.set([NaN,NaN,NaN,NaN,n[4],n[5]],x),new tg(k,f,hy(Oy,this),hy(Dy,this),hy(Py,this),hy(Ly,this))}}])}();function Hy(){var t=hy(Cy,this).subarray(4,6),e=hy(Cy,this).subarray(16,18),r=Zp(hy(Oy,this),4),n=r[0],i=r[1],a=r[2],o=r[3];return[(hy(jy,this)+(t[0]-e[0])/2-n)/a,(hy(Iy,this)+(t[1]-e[1])/2-i)/o,(hy(jy,this)+(e[0]-t[0])/2-n)/a,(hy(Iy,this)+(e[1]-t[1])/2-i)/o]}var Uy,zy={_:8},Vy={_:zy._+2},qy=new WeakMap,Yy=new WeakMap,Xy=new WeakMap,Ky=new WeakMap,Qy=new WeakMap,Jy=new WeakMap,$y=new WeakMap,Zy=new WeakSet,tg=function(t){function e(t,r,n,i,a,o){var s;ny(this,e),sy(s=Yp(this,e),Zy),uy(s,qy,void 0),uy(s,Yy,null),uy(s,Xy,void 0),uy(s,Ky,void 0),uy(s,Qy,void 0),uy(s,Jy,void 0),uy(s,$y,void 0),ly($y,s,t),ly(Qy,s,r),ly(qy,s,n),ly(Jy,s,i),ly(Xy,s,a),ly(Ky,s,o),fy(Zy,s,ng).call(s,o);for(var u=hy(Yy,s),c=u.x,l=u.y,h=u.width,f=u.height,d=0,v=t.length;d=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function og(t,e){if(t){if("string"==typeof t)return sg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sg(t,e):void 0}}function sg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);rt.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Hg(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Ug(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Hg(a,n,i,o,s,"next",t)}function s(t){Hg(a,n,i,o,s,"throw",t)}o(void 0)}))}}function zg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vg(t){for(var e=1;e-1?(am(bm,r,!0),om(Sm,r,Pm).call(r,t),om(Sm,r,Im).call(r)):im(lm,r)&&(am(um,r,t.anchorNode),am(cm,r,t.anchorOffset),am(vm,r,t.focusNode),am(pm,r,t.focusOffset),om(Sm,r,Tm).call(r),om(Sm,r,Im).call(r),r.rotate(r.rotation)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$g(t,e)}(e,Wa),function(t,e,r){return e&&qg(t.prototype,e),r&&qg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"telemetryInitialData",get:function(){return{action:"added",type:im(bm,this)?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:im(_m,this),methodOfCreation:im(Em,this)}}},{key:"telemetryFinalData",get:function(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}},{key:"translateInPage",value:function(t,e){}},{key:"toolbarPosition",get:function(){return im(wm,this)}},{key:"updateParams",value:function(t,e){switch(t){case _.HIGHLIGHT_COLOR:om(Sm,this,Lm).call(this,e);break;case _.HIGHLIGHT_THICKNESS:om(Sm,this,Mm).call(this,e)}}},{key:"propertiesToUpdate",get:function(){return[[_.HIGHLIGHT_COLOR,this.color||e._defaultColor],[_.HIGHLIGHT_THICKNESS,im(_m,this)||e._defaultThickness],[_.HIGHLIGHT_FREE,im(bm,this)]]}},{key:"addEditToolbar",value:(n=Ug(Gg().mark((function t(){var r;return Gg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kg(e,"addEditToolbar",this,3)([]);case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return",null);case 5:return this._uiManager.highlightColors&&(am(fm,this,new Tg({editor:this})),r.addColorPicker(im(fm,this))),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"disableEditing",value:function(){Kg(e,"disableEditing",this,3)([]),this.div.classList.toggle("disabled",!0)}},{key:"enableEditing",value:function(){Kg(e,"enableEditing",this,3)([]),this.div.classList.toggle("disabled",!1)}},{key:"fixAndSetPosition",value:function(){return Kg(e,"fixAndSetPosition",this,3)([om(Sm,this,Nm).call(this)])}},{key:"getBaseTranslation",value:function(){return[0,0]}},{key:"getRect",value:function(t,r){return Kg(e,"getRect",this,3)([t,r,om(Sm,this,Nm).call(this)])}},{key:"onceAdded",value:function(){this.annotationElementId||this.parent.addUndoableEditor(this),this.div.focus()}},{key:"remove",value:function(){om(Sm,this,jm).call(this),this._reportTelemetry({action:"deleted"}),Kg(e,"remove",this,3)([])}},{key:"rebuild",value:function(){this.parent&&(Kg(e,"rebuild",this,3)([]),null!==this.div&&(om(Sm,this,Im).call(this),this.isAttachedToDOM||this.parent.add(this)))}},{key:"setParent",value:function(t){var r=!1;if(this.parent&&!t)om(Sm,this,jm).call(this);else if(t){var n;om(Sm,this,Im).call(this,t),r=!this.parent&&(null===(n=this.div)||void 0===n?void 0:n.classList.contains("selectedEditor"))}Kg(e,"setParent",this,3)([t]),this.show(this._isVisible),r&&this.select()}},{key:"rotate",value:function(t){var r,n=this.parent.drawLayer;im(bm,this)?(t=(t-this.rotation+360)%360,r=Rm.call(e,im(gm,this).box,t)):r=Rm.call(e,this,t),n.rotate(im(mm,this),t),n.rotate(im(xm,this),t),n.updateBox(im(mm,this),r),n.updateBox(im(xm,this),Rm.call(e,im(dm,this).box,t))}},{key:"render",value:function(){if(this.div)return this.div;var t=Kg(e,"render",this,3)([]);im(Am,this)&&(t.setAttribute("aria-label",im(Am,this)),t.setAttribute("role","mark")),im(bm,this)?t.classList.add("free"):this.div.addEventListener("keydown",om(Sm,this,Fm).bind(this),{signal:this._uiManager._signal});var r=am(ym,this,document.createElement("div"));t.append(r),r.setAttribute("aria-hidden","true"),r.className="internal",r.style.clipPath=im(hm,this);var n=Ng(this.parentDimensions,2),i=n[0],a=n[1];return this.setDims(this.width*i,this.height*a),Br(this,im(ym,this),["pointerover","pointerleave"]),this.enableEditing(),t}},{key:"pointerover",value:function(){this.isSelected||this.parent.drawLayer.addClass(im(xm,this),"hovered")}},{key:"pointerleave",value:function(){this.isSelected||this.parent.drawLayer.removeClass(im(xm,this),"hovered")}},{key:"_moveCaret",value:function(t){switch(this.parent.unselect(this),t){case 0:case 2:om(Sm,this,Dm).call(this,!0);break;case 1:case 3:om(Sm,this,Dm).call(this,!1)}}},{key:"select",value:function(){var t,r;Kg(e,"select",this,3)([]),im(xm,this)&&(null===(t=this.parent)||void 0===t||t.drawLayer.removeClass(im(xm,this),"hovered"),null===(r=this.parent)||void 0===r||r.drawLayer.addClass(im(xm,this),"selected"))}},{key:"unselect",value:function(){var t;Kg(e,"unselect",this,3)([]),im(xm,this)&&(null===(t=this.parent)||void 0===t||t.drawLayer.removeClass(im(xm,this),"selected"),im(bm,this)||om(Sm,this,Dm).call(this,!1))}},{key:"_mustFixPosition",get:function(){return!im(bm,this)}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;Kg(e,"show",this,3)([t]),this.parent&&(this.parent.drawLayer.show(im(mm,this),t),this.parent.drawLayer.show(im(xm,this),t))}},{key:"serialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();var e=this.getRect(0,0),r=Wa._colorManager.convert(this.color),n={annotationType:A.HIGHLIGHT,color:r,opacity:im(km,this),thickness:im(_m,this),quadPoints:om(Sm,this,Wm).call(this),outlines:om(Sm,this,Bm).call(this,e),pageIndex:this.pageIndex,rect:e,rotation:om(Sm,this,Nm).call(this),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!om(Sm,this,Um).call(this,n)?null:(n.id=this.annotationElementId,n)}},{key:"renderAnnotationElement",value:function(t){return t.updateEdited({rect:this.getRect(0,0)}),null}}],[{key:"_keyboardManager",get:function(){var t=e.prototype;return W(this,"_keyboardManager",new rn([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}},{key:"computeTelemetryFinalData",value:function(t){return{numberOfColors:t.get("color").size}}},{key:"initialize",value:function(t,r){var n;Wa.initialize(t,r),e._defaultColor||(e._defaultColor=(null===(n=r.highlightColors)||void 0===n?void 0:n.values().next().value)||"#fff066")}},{key:"updateDefaultParams",value:function(t,r){switch(t){case _.HIGHLIGHT_DEFAULT_COLOR:e._defaultColor=r;break;case _.HIGHLIGHT_THICKNESS:e._defaultThickness=r}}},{key:"defaultPropertiesToUpdate",get:function(){return[[_.HIGHLIGHT_DEFAULT_COLOR,e._defaultColor],[_.HIGHLIGHT_THICKNESS,e._defaultThickness]]}},{key:"startHighlighting",value:function(t,r,n){var i=this,a=n.target,o=n.x,s=n.y,u=a.getBoundingClientRect(),c=u.x,l=u.y,h=u.width,f=u.height,d=new AbortController,v=t.combinedSignal(d),p=function(r){d.abort(),om(e,i,Hm).call(i,t,r)};window.addEventListener("blur",p,{signal:v}),window.addEventListener("pointerup",p,{signal:v}),window.addEventListener("pointerdown",(function(t){t.preventDefault(),t.stopPropagation()}),{capture:!0,passive:!1,signal:v}),window.addEventListener("contextmenu",Te,{signal:v}),a.addEventListener("pointermove",om(e,this,Gm).bind(this,t),{signal:v}),this._freeHighlight=new Gy({x:o,y:s},[c,l,h,f],t.scale,this._defaultThickness/2,r,.001);var y=t.drawLayer.highlight(this._freeHighlight,this._defaultColor,this._defaultOpacity,!0);this._freeHighlightId=y.id,this._freeHighlightClipId=y.clipPathId}},{key:"deserialize",value:(r=Ug(Gg().mark((function t(r,n,i){var a,o,s,u,c,l,h,f,d,v,p,y,g,m,b,w,k,x,_,E,S,O,T,P,L,M,C,j,I,R,F,D,N,W,B,G,H,U,z,V,q,Y,X;return Gg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,r instanceof Hv?(s=(o=r).data,u=s.quadPoints,c=s.rect,l=s.rotation,h=s.id,f=s.color,d=s.opacity,v=s.popupRef,p=o.parent.page.pageNumber,a=r={annotationType:A.HIGHLIGHT,color:Array.from(f),opacity:d,quadPoints:u,boxes:null,pageIndex:p-1,rect:c.slice(0),rotation:l,id:h,deleted:!1,popupRef:v}):r instanceof Gv&&(g=(y=r).data,m=g.inkLists,b=g.rect,w=g.rotation,k=g.id,x=g.color,_=g.borderStyle.rawWidth,E=g.popupRef,S=y.parent.page.pageNumber,a=r={annotationType:A.HIGHLIGHT,color:Array.from(x),thickness:_,inkLists:m,boxes:null,pageIndex:S-1,rect:b.slice(0),rotation:w,id:k,deleted:!1,popupRef:E}),T=(O=r).color,P=O.quadPoints,L=O.inkLists,M=O.opacity,t.next=5,Kg(e,"deserialize",this,2)([r,n,i]);case 5:if((C=t.sent).color=Z.makeHexColor.apply(Z,Dg(T)),am(km,C,M||1),L&&am(_m,C,r.thickness),C.annotationElementId=r.id||null,C._initialData=a,j=Ng(C.pageDimensions,2),I=j[0],R=j[1],F=Ng(C.pageTranslation,2),D=F[0],N=F[1],P){for(W=am(lm,C,[]),B=0;B=0)am(mm,this,r),am(hm,this,n),this.parent.drawLayer.finalizeLine(r,e),am(xm,this,this.parent.drawLayer.highlightOutline(im(dm,this)));else if(this.parent){var i=this.parent.viewport.rotation;this.parent.drawLayer.updateLine(im(mm,this),e),this.parent.drawLayer.updateBox(im(mm,this),Rm.call(Rg,im(gm,this).box,(i-this.rotation+360)%360)),this.parent.drawLayer.updateLine(im(xm,this),im(dm,this)),this.parent.drawLayer.updateBox(im(xm,this),Rm.call(Rg,im(dm,this).box,i))}var a=e.box,o=a.x,s=a.y,u=a.width,c=a.height;switch(this.rotation){case 0:this.x=o,this.y=s,this.width=u,this.height=c;break;case 90:var l=Ng(this.parentDimensions,2),h=l[0],f=l[1];this.x=s,this.y=1-o,this.width=u*f/h,this.height=c*h/f;break;case 180:this.x=1-o,this.y=1-s,this.width=u,this.height=c;break;case 270:var d=Ng(this.parentDimensions,2),v=d[0],p=d[1];this.x=1-s,this.y=o,this.width=u*p/v,this.height=c*v/p}var y=im(dm,this).box.lastPoint;am(wm,this,[(y[0]-o)/u,(y[1]-s)/c])}function Lm(t){var e=this,r=function(t,r){var n,i,a;e.color=t,null===(n=e.parent)||void 0===n||n.drawLayer.changeColor(im(mm,e),t),null===(i=im(fm,e))||void 0===i||i.updateColor(t),am(km,e,r),null===(a=e.parent)||void 0===a||a.drawLayer.changeOpacity(im(mm,e),r)},n=this.color,i=im(km,this);this.addCommands({cmd:r.bind(this,t,Rg._defaultOpacity),undo:r.bind(this,n,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(t)},!0)}function Mm(t){var e=this,r=im(_m,this),n=function(t){am(_m,e,t),om(Sm,e,Cm).call(e,t)};this.addCommands({cmd:n.bind(this,t),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:_.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}function Cm(t){if(im(bm,this)){om(Sm,this,Pm).call(this,{highlightOutlines:im(gm,this).getNewOutline(t/2)}),this.fixAndSetPosition();var e=Ng(this.parentDimensions,2),r=e[0],n=e[1];this.setDims(this.width*r,this.height*n)}}function jm(){null!==im(mm,this)&&this.parent&&(this.parent.drawLayer.remove(im(mm,this)),am(mm,this,null),this.parent.drawLayer.remove(im(xm,this)),am(xm,this,null))}function Im(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;if(null===im(mm,this)){var e=t.drawLayer.highlight(im(gm,this),this.color,im(km,this));nm(am,[mm,this])._=e.id,nm(am,[hm,this])._=e.clipPathId,am(xm,this,t.drawLayer.highlightOutline(im(dm,this))),im(ym,this)&&(im(ym,this).style.clipPath=im(hm,this))}}function Rm(t,e){var r=t.x,n=t.y,i=t.width,a=t.height;switch(e){case 90:return{x:1-n-a,y:r,width:a,height:i};case 180:return{x:1-r-i,y:1-n-a,width:i,height:a};case 270:return{x:n,y:1-r-i,width:a,height:i}}return{x:r,y:n,width:i,height:a}}function Fm(t){Rg._keyboardManager.exec(this,t)}function Dm(t){if(im(um,this)){var e=window.getSelection();t?e.setPosition(im(um,this),im(cm,this)):e.setPosition(im(vm,this),im(pm,this))}}function Nm(){return im(bm,this)?this.rotation:0}function Wm(){if(im(bm,this))return null;var t,e=Ng(this.pageDimensions,2),r=e[0],n=e[1],i=Ng(this.pageTranslation,2),a=i[0],o=i[1],s=im(lm,this),u=new Float32Array(8*s.length),c=0,l=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Wg(t))){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(s);try{for(l.s();!(t=l.n()).done;){var h=t.value,f=h.x,d=h.y,v=h.width,p=h.height,y=f*r+a,g=(1-d-p)*n+o;u[c]=u[c+4]=y,u[c+1]=u[c+3]=g,u[c+2]=u[c+6]=y+v*r,u[c+5]=u[c+7]=g+p*n,c+=8}}catch(t){l.e(t)}finally{l.f()}return u}function Bm(t){return im(gm,this).serialize(t,om(Sm,this,Nm).call(this))}function Gm(t,e){this._freeHighlight.add(e)&&t.drawLayer.updatePath(this._freeHighlightId,this._freeHighlight)}function Hm(t,e){this._freeHighlight.isEmpty()?t.drawLayer.removeFreeHighlight(this._freeHighlightId):t.createAndAddNewEditor(e,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}function Um(t){var e=this._initialData.color;return t.color.some((function(t,r){return t!==e[r]}))}function zm(){zm=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new L(n||[]);return i(o,"_invoke",{value:S(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",v="executing",p="completed",y={};function g(){}function m(){}function b(){}var w={};c(w,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==r&&n.call(x,o)&&(w=x);var A=b.prototype=g.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var u=h(t[i],t,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){c.value=t,o(c)}),(function(t){return r("throw",t,o,s)}))}s(u.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=f;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=O(s,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?p:d,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Vm(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Km(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function qm(t){return function(t){if(Array.isArray(t))return Qm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Km(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ym(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Xm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Km(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Km(t,e){if(t){if("string"==typeof t)return Qm(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qm(t,e):void 0}}function Qm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&t===i&&e===a)){var o,s,u=this.currentPath,c=hb(gb,this);if(u.push([t,e]),lb(wb,this,!0),u.length<=2)return(o=c).moveTo.apply(o,qm(u[0])),void c.lineTo(t,e);3===u.length&&(lb(gb,this,c=new Path2D),(s=c).moveTo.apply(s,qm(u[0]))),(r=fb(Ob,this,Wb)).call.apply(r,[this,c].concat(qm(u.at(-3)),qm(u.at(-2)),[t,e]))}}function Fb(){var t;if(0!==this.currentPath.length){var e=this.currentPath.at(-1);(t=hb(gb,this)).lineTo.apply(t,qm(e))}}function Db(t,e){var r,n=this;if(lb(Sb,this,null),t=Math.min(Math.max(t,0),this.canvas.width),e=Math.min(Math.max(e,0),this.canvas.height),fb(Ob,this,Rb).call(this,t,e),fb(Ob,this,Fb).call(this),1!==this.currentPath.length)r=fb(Ob,this,Bb).call(this);else{var i=[t,e];r=[[i,i.slice(),i.slice(),i]]}var a=hb(gb,this),o=this.currentPath;this.currentPath=[],lb(gb,this,new Path2D),this.addCommands({cmd:function(){n.allRawPaths.push(o),n.paths.push(r),n.bezierPath2D.push(a),n._uiManager.rebuild(n)},undo:function(){n.allRawPaths.pop(),n.paths.pop(),n.bezierPath2D.pop(),0===n.paths.length?n.remove():(n.canvas||(fb(Ob,n,Vb).call(n),fb(Ob,n,qb).call(n)),fb(Ob,n,rw).call(n))},mustExec:!0})}function Nb(){if(hb(wb,this)){lb(wb,this,!1);Math.ceil(this.thickness*this.parentScale);var t=this.currentPath.slice(-3),e=t.map((function(t){return t[0]})),r=t.map((function(t){return t[1]})),n=(Math.min.apply(Math,qm(e)),Math.max.apply(Math,qm(e)),Math.min.apply(Math,qm(r)),Math.max.apply(Math,qm(r)),this.ctx);n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);var i,a=Vm(this.bezierPath2D);try{for(a.s();!(i=a.n()).done;){var o=i.value;n.stroke(o)}}catch(t){a.e(t)}finally{a.f()}n.stroke(hb(gb,this)),n.restore()}}function Wb(t,e,r,n,i,a,o){var s=(e+n)/2,u=(r+i)/2,c=(n+a)/2,l=(i+o)/2;t.bezierCurveTo(s+2*(n-s)/3,u+2*(i-u)/3,c+2*(n-c)/3,l+2*(i-l)/3,c,l)}function Bb(){var t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];var e,r=[],n=Xm(t[0],2),i=n[0],a=n[1];for(e=1;e0&&void 0!==arguments[0]&&arguments[0];if(!this.isEmpty())if(hb(mb,this)){var e=fb(Ob,this,tw).call(this),r=fb(Ob,this,ew).call(this);lb(pb,this,Math.max(Wa.MIN_SIZE,e[2]-e[0])),lb(vb,this,Math.max(Wa.MIN_SIZE,e[3]-e[1]));var n=Math.ceil(r+hb(pb,this)*this.scaleFactor),i=Math.ceil(r+hb(vb,this)*this.scaleFactor),a=Xm(this.parentDimensions,2),o=a[0],s=a[1];this.width=n/o,this.height=i/s,this.setAspectRatio(n,i);var u=this.translationX,c=this.translationY;this.translationX=-e[0],this.translationY=-e[1],fb(Ob,this,Yb).call(this),fb(Ob,this,Gb).call(this),lb(_b,this,n),lb(Eb,this,i),this.setDims(n,i);var l=t?r/this.scaleFactor/2:0;this.translate(u-this.translationX-l,c-this.translationY-l)}else fb(Ob,this,Gb).call(this)}function nw(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return iw(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iw(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function ow(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function sw(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){ow(a,n,i,o,s,"next",t)}function s(t){ow(a,n,i,o,s,"throw",t)}o(void 0)}))}}function uw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function cw(t){for(var e=1;e0&&void 0!==l[0]?l[0]:null,r=!(l.length>1&&void 0!==l[1])||l[1],!this.hasAltTextData()){t.next=4;break}return t.abrupt("return",null);case 4:if(n=this._uiManager.mlManager){t.next=7;break}throw new Error("No ML.");case 7:return t.next=9,n.isEnabledFor("altText");case 9:if(t.sent){t.next=11;break}throw new Error("ML isn't enabled for alt text.");case 11:return i=e||this.copyCanvas(null,null,!0).imageData,a=i.data,o=i.width,s=i.height,t.next=14,n.guess({name:"altText",request:{data:a,width:o,height:s,channels:a.length/(o*s)}});case 14:if(u=t.sent){t.next=17;break}throw new Error("No response from the AI service.");case 17:if(!u.error){t.next=19;break}throw new Error("Error from the AI service.");case 19:if(!u.cancel){t.next=21;break}return t.abrupt("return",null);case 21:if(u.output){t.next=23;break}throw new Error("No valid response from the AI service.");case 23:return c=u.output,t.next=26,this.setGuessedAltText(c);case 26:return r&&!this.hasAltTextData()&&(this.altTextData={alt:c,decorative:!1}),t.abrupt("return",c);case 28:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"remove",value:function(){var t,r;kw(Ew,this)&&(xw(_w,this,null),this._uiManager.imageManager.deleteId(kw(Ew,this)),null===(t=kw(Lw,this))||void 0===t||t.remove(),xw(Lw,this,null),null===(r=kw(Mw,this))||void 0===r||r.disconnect(),xw(Mw,this,null),kw(Cw,this)&&(clearTimeout(kw(Cw,this)),xw(Cw,this,null))),dw(e,"remove",this,3)([])}},{key:"rebuild",value:function(){this.parent?(dw(e,"rebuild",this,3)([]),null!==this.div&&(kw(Ew,this)&&null===kw(Lw,this)&&Aw(Rw,this,Ww).call(this),this.isAttachedToDOM||this.parent.add(this))):kw(Ew,this)&&Aw(Rw,this,Ww).call(this)}},{key:"onceAdded",value:function(){this._isDraggable=!0,this.div.focus()}},{key:"isEmpty",value:function(){return!(kw(Sw,this)||kw(_w,this)||kw(Ow,this)||kw(Tw,this)||kw(Ew,this))}},{key:"isResizable",get:function(){return!0}},{key:"render",value:function(){if(this.div)return this.div;var t,r;if(this.width&&(t=this.x,r=this.y),dw(e,"render",this,3)([]),this.div.hidden=!0,this.div.setAttribute("role","figure"),this.addAltTextButton(),kw(_w,this)?Aw(Rw,this,Bw).call(this):Aw(Rw,this,Ww).call(this),this.width&&!this.annotationElementId){var n=nw(this.parentDimensions,2),i=n[0],a=n[1];this.setAt(t*i,r*a,this.width*i,this.height*a)}return this.div}},{key:"copyCanvas",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t||(t=224);var n=kw(_w,this),i=n.width,a=n.height,o=new Fe,s=kw(_w,this),u=i,c=a,l=null;if(e){var h,f;if(i>e||a>e){var d=Math.min(e/i,e/a);u=Math.floor(i*d),c=Math.floor(a*d)}var v=(l=document.createElement("canvas")).width=Math.ceil(u*o.sx),p=l.height=Math.ceil(c*o.sy);kw(jw,this)||(s=Aw(Rw,this,Hw).call(this,v,p));var y=l.getContext("2d");y.filter=this._uiManager.hcmFilter;var g="white",m="#cfcfd8";"none"!==this._uiManager.hcmFilter?m="black":null!==(h=(f=window).matchMedia)&&void 0!==h&&h.call(f,"(prefers-color-scheme: dark)").matches&&(g="#8f8f9d",m="#42414d");var b=15*o.sx,w=15*o.sy,k=new OffscreenCanvas(2*b,2*w),x=k.getContext("2d");x.fillStyle=g,x.fillRect(0,0,2*b,2*w),x.fillStyle=m,x.fillRect(0,0,b,w),x.fillRect(b,w,b,w),y.fillStyle=y.createPattern(k,"repeat"),y.fillRect(0,0,v,p),y.drawImage(s,0,0,s.width,s.height,0,0,v,p)}var A=null;if(r){var _,E;if(o.symmetric&&s.widtht||a>t){var S=Math.min(t/i,t/a);_=Math.floor(i*S),E=Math.floor(a*S),kw(jw,this)||(s=Aw(Rw,this,Hw).call(this,_,E))}var O=new OffscreenCanvas(_,E).getContext("2d",{willReadFrequently:!0});O.drawImage(s,0,0,s.width,s.height,0,0,_,E),A={width:_,height:E,data:O.getImageData(0,0,_,E).data}}return{canvas:l,width:u,height:c,imageData:A}}},{key:"getImageForAltText",value:function(){return kw(Lw,this)}},{key:"serialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();var r={annotationType:A.STAMP,bitmapId:kw(Ew,this),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:kw(jw,this),structTreeParentId:this._structTreeParentId};if(t)return r.bitmapUrl=Aw(Rw,this,zw).call(this,!0),r.accessibilityData=this.serializeAltText(!0),r;var n=this.serializeAltText(!1),i=n.decorative,a=n.altText;if(!i&&a&&(r.accessibilityData={type:"Figure",alt:a}),this.annotationElementId){var o,s=Aw(Rw,this,qw).call(this,r);if(s.isSame)return null;s.isSameAltText?delete r.accessibilityData:r.accessibilityData.structParent=null!==(o=this._initialData.structParent)&&void 0!==o?o:-1}if(r.id=this.annotationElementId,null===e)return r;e.stamps||(e.stamps=new Map);var u=kw(jw,this)?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(e.stamps.has(kw(Ew,this))){if(kw(jw,this)){var c=e.stamps.get(kw(Ew,this));u>c.area&&(c.area=u,c.serialized.bitmap.close(),c.serialized.bitmap=Aw(Rw,this,zw).call(this,!1))}}else e.stamps.set(kw(Ew,this),{area:u,serialized:r}),r.bitmap=Aw(Rw,this,zw).call(this,!1);return r}},{key:"renderAnnotationElement",value:function(t){return t.updateEdited({rect:this.getRect(0,0)}),null}}],[{key:"initialize",value:function(t,e){Wa.initialize(t,e)}},{key:"supportedTypes",get:function(){return W(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((function(t){return"image/".concat(t)})))}},{key:"supportedTypesStr",get:function(){return W(this,"supportedTypesStr",this.supportedTypes.join(","))}},{key:"isHandlingMimeForPasting",value:function(t){return this.supportedTypes.includes(t)}},{key:"paste",value:function(t,e){e.pasteEditor(A.STAMP,{bitmapFile:t.getAsFile()})}},{key:"computeTelemetryFinalData",value:function(t){var e,r,n=t.get("hasAltText");return{hasAltText:null!==(e=n.get(!0))&&void 0!==e?e:0,hasNoAltText:null!==(r=n.get(!1))&&void 0!==r?r:0}}},{key:"deserialize",value:(r=sw(aw().mark((function t(r,n,i){var a,o,s,u,c,l,h,f,d,v,p,y,g,m,b,w,k,x,_,E,S,O,T,P,L;return aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=null,!(r instanceof qv)){t.next=22;break}return u=(s=r).data,c=u.rect,l=u.rotation,h=u.id,f=u.structParent,d=u.popupRef,v=s.container,p=s.parent.page.pageNumber,y=v.querySelector("canvas"),g=i.imageManager.getFromCanvas(v.id,y),y.remove(),t.next=8,n._structTree.getAriaAttributes("".concat(at).concat(h));case 8:if(t.t2=o=t.sent,t.t1=null===t.t2,t.t1){t.next=12;break}t.t1=void 0===o;case 12:if(!t.t1){t.next=16;break}t.t3=void 0,t.next=17;break;case 16:t.t3=o.get("aria-label");case 17:if(t.t0=t.t3,t.t0){t.next=20;break}t.t0="";case 20:m=t.t0,a=r={annotationType:A.STAMP,bitmapId:g.id,bitmap:g.bitmap,pageIndex:p-1,rect:c.slice(0),rotation:l,id:h,deleted:!1,accessibilityData:{decorative:!1,altText:m},isSvg:!1,structParent:f,popupRef:d};case 22:return t.next=24,dw(e,"deserialize",this,2)([r,n,i]);case 24:return b=t.sent,k=(w=r).rect,x=w.bitmap,_=w.bitmapUrl,E=w.bitmapId,S=w.isSvg,O=w.accessibilityData,E&&i.imageManager.isValidId(E)?(xw(Ew,b,E),x&&xw(_w,b,x)):xw(Ow,b,_),xw(jw,b,S),T=nw(b.pageDimensions,2),P=T[0],L=T[1],b.width=(k[2]-k[0])/P,b.height=(k[3]-k[1])/L,b.annotationElementId=r.id||null,O&&(b.altTextData=O),b._initialData=a,xw(Iw,b,!!a),t.abrupt("return",b);case 36:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})}]);var r,n}();function Dw(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?(xw(_w,this,t.bitmap),e||(xw(Ew,this,t.id),xw(jw,this,t.isSvg)),t.file&&xw(Pw,this,t.file.name),Aw(Rw,this,Bw).call(this)):this.remove()}function Nw(){if(xw(Sw,this,null),this._uiManager.enableWaiting(!1),kw(Lw,this)){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&kw(_w,this))return this._editToolbar.hide(),void this._uiManager.editAltText(this,!0);if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&kw(_w,this)){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch(t){}}this.div.focus()}}function Ww(){var t=this;if(kw(Ew,this))return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(kw(Ew,this)).then((function(e){return Aw(Rw,t,Dw).call(t,e,!0)})).finally((function(){return Aw(Rw,t,Nw).call(t)}));if(kw(Ow,this)){var e=kw(Ow,this);return xw(Ow,this,null),this._uiManager.enableWaiting(!0),void xw(Sw,this,this._uiManager.imageManager.getFromUrl(e).then((function(e){return Aw(Rw,t,Dw).call(t,e)})).finally((function(){return Aw(Rw,t,Nw).call(t)})))}if(kw(Tw,this)){var r=kw(Tw,this);return xw(Tw,this,null),this._uiManager.enableWaiting(!0),void xw(Sw,this,this._uiManager.imageManager.getFromFile(r).then((function(e){return Aw(Rw,t,Dw).call(t,e)})).finally((function(){return Aw(Rw,t,Nw).call(t)})))}var n=document.createElement("input");n.type="file",n.accept=db.supportedTypesStr;var i=this._uiManager._signal;xw(Sw,this,new Promise((function(e){n.addEventListener("change",sw(aw().mark((function r(){var i;return aw().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n.files&&0!==n.files.length){r.next=4;break}t.remove(),r.next=10;break;case 4:return t._uiManager.enableWaiting(!0),r.next=7,t._uiManager.imageManager.getFromFile(n.files[0]);case 7:i=r.sent,t._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:t._uiManager.useNewAltTextFlow}}),Aw(Rw,t,Dw).call(t,i);case 10:e();case 11:case"end":return r.stop()}}),r)}))),{signal:i}),n.addEventListener("cancel",(function(){t.remove(),e()}),{signal:i})})).finally((function(){return Aw(Rw,t,Nw).call(t)}))),n.click()}function Bw(){var t=this.div,e=kw(_w,this),r=e.width,n=e.height,i=nw(this.pageDimensions,2),a=i[0],o=i[1],s=.75;if(this.width)r=this.width*a,n=this.height*o;else if(r>s*a||n>s*o){var u=Math.min(s*a/r,s*o/n);r*=u,n*=u}var c=nw(this.parentDimensions,2),l=c[0],h=c[1];this.setDims(r*l/a,n*h/o),this._uiManager.enableWaiting(!1);var f=xw(Lw,this,document.createElement("canvas"));f.setAttribute("role","img"),this.addContainer(f),this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(t.hidden=!1),Aw(Rw,this,Uw).call(this,r,n),Aw(Rw,this,Vw).call(this),kw(Iw,this)||(this.parent.addUndoableEditor(this),xw(Iw,this,!0)),this._reportTelemetry({action:"inserted_image"}),kw(Pw,this)&&f.setAttribute("aria-label",kw(Pw,this))}function Gw(t,e){var r,n=this,i=nw(this.parentDimensions,2),a=i[0],o=i[1];this.width=t/a,this.height=e/o,null!==(r=this._initialOptions)&&void 0!==r&&r.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==kw(Cw,this)&&clearTimeout(kw(Cw,this)),xw(Cw,this,setTimeout((function(){xw(Cw,n,null),Aw(Rw,n,Uw).call(n,t,e)}),200))}function Hw(t,e){for(var r=kw(_w,this),n=r.width,i=r.height,a=kw(_w,this);n>2*t||i>2*e;){var o=n,s=i;n>2*t&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2)),i>2*e&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2));var u=new OffscreenCanvas(n,i);u.getContext("2d").drawImage(a,0,0,o,s,0,0,n,i),a=u.transferToImageBitmap()}return a}function Uw(t,e){var r=new Fe,n=Math.ceil(t*r.sx),i=Math.ceil(e*r.sy),a=kw(Lw,this);if(a&&(a.width!==n||a.height!==i)){a.width=n,a.height=i;var o=kw(jw,this)?kw(_w,this):Aw(Rw,this,Hw).call(this,n,i),s=a.getContext("2d");s.filter=this._uiManager.hcmFilter,s.drawImage(o,0,0,o.width,o.height,0,0,n,i)}}function zw(t){if(t){if(kw(jw,this)){var e=this._uiManager.imageManager.getSvgUrl(kw(Ew,this));if(e)return e}var r=document.createElement("canvas"),n=kw(_w,this);return r.width=n.width,r.height=n.height,r.getContext("2d").drawImage(kw(_w,this),0,0),r.toDataURL()}if(kw(jw,this)){var i=nw(this.pageDimensions,2),a=i[0],o=i[1],s=Math.round(this.width*a*Vt.PDF_TO_CSS_UNITS),u=Math.round(this.height*o*Vt.PDF_TO_CSS_UNITS),c=new OffscreenCanvas(s,u);return c.getContext("2d").drawImage(kw(_w,this),0,0,kw(_w,this).width,kw(_w,this).height,0,0,s,u),c.transferToImageBitmap()}return structuredClone(kw(_w,this))}function Vw(){var t=this;this._uiManager._signal&&(xw(Mw,this,new ResizeObserver((function(e){var r=e[0].contentRect;r.width&&r.height&&Aw(Rw,t,Gw).call(t,r.width,r.height)}))),kw(Mw,this).observe(this.div),this._uiManager._signal.addEventListener("abort",(function(){var e;null===(e=kw(Mw,t))||void 0===e||e.disconnect(),xw(Mw,t,null)}),{once:!0}))}function qw(t){var e,r=this._initialData,n=r.rect,i=r.pageIndex,a=r.accessibilityData.altText,o=t.rect.every((function(t,e){return Math.abs(t-n[e])<1})),s=t.pageIndex===i,u=((null===(e=t.accessibilityData)||void 0===e?void 0:e.alt)||"")===a;return{isSame:o&&s&&u,isSameAltText:u}}function Yw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xw(t){for(var e=1;e=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Qw(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Jw(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){Qw(a,n,i,o,s,"next",t)}function s(t){Qw(a,n,i,o,s,"throw",t)}o(void 0)}))}}function $w(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Zw(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Zw(t,e){if(t){if("string"==typeof t)return tk(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tk(t,e):void 0}}function tk(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0&&void 0!==arguments[0]?arguments[0]:sk(kk,this).getMode();switch(ck(xk,this,Tk).call(this),t){case A.NONE:return this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case A.INK:this.addInkEditorIfNeeded(!1),this.disableTextSelection(),this.togglePointerEvents(!0),this.disableClick();break;case A.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);var e,r=this.div.classList,n=$w(Lk._.values());try{for(n.s();!(e=n.n()).done;){var i=e.value;r.toggle("".concat(i._type,"Editing"),t===i._editorType)}}catch(t){n.e(t)}finally{n.f()}this.div.hidden=!1}},{key:"hasTextLayer",value:function(t){var e;return t===(null===(e=sk(bk,this))||void 0===e?void 0:e.div)}},{key:"addInkEditorIfNeeded",value:function(t){if(sk(kk,this).getMode()===A.INK){if(!t){var e,r=$w(sk(pk,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;if(n.isEmpty())return void n.setInBackground()}}catch(t){r.e(t)}finally{r.f()}}this.createAndAddNewEditor({offsetX:0,offsetY:0},!1).setInBackground()}}},{key:"setEditingState",value:function(t){sk(kk,this).setEditingState(t)}},{key:"addCommands",value:function(t){sk(kk,this).addCommands(t)}},{key:"toggleDrawing",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("drawing",!t)}},{key:"togglePointerEvents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("disabled",!t)}},{key:"toggleAnnotationLayerPointerEvents",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(t=sk(fk,this))||void 0===t||t.div.classList.toggle("disabled",!e)}},{key:"enable",value:(e=Jw(Kw().mark((function t(){var e,r,n,i,a,o,s,u,c;return Kw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.div.tabIndex=0,this.togglePointerEvents(!0),e=new Set,r=$w(sk(pk,this).values());try{for(r.s();!(n=r.n()).done;)(i=n.value).enableEditing(),i.show(!0),i.annotationElementId&&(sk(kk,this).removeChangedExistingAnnotation(i),e.add(i.annotationElementId))}catch(t){r.e(t)}finally{r.f()}if(sk(fk,this)){t.next=7;break}return t.abrupt("return");case 7:a=sk(fk,this).getEditableAnnotations(),o=$w(a),t.prev=9,o.s();case 11:if((s=o.n()).done){t.next=27;break}if((u=s.value).hide(),!sk(kk,this).isDeletedAnnotationElement(u.data.id)){t.next=16;break}return t.abrupt("continue",25);case 16:if(!e.has(u.data.id)){t.next=18;break}return t.abrupt("continue",25);case 18:return t.next=20,this.deserialize(u);case 20:if(c=t.sent){t.next=23;break}return t.abrupt("continue",25);case 23:this.addOrRebuild(c),c.enableEditing();case 25:t.next=11;break;case 27:t.next=32;break;case 29:t.prev=29,t.t0=t.catch(9),o.e(t.t0);case 32:return t.prev=32,o.f(),t.finish(32);case 35:case"end":return t.stop()}}),t,this,[[9,29,32,35]])}))),function(){return e.apply(this,arguments)})},{key:"disable",value:function(){uk(mk,this,!0),this.div.tabIndex=-1,this.togglePointerEvents(!1);var t,e=new Map,r=new Map,n=$w(sk(pk,this).values());try{for(n.s();!(t=n.n()).done;){var i,a=t.value;a.disableEditing(),a.annotationElementId&&(null===a.serialize()?(r.set(a.annotationElementId,a),null===(i=this.getEditableAnnotation(a.annotationElementId))||void 0===i||i.show(),a.remove()):e.set(a.annotationElementId,a))}}catch(t){n.e(t)}finally{n.f()}if(sk(fk,this)){var o,s=$w(sk(fk,this).getEditableAnnotations());try{for(s.s();!(o=s.n()).done;){var u=o.value,c=u.data.id;if(!sk(kk,this).isDeletedAnnotationElement(c)){var l=r.get(c);l?(l.resetAnnotationElement(u),l.show(!1),u.show()):((l=e.get(c))&&(sk(kk,this).addChangedExistingAnnotation(l),l.renderAnnotationElement(u)&&l.show(!1)),u.show())}}}catch(t){s.e(t)}finally{s.f()}}ck(xk,this,Tk).call(this),this.isEmpty&&(this.div.hidden=!0);var h,f=this.div.classList,d=$w(Lk._.values());try{for(d.s();!(h=d.n()).done;){var v=h.value;f.remove("".concat(v._type,"Editing"))}}catch(t){d.e(t)}finally{d.f()}this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),uk(mk,this,!1)}},{key:"getEditableAnnotation",value:function(t){var e;return(null===(e=sk(fk,this))||void 0===e?void 0:e.getEditableAnnotation(t))||null}},{key:"setActiveEditor",value:function(t){sk(kk,this).getActive()!==t&&sk(kk,this).setActiveEditor(t)}},{key:"enableTextSelection",value:function(){var t;if(this.div.tabIndex=-1,null!==(t=sk(bk,this))&&void 0!==t&&t.div&&!sk(wk,this)){uk(wk,this,new AbortController);var e=sk(kk,this).combinedSignal(sk(wk,this));sk(bk,this).div.addEventListener("pointerdown",ck(xk,this,_k).bind(this),{signal:e}),sk(bk,this).div.classList.add("highlighting")}}},{key:"disableTextSelection",value:function(){var t;this.div.tabIndex=0,null!==(t=sk(bk,this))&&void 0!==t&&t.div&&sk(wk,this)&&(sk(wk,this).abort(),uk(wk,this,null),sk(bk,this).div.classList.remove("highlighting"))}},{key:"enableClick",value:function(){if(!sk(dk,this)){uk(dk,this,new AbortController);var t=sk(kk,this).combinedSignal(sk(dk,this));this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t}),this.div.addEventListener("pointerup",this.pointerup.bind(this),{signal:t})}}},{key:"disableClick",value:function(){var t;null===(t=sk(dk,this))||void 0===t||t.abort(),uk(dk,this,null)}},{key:"attach",value:function(t){sk(pk,this).set(t.id,t);var e=t.annotationElementId;e&&sk(kk,this).isDeletedAnnotationElement(e)&&sk(kk,this).removeDeletedAnnotationElement(t)}},{key:"detach",value:function(t){var e;sk(pk,this).delete(t.id),null===(e=sk(lk,this))||void 0===e||e.removePointerInTextLayer(t.contentDiv),!sk(mk,this)&&t.annotationElementId&&sk(kk,this).addDeletedAnnotationElement(t)}},{key:"remove",value:function(t){this.detach(t),sk(kk,this).removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1,sk(gk,this)||this.addInkEditorIfNeeded(!1)}},{key:"changeParent",value:function(t){var e;t.parent!==this&&(t.parent&&t.annotationElementId&&(sk(kk,this).addDeletedAnnotationElement(t.annotationElementId),Wa.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),null===(e=t.parent)||void 0===e||e.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}},{key:"add",value:function(t){if(t.parent!==this||!t.isAttachedToDOM){if(this.changeParent(t),sk(kk,this).addEditor(t),this.attach(t),!t.isAttachedToDOM){var e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(),sk(kk,this).addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}},{key:"moveEditorInDOM",value:function(t){var e,r=this;if(t.isAttachedToDOM){var n=document.activeElement;t.div.contains(n)&&!sk(vk,this)&&(t._focusEventsAllowed=!1,uk(vk,this,setTimeout((function(){uk(vk,r,null),t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",(function(){t._focusEventsAllowed=!0}),{once:!0,signal:sk(kk,r)._signal}),n.focus())}),0))),t._structTreeParentId=null===(e=sk(lk,this))||void 0===e?void 0:e.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}}},{key:"addOrRebuild",value:function(t){t.needsToBeRebuilt()?(t.parent||(t.parent=this),t.rebuild(),t.show()):this.add(t)}},{key:"addUndoableEditor",value:function(t){this.addCommands({cmd:function(){return t._uiManager.rebuild(t)},undo:function(){t.remove()},mustExec:!1})}},{key:"getNextId",value:function(){return sk(kk,this).getId()}},{key:"combinedSignal",value:function(t){return sk(kk,this).combinedSignal(t)}},{key:"canCreateNewEmptyEditor",value:function(){var t;return null===(t=ok(xk,this,Ek))||void 0===t?void 0:t.canCreateNewEmptyEditor()}},{key:"pasteEditor",value:function(t,e){sk(kk,this).updateToolbar(t),sk(kk,this).updateMode(t);var r=ck(xk,this,Ok).call(this),n=r.offsetX,i=r.offsetY,a=this.getNextId(),o=ck(xk,this,Sk).call(this,Xw({parent:this,id:a,x:n,y:i,uiManager:sk(kk,this),isCentered:!0},e));o&&this.add(o)}},{key:"deserialize",value:(t=Jw(Kw().mark((function t(e){var r,n;return Kw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(r=Lk._.get(null!==(n=e.annotationType)&&void 0!==n?n:e.annotationEditorType))||void 0===r?void 0:r.deserialize(e,this,sk(kk,this));case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0=null;case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),t,this)}))),function(e){return t.apply(this,arguments)})},{key:"createAndAddNewEditor",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getNextId(),i=ck(xk,this,Sk).call(this,Xw({parent:this,id:n,x:t.offsetX,y:t.offsetY,uiManager:sk(kk,this),isCentered:e},r));return i&&this.add(i),i}},{key:"addNewEditor",value:function(){this.createAndAddNewEditor(ck(xk,this,Ok).call(this),!0)}},{key:"setSelected",value:function(t){sk(kk,this).setSelected(t)}},{key:"toggleSelected",value:function(t){sk(kk,this).toggleSelected(t)}},{key:"unselect",value:function(t){sk(kk,this).unselect(t)}},{key:"pointerup",value:function(t){var e=J.platform.isMac;0!==t.button||t.ctrlKey&&e||t.target===this.div&&sk(yk,this)&&(uk(yk,this,!1),sk(hk,this)?sk(kk,this).getMode()!==A.STAMP?this.createAndAddNewEditor(t,!1):sk(kk,this).unselectAll():uk(hk,this,!0))}},{key:"pointerdown",value:function(t){if(sk(kk,this).getMode()===A.HIGHLIGHT&&this.enableTextSelection(),sk(yk,this))uk(yk,this,!1);else{var e=J.platform.isMac;if(!(0!==t.button||t.ctrlKey&&e)&&t.target===this.div){uk(yk,this,!0);var r=sk(kk,this).getActive();uk(hk,this,!r||r.isEmpty())}}}},{key:"findNewParent",value:function(t,e,r){var n=sk(kk,this).findParent(e,r);return null!==n&&n!==this&&(n.changeParent(t),!0)}},{key:"destroy",value:function(){var t;(null===(t=sk(kk,this).getActive())||void 0===t?void 0:t.parent)===this&&(sk(kk,this).commitOrRemove(),sk(kk,this).setActiveEditor(null)),sk(vk,this)&&(clearTimeout(sk(vk,this)),uk(vk,this,null));var e,r=$w(sk(pk,this).values());try{for(r.s();!(e=r.n()).done;){var n,i=e.value;null===(n=sk(lk,this))||void 0===n||n.removePointerInTextLayer(i.contentDiv),i.setParent(null),i.isAttachedToDOM=!1,i.div.remove()}}catch(t){r.e(t)}finally{r.f()}this.div=null,sk(pk,this).clear(),sk(kk,this).removeLayer(this)}},{key:"render",value:function(t){var e=t.viewport;this.viewport=e,Re(this.div,e);var r,n=$w(sk(kk,this).getEditors(this.pageIndex));try{for(n.s();!(r=n.n()).done;){var i=r.value;this.add(i),i.rebuild()}}catch(t){n.e(t)}finally{n.f()}this.updateMode()}},{key:"update",value:function(t){var e=t.viewport;sk(kk,this).commitOrRemove(),ck(xk,this,Tk).call(this);var r=this.viewport.rotation,n=e.rotation;if(this.viewport=e,Re(this.div,{rotation:n}),r!==n){var i,a=$w(sk(pk,this).values());try{for(a.s();!(i=a.n()).done;)i.value.rotate(n)}catch(t){a.e(t)}finally{a.f()}}this.addInkEditorIfNeeded(!1)}},{key:"pageDimensions",get:function(){var t=this.viewport.rawDims;return[t.pageWidth,t.pageHeight]}},{key:"scale",get:function(){return sk(kk,this).viewParameters.realScale}}]);var t,e}();function _k(t){var e=this;sk(kk,this).unselectAll();var r=t.target;if(r===sk(bk,this).div||("img"===r.getAttribute("role")||r.classList.contains("endOfContent"))&&sk(bk,this).div.contains(r)){var n=J.platform.isMac;if(0!==t.button||t.ctrlKey&&n)return;sk(kk,this).showAllEditors("highlight",!0,!0),sk(bk,this).div.classList.add("free"),this.toggleDrawing(),Om.startHighlighting(this,"ltr"===sk(kk,this).direction,{target:sk(bk,this).div,x:t.x,y:t.y}),sk(bk,this).div.addEventListener("pointerup",(function(){sk(bk,e).div.classList.remove("free"),e.toggleDrawing(!0)}),{once:!0,signal:sk(kk,this)._signal}),t.preventDefault()}}function Ek(t){return Lk._.get(sk(kk,t).getMode())}function Sk(t){var e=ok(xk,this,Ek);return e?new e.prototype.constructor(t):null}function Ok(){var t=this.div.getBoundingClientRect(),e=t.x,r=t.y,n=t.width,i=t.height,a=Math.max(0,e),o=Math.max(0,r),s=(a+Math.min(window.innerWidth,e+n))/2-e,u=(o+Math.min(window.innerHeight,r+i))/2-r,c=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Zw(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.viewport.rotation%180==0?[s,u]:[u,s],2);return{offsetX:c[0],offsetY:c[1]}}function Tk(){uk(gk,this,!0);var t,e=$w(sk(pk,this).values());try{for(e.s();!(t=e.n()).done;){var r=t.value;r.isEmpty()&&r.remove()}}catch(t){e.e(t)}finally{e.f()}uk(gk,this,!1)}rk(Ak,"_initialized",!1);var Pk,Lk={_:new Map([Dp,Tb,Fw,Om].map((function(t){return[t._editorType,t]})))};function Mk(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ck(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ck(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function Ck(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0){var e,r=Mk(Nk(Hk,this).values());try{for(r.s();!(e=r.n()).done;){var n=e.value;n.remove(),t.append(n)}}catch(t){r.e(t)}finally{r.f()}}Dk(Bk,this,t)}}else Dk(Bk,this,t)}},{key:"highlight",value:function(e,r,n){var i,a,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=(Dk(Gk,this,(i=Nk(Gk,this),a=i++,i)),a),u=Wk(zk,this,Yk).call(this,e.box);u.classList.add("highlight"),e.free&&u.classList.add("free");var c=t._svgFactory.createElement("defs");u.append(c);var l=t._svgFactory.createElement("path");c.append(l);var h="path_p".concat(this.pageIndex,"_").concat(s);l.setAttribute("id",h),l.setAttribute("d",e.toSVGPath()),o&&Nk(Uk,this).set(s,l);var f=Wk(zk,this,Xk).call(this,c,h),d=t._svgFactory.createElement("use");return u.append(d),u.setAttribute("fill",r),u.setAttribute("fill-opacity",n),d.setAttribute("href","#".concat(h)),Nk(Hk,this).set(s,u),{id:s,clipPathId:"url(#".concat(f,")")}}},{key:"highlightOutline",value:function(e){var r,n,i=(Dk(Gk,this,(r=Nk(Gk,this),n=r++,r)),n),a=Wk(zk,this,Yk).call(this,e.box);a.classList.add("highlightOutline");var o=t._svgFactory.createElement("defs");a.append(o);var s=t._svgFactory.createElement("path");o.append(s);var u,c="path_p".concat(this.pageIndex,"_").concat(i);if(s.setAttribute("id",c),s.setAttribute("d",e.toSVGPath()),s.setAttribute("vector-effect","non-scaling-stroke"),e.free){a.classList.add("free");var l=t._svgFactory.createElement("mask");o.append(l),u="mask_p".concat(this.pageIndex,"_").concat(i),l.setAttribute("id",u),l.setAttribute("maskUnits","objectBoundingBox");var h=t._svgFactory.createElement("rect");l.append(h),h.setAttribute("width","1"),h.setAttribute("height","1"),h.setAttribute("fill","white");var f=t._svgFactory.createElement("use");l.append(f),f.setAttribute("href","#".concat(c)),f.setAttribute("stroke","none"),f.setAttribute("fill","black"),f.setAttribute("fill-rule","nonzero"),f.classList.add("mask")}var d=t._svgFactory.createElement("use");a.append(d),d.setAttribute("href","#".concat(c)),u&&d.setAttribute("mask","url(#".concat(u,")"));var v=d.cloneNode();return a.append(v),d.classList.add("mainOutline"),v.classList.add("secondaryOutline"),Nk(Hk,this).set(i,a),i}},{key:"finalizeLine",value:function(t,e){var r=Nk(Uk,this).get(t);Nk(Uk,this).delete(t),this.updateBox(t,e.box),r.setAttribute("d",e.toSVGPath())}},{key:"updateLine",value:function(t,e){Nk(Hk,this).get(t).firstChild.firstChild.setAttribute("d",e.toSVGPath())}},{key:"removeFreeHighlight",value:function(t){this.remove(t),Nk(Uk,this).delete(t)}},{key:"updatePath",value:function(t,e){Nk(Uk,this).get(t).setAttribute("d",e.toSVGPath())}},{key:"updateBox",value:function(e,r){qk.call(t,Nk(Hk,this).get(e),r)}},{key:"show",value:function(t,e){Nk(Hk,this).get(t).classList.toggle("hidden",!e)}},{key:"rotate",value:function(t,e){Nk(Hk,this).get(t).setAttribute("data-main-rotation",e)}},{key:"changeColor",value:function(t,e){Nk(Hk,this).get(t).setAttribute("fill",e)}},{key:"changeOpacity",value:function(t,e){Nk(Hk,this).get(t).setAttribute("fill-opacity",e)}},{key:"addClass",value:function(t,e){Nk(Hk,this).get(t).classList.add(e)}},{key:"removeClass",value:function(t,e){Nk(Hk,this).get(t).classList.remove(e)}},{key:"getSVGRoot",value:function(t){return Nk(Hk,this).get(t)}},{key:"remove",value:function(t){null!==Nk(Bk,this)&&(Nk(Hk,this).get(t).remove(),Nk(Hk,this).delete(t))}},{key:"destroy",value:function(){Dk(Bk,this,null);var t,e=Mk(Nk(Hk,this).values());try{for(e.s();!(t=e.n()).done;)t.value.remove()}catch(t){e.e(t)}finally{e.f()}Nk(Hk,this).clear()}}],[{key:"_svgFactory",get:function(){return W(this,"_svgFactory",new me)}}])}();function qk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.x,n=void 0===r?0:r,i=e.y,a=void 0===i?0:i,o=e.width,s=void 0===o?1:o,u=e.height,c=void 0===u?1:u,l=t.style;l.top="".concat(100*a,"%"),l.left="".concat(100*n,"%"),l.width="".concat(100*s,"%"),l.height="".concat(100*c,"%")}function Yk(t){var e=Pk._svgFactory.create(1,1,!0);return Nk(Bk,this).append(e),e.setAttribute("aria-hidden",!0),qk.call(Pk,e,t),e}function Xk(t,e){var r=Pk._svgFactory.createElement("clipPath");t.append(r);var n="clip_".concat(e);r.setAttribute("id",n),r.setAttribute("clipPathUnits","objectBoundingBox");var i=Pk._svgFactory.createElement("use");return r.append(i),i.setAttribute("href","#".concat(e)),i.classList.add("clip"),n}Pk=Vk;`;function fe(e,t){return typeof e=="string"?e:e instanceof Blob?URL.createObjectURL(e):e instanceof ArrayBuffer?URL.createObjectURL(new Blob([e],t)):e instanceof Response?URL.createObjectURL(e.blob()):e}function He(e){return new Promise((t,r)=>{let n=document.createElement("script");n.src=e,n.onload=function(){t()},n.onerror=function(){r()},document.body.append(n)})}function je(e,t){return ei(this,null,function*(){t&&(t instanceof ArrayBuffer&&(t=new Blob([t])),oe(e,URL.createObjectURL(t)))})}function oe(e,t){let r=document.createElement("a");r.download=e,r.style.display="none",r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}function J(e){var t,r,n,i,a;for(t="",n=e.length,r=0;r=1&&i<=127?t+=e.charAt(r):i>2047?(a=224|i>>12&15,t+=String.fromCharCode(a),a=128|i>>6&63,t+=String.fromCharCode(a),a=128|i>>0&63,t+=String.fromCharCode(a)):(a=192|i>>6&31,t+=String.fromCharCode(a),a=128|i>>0&63,t+=String.fromCharCode(a));return t}var G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ti(e){var t,r,n,i,a,o;for(n=e.length,r=0,t="";r>2),t+=G.charAt((i&3)<<4),t+="==";break}if(a=e.charCodeAt(r++),r==n){t+=G.charAt(i>>2),t+=G.charAt((i&3)<<4|(a&240)>>4),t+=G.charAt((a&15)<<2),t+="=";break}o=e.charCodeAt(r++),t+=G.charAt(i>>2),t+=G.charAt((i&3)<<4|(a&240)>>4),t+=G.charAt((a&15)<<2|(o&192)>>6),t+=G.charAt(o&63)}return t}function Nt(e){return ti(J(e))}var de=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ni(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r-1}var vi=yi,Ci=Ie;function Bi(e,t){var r=this.__data__,n=Ci(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Ei=Bi,Qi=ai,mi=hi,bi=Ii,wi=vi,ki=Ei;function z(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=wA}var $e=kA,SA=ee,xA=$e,DA=Y,FA="[object Arguments]",RA="[object Array]",NA="[object Boolean]",LA="[object Date]",GA="[object Error]",MA="[object Function]",UA="[object Map]",OA="[object Number]",PA="[object Object]",TA="[object RegExp]",_A="[object Set]",HA="[object String]",jA="[object WeakMap]",JA="[object ArrayBuffer]",YA="[object DataView]",qA="[object Float32Array]",KA="[object Float64Array]",WA="[object Int8Array]",ZA="[object Int16Array]",XA="[object Int32Array]",VA="[object Uint8Array]",zA="[object Uint8ClampedArray]",$A="[object Uint16Array]",es="[object Uint32Array]",m={};m[qA]=m[KA]=m[WA]=m[ZA]=m[XA]=m[VA]=m[zA]=m[$A]=m[es]=!0,m[FA]=m[RA]=m[JA]=m[NA]=m[YA]=m[LA]=m[GA]=m[MA]=m[UA]=m[OA]=m[PA]=m[TA]=m[_A]=m[HA]=m[jA]=!1;function ts(e){return DA(e)&&xA(e.length)&&!!m[SA(e)]}var rs=ts;function ns(e){return function(t){return e(t)}}var Be=ns,Ee={exports:{}};Ee.exports,function(e,t){var r=Lt,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,A=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch(c){}}();e.exports=A}(Ee,Ee.exports);var et=Ee.exports,is=rs,as=Be,Vt=et,zt=Vt&&Vt.isTypedArray,os=zt?as(zt):is,$t=os,As=cA,ss=Xe,cs=U,us=Ve,ls=ze,gs=$t,hs=Object.prototype,fs=hs.hasOwnProperty;function ds(e,t){var r=cs(e),n=!r&&ss(e),i=!r&&!n&&us(e),a=!r&&!n&&!i&&gs(e),o=r||n||i||a,A=o?As(e.length,String):[],s=A.length;for(var c in e)(t||fs.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ls(c,s)))&&A.push(c);return A}var er=ds,Is=Object.prototype;function ps(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Is;return e===r}var tt=ps;function ys(e,t){return function(r){return e(t(r))}}var tr=ys,vs=tr,Cs=vs(Object.keys,Object),Bs=Cs,Es=tt,Qs=Bs,ms=Object.prototype,bs=ms.hasOwnProperty;function ws(e){if(!Es(e))return Qs(e);var t=[];for(var r in Object(e))bs.call(e,r)&&r!="constructor"&&t.push(r);return t}var ks=ws,Ss=Pt,xs=$e;function Ds(e){return e!=null&&xs(e.length)&&!Ss(e)}var rr=Ds,Fs=er,Rs=ks,Ns=rr;function Ls(e){return Ns(e)?Fs(e):Rs(e)}var Qe=Ls,Gs=se,Ms=Qe;function Us(e,t){return e&&Gs(t,Ms(t),e)}var Os=Us;function Ps(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ts=Ps,_s=_,Hs=tt,js=Ts,Js=Object.prototype,Ys=Js.hasOwnProperty;function qs(e){if(!_s(e))return js(e);var t=Hs(e),r=[];for(var n in e)n=="constructor"&&(t||!Ys.call(e,n))||r.push(n);return r}var Ks=qs,Ws=er,Zs=Ks,Xs=rr;function Vs(e){return Xs(e)?Ws(e,!0):Zs(e)}var rt=Vs,zs=se,$s=rt;function ec(e,t){return e&&zs(t,$s(t),e)}var tc=ec,me={exports:{}};me.exports,function(e,t){var r=N,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a?r.Buffer:void 0,A=o?o.allocUnsafe:void 0;function s(c,u){if(u)return c.slice();var l=c.length,g=A?A(l):new c.constructor(l);return c.copy(g),g}e.exports=s}(me,me.exports);var rc=me.exports;function nc(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++ri?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n0&&r(A)?t>1?Pr(A,t-1,r,n,i):Fh(i,A):n||(i[i.length]=A)}return i}var Tr=Pr,Nh=Tr;function Lh(e){var t=e==null?0:e.length;return t?Nh(e,1):[]}var Gh=Lh;function Mh(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var ue=Mh,Uh=ue,_r=Math.max;function Oh(e,t,r){return t=_r(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=_r(n.length-t,0),o=Array(a);++i0){if(++t>=qh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Jr=Zh,Xh=Yh,Vh=Jr,zh=Vh(Xh),dt=zh,$h=Gh,ef=Hr,tf=dt;function rf(e){return tf(ef(e,void 0,$h),e+"")}var Yr=rf,nf=Je,af=Ig,of=hh,Af=De,sf=se,cf=wh,uf=Yr,lf=sr,gf=1,hf=2,ff=4,df=uf(function(e,t){var r={};if(e==null)return r;var n=!1;t=nf(t,function(a){return a=Af(a,e),n||(n=a.length>1),a}),sf(e,lf(e),r),n&&(r=af(r,gf|hf|ff,cf));for(var i=t.length;i--;)of(r,t[i]);return r}),If=df;const pf=ri(If);var yf=/\s/;function vf(e){for(var t=e.length;t--&&yf.test(e.charAt(t)););return t}var Cf=vf,Bf=Cf,Ef=/^\s+/;function Qf(e){return e&&e.slice(0,Bf(e)+1).replace(Ef,"")}var mf=Qf,bf=mf,qr=_,wf=xe,Kr=0/0,kf=/^[-+]0x[0-9a-f]+$/i,Sf=/^0b[01]+$/i,xf=/^0o[0-7]+$/i,Df=parseInt;function Ff(e){if(typeof e=="number")return e;if(wf(e))return Kr;if(qr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=bf(e);var r=Sf.test(e);return r||xf.test(e)?Df(e.slice(2),r?2:8):kf.test(e)?Kr:+e}var It=Ff,Rf=It,Wr=1/0,Nf=17976931348623157e292;function Lf(e){if(!e)return e===0?e:0;if(e=Rf(e),e===Wr||e===-Wr){var t=e<0?-1:1;return t*Nf}return e===e?e:0}var Gf=Lf,Mf=Gf;function Uf(e){var t=Mf(e),r=t%1;return t===t?r?t-r:t:0}var ge=Uf,Of=ge,Pf="Expected a function";function Tf(e,t){if(typeof t!="function")throw new TypeError(Pf);return e=Of(e),function(){if(--e<1)return t.apply(this,arguments)}}var _f=Tf,Zr=cr,Hf=Zr&&new Zr,Xr=Hf,jf=le,Vr=Xr,Jf=Vr?function(e,t){return Vr.set(e,t),e}:jf,zr=Jf,Yf=ke,qf=_;function Kf(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Yf(e.prototype),n=e.apply(r,t);return qf(n)?n:r}}var Fe=Kf,Wf=Fe,Zf=N,Xf=1;function Vf(e,t,r){var n=t&Xf,i=Wf(e);function a(){var o=this&&this!==Zf&&this instanceof a?i:e;return o.apply(n?r:this,arguments)}return a}var zf=Vf,$f=Math.max;function e0(e,t,r,n){for(var i=-1,a=e.length,o=r.length,A=-1,s=t.length,c=$f(a-o,0),u=Array(s+c),l=!n;++A1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(K0,`{ +/* [wrapped with `+t+`] */ +`)}var Z0=W0;function X0(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a-1}var cd=sd,ud=Jt,ld=cd,gd=1,hd=2,fd=8,dd=16,Id=32,pd=64,yd=128,vd=256,Cd=512,Bd=[["ary",yd],["bind",gd],["bindKey",hd],["curry",fd],["curryRight",dd],["flip",Cd],["partial",Id],["partialRight",pd],["rearg",vd]];function Ed(e,t){return ud(Bd,function(r){var n="_."+r[0];t&r[1]&&!ld(e,n)&&e.push(n)}),e.sort()}var Qd=Ed,md=q0,bd=Z0,wd=dt,kd=Qd;function Sd(e,t,r){var n=t+"";return wd(e,bd(n,kd(md(n),r)))}var sn=Sd,xd=P0,Dd=An,Fd=sn,Rd=1,Nd=2,Ld=4,Gd=8,cn=32,un=64;function Md(e,t,r,n,i,a,o,A,s,c){var u=t&Gd,l=u?o:void 0,g=u?void 0:o,h=u?a:void 0,y=u?void 0:a;t|=u?cn:un,t&=~(u?un:cn),t&Ld||(t&=~(Rd|Nd));var C=[e,t,i,h,l,y,g,A,s,c],I=r.apply(void 0,C);return xd(e)&&Dd(I,C),I.placeholder=n,Fd(I,e,t)}var ln=Md;function Ud(e){var t=e;return t.placeholder}var ae=Ud,Od=nt,Pd=ze,Td=Math.min;function _d(e,t){for(var r=e.length,n=Td(t.length,r),i=Od(e);n--;){var a=t[n];e[n]=Pd(a,r)?i[a]:void 0}return e}var Hd=_d,gn="__lodash_placeholder__";function jd(e,t){for(var r=-1,n=e.length,i=0,a=[];++r1&&B.reverse(),u&&s0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var bn=jI,JI=le,YI=Hr,qI=dt;function KI(e,t){return qI(YI(e,t,JI),e+"")}var H=KI,WI=H,ZI=q,XI=ae,VI=X,zI=1,$I=32,Qt=WI(function(e,t,r){var n=zI;if(r.length){var i=VI(r,XI(Qt));n|=$I}return ZI(e,n,t,r,i)});Qt.placeholder={};var e1=Qt,t1=H,r1=q,n1=ae,i1=X,a1=1,o1=2,A1=32,mt=t1(function(e,t,r){var n=a1|o1;if(r.length){var i=i1(r,n1(mt));n|=A1}return r1(t,n,e,r,i)});mt.placeholder={};var s1=mt,c1=q,u1=8;function bt(e,t,r){t=r?void 0:t;var n=c1(e,u1,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=bt.placeholder,n}bt.placeholder={};var l1=bt,g1=q,h1=16;function wt(e,t,r){t=r?void 0:t;var n=g1(e,h1,void 0,void 0,void 0,void 0,void 0,t);return n.placeholder=wt.placeholder,n}wt.placeholder={};var f1=wt,d1=N,I1=function(){return d1.Date.now()},p1=I1,y1=_,kt=p1,wn=It,v1="Expected a function",C1=Math.max,B1=Math.min;function E1(e,t,r){var n,i,a,o,A,s,c=0,u=!1,l=!1,g=!0;if(typeof e!="function")throw new TypeError(v1);t=wn(t)||0,y1(r)&&(u=!!r.leading,l="maxWait"in r,a=l?C1(wn(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g);function h(w){var L=n,M=i;return n=i=void 0,c=w,o=e.apply(M,L),o}function y(w){return c=w,A=setTimeout(f,t),u?h(w):o}function C(w){var L=w-s,M=w-c,Oe=t-L;return l?B1(Oe,a-M):Oe}function I(w){var L=w-s,M=w-c;return s===void 0||L>=t||L<0||l&&M>=a}function f(){var w=kt();if(I(w))return B(w);A=setTimeout(f,C(w))}function B(w){return A=void 0,g&&n?h(w):(n=i=void 0,o)}function j(){A!==void 0&&clearTimeout(A),c=0,n=s=i=A=void 0}function T(){return A===void 0?o:B(kt())}function O(){var w=kt(),L=I(w);if(n=arguments,i=this,s=w,L){if(A===void 0)return y(s);if(l)return clearTimeout(A),A=setTimeout(f,t),h(s)}return A===void 0&&(A=setTimeout(f,t)),o}return O.cancel=j,O.flush=T,O}var kn=E1,Q1="Expected a function";function m1(e,t,r){if(typeof e!="function")throw new TypeError(Q1);return setTimeout(function(){e.apply(void 0,r)},t)}var Sn=m1,b1=Sn,w1=H,k1=w1(function(e,t){return b1(e,1,t)}),S1=k1,x1=Sn,D1=H,F1=It,R1=D1(function(e,t,r){return x1(e,F1(t)||0,r)}),N1=R1,L1=q,G1=512;function M1(e){return L1(e,G1)}var U1=M1,O1="Expected a function";function P1(e){if(typeof e!="function")throw new TypeError(O1);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var T1=P1,_1=bn;function H1(e){return _1(2,e)}var j1=H1,J1="__lodash_hash_undefined__";function Y1(e){return this.__data__.set(e,J1),this}var q1=Y1;function K1(e){return this.__data__.has(e)}var W1=K1,Z1=We,X1=q1,V1=W1;function Ge(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Z1;++tA))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var l=-1,g=!0,h=r&Ap?new np:void 0;for(a.set(e,t),a.set(t,e);++l=n?e:Lv(e,t,r)}var Mv=Gv,Uv=ue,Ov=be,Pv=H,Tv=Mv,_v=ge,Hv="Expected a function",jv=Math.max;function Jv(e,t){if(typeof e!="function")throw new TypeError(Hv);return t=t==null?0:jv(_v(t),0),Pv(function(r){var n=r[t],i=Tv(r,0,t);return n&&Ov(i,n),Uv(e,this,i)})}var Yv=Jv,qv=kn,Kv=_,Wv="Expected a function";function Zv(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Wv);return Kv(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),qv(e,t,{leading:n,maxWait:t,trailing:i})}var Xv=Zv,Vv=mn;function zv(e){return Vv(e,1)}var $v=zv,eC=le;function tC(e){return typeof e=="function"?e:eC}var rC=tC,nC=rC,iC=Wn;function aC(e,t){return iC(nC(t),e)}var oC=aC,AC={after:_f,ary:mn,before:bn,bind:e1,bindKey:s1,curry:l1,curryRight:f1,debounce:kn,defer:S1,delay:N1,flip:U1,memoize:Dr,negate:T1,once:j1,overArgs:gv,partial:Wn,partialRight:Qv,rearg:Sv,rest:Nv,spread:Yv,throttle:Xv,unary:$v,wrap:oC};const sC=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},cC=`data:text/javascript;base64,${Nt(_e)}`,uC=`data:text/javascript;base64,${Nt(R)}`;let Zn=!1,Xn=!1;const lC=Q.defineComponent({name:"VueOfficePdf",props:{src:[String,ArrayBuffer,Blob],requestOptions:{type:Object,default:()=>({})},staticFileUrl:{type:String,default:"https://unpkg.com/pdfjs-dist@3.1.81/"},options:{type:Object,default:()=>({})},defaultScale:{type:Number,default:1}},emits:["rendered","error"],setup(e,{emit:t}){let r=null,n=null;const i=Q.ref(null),a=Q.ref(null),o=Q.ref([]),A=Q.ref(0);let s=0,c=0,u=0,l=0,g=6,h=0,y=0,C=null,I=2,f=Q.ref(e.options.defaultScale||1);Q.onBeforeUnmount(()=>{r!==null&&(r.destroy(),r=null,n=null,C&&clearTimeout(C))});function B(){return f}function j(v){f.value=v,M()}function T(){return He(cC).then(()=>{if(window.pdfjsLib&&!Xn)Xn=!0,window.pdfjsLib.GlobalWorkerOptions.workerSrc=uC;else return Promise.reject("window.pdfjsLib未找到")})}function O(){return new Promise(v=>{const p=()=>{window.pdfjsLib?v():C=setTimeout(p,10)};p()})}function w(){return window.pdfjsLib?Promise.resolve():Zn?O():(Zn=!0,T())}function L(){a.value.innerHTML=""}function M(){if(!e.src){L(),t("error",new Error("src不能为空"));return}n=window.pdfjsLib.getDocument($n({url:fe(e.src,{type:"application/pdf"}),withCredentials:e.requestOptions&&e.requestOptions.withCredentials,cMapUrl:`${e.staticFileUrl.endsWith("/")?e.staticFileUrl:e.staticFileUrl+"/"}cmaps/`,cMapPacked:!0,enableXfa:!0},pf(e.options,["width"]))),n.promise.then(v=>{r&&r.destroy(),r=v,Oe(r).then(p=>{s=r.numPages,l=i.value.getBoundingClientRect().height,c=p.width,u=p.height,h=p.canvasWidth,y=p.canvasHeight;let S=e.options.gap||10;g=Math.ceil(l/(u+S))+4;let d=(u+S)*s-S;a.value.style.height=d+"px",L(),Rt(1,Math.min(s,g))})}).catch(v=>{t("error",v)})}function Oe(v){return v.getPage(1).then(p=>{let S=e.options.width||a.value.getBoundingClientRect().width-20,d=p.getViewport({scale:1});d.width>S*2?I=.5:d.width>S?I=1:I=2,d=p.getViewport({scale:I*(f.value<1?f.value:1)});const D=window.devicePixelRatio>2?1.5:2;let F=Math.floor(d.width*D),P=Math.floor(d.height*D),b=Math.floor(d.width),x=Math.floor(d.height);if(e.options.width){let V=e.options.width/b;b=Math.floor(e.options.width),x=Math.floor(x*V)}let K=a.value.getBoundingClientRect().width-20;if(b>K){let V=K/b;b=Math.floor(K),x=Math.floor(x*V)}return{width:b,height:x,canvasWidth:F,canvasHeight:P}}).catch(p=>{t("error",p)})}const hC=AC.debounce(function(v){const{scrollTop:p}=v.target;let S=parseInt(getComputedStyle(a.value).paddingTop)||0;const d=e.options.gap||10,D=Math.max(Math.floor(Math.max(p-S,0)/(u+d))-1,1),F=Math.min(D+g-1,s);Rt(D,F)},60);function Pe(v){let p=parseInt(getComputedStyle(a.value).paddingTop)||0,S=e.options.gap||10;const d=document.createElement("canvas");return d.style.position="absolute",d.style.top=(v-1)*(u+S)+p+"px",d.style.left="50%",d.style.transform="translate(-50%)",d.style.backgroundColor="#fff",d.setAttribute("data-id",v),d.width=h,d.height=y,d.style.width=`${c}px`,d.style.height=`${u}px`,d}function Rt(v,p){let S=a.value,d=[...S.childNodes],D=[];if(S.childNodes.length===0)for(let F=v;F<=p;F++){let P=Pe(F);S.appendChild(P),D.push(Te(F,P))}else{let F=+d[0].getAttribute("data-id"),P=+d[d.length-1].getAttribute("data-id");if(pP)for(let b=v;b<=p;b++){let x=Pe(b);S.appendChild(x),D.push(Te(b,x))}if(v=F){let b=d[0];for(let x=F-1;x>=v;x--){let K=Pe(x);S.insertBefore(K,b),b=K,D.push(Te(x,K))}}for(let b=0;b<=P-F;b++){let x=+d[b].getAttribute("data-id");(xp)&&S.removeChild(d[b])}if(p>P&&v<=P)for(let b=P+1;b<=p;b++){let x=Pe(b);S.appendChild(x),D.push(Te(b,x))}}Promise.all(D).then(F=>{t("rendered")}).catch(F=>{t("error",F)})}function Te(v,p){return r.getPage(v).then(S=>{const d=S.getViewport({scale:I*(f.value<1?f.value:1)});let D=window.devicePixelRatio>2?1.5:2;if(h*d.height!==y*d.width){let x=Math.floor(d.width*D),K=Math.floor(d.height*D),V=y/K;D=D*V,p.width=x*V,p.style.width=parseInt(p.style.width)*V+"px"}const F=p.getContext("2d"),P=D!==1?[D,0,0,D,0,0]:null;return S.render({canvasContext:F,transform:P,viewport:d}).promise})}function fC(){Rt(1,Math.min(s,g))}Q.onMounted(()=>{e.src&&w().then(M).catch(v=>{console.warn(v)})}),Q.watch(()=>e.src,()=>{w().then(M).catch(v=>{console.warn(v)})});function dC(v){r&&r._transport&&r._transport.getData().then(p=>{je(v||`vue-office-pdf-${new Date().getTime()}.pdf`,p.buffer)})}return{containerRef:i,wrapperRef:a,rootRef:o,numPages:A,save:dC,onScrollPdf:hC,rerender:fC,userScale:f,getScale:B,setScale:j}}});function gC(e,t,r,n,i,a){return k.openBlock(),k.createElementBlock("div",{class:"vue-office-pdf",ref:"containerRef",style:{"text-align":"center","overflow-y":"auto",position:"relative"},onScroll:t[0]||(t[0]=(...o)=>e.onScrollPdf&&e.onScrollPdf(...o))},[k.createElementVNode("div",{ref:"wrapperRef",class:"vue-office-pdf-wrapper",style:k.normalizeStyle([{background:"gray",padding:"30px 0",position:"relative","box-sizing":"content-box"},{width:`${100*(e.userScale<1?1:e.userScale)}%`}])},null,4),k.renderSlot(e.$slots,"default")],544)}const Ue=sC(lC,[["render",gC]]);return Ue.install=function(e){e.component(Ue.name,Ue)},Ue});