@elizaos/plugin-pdf 2.0.0-alpha.9 → 2.0.11-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -43
- package/dist/browser/index.browser.js +5 -63
- package/dist/browser/index.browser.js.map +6 -7
- package/dist/generated/specs/specs.d.ts +1 -18
- package/dist/generated/specs/specs.d.ts.map +1 -1
- package/dist/index.browser.d.ts +6 -2
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.node.d.ts +6 -2
- package/dist/index.node.d.ts.map +1 -1
- package/dist/node/index.node.js +88 -38374
- package/dist/node/index.node.js.map +6 -7
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/pdf.d.ts +4 -3
- package/dist/services/pdf.d.ts.map +1 -1
- package/package.json +20 -14
- package/dist/build.d.ts +0 -4
- package/dist/build.d.ts.map +0 -1
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.node.cjs +0 -38522
- package/dist/cjs/index.node.js.map +0 -13
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,64 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
`?"\\n":q==="\r"?"\\r":`\\${q}`)}function x3(Z,q,X,z){if(!Z)return;let R=null;if(Z instanceof P1){if(z.has(Z))return;R=Z,z.put(R),Z=q.fetch(Z)}if(Array.isArray(Z))for(let G of Z)x3(G,q,X,z);else if(Z instanceof S){if(Q8(Z.get("S"),"JavaScript")){let G=Z.get("JS"),P;G instanceof C1?P=G.getString():typeof G=="string"&&(P=G),P&&=E1(P,!0).replaceAll("\x00",""),P&&X.push(P.trim())}x3(Z.getRaw("Next"),q,X,z)}R&&z.remove(R)}function X9(Z,q,X){let z=Object.create(null),R=F0({dict:q,key:"AA",stopWhenFound:!1});if(R)for(let G=R.length-1;G>=0;G--){let P=R[G];if(P instanceof S)for(let Q of P.getKeys()){let Y=X[Q];if(!Y)continue;let W=[];x3(P.getRaw(Q),Z,W,new U8),W.length>0&&(z[Y]=W)}}if(q.has("A")){let G=[];x3(q.get("A"),Z,G,new U8),G.length>0&&(z.Action=G)}return qX(z)>0?z:null}function*ZI(Z){for(let q=0,X=Z.length;q<X;q++){let z=Z.codePointAt(q);z>55295&&(z<57344||z>65533)&&q++,yield z}}function $6(Z){let q=[],X=0;for(let z=0,R=Z.length;z<R;z++){let G=Z.codePointAt(z);if(32<=G&&G<=126){let P=eB[G];P&&(X<z&&q.push(Z.substring(X,z)),q.push(P),X=z+1)}else X<z&&q.push(Z.substring(X,z)),q.push(`&#x${G.toString(16).toUpperCase()};`),G>55295&&(G<57344||G>65533)&&z++,X=z+1}return q.length===0?Z:(X<Z.length&&q.push(Z.substring(X,Z.length)),q.join(""))}function hZ(Z,q=!1){let X=/^("|').*("|')$/.exec(Z);if(X&&X[1]===X[2]){if(new RegExp(`[^\\\\]${X[1]}`).test(Z.slice(1,-1)))return q&&v(`FontFamily contains unescaped ${X[1]}: ${Z}.`),!1}else for(let z of Z.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(z)||!/^[\w-\\]+$/.test(z))return q&&v(`FontFamily contains invalid <custom-ident>: ${Z}.`),!1;return!0}function qI(Z){let q=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:X,fontWeight:z,italicAngle:R}=Z;if(!hZ(X,!0))return!1;let G=z?z.toString():"";Z.fontWeight=q.has(G)?G:"400";let P=parseFloat(R);return Z.italicAngle=isNaN(P)||P<-90||P>90?"14":R.toString(),!0}function LP(Z){let q=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+`)\\((?:'|")([^'"]*)(?:'|")(?:,\\s*(\\w+)\\)|\\))`,"i").exec(Z);return q?.[2]?{url:q[2],newWindow:q[1]==="app.launchURL"&&q[3]==="true"}:null}function O1(Z){if(Number.isInteger(Z))return Z.toString();let q=Math.round(100*Z);return q%100==0?(q/100).toString():q%10==0?Z.toFixed(1):Z.toFixed(2)}function kP(Z){if(!Z)return null;let q=new Map;for(let[X,z]of Z){if(!X.startsWith(rG))continue;let R=q.get(z.pageIndex);R||(R=[],q.set(z.pageIndex,R)),R.push(z)}return q.size>0?q:null}function x0(Z){return Z==null||function(q){if(typeof q!="string")return!1;return!q||/^[\x00-\x7F]*$/.test(q)}(Z)?Z:TP(Z,!0)}function XI(Z){let q=[];for(let X=0,z=Z.length;X<z;X++){let R=Z.charCodeAt(X);q.push(W6[R>>8&255],W6[255&R])}return q.join("")}function TP(Z,q=!1){let X=[];q&&X.push("þÿ");for(let z=0,R=Z.length;z<R;z++){let G=Z.charCodeAt(z);X.push(String.fromCharCode(G>>8&255),String.fromCharCode(255&G))}return X.join("")}function M3(Z,q,X){switch(Z){case 90:return[0,1,-1,0,q,0];case 180:return[-1,0,0,-1,q,X];case 270:return[0,-1,1,0,0,X];default:throw Error("Invalid rotation")}}function qR(Z){return Math.ceil(Math.ceil(Math.log2(1+Z))/8)}class L8{static#Z=null;static _memory=null;static _mustAddAlpha=!1;static _destBuffer=null;static _destOffset=0;static _destLength=0;static _cssColor="";static _makeHexColor=null;static get _memoryArray(){let Z=this.#Z;return Z?.byteLength?Z:this.#Z=new Uint8Array(this._memory.buffer)}}function CP(){return q7!==null&&q7.byteLength!==0||(q7=new Uint8Array(i8.memory.buffer)),q7}function XR(Z,q){let X=q(1*Z.length,1)>>>0;return CP().set(Z,X/1),sZ=Z.length,X}function RI(){let Z={wbg:{}};return Z.wbg.__wbg_copyresult_b08ee7d273f295dd=function(q,X){(function(z,R){let{_mustAddAlpha:G,_destBuffer:P,_destOffset:Q,_destLength:Y,_memoryArray:W}=L8;if(R!==Y)if(G)for(let $=z,_=z+R,J=Q;$<_;$+=3,J+=4)P[J]=W[$],P[J+1]=W[$+1],P[J+2]=W[$+2],P[J+3]=255;else for(let $=z,_=z+R,J=Q;$<_;$+=3,J+=4)P[J]=W[$],P[J+1]=W[$+1],P[J+2]=W[$+2];else P.set(W.subarray(z,z+R),Q)})(q>>>0,X>>>0)},Z.wbg.__wbg_copyrgb_d60ce17bb05d9b67=function(q){(function(X){let{_destBuffer:z,_destOffset:R,_memoryArray:G}=L8;z[R]=G[X],z[R+1]=G[X+1],z[R+2]=G[X+2]})(q>>>0)},Z.wbg.__wbg_makecssRGB_893bf0cd9fdb302d=function(q){(function(X){let{_memoryArray:z}=L8;L8._cssColor=L8._makeHexColor(z[X],z[X+1],z[X+2])})(q>>>0)},Z.wbg.__wbindgen_init_externref_table=function(){let q=i8.__wbindgen_export_0,X=q.grow(4);q.set(0,void 0),q.set(X+0,void 0),q.set(X+1,null),q.set(X+2,!0),q.set(X+3,!1)},Z.wbg.__wbindgen_throw=function(q,X){throw Error((z=q,R=X,z>>>=0,NP.decode(CP().subarray(z,z+R))));var z,R},Z}function GI(Z){if(i8!==void 0)return i8;Z!==void 0&&(Object.getPrototypeOf(Z)===Object.prototype?{module:Z}=Z:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let q=RI();return Z instanceof WebAssembly.Module||(Z=new WebAssembly.Module(Z)),function(X){return i8=X.exports,q7=null,i8.__wbindgen_start(),i8}(new WebAssembly.Instance(Z,q))}function pP(Z){let q=new XMLHttpRequest;return q.open("GET",Z,!1),q.responseType="arraybuffer",q.send(null),q.response}class wP{constructor(Z,q){this.length=q.length,this.chunkSize=q.rangeChunkSize,this.stream=new DP(this.length,this.chunkSize,this),this.pdfNetworkStream=Z,this.disableAutoFetch=q.disableAutoFetch,this.msgHandler=q.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=Promise.withResolvers()}sendRequest(Z,q){let X=this.pdfNetworkStream.getRangeReader(Z,q);X.isStreamingSupported||(X.onProgress=this.onProgress.bind(this));let z=[],R=0;return new Promise((G,P)=>{let Q=({value:Y,done:W})=>{try{if(W){let $=MP(z);return z=null,void G($)}R+=Y.byteLength,X.isStreamingSupported&&this.onProgress({loaded:R}),z.push(Y),X.read().then(Q,P)}catch($){P($)}};X.read().then(Q,P)}).then((G)=>{this.aborted||this.onReceiveData({chunk:G,begin:Z})})}requestAllChunks(Z=!1){if(!Z){let q=this.stream.getMissingChunks();this._requestChunks(q)}return this._loadedStreamCapability.promise}_requestChunks(Z){let q=this.currRequestId++,X=new Set;this._chunksNeededByRequest.set(q,X);for(let G of Z)this.stream.hasChunk(G)||X.add(G);if(X.size===0)return Promise.resolve();let z=Promise.withResolvers();this._promisesByRequest.set(q,z);let R=[];for(let G of X){let P=this._requestsByChunk.get(G);P||(P=[],this._requestsByChunk.set(G,P),R.push(G)),P.push(q)}if(R.length>0){let G=this.groupChunks(R);for(let P of G){let Q=P.beginChunk*this.chunkSize,Y=Math.min(P.endChunk*this.chunkSize,this.length);this.sendRequest(Q,Y).catch(z.reject)}}return z.promise.catch((G)=>{if(!this.aborted)throw G})}getStream(){return this.stream}requestRange(Z,q){q=Math.min(q,this.length);let X=this.getBeginChunk(Z),z=this.getEndChunk(q),R=[];for(let G=X;G<z;++G)R.push(G);return this._requestChunks(R)}requestRanges(Z=[]){let q=[];for(let X of Z){let z=this.getBeginChunk(X.begin),R=this.getEndChunk(X.end);for(let G=z;G<R;++G)q.includes(G)||q.push(G)}return q.sort((X,z)=>X-z),this._requestChunks(q)}groupChunks(Z){let q=[],X=-1,z=-1;for(let R=0,G=Z.length;R<G;++R){let P=Z[R];X<0&&(X=P),z>=0&&z+1!==P&&(q.push({beginChunk:X,endChunk:z+1}),X=P),R+1===Z.length&&q.push({beginChunk:X,endChunk:P+1}),z=P}return q}onProgress(Z){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+Z.loaded,total:this.length})}onReceiveData(Z){let q=Z.chunk,X=Z.begin===void 0,z=X?this.progressiveDataLength:Z.begin,R=z+q.byteLength,G=Math.floor(z/this.chunkSize),P=R<this.length?Math.floor(R/this.chunkSize):Math.ceil(R/this.chunkSize);X?(this.stream.onReceiveProgressiveData(q),this.progressiveDataLength=R):this.stream.onReceiveData(z,q),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);let Q=[];for(let Y=G;Y<P;++Y){let W=this._requestsByChunk.get(Y);if(W){this._requestsByChunk.delete(Y);for(let $ of W){let _=this._chunksNeededByRequest.get($);_.has(Y)&&_.delete(Y),_.size>0||Q.push($)}}}if(!this.disableAutoFetch&&this._requestsByChunk.size===0){let Y;if(this.stream.numChunksLoaded===1){let W=this.stream.numChunks-1;this.stream.hasChunk(W)||(Y=W)}else Y=this.stream.nextEmptyChunk(P);Number.isInteger(Y)&&this._requestChunks([Y])}for(let Y of Q){let W=this._promisesByRequest.get(Y);this._promisesByRequest.delete(Y),W.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(Z){this._loadedStreamCapability.reject(Z)}getBeginChunk(Z){return Math.floor(Z/this.chunkSize)}getEndChunk(Z){return Math.floor((Z-1)/this.chunkSize)+1}abort(Z){this.aborted=!0,this.pdfNetworkStream?.cancelAllRequests(Z);for(let q of this._promisesByRequest.values())q.reject(Z)}}function EP(Z){switch(Z.kind){case X3:return lZ(Z);case W7:return function({src:q,srcPos:X=0,dest:z,destPos:R=0,width:G,height:P}){let Q=0,Y=G*P*3,W=Y>>2,$=new Uint32Array(q.buffer,X,W);if(Z0.isLittleEndian){for(;Q<W-2;Q+=3,R+=4){let _=$[Q],J=$[Q+1],U=$[Q+2];z[R]=4278190080|_,z[R+1]=_>>>24|J<<8|4278190080,z[R+2]=J>>>16|U<<16|4278190080,z[R+3]=U>>>8|4278190080}for(let _=4*Q,J=X+Y;_<J;_+=3)z[R++]=q[_]|q[_+1]<<8|q[_+2]<<16|4278190080}else{for(;Q<W-2;Q+=3,R+=4){let _=$[Q],J=$[Q+1],U=$[Q+2];z[R]=255|_,z[R+1]=_<<24|J>>>8|255,z[R+2]=J<<16|U>>>16|255,z[R+3]=U<<8|255}for(let _=4*Q,J=X+Y;_<J;_+=3)z[R++]=q[_]<<24|q[_+1]<<16|q[_+2]<<8|255}return{srcPos:X+Y,destPos:R}}(Z)}return null}function lZ({src:Z,srcPos:q=0,dest:X,width:z,height:R,nonBlackColor:G=4294967295,inverseDecode:P=!1}){let Q=Z0.isLittleEndian?4278190080:255,[Y,W]=P?[G,Q]:[Q,G],$=z>>3,_=7&z,J=Z.length;X=new Uint32Array(X.buffer);let U=0;for(let f=0;f<R;f++){for(let I=q+$;q<I;q++){let B=q<J?Z[q]:255;X[U++]=128&B?W:Y,X[U++]=64&B?W:Y,X[U++]=32&B?W:Y,X[U++]=16&B?W:Y,X[U++]=8&B?W:Y,X[U++]=4&B?W:Y,X[U++]=2&B?W:Y,X[U++]=1&B?W:Y}if(_===0)continue;let K=q<J?Z[q++]:255;for(let I=0;I<_;I++)X[U++]=K&1<<7-I?W:Y}return{srcPos:q,destPos:U}}class g1{static parse({cs:Z,xref:q,resources:X=null,pdfFunctionFactory:z,globalColorSpaceCache:R,localColorSpaceCache:G,asyncIfNotCached:P=!1}){let Q={xref:q,resources:X,pdfFunctionFactory:z,globalColorSpaceCache:R,localColorSpaceCache:G},Y,W,$;if(Z instanceof P1){W=Z;let _=R.getByRef(W)||G.getByRef(W);if(_)return _;Z=q.fetch(Z)}if(Z instanceof t){Y=Z.name;let _=G.getByName(Y);if(_)return _}try{$=this.#q(Z,Q)}catch(_){if(P&&!(_ instanceof X8))return Promise.reject(_);throw _}return(Y||W)&&(G.set(Y,W,$),W&&R.set(null,W,$)),P?Promise.resolve($):$}static#Z(Z,q){let{globalColorSpaceCache:X}=q,z;if(Z instanceof P1){z=Z;let G=X.getByRef(z);if(G)return G}let R=this.#q(Z,q);return z&&X.set(null,z,R),R}static#q(Z,q){let{xref:X,resources:z,pdfFunctionFactory:R,globalColorSpaceCache:G}=q;if((Z=X.fetchIfRef(Z))instanceof t)switch(Z.name){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"DeviceRGBA":return this.rgba;case"CMYK":case"DeviceCMYK":return this.cmyk;case"Pattern":return new rZ(null);default:if(z instanceof S){let P=z.get("ColorSpace");if(P instanceof S){let Q=P.get(Z.name);if(Q){if(Q instanceof t)return this.#q(Q,q);Z=Q;break}}}return v(`Unrecognized ColorSpace: ${Z.name}`),this.gray}if(Array.isArray(Z)){let P=X.fetchIfRef(Z[0]).name,Q,Y,W,$,_,J;switch(P){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"CMYK":case"DeviceCMYK":return this.cmyk;case"CalGray":return Q=X.fetchIfRef(Z[1]),$=Q.getArray("WhitePoint"),_=Q.getArray("BlackPoint"),J=Q.get("Gamma"),new OP($,_,J);case"CalRGB":Q=X.fetchIfRef(Z[1]),$=Q.getArray("WhitePoint"),_=Q.getArray("BlackPoint"),J=Q.getArray("Gamma");let U=Q.getArray("Matrix");return new c8($,_,J,U);case"ICCBased":let f=Z[1]instanceof P1;if(f){let A=G.getByRef(Z[1]);if(A)return A}let K=X.fetchIfRef(Z[1]),I=K.dict;if(Y=I.get("N"),M4.isUsable)try{let A=new M4(K.getBytes(),"ICCBased",Y);return f&&G.set(null,Z[1],A),A}catch(A){if(A instanceof X8)throw A;v(`ICCBased color space (${Z[1]}): "${A}".`)}let B=I.getRaw("Alternate");if(B){let A=this.#Z(B,q);if(A.numComps===Y)return A;v("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(Y===1)return this.gray;if(Y===3)return this.rgb;if(Y===4)return this.cmyk;break;case"Pattern":return W=Z[1]||null,W&&(W=this.#Z(W,q)),new rZ(W);case"I":case"Indexed":W=this.#Z(Z[1],q);let j=E8(X.fetchIfRef(Z[2]),0,255),V=X.fetchIfRef(Z[3]);return new vP(W,j,V);case"Separation":case"DeviceN":let x=X.fetchIfRef(Z[1]);Y=Array.isArray(x)?x.length:1,W=this.#Z(Z[2],q);let M=R.create(Z[3]);return new FP(Y,W,M);case"Lab":Q=X.fetchIfRef(Z[1]),$=Q.getArray("WhitePoint"),_=Q.getArray("BlackPoint");let H=Q.getArray("Range");return new yP($,_,H);default:return v(`Unimplemented ColorSpace object: ${P}`),this.gray}}return v(`Unrecognized ColorSpace object: ${Z}`),this.gray}static get gray(){return X1(this,"gray",new bP)}static get rgb(){return X1(this,"rgb",new SP)}static get rgba(){return X1(this,"rgba",new mP)}static get cmyk(){if(C7.isUsable)try{return X1(this,"cmyk",new C7)}catch{v("CMYK fallback: DeviceCMYK")}return X1(this,"cmyk",new zX)}}function QI(Z,q){let X,z,R=0,G=16;for(;G>0&&!Z[G-1];)G--;let P=[{children:[],index:0}],Q,Y=P[0];for(X=0;X<G;X++){for(z=0;z<Z[X];z++){for(Y=P.pop(),Y.children[Y.index]=q[R];Y.index>0;)Y=P.pop();for(Y.index++,P.push(Y);P.length<=X;)P.push(Q={children:[],index:0}),Y.children[Y.index]=Q.children,Y=Q;R++}X+1<G&&(P.push(Q={children:[],index:0}),Y.children[Y.index]=Q.children,Y=Q)}return P[0].children}function oZ(Z,q,X){return 64*((Z.blocksPerLine+1)*q+X)}function YI(Z,q,X,z,R,G,P,Q,Y,W=!1){let{mcusPerLine:$,progressive:_}=X,J=q,U=0,f=0;function K(){if(f>0)return f--,U>>f&1;if(U=Z[q++],U===255){let E=Z[q++];if(E){if(E===220&&W){let p=S1(Z,q+=2);if(q+=2,p>0&&p!==X.scanLines)throw new L3("Found DNL marker (0xFFDC) while parsing scan data",p)}else if(E===217){if(W){let p=H*(X.precision===8?8:0);if(p>0&&Math.round(X.scanLines/p)>=5)throw new L3("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",p)}throw new RX("Found EOI marker (0xFFD9) while parsing scan data")}throw new I0(`unexpected marker ${(U<<8|E).toString(16)}`)}}return f=7,U>>>7}function I(E){let p=E;for(;;){switch(p=p[K()],typeof p){case"number":return p;case"object":continue}throw new I0("invalid huffman sequence")}}function B(E){let p=0;for(;E>0;)p=p<<1|K(),E--;return p}function j(E){if(E===1)return K()===1?1:-1;let p=B(E);return p>=1<<E-1?p:p+(-1<<E)+1}let V=0,x,M=0,H=0;function A(E,p,F,s,w){let c=F%$;H=(F/$|0)*E.v+s;let o=c*E.h+w;p(E,oZ(E,H,o))}function T(E,p,F){H=F/E.blocksPerLine|0;let s=F%E.blocksPerLine;p(E,oZ(E,H,s))}let k=z.length,y,O,D,n,b,l;l=_?G===0?Q===0?function(E,p){let F=I(E.huffmanTableDC),s=F===0?0:j(F)<<Y;E.blockData[p]=E.pred+=s}:function(E,p){E.blockData[p]|=K()<<Y}:Q===0?function(E,p){if(V>0)return void V--;let F=G,s=P;for(;F<=s;){let w=I(E.huffmanTableAC),c=15&w,o=w>>4;if(c===0){if(o<15){V=B(o)+(1<<o)-1;break}F+=16;continue}F+=o;let Q1=_7[F];E.blockData[p+Q1]=j(c)*(1<<Y),F++}}:function(E,p){let F=G,s=P,w,c,o=0;for(;F<=s;){let Q1=p+_7[F],r=E.blockData[Q1]<0?-1:1;switch(M){case 0:if(c=I(E.huffmanTableAC),w=15&c,o=c>>4,w===0)o<15?(V=B(o)+(1<<o),M=4):(o=16,M=1);else{if(w!==1)throw new I0("invalid ACn encoding");x=j(w),M=o?2:3}continue;case 1:case 2:E.blockData[Q1]?E.blockData[Q1]+=r*(K()<<Y):(o--,o===0&&(M=M===2?3:0));break;case 3:E.blockData[Q1]?E.blockData[Q1]+=r*(K()<<Y):(E.blockData[Q1]=x<<Y,M=0);break;case 4:E.blockData[Q1]&&(E.blockData[Q1]+=r*(K()<<Y))}F++}M===4&&(V--,V===0&&(M=0))}:function(E,p){let F=I(E.huffmanTableDC),s=F===0?0:j(F);E.blockData[p]=E.pred+=s;let w=1;for(;w<64;){let c=I(E.huffmanTableAC),o=15&c,Q1=c>>4;if(o===0){if(Q1<15)break;w+=16;continue}w+=Q1;let r=_7[w];E.blockData[p+r]=j(o),w++}};let N,L=0,m=k===1?z[0].blocksPerLine*z[0].blocksPerColumn:$*X.mcusPerColumn,d,e;for(;L<=m;){let E=R?Math.min(m-L,R):m;if(E>0){for(O=0;O<k;O++)z[O].pred=0;if(V=0,k===1)for(y=z[0],b=0;b<E;b++)T(y,l,L),L++;else for(b=0;b<E;b++){for(O=0;O<k;O++)for(y=z[O],d=y.h,e=y.v,D=0;D<e;D++)for(n=0;n<d;n++)A(y,l,L,D,n);L++}}if(f=0,N=z9(Z,q),!N)break;if(N.invalid)v(`decodeScan - ${E>0?"unexpected":"excessive"} MCU data, current marker is: ${N.invalid}`),q=N.offset;if(!(N.marker>=65488&&N.marker<=65495))break;q+=2}return q-J}function WI(Z,q,X){let{quantizationTable:z,blockData:R}=Z,G,P,Q,Y,W,$,_,J,U,f,K,I,B,j,V,x,M;if(!z)throw new I0("missing required Quantization Table.");for(let H=0;H<64;H+=8)U=R[q+H],f=R[q+H+1],K=R[q+H+2],I=R[q+H+3],B=R[q+H+4],j=R[q+H+5],V=R[q+H+6],x=R[q+H+7],U*=z[H],(f|K|I|B|j|V|x)!==0?(f*=z[H+1],K*=z[H+2],I*=z[H+3],B*=z[H+4],j*=z[H+5],V*=z[H+6],x*=z[H+7],G=d5*U+128>>8,P=d5*B+128>>8,Q=K,Y=V,W=A2*(f-x)+128>>8,J=A2*(f+x)+128>>8,$=I<<4,_=j<<4,G=G+P+1>>1,P=G-P,M=Q*M2+Y*x2+128>>8,Q=Q*x2-Y*M2+128>>8,Y=M,W=W+_+1>>1,_=W-_,J=J+$+1>>1,$=J-$,G=G+Y+1>>1,Y=G-Y,P=P+Q+1>>1,Q=P-Q,M=W*H2+J*V2+2048>>12,W=W*V2-J*H2+2048>>12,J=M,M=$*j2+_*I2+2048>>12,$=$*I2-_*j2+2048>>12,_=M,X[H]=G+J,X[H+7]=G-J,X[H+1]=P+_,X[H+6]=P-_,X[H+2]=Q+$,X[H+5]=Q-$,X[H+3]=Y+W,X[H+4]=Y-W):(M=d5*U+512>>10,X[H]=M,X[H+1]=M,X[H+2]=M,X[H+3]=M,X[H+4]=M,X[H+5]=M,X[H+6]=M,X[H+7]=M);for(let H=0;H<8;++H)U=X[H],f=X[H+8],K=X[H+16],I=X[H+24],B=X[H+32],j=X[H+40],V=X[H+48],x=X[H+56],(f|K|I|B|j|V|x)!==0?(G=d5*U+2048>>12,P=d5*B+2048>>12,Q=K,Y=V,W=A2*(f-x)+2048>>12,J=A2*(f+x)+2048>>12,$=I,_=j,G=4112+(G+P+1>>1),P=G-P,M=Q*M2+Y*x2+2048>>12,Q=Q*x2-Y*M2+2048>>12,Y=M,W=W+_+1>>1,_=W-_,J=J+$+1>>1,$=J-$,G=G+Y+1>>1,Y=G-Y,P=P+Q+1>>1,Q=P-Q,M=W*H2+J*V2+2048>>12,W=W*V2-J*H2+2048>>12,J=M,M=$*j2+_*I2+2048>>12,$=$*I2-_*j2+2048>>12,_=M,U=G+J,x=G-J,f=P+_,V=P-_,K=Q+$,j=Q-$,I=Y+W,B=Y-W,U<16?U=0:U>=4080?U=255:U>>=4,f<16?f=0:f>=4080?f=255:f>>=4,K<16?K=0:K>=4080?K=255:K>>=4,I<16?I=0:I>=4080?I=255:I>>=4,B<16?B=0:B>=4080?B=255:B>>=4,j<16?j=0:j>=4080?j=255:j>>=4,V<16?V=0:V>=4080?V=255:V>>=4,x<16?x=0:x>=4080?x=255:x>>=4,R[q+H]=U,R[q+H+8]=f,R[q+H+16]=K,R[q+H+24]=I,R[q+H+32]=B,R[q+H+40]=j,R[q+H+48]=V,R[q+H+56]=x):(M=d5*U+8192>>14,M=M<-2040?0:M>=2024?255:M+2056>>4,R[q+H]=M,R[q+H+8]=M,R[q+H+16]=M,R[q+H+24]=M,R[q+H+32]=M,R[q+H+40]=M,R[q+H+48]=M,R[q+H+56]=M)}function $I(Z,q){let{blocksPerLine:X,blocksPerColumn:z}=q,R=new Int16Array(64);for(let G=0;G<z;G++)for(let P=0;P<X;P++)WI(q,oZ(q,G,P),R);return q.blockData}function z9(Z,q,X=q){let z=Z.length-1,R=X<q?X:q;if(q>=z)return null;let G=S1(Z,q);if(G>=65472&&G<=65534)return{invalid:null,marker:G,offset:q};let P=S1(Z,R);for(;!(P>=65472&&P<=65534);){if(++R>=z)return null;P=S1(Z,R)}return{invalid:G.toString(16),marker:P,offset:R}}function _I(Z){let q=Math.ceil(Z.samplesPerLine/8/Z.maxH),X=Math.ceil(Z.scanLines/8/Z.maxV);for(let z of Z.components){let R=Math.ceil(Math.ceil(Z.samplesPerLine/8)*z.h/Z.maxH),G=Math.ceil(Math.ceil(Z.scanLines/8)*z.v/Z.maxV),P=q*z.h,Q=64*(X*z.v)*(P+1);z.blockData=new Int16Array(Q),z.blocksPerLine=R,z.blocksPerColumn=G}Z.mcusPerLine=q,Z.mcusPerColumn=X}function zR(Z,q){let X=S1(Z,q),z=(q+=2)+X-2,R=z9(Z,z,q);R?.invalid&&(v("readDataBlock - incorrect length, current marker is: "+R.invalid),z=R.offset);let G=Z.subarray(q,z);return{appData:G,oldOffset:q,newOffset:q+G.length}}function JI(Z,q){let X=S1(Z,q),z=(q+=2)+X-2,R=z9(Z,z,q);return R?.invalid?R.offset:z}class aZ{constructor({decodeTransform:Z=null,colorTransform:q=-1}={}){this._decodeTransform=Z,this._colorTransform=q}static canUseImageDecoder(Z,q=-1){let X=null,z=0,R=null,G=S1(Z,z);if(z+=2,G!==65496)throw new I0("SOI not found");G=S1(Z,z),z+=2;Z:for(;G!==65497;){switch(G){case 65505:let{appData:P,oldOffset:Q,newOffset:Y}=zR(Z,z);if(z=Y,P[0]===69&&P[1]===120&&P[2]===105&&P[3]===102&&P[4]===0&&P[5]===0){if(X)throw new I0("Duplicate EXIF-blocks found.");X={exifStart:Q+6,exifEnd:Y}}G=S1(Z,z),z+=2;continue;case 65472:case 65473:case 65474:R=Z[z+7];break Z;case 65535:Z[z]!==255&&z--}z=JI(Z,z),G=S1(Z,z),z+=2}return R===4||R===3&&q===0?null:X||{}}parse(Z,{dnlScanLines:q=null}={}){let X,z,R=0,G=null,P=null,Q=0,Y=[],W=[],$=[],_=S1(Z,R);if(R+=2,_!==65496)throw new I0("SOI not found");_=S1(Z,R),R+=2;Z:for(;_!==65497;){let J,U,f;switch(_){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:let{appData:K,newOffset:I}=zR(Z,R);R=I,_===65504&&K[0]===74&&K[1]===70&&K[2]===73&&K[3]===70&&K[4]===0&&(G={version:{major:K[5],minor:K[6]},densityUnits:K[7],xDensity:K[8]<<8|K[9],yDensity:K[10]<<8|K[11],thumbWidth:K[12],thumbHeight:K[13],thumbData:K.subarray(14,14+3*K[12]*K[13])}),_===65518&&K[0]===65&&K[1]===100&&K[2]===111&&K[3]===98&&K[4]===101&&(P={version:K[5]<<8|K[6],flags0:K[7]<<8|K[8],flags1:K[9]<<8|K[10],transformCode:K[11]});break;case 65499:let B=S1(Z,R);R+=2;let j=B+R-2,V;for(;R<j;){let N=Z[R++],L=new Uint16Array(64);if(N>>4){if(N>>4!=1)throw new I0("DQT - invalid table spec");for(U=0;U<64;U++)V=_7[U],L[V]=S1(Z,R),R+=2}else for(U=0;U<64;U++)V=_7[U],L[V]=Z[R++];Y[15&N]=L}break;case 65472:case 65473:case 65474:if(X)throw new I0("Only single frame JPEGs supported");R+=2,X={},X.extended=_===65473,X.progressive=_===65474,X.precision=Z[R++];let x=S1(Z,R);R+=2,X.scanLines=q||x,X.samplesPerLine=S1(Z,R),R+=2,X.components=[],X.componentIds={};let M=Z[R++],H=0,A=0;for(J=0;J<M;J++){let N=Z[R],L=Z[R+1]>>4,m=15&Z[R+1];H<L&&(H=L),A<m&&(A=m);let d=Z[R+2];f=X.components.push({h:L,v:m,quantizationId:d,quantizationTable:null}),X.componentIds[N]=f-1,R+=3}X.maxH=H,X.maxV=A,_I(X);break;case 65476:let T=S1(Z,R);for(R+=2,J=2;J<T;){let N=Z[R++],L=new Uint8Array(16),m=0;for(U=0;U<16;U++,R++)m+=L[U]=Z[R];let d=new Uint8Array(m);for(U=0;U<m;U++,R++)d[U]=Z[R];J+=17+m,(N>>4?W:$)[15&N]=QI(L,d)}break;case 65501:R+=2,z=S1(Z,R),R+=2;break;case 65498:let k=++Q===1&&!q;R+=2;let y=Z[R++],O=[];for(J=0;J<y;J++){let N=Z[R++],L=X.componentIds[N],m=X.components[L];m.index=N;let d=Z[R++];m.huffmanTableDC=$[d>>4],m.huffmanTableAC=W[15&d],O.push(m)}let D=Z[R++],n=Z[R++],b=Z[R++];try{R+=YI(Z,R,X,O,z,D,n,b>>4,15&b,k)}catch(N){if(N instanceof L3)return v(`${N.message} -- attempting to re-parse the JPEG image.`),this.parse(Z,{dnlScanLines:N.scanLines});if(N instanceof RX){v(`${N.message} -- ignoring the rest of the image data.`);break Z}throw N}break;case 65500:R+=4;break;case 65535:Z[R]!==255&&R--;break;default:let l=z9(Z,R-2,R-3);if(l?.invalid){v("JpegImage.parse - unexpected data, current marker is: "+l.invalid),R=l.offset;break}if(!l||R>=Z.length-1){v("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break Z}throw new I0("JpegImage.parse - unknown marker: "+_.toString(16))}_=S1(Z,R),R+=2}if(!X)throw new I0("JpegImage.parse - no frame data found.");this.width=X.samplesPerLine,this.height=X.scanLines,this.jfif=G,this.adobe=P,this.components=[];for(let J of X.components){let U=Y[J.quantizationId];U&&(J.quantizationTable=U),this.components.push({index:J.index,output:$I(0,J),scaleX:J.h/X.maxH,scaleY:J.v/X.maxV,blocksPerLine:J.blocksPerLine,blocksPerColumn:J.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(Z,q,X=!1){let z=this.width/Z,R=this.height/q,G,P,Q,Y,W,$,_,J,U,f,K,I=0,B=this.components.length,j=Z*q*B,V=new Uint8ClampedArray(j),x=new Uint32Array(Z),M=4294967288,H;for(_=0;_<B;_++){if(G=this.components[_],P=G.scaleX*z,Q=G.scaleY*R,I=_,K=G.output,Y=G.blocksPerLine+1<<3,P!==H){for(W=0;W<Z;W++)J=0|W*P,x[W]=(J&M)<<3|7&J;H=P}for($=0;$<q;$++)for(J=0|$*Q,f=Y*(J&M)|(7&J)<<3,W=0;W<Z;W++)V[I]=K[f+x[W]],I+=B}let A=this._decodeTransform;if(X||B!==4||A||(A=new Int32Array([-256,255,-256,255,-256,255,-256,255])),A)for(_=0;_<j;)for(J=0,U=0;J<B;J++,_++,U+=2)V[_]=(V[_]*A[U]>>8)+A[U+1];return V}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:this.numComponents===3?this._colorTransform!==0&&(this.components[0].index!==82||this.components[1].index!==71||this.components[2].index!==66):this._colorTransform===1}_convertYccToRgb(Z){let q,X,z;for(let R=0,G=Z.length;R<G;R+=3)q=Z[R],X=Z[R+1],z=Z[R+2],Z[R]=q-179.456+1.402*z,Z[R+1]=q+135.459-0.344*X-0.714*z,Z[R+2]=q-226.816+1.772*X;return Z}_convertYccToRgba(Z,q){for(let X=0,z=0,R=Z.length;X<R;X+=3,z+=4){let G=Z[X],P=Z[X+1],Q=Z[X+2];q[z]=G-179.456+1.402*Q,q[z+1]=G+135.459-0.344*P-0.714*Q,q[z+2]=G-226.816+1.772*P,q[z+3]=255}return q}_convertYcckToRgb(Z){return this._convertYcckToCmyk(Z),this._convertCmykToRgb(Z)}_convertYcckToRgba(Z){return this._convertYcckToCmyk(Z),this._convertCmykToRgba(Z)}_convertYcckToCmyk(Z){let q,X,z;for(let R=0,G=Z.length;R<G;R+=4)q=Z[R],X=Z[R+1],z=Z[R+2],Z[R]=434.456-q-1.402*z,Z[R+1]=119.541-q+0.344*X+0.714*z,Z[R+2]=481.816-q-1.772*X;return Z}_convertCmykToRgb(Z){let q=Z.length/4;return g1.cmyk.getRgbBuffer(Z,0,q,Z,0,8,0),Z.subarray(0,3*q)}_convertCmykToRgba(Z){if(g1.cmyk.getRgbBuffer(Z,0,Z.length/4,Z,0,8,1),g1.cmyk instanceof zX)for(let q=3,X=Z.length;q<X;q+=4)Z[q]=255;return Z}getData({width:Z,height:q,forceRGBA:X=!1,forceRGB:z=!1,isSourcePDF:R=!1}){if(this.numComponents>4)throw new I0("Unsupported color mode");let G=this._getLinearizedBlockData(Z,q,R);if(this.numComponents===1&&(X||z)){let P=G.length*(X?4:3),Q=new Uint8ClampedArray(P),Y=0;if(X)(function(W,$){if(Z0.isLittleEndian)for(let _=0,J=W.length;_<J;_++)$[_]=65793*W[_]|4278190080;else for(let _=0,J=W.length;_<J;_++)$[_]=16843008*W[_]|255})(G,new Uint32Array(Q.buffer));else for(let W of G)Q[Y++]=W,Q[Y++]=W,Q[Y++]=W;return Q}if(this.numComponents===3&&this._isColorConversionNeeded){if(X){let P=new Uint8ClampedArray(G.length/3*4);return this._convertYccToRgba(G,P)}return this._convertYccToRgb(G)}if(this.numComponents===4){if(this._isColorConversionNeeded)return X?this._convertYcckToRgba(G):z?this._convertYcckToRgb(G):this._convertYcckToCmyk(G);if(X)return this._convertCmykToRgba(G);if(z)return this._convertCmykToRgb(G)}return G}}class i7{static#Z=null;static#q=null;static#z=null;static#X=!0;static#R=!0;static#G=null;static setOptions({handler:Z,useWasm:q,useWorkerFetch:X,wasmUrl:z}){this.#X=q,this.#R=X,this.#G=z,X||(this.#q=Z)}static async#Q(Z){}static async#P(Z,q,X){}static async decode(Z,{numComponents:q=4,isIndexedColormap:X=!1,smaskInData:z=!1,reducePower:R=0}={}){let G=await this.#z;if(!G)throw new X7("OpenJPEG failed to initialize");let P;try{let Q=Z.length;if(P=G._malloc(Q),G.writeArrayToMemory(Z,P),G._jp2_decode(P,Q,q>0?q:0,!!X,!!z,R)){let{errorMessages:W}=G;if(W)throw delete G.errorMessages,new X7(W);throw new X7("Unknown error")}let{imageData:Y}=G;return G.imageData=null,Y}finally{P&&G._free(P)}}static cleanup(){this.#z=null}static parseImageProperties(Z){let q=Z.getByte();for(;q>=0;){let X=q;if(q=Z.getByte(),(X<<8|q)===65361){Z.skip(4);let z=Z.getInt32()>>>0,R=Z.getInt32()>>>0,G=Z.getInt32()>>>0,P=Z.getInt32()>>>0;return Z.skip(16),{width:z-G,height:R-P,bitsPerComponent:8,componentsCount:Z.getUint16()}}}throw new X7("No size marker found in JPX stream")}}function w6(Z,q,X,z,R){let G=Z;for(let P=0,Q=q.length-1;P<Q;P++){let Y=q[P];G=G[Y]||=[]}G[q.at(-1)]={checkFn:X,iterateFn:z,processFn:R}}class GX{constructor(Z){this.queue=Z}_optimize(){}push(Z,q){this.queue.fnArray.push(Z),this.queue.argsArray.push(q),this._optimize()}flush(){}reset(){}}function d8(Z,q){let X=0;for(let z=0;z<=q;z++)X=X<<8|Z[z];return X>>>0}function L2(Z,q){return q===1?String.fromCharCode(Z[0],Z[1]):q===3?String.fromCharCode(Z[0],Z[1],Z[2],Z[3]):String.fromCharCode(...Z.subarray(0,q+1))}function n8(Z,q,X){let z=0;for(let R=X;R>=0;R--)z+=Z[R]+q[R],Z[R]=255&z,z>>=8}function X5(Z,q){let X=1;for(let z=q;z>=0&&X>0;z--)X+=Z[z],Z[z]=255&X,X>>=8}class dP{constructor(Z){this.buffer=Z,this.pos=0,this.end=Z.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let Z,q=0;do{let X=this.readByte();if(X<0)throw new h("unexpected EOF in bcmap");Z=!(128&X),q=q<<7|127&X}while(!Z);return q}readSigned(){let Z=this.readNumber();return 1&Z?~(Z>>>1):Z>>>1}readHex(Z,q){Z.set(this.buffer.subarray(this.pos,this.pos+q+1)),this.pos+=q+1}readHexNumber(Z,q){let X,z=this.tmpBuf,R=0;do{let Y=this.readByte();if(Y<0)throw new h("unexpected EOF in bcmap");X=!(128&Y),z[R++]=127&Y}while(!X);let G=q,P=0,Q=0;for(;G>=0;){for(;Q<8&&z.length>0;)P|=z[--R]<<Q,Q+=7;Z[G]=255&P,G--,P>>=8,Q-=8}}readHexSigned(Z,q){this.readHexNumber(Z,q);let X=1&Z[q]?255:0,z=0;for(let R=0;R<=q;R++)z=(1&z)<<8|Z[R],Z[R]=z>>1^X}readString(){let Z=this.readNumber(),q=Array(Z);for(let X=0;X<Z;X++)q[X]=this.readNumber();return String.fromCharCode(...q)}}class cP{async process(Z,q,X){let z=new dP(Z),R=z.readByte();q.vertical=!!(1&R);let G=null,P=new Uint8Array(c5),Q=new Uint8Array(c5),Y=new Uint8Array(c5),W=new Uint8Array(c5),$=new Uint8Array(c5),_,J;for(;(J=z.readByte())>=0;){let U=J>>5;if(U===7){switch(31&J){case 0:z.readString();break;case 1:G=z.readString()}continue}let f=!!(16&J),K=15&J;if(K+1>c5)throw Error("BinaryCMapReader.process: Invalid dataSize.");let I=1,B=z.readNumber();switch(U){case 0:z.readHex(P,K),z.readHexNumber(Q,K),n8(Q,P,K),q.addCodespaceRange(K+1,d8(P,K),d8(Q,K));for(let j=1;j<B;j++)X5(Q,K),z.readHexNumber(P,K),n8(P,Q,K),z.readHexNumber(Q,K),n8(Q,P,K),q.addCodespaceRange(K+1,d8(P,K),d8(Q,K));break;case 1:z.readHex(P,K),z.readHexNumber(Q,K),n8(Q,P,K),z.readNumber();for(let j=1;j<B;j++)X5(Q,K),z.readHexNumber(P,K),n8(P,Q,K),z.readHexNumber(Q,K),n8(Q,P,K),z.readNumber();break;case 2:z.readHex(Y,K),_=z.readNumber(),q.mapOne(d8(Y,K),_);for(let j=1;j<B;j++)X5(Y,K),f||(z.readHexNumber($,K),n8(Y,$,K)),_=z.readSigned()+(_+1),q.mapOne(d8(Y,K),_);break;case 3:z.readHex(P,K),z.readHexNumber(Q,K),n8(Q,P,K),_=z.readNumber(),q.mapCidRange(d8(P,K),d8(Q,K),_);for(let j=1;j<B;j++)X5(Q,K),f?P.set(Q):(z.readHexNumber(P,K),n8(P,Q,K)),z.readHexNumber(Q,K),n8(Q,P,K),_=z.readNumber(),q.mapCidRange(d8(P,K),d8(Q,K),_);break;case 4:z.readHex(Y,I),z.readHex(W,K),q.mapOne(d8(Y,I),L2(W,K));for(let j=1;j<B;j++)X5(Y,I),f||(z.readHexNumber($,I),n8(Y,$,I)),X5(W,K),z.readHexSigned($,K),n8(W,$,K),q.mapOne(d8(Y,I),L2(W,K));break;case 5:z.readHex(P,I),z.readHexNumber(Q,I),n8(Q,P,I),z.readHex(W,K),q.mapBfRange(d8(P,I),d8(Q,I),L2(W,K));for(let j=1;j<B;j++)X5(Q,I),f?P.set(Q):(z.readHexNumber(P,I),n8(P,Q,I)),z.readHexNumber(Q,I),n8(Q,P,I),z.readHex(W,K),q.mapBfRange(d8(P,I),d8(Q,I),L2(W,K));break;default:throw Error(`BinaryCMapReader.process - unknown type: ${U}`)}}return G?X(G):q}}class PX{constructor(Z,q={}){if(typeof Z?.next!="function")throw Error('CCITTFaxDecoder - invalid "source" parameter.');let X;for(this.source=Z,this.eof=!1,this.encoding=q.K||0,this.eoline=q.EndOfLine||!1,this.byteAlign=q.EncodedByteAlign||!1,this.columns=q.Columns||1728,this.rows=q.Rows||0,this.eoblock=q.EndOfBlock??!0,this.black=q.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;(X=this._lookBits(12))===0;)this._eatBits(1);X===1&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;let Z=this.refLine,q=this.codingLine,X=this.columns,z,R,G,P,Q;if(this.outputBits===0){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let Y,W,$;if(this.err=!1,this.nextLine2D){for(P=0;q[P]<X;++P)Z[P]=q[P];for(Z[P++]=X,Z[P]=X,q[0]=0,this.codingPos=0,z=0,R=0;q[this.codingPos]<X;)switch(Y=this._getTwoDimCode(),Y){case 0:this._addPixels(Z[z+1],R),Z[z+1]<X&&(z+=2);break;case 1:if(Y=W=0,R){do Y+=$=this._getBlackCode();while($>=64);do W+=$=this._getWhiteCode();while($>=64)}else{do Y+=$=this._getWhiteCode();while($>=64);do W+=$=this._getBlackCode();while($>=64)}for(this._addPixels(q[this.codingPos]+Y,R),q[this.codingPos]<X&&this._addPixels(q[this.codingPos]+W,1^R);Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 7:if(this._addPixels(Z[z]+3,R),R^=1,q[this.codingPos]<X)for(++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 5:if(this._addPixels(Z[z]+2,R),R^=1,q[this.codingPos]<X)for(++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 3:if(this._addPixels(Z[z]+1,R),R^=1,q[this.codingPos]<X)for(++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 2:if(this._addPixels(Z[z],R),R^=1,q[this.codingPos]<X)for(++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 8:if(this._addPixelsNeg(Z[z]-3,R),R^=1,q[this.codingPos]<X)for(z>0?--z:++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 6:if(this._addPixelsNeg(Z[z]-2,R),R^=1,q[this.codingPos]<X)for(z>0?--z:++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case 4:if(this._addPixelsNeg(Z[z]-1,R),R^=1,q[this.codingPos]<X)for(z>0?--z:++z;Z[z]<=q[this.codingPos]&&Z[z]<X;)z+=2;break;case Q4:this._addPixels(X,0),this.eof=!0;break;default:v1("bad 2d code"),this._addPixels(X,0),this.err=!0}}else for(q[0]=0,this.codingPos=0,R=0;q[this.codingPos]<X;){if(Y=0,R)do Y+=$=this._getBlackCode();while($>=64);else do Y+=$=this._getWhiteCode();while($>=64);this._addPixels(q[this.codingPos]+Y,R),R^=1}let _=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(Y=this._lookBits(12),this.eoline)for(;Y!==Q4&&Y!==1;)this._eatBits(1),Y=this._lookBits(12);else for(;Y===0;)this._eatBits(1),Y=this._lookBits(12);Y===1?(this._eatBits(12),_=!0):Y===Q4&&(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&&_&&this.byteAlign){if(Y=this._lookBits(12),Y===1){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(P=0;P<4;++P)Y=this._lookBits(12),Y!==1&&v1("bad rtc code: "+Y),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(Y=this._lookBits(13),Y===Q4)return this.eof=!0,-1;if(Y>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&Y))}this.outputBits=q[0]>0?q[this.codingPos=0]:q[this.codingPos=1],this.row++}if(this.outputBits>=8)Q=1&this.codingPos?0:255,this.outputBits-=8,this.outputBits===0&&q[this.codingPos]<X&&(this.codingPos++,this.outputBits=q[this.codingPos]-q[this.codingPos-1]);else{G=8,Q=0;do{if(typeof this.outputBits!="number")throw new h('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>G?(Q<<=G,1&this.codingPos||(Q|=255>>8-G),this.outputBits-=G,G=0):(Q<<=this.outputBits,1&this.codingPos||(Q|=255>>8-this.outputBits),G-=this.outputBits,this.outputBits=0,q[this.codingPos]<X?(this.codingPos++,this.outputBits=q[this.codingPos]-q[this.codingPos-1]):G>0&&(Q<<=G,G=0))}while(G)}return this.black&&(Q^=255),Q}_addPixels(Z,q){let X=this.codingLine,z=this.codingPos;Z>X[z]&&(Z>this.columns&&(v1("row is wrong length"),this.err=!0,Z=this.columns),1&z^q&&++z,X[z]=Z),this.codingPos=z}_addPixelsNeg(Z,q){let X=this.codingLine,z=this.codingPos;if(Z>X[z])Z>this.columns&&(v1("row is wrong length"),this.err=!0,Z=this.columns),1&z^q&&++z,X[z]=Z;else if(Z<X[z]){for(Z<0&&(v1("invalid code"),this.err=!0,Z=0);z>0&&Z<X[z-1];)--z;X[z]=Z}this.codingPos=z}_findTableCode(Z,q,X,z){let R=z||0;for(let G=Z;G<=q;++G){let P=this._lookBits(G);if(P===Q4)return[!0,1,!1];if(G<q&&(P<<=q-G),!R||P>=R){let Q=X[P-R];if(Q[0]===G)return this._eatBits(G),[!0,Q[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let Z,q=0;if(this.eoblock){if(q=this._lookBits(7),Z=RR[q],Z?.[0]>0)return this._eatBits(Z[0]),Z[1]}else{let X=this._findTableCode(1,7,RR);if(X[0]&&X[2])return X[1]}return v1("Bad two dim code"),Q4}_getWhiteCode(){let Z,q=0;if(this.eoblock){if(q=this._lookBits(12),q===Q4)return 1;if(Z=q>>5?PR[q>>3]:GR[q],Z[0]>0)return this._eatBits(Z[0]),Z[1]}else{let X=this._findTableCode(1,9,PR);if(X[0])return X[1];if(X=this._findTableCode(11,12,GR),X[0])return X[1]}return v1("bad white code"),this._eatBits(1),1}_getBlackCode(){let Z,q;if(this.eoblock){if(Z=this._lookBits(13),Z===Q4)return 1;if(q=Z>>7?!(Z>>9)&&Z>>7?YR[(Z>>1)-64]:WR[Z>>7]:QR[Z],q[0]>0)return this._eatBits(q[0]),q[1]}else{let X=this._findTableCode(2,6,WR);if(X[0])return X[1];if(X=this._findTableCode(7,12,YR,64),X[0])return X[1];if(X=this._findTableCode(10,13,QR),X[0])return X[1]}return v1("bad black code"),this._eatBits(1),1}_lookBits(Z){let q;for(;this.inputBits<Z;){if((q=this.source.next())===-1)return this.inputBits===0?Q4:this.inputBuf<<Z-this.inputBits&65535>>16-Z;this.inputBuf=this.inputBuf<<8|q,this.inputBits+=8}return this.inputBuf>>this.inputBits-Z&65535>>16-Z}_eatBits(Z){(this.inputBits-=Z)<0&&(this.inputBits=0)}}class lP{constructor(Z,q,X){this.data=Z,this.bp=q,this.dataEnd=X,this.chigh=Z[q],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){let Z=this.data,q=this.bp;Z[q]===255?Z[q+1]>143?(this.clow+=65280,this.ct=8):(q++,this.clow+=Z[q]<<9,this.ct=7,this.bp=q):(q++,this.clow+=q<this.dataEnd?Z[q]<<8:65280,this.ct=8,this.bp=q),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(Z,q){let X=Z[q]>>1,z=1&Z[q],R=II[X],G=R.qe,P,Q=this.a-G;if(this.chigh<G)Q<G?(Q=G,P=z,X=R.nmps):(Q=G,P=1^z,R.switchFlag===1&&(z=P),X=R.nlps);else{if(this.chigh-=G,32768&Q)return this.a=Q,z;Q<G?(P=1^z,R.switchFlag===1&&(z=P),X=R.nlps):(P=z,X=R.nmps)}do this.ct===0&&this.byteIn(),Q<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(!(32768&Q));return this.a=Q,Z[q]=X<<1|z,P}}class oP{getContexts(Z){return Z in this?this[Z]:this[Z]=new Int8Array(65536)}}class o5{constructor(Z,q,X){this.data=Z,this.start=q,this.end=X}get decoder(){return X1(this,"decoder",new lP(this.data,this.start,this.end))}get contextCache(){return X1(this,"contextCache",new oP)}}function s8(Z,q,X){let z=Z.getContexts(q),R=1;function G(W){let $=0;for(let _=0;_<W;_++){let J=X.readBit(z,R);R=R<256?R<<1|J:511&(R<<1|J)|256,$=$<<1|J}return $>>>0}let P=G(1),Q=G(1)?G(1)?G(1)?G(1)?G(1)?G(32)+4436:G(12)+340:G(8)+84:G(6)+20:G(4)+4:G(2),Y;return P===0?Y=Q:Q>0&&(Y=-Q),Y>=-2147483648&&Y<=uZ?Y:null}function aP(Z,q,X){let z=Z.getContexts("IAID"),R=1;for(let G=0;G<X;G++)R=R<<1|q.readBit(z,R);return X<31?R&(1<<X)-1:2147483647&R}function k2(Z,q,X,z,R,G,P,Q){if(Z)return iZ(new e5(Q.data,Q.start,Q.end),q,X,!1);if(z===0&&!R&&P.length===4&&P[0].x===3&&P[0].y===-1&&P[1].x===-3&&P[1].y===-1&&P[2].x===2&&P[2].y===-2&&P[3].x===-2&&P[3].y===-2)return function(p,F,s){let w=s.decoder,c=s.contextCache.getContexts("GB"),o=[],Q1,r,q1,R1,V1,f1,Y1;for(r=0;r<F;r++)for(V1=o[r]=new Uint8Array(p),f1=r<1?V1:o[r-1],Y1=r<2?V1:o[r-2],Q1=Y1[0]<<13|Y1[1]<<12|Y1[2]<<11|f1[0]<<7|f1[1]<<6|f1[2]<<5|f1[3]<<4,q1=0;q1<p;q1++)V1[q1]=R1=w.readBit(c,Q1),Q1=(31735&Q1)<<1|(q1+3<p?Y1[q1+3]<<11:0)|(q1+4<p?f1[q1+4]<<4:0)|R1;return o}(q,X,Q);let Y=jI[z].concat(P);Y.sort((p,F)=>p.y-F.y||p.x-F.x);let W=Y.length,$=new Int8Array(W),_=new Int8Array(W),J=[],U,f,K=0,I=0,B=0,j=0;for(f=0;f<W;f++)$[f]=Y[f].x,_[f]=Y[f].y,I=Math.min(I,Y[f].x),B=Math.max(B,Y[f].x),j=Math.min(j,Y[f].y),f<W-1&&Y[f].y===Y[f+1].y&&Y[f].x===Y[f+1].x-1?K|=1<<W-1-f:J.push(f);let V=J.length,x=new Int8Array(V),M=new Int8Array(V),H=new Uint16Array(V);for(U=0;U<V;U++)f=J[U],x[U]=Y[f].x,M[U]=Y[f].y,H[U]=1<<W-1-f;let A=-I,T=-j,k=q-B,y=VI[z],O=new Uint8Array(q),D=[],n=Q.decoder,b=Q.contextCache.getContexts("GB"),l,N,L,m,d,e=0,E=0;for(let p=0;p<X;p++){if(R){if(e^=n.readBit(b,y),e){D.push(O);continue}}for(O=new Uint8Array(O),D.push(O),l=0;l<q;l++){if(l>=A&&l<k&&p>=T)for(E=E<<1&K,f=0;f<V;f++)N=p+M[f],L=l+x[f],m=D[N][L],m&&(m=H[f],E|=m);else for(E=0,d=W-1,f=0;f<W;f++,d--)L=l+$[f],L>=0&&L<q&&(N=p+_[f],N>=0&&(m=D[N][L],m&&(E|=m<<d)));let F=n.readBit(b,E);O[l]=F}}return D}function nP(Z,q,X,z,R,G,P,Q,Y){let W=JR[X].coding;X===0&&(W=W.concat([Q[0]]));let $=W.length,_=new Int32Array($),J=new Int32Array($),U;for(U=0;U<$;U++)_[U]=W[U].x,J[U]=W[U].y;let f=JR[X].reference;X===0&&(f=f.concat([Q[1]]));let K=f.length,I=new Int32Array(K),B=new Int32Array(K);for(U=0;U<K;U++)I[U]=f[U].x,B[U]=f[U].y;let j=z[0].length,V=z.length,x=[],M=Y.decoder,H=Y.contextCache.getContexts("GR");for(let A=0;A<q;A++){let T=new Uint8Array(Z);x.push(T);for(let k=0;k<Z;k++){let y,O,D=0;for(U=0;U<$;U++)y=A+J[U],O=k+_[U],y<0||O<0||O>=Z?D<<=1:D=D<<1|x[y][O];for(U=0;U<K;U++)y=A+B[U]-G,O=k+I[U]-R,y<0||y>=V||O<0||O>=j?D<<=1:D=D<<1|z[y][O];let n=M.readBit(H,D);T[k]=n}}return x}function UR(Z,q,X,z,R,G,P,Q,Y,W,$,_,J,U,f,K,I,B,j){if(Z&&q)throw new R8("refinement with Huffman is not supported");let V=[],x,M;for(x=0;x<z;x++)M=new Uint8Array(X),R&&M.fill(R),V.push(M);let{decoder:H,contextCache:A}=I,T=Z?-U.tableDeltaT.decode(j):-s8(A,"IADT",H),k=0;for(x=0;x<G;){T+=Z?U.tableDeltaT.decode(j):s8(A,"IADT",H),k+=Z?U.tableFirstS.decode(j):s8(A,"IAFS",H);let y=k;for(;;){let O=0;P>1&&(O=Z?j.readBits(B):s8(A,"IAIT",H));let D=P*T+O,n=Z?U.symbolIDTable.decode(j):aP(A,H,Y),b=q&&(Z?j.readBit():s8(A,"IARI",H)),l=Q[n],N=l[0].length,L=l.length;if(b){let w=s8(A,"IARDW",H),c=s8(A,"IARDH",H);N+=w,L+=c,l=nP(N,L,f,l,(w>>1)+s8(A,"IARDX",H),(c>>1)+s8(A,"IARDY",H),0,K,I)}let m=0;W?1&_?m=L-1:y+=L-1:_>1?y+=N-1:m=N-1;let d=D-(1&_?0:L-1),e=y-(2&_?N-1:0),E,p,F;if(W)for(E=0;E<L;E++){if(M=V[e+E],!M)continue;F=l[E];let w=Math.min(X-d,N);switch(J){case 0:for(p=0;p<w;p++)M[d+p]|=F[p];break;case 2:for(p=0;p<w;p++)M[d+p]^=F[p];break;default:throw new R8(`operator ${J} is not supported`)}}else for(p=0;p<L;p++)if(M=V[d+p],M)switch(F=l[p],J){case 0:for(E=0;E<N;E++)M[e+E]|=F[E];break;case 2:for(E=0;E<N;E++)M[e+E]^=F[E];break;default:throw new R8(`operator ${J} is not supported`)}x++;let s=Z?U.tableDeltaS.decode(j):s8(A,"IADS",H);if(s===null)break;y+=m+s+$}}return V}function HI(Z,q){let X={};X.number=n1(Z,q);let z=Z[q+4],R=63&z;if(!_R[R])throw new R8("invalid segment type: "+R);X.type=R,X.typeName=_R[R],X.deferredNonRetain=!!(128&z);let G=!!(64&z),P=Z[q+5],Q=P>>5&7,Y=[31&P],W=q+6;if(P===7){Q=536870911&n1(Z,W-1),W+=3;let f=Q+7>>3;for(Y[0]=Z[W++];--f>0;)Y.push(Z[W++])}else if(P===5||P===6)throw new R8("invalid referred-to flags");X.retainBits=Y;let $=4;X.number<=256?$=1:X.number<=65536&&($=2);let _=[],J,U;for(J=0;J<Q;J++){let f;f=$===1?Z[W]:$===2?S1(Z,W):n1(Z,W),_.push(f),W+=$}if(X.referredTo=_,G?(X.pageAssociation=n1(Z,W),W+=4):X.pageAssociation=Z[W++],X.length=n1(Z,W),W+=4,X.length===4294967295){if(R!==38)throw new R8("invalid unknown segment length");{let f=c2(Z,W),K=!!(1&Z[W+h2]),B=new Uint8Array(6);for(K||(B[0]=255,B[1]=172),B[2]=f.height>>>24&255,B[3]=f.height>>16&255,B[4]=f.height>>8&255,B[5]=255&f.height,J=W,U=Z.length;J<U;J++){let j=0;for(;j<6&&B[j]===Z[J+j];)j++;if(j===6){X.length=J+6;break}}if(X.length===4294967295)throw new R8("segment end was not found")}}return X.headerEnd=W,X}function xI(Z,q,X,z){let R=[],G=X;for(;G<z;){let P=HI(q,G);G=P.headerEnd;let Q={header:P,data:q};if(Z.randomAccess||(Q.start=G,G+=P.length,Q.end=G),R.push(Q),P.type===51)break}if(Z.randomAccess)for(let P=0,Q=R.length;P<Q;P++)R[P].start=G,G+=R[P].header.length,R[P].end=G;return R}function c2(Z,q){return{width:n1(Z,q),height:n1(Z,q+4),x:n1(Z,q+8),y:n1(Z,q+12),combinationOperator:7&Z[q+16]}}function MI(Z,q){let{header:X,data:z,end:R}=Z,G,P,Q,Y,W=Z.start;switch(X.type){case 0:let _={},J=S1(z,W);if(_.huffman=!!(1&J),_.refinement=!!(2&J),_.huffmanDHSelector=J>>2&3,_.huffmanDWSelector=J>>4&3,_.bitmapSizeSelector=J>>6&1,_.aggregationInstancesSelector=J>>7&1,_.bitmapCodingContextUsed=!!(256&J),_.bitmapCodingContextRetained=!!(512&J),_.template=J>>10&3,_.refinementTemplate=J>>12&1,W+=2,!_.huffman){for(Y=_.template===0?4:1,P=[],Q=0;Q<Y;Q++)P.push({x:s0(z,W),y:s0(z,W+1)}),W+=2;_.at=P}if(_.refinement&&!_.refinementTemplate){for(P=[],Q=0;Q<2;Q++)P.push({x:s0(z,W),y:s0(z,W+1)}),W+=2;_.refinementAt=P}_.numberOfExportedSymbols=n1(z,W),W+=4,_.numberOfNewSymbols=n1(z,W),W+=4,G=[_,X.number,X.referredTo,z,W,R];break;case 6:case 7:let U={};U.info=c2(z,W),W+=h2;let f=S1(z,W);if(W+=2,U.huffman=!!(1&f),U.refinement=!!(2&f),U.logStripSize=f>>2&3,U.stripSize=1<<U.logStripSize,U.referenceCorner=f>>4&3,U.transposed=!!(64&f),U.combinationOperator=f>>7&3,U.defaultPixelValue=f>>9&1,U.dsOffset=f<<17>>27,U.refinementTemplate=f>>15&1,U.huffman){let A=S1(z,W);W+=2,U.huffmanFS=3&A,U.huffmanDS=A>>2&3,U.huffmanDT=A>>4&3,U.huffmanRefinementDW=A>>6&3,U.huffmanRefinementDH=A>>8&3,U.huffmanRefinementDX=A>>10&3,U.huffmanRefinementDY=A>>12&3,U.huffmanRefinementSizeSelector=!!(16384&A)}if(U.refinement&&!U.refinementTemplate){for(P=[],Q=0;Q<2;Q++)P.push({x:s0(z,W),y:s0(z,W+1)}),W+=2;U.refinementAt=P}U.numberOfSymbolInstances=n1(z,W),W+=4,G=[U,X.referredTo,z,W,R];break;case 16:let K={},I=z[W++];K.mmr=!!(1&I),K.template=I>>1&3,K.patternWidth=z[W++],K.patternHeight=z[W++],K.maxPatternIndex=n1(z,W),W+=4,G=[K,X.number,z,W,R];break;case 22:case 23:let B={};B.info=c2(z,W),W+=h2;let j=z[W++];B.mmr=!!(1&j),B.template=j>>1&3,B.enableSkip=!!(8&j),B.combinationOperator=j>>4&7,B.defaultPixelValue=j>>7&1,B.gridWidth=n1(z,W),W+=4,B.gridHeight=n1(z,W),W+=4,B.gridOffsetX=4294967295&n1(z,W),W+=4,B.gridOffsetY=4294967295&n1(z,W),W+=4,B.gridVectorX=S1(z,W),W+=2,B.gridVectorY=S1(z,W),W+=2,G=[B,X.referredTo,z,W,R];break;case 38:case 39:let V={};V.info=c2(z,W),W+=h2;let x=z[W++];if(V.mmr=!!(1&x),V.template=x>>1&3,V.prediction=!!(8&x),!V.mmr){for(Y=V.template===0?4:1,P=[],Q=0;Q<Y;Q++)P.push({x:s0(z,W),y:s0(z,W+1)}),W+=2;V.at=P}G=[V,z,W,R];break;case 48:let M={width:n1(z,W),height:n1(z,W+4),resolutionX:n1(z,W+8),resolutionY:n1(z,W+12)};M.height===4294967295&&delete M.height;let H=z[W+16];S1(z,W+17),M.lossless=!!(1&H),M.refinement=!!(2&H),M.defaultPixelValue=H>>2&1,M.combinationOperator=H>>3&3,M.requiresBuffer=!!(32&H),M.combinationOperatorOverride=!!(64&H),G=[M];break;case 49:case 50:case 51:case 62:break;case 53:G=[X.number,z,W,R];break;default:throw new R8(`segment type ${X.typeName}(${X.type}) is not implemented`)}let $="on"+X.typeName;$ in q&&q[$].apply(q,G)}function AI(Z,q){for(let X=0,z=Z.length;X<z;X++)MI(Z[X],q)}class iP{onPageInformation(Z){this.currentPageInfo=Z;let q=Z.width+7>>3,X=new Uint8ClampedArray(q*Z.height);Z.defaultPixelValue&&X.fill(255),this.buffer=X}drawBitmap(Z,q){let X=this.currentPageInfo,z=Z.width,R=Z.height,G=X.width+7>>3,P=X.combinationOperatorOverride?Z.combinationOperator:X.combinationOperator,Q=this.buffer,Y=128>>(7&Z.x),W,$,_,J,U=Z.y*G+(Z.x>>3);switch(P){case 0:for(W=0;W<R;W++){for(_=Y,J=U,$=0;$<z;$++)q[W][$]&&(Q[J]|=_),_>>=1,_||(_=128,J++);U+=G}break;case 2:for(W=0;W<R;W++){for(_=Y,J=U,$=0;$<z;$++)q[W][$]&&(Q[J]^=_),_>>=1,_||(_=128,J++);U+=G}break;default:throw new R8(`operator ${P} is not supported`)}}onImmediateGenericRegion(Z,q,X,z){let R=Z.info,G=new o5(q,X,z),P=k2(Z.mmr,R.width,R.height,Z.template,Z.prediction,0,Z.at,G);this.drawBitmap(R,P)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(Z,q,X,z,R,G){let P,Q;Z.huffman&&(P=function(_,J,U){let f,K,I,B,j=0;switch(_.huffmanDHSelector){case 0:case 1:f=F4(_.huffmanDHSelector+4);break;case 3:f=z5(j,J,U),j++;break;default:throw new R8("invalid Huffman DH selector")}switch(_.huffmanDWSelector){case 0:case 1:K=F4(_.huffmanDWSelector+2);break;case 3:K=z5(j,J,U),j++;break;default:throw new R8("invalid Huffman DW selector")}return _.bitmapSizeSelector?(I=z5(j,J,U),j++):I=F4(1),B=_.aggregationInstancesSelector?z5(j,J,U):F4(1),{tableDeltaHeight:f,tableDeltaWidth:K,tableBitmapSize:I,tableAggregateInstances:B}}(Z,X,this.customTables),Q=new e5(z,R,G));let Y=this.symbols;Y||(this.symbols=Y={});let W=[];for(let _ of X){let J=Y[_];J&&W.push(...J)}let $=new o5(z,R,G);Y[q]=function(_,J,U,f,K,I,B,j,V,x,M,H){if(_&&J)throw new R8("symbol refinement with Huffman is not supported");let A=[],T=0,k=h9(U.length+f),y=M.decoder,O=M.contextCache,D,n;for(_&&(D=F4(1),n=[],k=Math.max(k,1));A.length<f;){T+=_?I.tableDeltaHeight.decode(H):s8(O,"IADH",y);let e=0,E=0,p=_?n.length:0;for(;;){let F=_?I.tableDeltaWidth.decode(H):s8(O,"IADW",y);if(F===null)break;let s;if(e+=F,E+=e,J){let w=s8(O,"IAAI",y);if(w>1)s=UR(_,J,e,T,0,w,1,U.concat(A),k,0,0,1,0,I,V,x,M,0,H);else{let c=aP(O,y,k),o=s8(O,"IARDX",y),Q1=s8(O,"IARDY",y);s=nP(e,T,V,c<U.length?U[c]:A[c-U.length],o,Q1,0,x,M)}A.push(s)}else _?n.push(e):(s=k2(!1,e,T,B,!1,0,j,M),A.push(s))}if(_&&!J){let F=I.tableBitmapSize.decode(H),s;if(H.byteAlign(),F===0)s=LI(H,E,T);else{let c=H.end,o=H.position+F;H.end=o,s=iZ(H,E,T,!1),H.end=c,H.position=o}let w=n.length;if(p===w-1)A.push(s);else{let c,o,Q1,r,q1,R1=0;for(c=p;c<w;c++){for(r=n[c],Q1=R1+r,q1=[],o=0;o<T;o++)q1.push(s[o].subarray(R1,Q1));A.push(q1),R1=Q1}}}}let b=[],l=[],N,L,m=!1,d=U.length+f;for(;l.length<d;){let e=_?D.decode(H):s8(O,"IAEX",y);for(;e--;)l.push(m);m=!m}for(N=0,L=U.length;N<L;N++)l[N]&&b.push(U[N]);for(let e=0;e<f;N++,e++)l[N]&&b.push(A[e]);return b}(Z.huffman,Z.refinement,W,Z.numberOfNewSymbols,Z.numberOfExportedSymbols,P,Z.template,Z.at,Z.refinementTemplate,Z.refinementAt,$,Q)}onImmediateTextRegion(Z,q,X,z,R){let G=Z.info,P,Q,Y=this.symbols,W=[];for(let U of q){let f=Y[U];f&&W.push(...f)}let $=h9(W.length);Z.huffman&&(Q=new e5(X,z,R),P=function(U,f,K,I,B){let j=[];for(let k=0;k<=34;k++){let y=B.readBits(4);j.push(new J4([k,y,0,0]))}let V=new J7(j,!1);j.length=0;for(let k=0;k<I;){let y=V.decode(B);if(y>=32){let O,D,n;switch(y){case 32:if(k===0)throw new R8("no previous value in symbol ID table");D=B.readBits(2)+3,O=j[k-1].prefixLength;break;case 33:D=B.readBits(3)+3,O=0;break;case 34:D=B.readBits(7)+11,O=0;break;default:throw new R8("invalid code length in symbol ID table")}for(n=0;n<D;n++)j.push(new J4([k,O,0,0])),k++}else j.push(new J4([k,y,0,0])),k++}B.byteAlign();let x=new J7(j,!1),M,H,A,T=0;switch(U.huffmanFS){case 0:case 1:M=F4(U.huffmanFS+6);break;case 3:M=z5(T,f,K),T++;break;default:throw new R8("invalid Huffman FS selector")}switch(U.huffmanDS){case 0:case 1:case 2:H=F4(U.huffmanDS+8);break;case 3:H=z5(T,f,K),T++;break;default:throw new R8("invalid Huffman DS selector")}switch(U.huffmanDT){case 0:case 1:case 2:A=F4(U.huffmanDT+11);break;case 3:A=z5(T,f,K),T++;break;default:throw new R8("invalid Huffman DT selector")}if(U.refinement)throw new R8("refinement with Huffman is not supported");return{symbolIDTable:x,tableFirstS:M,tableDeltaS:H,tableDeltaT:A}}(Z,q,this.customTables,W.length,Q));let _=new o5(X,z,R),J=UR(Z.huffman,Z.refinement,G.width,G.height,Z.defaultPixelValue,Z.numberOfSymbolInstances,Z.stripSize,W,$,Z.transposed,Z.dsOffset,Z.referenceCorner,Z.combinationOperator,P,Z.refinementTemplate,Z.refinementAt,_,Z.logStripSize,Q);this.drawBitmap(G,J)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(Z,q,X,z,R){let G=this.patterns;G||(this.patterns=G={});let P=new o5(X,z,R);G[q]=function(Q,Y,W,$,_,J){let U=[];Q||(U.push({x:-Y,y:0}),_===0&&U.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));let f=k2(Q,($+1)*Y,W,_,!1,0,U,J),K=[];for(let I=0;I<=$;I++){let B=[],j=Y*I,V=j+Y;for(let x=0;x<W;x++)B.push(f[x].subarray(j,V));K.push(B)}return K}(Z.mmr,Z.patternWidth,Z.patternHeight,Z.maxPatternIndex,Z.template,P)}onImmediateHalftoneRegion(Z,q,X,z,R){let G=this.patterns[q[0]],P=Z.info,Q=new o5(X,z,R),Y=function(W,$,_,J,U,f,K,I,B,j,V,x,M,H,A){if(K)throw new R8("skip is not supported");if(I!==0)throw new R8(`operator "${I}" is not supported in halftone region`);let T=[],k,y,O;for(k=0;k<U;k++)O=new Uint8Array(J),f&&O.fill(f),T.push(O);let D=$.length,n=$[0],b=n[0].length,l=n.length,N=h9(D),L=[];W||(L.push({x:_<=1?3:2,y:-1}),_===0&&L.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));let m=[],d,e,E,p,F,s,w,c,o,Q1,r;for(W&&(d=new e5(A.data,A.start,A.end)),k=N-1;k>=0;k--)e=W?iZ(d,B,j,!0):k2(!1,B,j,_,!1,0,L,A),m[k]=e;for(E=0;E<j;E++)for(p=0;p<B;p++){for(F=0,s=0,y=N-1;y>=0;y--)F^=m[y][E][p],s|=F<<y;if(w=$[s],c=V+E*H+p*M>>8,o=x+E*M-p*H>>8,c>=0&&c+b<=J&&o>=0&&o+l<=U)for(k=0;k<l;k++)for(r=T[o+k],Q1=w[k],y=0;y<b;y++)r[c+y]|=Q1[y];else{let q1,R1;for(k=0;k<l;k++)if(R1=o+k,!(R1<0||R1>=U))for(r=T[R1],Q1=w[k],y=0;y<b;y++)q1=c+y,q1>=0&&q1<J&&(r[q1]|=Q1[y])}}return T}(Z.mmr,G,Z.template,P.width,P.height,Z.defaultPixelValue,Z.enableSkip,Z.combinationOperator,Z.gridWidth,Z.gridHeight,Z.gridOffsetX,Z.gridOffsetY,Z.gridVectorX,Z.gridVectorY,Q);this.drawBitmap(P,Y)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(Z,q,X,z){let R=this.customTables;R||(this.customTables=R={}),R[Z]=function(G,P,Q){let Y=G[P],W=4294967295&n1(G,P+1),$=4294967295&n1(G,P+5),_=new e5(G,P+9,Q),J=1+(Y>>1&7),U=1+(Y>>4&7),f=[],K,I,B=W;do K=_.readBits(J),I=_.readBits(U),f.push(new J4([B,K,I,0])),B+=1<<I;while(B<$);return K=_.readBits(J),f.push(new J4([W-1,K,32,0,"lower"])),K=_.readBits(J),f.push(new J4([$,K,32,0])),1&Y&&(K=_.readBits(J),f.push(new J4([K,0]))),new J7(f,!1)}(q,X,z)}}class J4{constructor(Z){Z.length===2?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=Z[0],this.rangeLength=0,this.prefixCode=Z[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=Z[0],this.prefixLength=Z[1],this.rangeLength=Z[2],this.prefixCode=Z[3],this.isLowerRange=Z[4]==="lower")}}class k3{constructor(Z){this.children=[],Z?(this.isLeaf=!0,this.rangeLength=Z.rangeLength,this.rangeLow=Z.rangeLow,this.isLowerRange=Z.isLowerRange,this.isOOB=Z.isOOB):this.isLeaf=!1}buildTree(Z,q){let X=Z.prefixCode>>q&1;if(q<=0)this.children[X]=new k3(Z);else{let z=this.children[X];z||(this.children[X]=z=new k3(null)),z.buildTree(Z,q-1)}}decodeNode(Z){if(this.isLeaf){if(this.isOOB)return null;let X=Z.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-X:X)}let q=this.children[Z.readBit()];if(!q)throw new R8("invalid Huffman data");return q.decodeNode(Z)}}class J7{constructor(Z,q){q||this.assignPrefixCodes(Z),this.rootNode=new k3(null);for(let X=0,z=Z.length;X<z;X++){let R=Z[X];R.prefixLength>0&&this.rootNode.buildTree(R,R.prefixLength-1)}}decode(Z){return this.rootNode.decodeNode(Z)}assignPrefixCodes(Z){let q=Z.length,X=0;for(let W=0;W<q;W++)X=Math.max(X,Z[W].prefixLength);let z=new Uint32Array(X+1);for(let W=0;W<q;W++)z[Z[W].prefixLength]++;let R,G,P,Q=1,Y=0;for(z[0]=0;Q<=X;){for(Y=Y+z[Q-1]<<1,R=Y,G=0;G<q;)P=Z[G],P.prefixLength===Q&&(P.prefixCode=R,R++),G++;Q++}}}function F4(Z){let q,X=fR[Z];if(X)return X;switch(Z){case 1:q=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:q=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:q=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:q=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:q=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:q=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:q=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:q=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:q=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:q=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:q=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:q=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:q=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:q=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:q=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new R8(`standard table B.${Z} does not exist`)}for(let z=0,R=q.length;z<R;z++)q[z]=new J4(q[z]);return X=new J7(q,!0),fR[Z]=X,X}class e5{constructor(Z,q,X){this.data=Z,this.start=q,this.end=X,this.position=q,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new R8("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}let Z=this.currentByte>>this.shift&1;return this.shift--,Z}readBits(Z){let q,X=0;for(q=Z-1;q>=0;q--)X|=this.readBit()<<q;return X}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function z5(Z,q,X){let z=0;for(let R=0,G=q.length;R<G;R++){let P=X[q[R]];if(P){if(Z===z)return P;z++}}throw new R8("can't find custom Huffman table")}function LI(Z,q,X){let z=[];for(let R=0;R<X;R++){let G=new Uint8Array(q);z.push(G);for(let P=0;P<q;P++)G[P]=Z.readBit();Z.byteAlign()}return z}function iZ(Z,q,X,z){let R=new PX(Z,{K:-1,Columns:q,Rows:X,BlackIs1:!0,EndOfBlock:z}),G=[],P,Q=!1;for(let Y=0;Y<X;Y++){let W=new Uint8Array(q);G.push(W);let $=-1;for(let _=0;_<q;_++)$<0&&(P=R.readNextChar(),P===-1&&(P=0,Q=!0),$=7),W[_]=P>>$&1,$--}if(z&&!Q)for(let W=0;W<5&&R.readNextChar()!==-1;W++);return G}class tP{parseChunks(Z){return function(q){let X=new iP;for(let z=0,R=q.length;z<R;z++){let G=q[z];AI(xI({},G.data,G.start,G.end),X)}return X.buffer}(Z)}parse(Z){throw Error("Not implemented: Jbig2Image.parse")}}class f4{constructor({lexer:Z,xref:q,allowStreams:X=!1,recoveryMode:z=!1}){this.lexer=Z,this.xref=q,this.allowStreams=X,this.recoveryMode=z,this.imageCache=Object.create(null),this._imageId=0,this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof x8&&this.buf2.cmd==="ID"?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(Z){if(Z instanceof X8)throw Z;return!1}}getObj(Z=null){let q=this.buf1;if(this.shift(),q instanceof x8)switch(q.cmd){case"BI":return this.makeInlineImage(Z);case"[":let X=[];for(;!k8(this.buf1,"]")&&this.buf1!==b8;)X.push(this.getObj(Z));if(this.buf1===b8){if(this.recoveryMode)return X;throw new H3("End of file inside array.")}return this.shift(),X;case"<<":let z=new S(this.xref);for(;!k8(this.buf1,">>")&&this.buf1!==b8;){if(!(this.buf1 instanceof t)){v1("Malformed dictionary: key must be a name object"),this.shift();continue}let R=this.buf1.name;if(this.shift(),this.buf1===b8)break;z.set(R,this.getObj(Z))}if(this.buf1===b8){if(this.recoveryMode)return z;throw new H3("End of file inside dictionary.")}return k8(this.buf2,"stream")?this.allowStreams?this.makeStream(z,Z):z:(this.shift(),z);default:return q}if(Number.isInteger(q)){if(Number.isInteger(this.buf1)&&k8(this.buf2,"R")){let X=P1.get(q,this.buf1);return this.shift(),this.shift(),X}return q}return typeof q=="string"&&Z?Z.decryptString(q):q}findDefaultInlineStreamEnd(Z){let{knownCommands:q}=this.lexer,X=Z.pos,z,R,G=0;for(;(z=Z.getByte())!==-1;)if(G===0)G=z===69?1:0;else if(G===1)G=z===73?2:0;else if(z===32||z===10||z===13){R=Z.pos;let Q=Z.peekBytes(15),Y=Q.length;if(Y===0)break;for(let _=0;_<Y;_++)if(z=Q[_],(z!==0||Q[_+1]===0)&&z!==10&&z!==13&&(z<32||z>127)){G=0;break}if(G!==2)continue;if(!q){v("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}let W=new C0(new W8(Z.peekBytes(75)),q);W._hexStringWarn=()=>{};let $=0;for(;;){let _=W.getObj();if(_===b8){G=0;break}if(_ instanceof x8){let J=q[_.cmd];if(!J){G=0;break}if(J.variableArgs?$<=J.numArgs:$===J.numArgs)break;$=0;continue}$++}if(G===2)break}else G=0;z===-1&&(v("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),R&&(v('... trying to recover by using the last "EI" occurrence.'),Z.skip(-(Z.pos-R))));let P=4;return Z.skip(-P),z=Z.peekByte(),Z.skip(P),M0(z)||P--,Z.pos-P-X}findDCTDecodeInlineStreamEnd(Z){let q=Z.pos,X,z,R=!1;for(;(X=Z.getByte())!==-1;)if(X===255){switch(Z.getByte()){case 0:break;case 255:Z.skip(-1);break;case 217:R=!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:z=Z.getUint16(),z>2?Z.skip(z-2):Z.skip(-2)}if(R)break}let G=Z.pos-q;return X===-1?(v("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),Z.skip(-G),this.findDefaultInlineStreamEnd(Z)):(this.inlineStreamSkipEI(Z),G)}findASCII85DecodeInlineStreamEnd(Z){let q=Z.pos,X;for(;(X=Z.getByte())!==-1;)if(X===126){let R=Z.pos;for(X=Z.peekByte();M0(X);)Z.skip(),X=Z.peekByte();if(X===62){Z.skip();break}if(Z.pos>R){let G=Z.peekBytes(2);if(G[0]===69&&G[1]===73)break}}let z=Z.pos-q;return X===-1?(v("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),Z.skip(-z),this.findDefaultInlineStreamEnd(Z)):(this.inlineStreamSkipEI(Z),z)}findASCIIHexDecodeInlineStreamEnd(Z){let q=Z.pos,X;for(;(X=Z.getByte())!==-1&&X!==62;);let z=Z.pos-q;return X===-1?(v("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),Z.skip(-z),this.findDefaultInlineStreamEnd(Z)):(this.inlineStreamSkipEI(Z),z)}inlineStreamSkipEI(Z){let q,X=0;for(;(q=Z.getByte())!==-1;)if(X===0)X=q===69?1:0;else if(X===1)X=q===73?2:0;else if(X===2)break}makeInlineImage(Z){let q=this.lexer,X=q.stream,z=Object.create(null),R;for(;!k8(this.buf1,"ID")&&this.buf1!==b8;){if(!(this.buf1 instanceof t))throw new h("Dictionary key must be a name object");let J=this.buf1.name;if(this.shift(),this.buf1===b8)break;z[J]=this.getObj(Z)}q.beginInlineImagePos!==-1&&(R=X.pos-q.beginInlineImagePos);let G=this.xref.fetchIfRef(z.F||z.Filter),P;if(G instanceof t)P=G.name;else if(Array.isArray(G)){let J=this.xref.fetchIfRef(G[0]);J instanceof t&&(P=J.name)}let Q=X.pos,Y,W;switch(P){case"DCT":case"DCTDecode":Y=this.findDCTDecodeInlineStreamEnd(X);break;case"A85":case"ASCII85Decode":Y=this.findASCII85DecodeInlineStreamEnd(X);break;case"AHx":case"ASCIIHexDecode":Y=this.findASCIIHexDecodeInlineStreamEnd(X);break;default:Y=this.findDefaultInlineStreamEnd(X)}if(Y<1000&&R>0){let J=X.pos;X.pos=q.beginInlineImagePos,W=function(f){let K=[],I=f.length,B=0;for(;B<I-1;)K.push(f[B++]<<8|f[B++]);return B<I&&K.push(f[B]),I+"_"+String.fromCharCode.apply(null,K)}(X.getBytes(R+Y)),X.pos=J;let U=this.imageCache[W];if(U!==void 0)return this.buf2=x8.get("EI"),this.shift(),U.reset(),U}let $=new S(this.xref);for(let J in z)$.set(J,z[J]);let _=X.makeSubStream(Q,Y,$);return Z&&(_=Z.createStream(_,Y)),_=this.filter(_,$,Y),_.dict=$,W!==void 0&&(_.cacheKey="inline_img_"+ ++this._imageId,this.imageCache[W]=_),this.buf2=x8.get("EI"),this.shift(),_}#Z(Z){let{stream:q}=this.lexer;q.pos=Z;let X=new Uint8Array([101,110,100]),z=X.length,R=[new Uint8Array([115,116,114,101,97,109]),new Uint8Array([115,116,101,97,109]),new Uint8Array([115,116,114,101,97])],G=9-z;for(;q.pos<q.end;){let P=q.peekBytes(2048),Q=P.length-9;if(Q<=0)break;let Y=0;for(;Y<Q;){let W=0;for(;W<z&&P[Y+W]===X[W];)W++;if(W>=z){let $=!1;for(let _ of R){let J=_.length,U=0;for(;U<J&&P[Y+W+U]===_[U];)U++;if(U>=G){$=!0;break}if(U>=J){M0(P[Y+W+U])&&(v1(`Found "${$0([...X,..._])}" when searching for endstream command.`),$=!0);break}}if($)return q.pos+=Y,q.pos-Z}Y++}q.pos+=Q}return-1}makeStream(Z,q){let X=this.lexer,z=X.stream;X.skipToNextLine();let R=z.pos-1,G=Z.get("Length");if(Number.isInteger(G)||(v1(`Bad length "${G&&G.toString()}" in stream.`),G=0),z.pos=R+G,X.nextChar(),this.tryShift()&&k8(this.buf2,"endstream"))this.shift();else{if(G=this.#Z(R),G<0)throw new h("Missing endstream command.");X.nextChar(),this.shift(),this.shift()}return this.shift(),z=z.makeSubStream(R,G,Z),q&&(z=q.createStream(z,G)),z=this.filter(z,Z,G),z.dict=Z,z}filter(Z,q,X){let z=q.get("F","Filter"),R=q.get("DP","DecodeParms");if(z instanceof t)return Array.isArray(R)&&v("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(Z,z.name,X,R);let G=X;if(Array.isArray(z)){let P=z,Q=R;for(let Y=0,W=P.length;Y<W;++Y){if(z=this.xref.fetchIfRef(P[Y]),!(z instanceof t))throw new h(`Bad filter name "${z}"`);R=null,Array.isArray(Q)&&Y in Q&&(R=this.xref.fetchIfRef(Q[Y])),Z=this.makeFilter(Z,z.name,G,R),G=null}}return Z}makeFilter(Z,q,X,z){if(X===0)return v(`Empty "${q}" stream.`),new A3;try{switch(q){case"Fl":case"FlateDecode":return z?new eZ(new nZ(Z,X),X,z):new nZ(Z,X);case"LZW":case"LZWDecode":let R=1;return z?(z.has("EarlyChange")&&(R=z.get("EarlyChange")),new eZ(new tZ(Z,X,R),X,z)):new tZ(Z,X,R);case"DCT":case"DCTDecode":return new v6(Z,X,z);case"JPX":case"JPXDecode":return new ZQ(Z,X,z);case"A85":case"ASCII85Decode":return new hP(Z,X);case"AHx":case"ASCIIHexDecode":return new sP(Z,X);case"CCF":case"CCITTFaxDecode":return new rP(Z,X,z);case"RL":case"RunLengthDecode":return new qQ(Z,X);case"JBIG2Decode":return new eP(Z,X,z)}return v(`Filter "${q}" is not supported.`),Z}catch(R){if(R instanceof X8)throw R;return v(`Invalid stream: "${R}"`),new A3}}}function r9(Z){return Z>=48&&Z<=57?15&Z:Z>=65&&Z<=70||Z>=97&&Z<=102?9+(15&Z):-1}class C0{constructor(Z,q=null){this.stream=Z,this.nextChar(),this.strBuf=[],this.knownCommands=q,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let Z=this.currentChar,q=!1,X=0,z=1;if(Z===45?(z=-1,Z=this.nextChar(),Z===45&&(Z=this.nextChar())):Z===43&&(Z=this.nextChar()),Z===10||Z===13)do Z=this.nextChar();while(Z===10||Z===13);if(Z===46&&(X=10,Z=this.nextChar()),Z<48||Z>57){let Q=`Invalid number: ${String.fromCharCode(Z)} (charCode ${Z})`;if(M0(Z)||Z===40||Z===60||Z===-1)return v1(`Lexer.getNumber - "${Q}".`),0;throw new h(Q)}let R=Z-48,G=0,P=1;for(;(Z=this.nextChar())>=0;)if(Z>=48&&Z<=57){let Q=Z-48;q?G=10*G+Q:(X!==0&&(X*=10),R=10*R+Q)}else if(Z===46){if(X!==0)break;X=1}else if(Z===45)v("Badly formatted number: minus sign in the middle");else{if(Z!==69&&Z!==101)break;if(Z=this.peekChar(),Z===43||Z===45)P=Z===45?-1:1,this.nextChar();else if(Z<48||Z>57)break;q=!0}return X!==0&&(R/=X),q&&(R*=10**(P*G)),z*R}getString(){let Z=1,q=!1,X=this.strBuf;X.length=0;let z=this.nextChar();for(;;){let R=!1;switch(0|z){case-1:v("Unterminated string"),q=!0;break;case 40:++Z,X.push("(");break;case 41:--Z===0?(this.nextChar(),q=!0):X.push(")");break;case 92:switch(z=this.nextChar(),z){case-1:v("Unterminated string"),q=!0;break;case 110:X.push(`
|
|
3
|
-
`);break;case 114:X.push("\r");break;case 116:X.push("\t");break;case 98:X.push("\b");break;case 102:X.push("\f");break;case 92:case 40:case 41:X.push(String.fromCharCode(z));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let G=15&z;z=this.nextChar(),R=!0,z>=48&&z<=55&&(G=(G<<3)+(15&z),z=this.nextChar(),z>=48&&z<=55&&(R=!1,G=(G<<3)+(15&z))),X.push(String.fromCharCode(G));break;case 13:this.peekChar()===10&&this.nextChar();break;case 10:break;default:X.push(String.fromCharCode(z))}break;default:X.push(String.fromCharCode(z))}if(q)break;R||(z=this.nextChar())}return X.join("")}getName(){let Z,q,X=this.strBuf;for(X.length=0;(Z=this.nextChar())>=0&&!h5[Z];)if(Z===35){if(Z=this.nextChar(),h5[Z]){v("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),X.push("#");break}let z=r9(Z);if(z!==-1){q=Z,Z=this.nextChar();let R=r9(Z);if(R===-1){if(v(`Lexer_getName: Illegal digit (${String.fromCharCode(Z)}) in hexadecimal number.`),X.push("#",String.fromCharCode(q)),h5[Z])break;X.push(String.fromCharCode(Z));continue}X.push(String.fromCharCode(z<<4|R))}else X.push("#",String.fromCharCode(Z))}else X.push(String.fromCharCode(Z));return X.length>127&&v(`Name token is longer than allowed by the spec: ${X.length}`),t.get(X.join(""))}_hexStringWarn(Z){this._hexStringNumWarn++!==5?this._hexStringNumWarn>5||v(`getHexString - ignoring invalid character: ${Z}`):v("getHexString - ignoring additional invalid characters.")}getHexString(){let Z=this.strBuf;Z.length=0;let q=this.currentChar,X=-1,z=-1;for(this._hexStringNumWarn=0;;){if(q<0){v("Unterminated hex string");break}if(q===62){this.nextChar();break}h5[q]!==1?(z=r9(q),z===-1?this._hexStringWarn(q):X===-1?X=z:(Z.push(String.fromCharCode(X<<4|z)),X=-1),q=this.nextChar()):q=this.nextChar()}return X!==-1&&Z.push(String.fromCharCode(X<<4)),Z.join("")}getObj(){let Z=!1,q=this.currentChar;for(;;){if(q<0)return b8;if(Z)q!==10&&q!==13||(Z=!1);else if(q===37)Z=!0;else if(h5[q]!==1)break;q=this.nextChar()}switch(0|q){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(),x8.get("[");case 93:return this.nextChar(),x8.get("]");case 60:return q=this.nextChar(),q===60?(this.nextChar(),x8.get("<<")):this.getHexString();case 62:return q=this.nextChar(),q===62?(this.nextChar(),x8.get(">>")):x8.get(">");case 123:return this.nextChar(),x8.get("{");case 125:return this.nextChar(),x8.get("}");case 41:throw this.nextChar(),new h(`Illegal character: ${q}`)}let X=String.fromCharCode(q);if(q<32||q>127){let G=this.peekChar();if(G>=32&&G<=127)return this.nextChar(),x8.get(X)}let z=this.knownCommands,R=z?.[X]!==void 0;for(;(q=this.nextChar())>=0&&!h5[q];){let G=X+String.fromCharCode(q);if(R&&z[G]===void 0)break;if(X.length===128)throw new h(`Command token too long: ${X.length}`);X=G,R=z?.[X]!==void 0}return X==="true"||X!=="false"&&(X==="null"?null:(X==="BI"&&(this.beginInlineImagePos=this.stream.pos),x8.get(X)))}skipToNextLine(){let Z=this.currentChar;for(;Z>=0;){if(Z===13){Z=this.nextChar(),Z===10&&this.nextChar();break}if(Z===10){this.nextChar();break}Z=this.nextChar()}}}class XQ{static create(Z){function q(W,$,_=!1){let J=W.get($);if(Number.isInteger(J)&&(_?J>=0:J>0))return J;throw Error(`The "${$}" parameter in the linearization dictionary is invalid.`)}let X=new f4({lexer:new C0(Z),xref:null}),z=X.getObj(),R=X.getObj(),G=X.getObj(),P=X.getObj(),Q,Y;if(!(Number.isInteger(z)&&Number.isInteger(R)&&k8(G,"obj")&&P instanceof S&&typeof(Q=P.get("Linearized"))=="number"&&Q>0))return null;if((Y=q(P,"L"))!==Z.length)throw Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:Y,hints:function(W){let $=W.get("H"),_;if(Array.isArray($)&&((_=$.length)===2||_===4)){for(let J=0;J<_;J++){let U=$[J];if(!(Number.isInteger(U)&&U>0))throw Error(`Hint (${J}) in the linearization dictionary is invalid.`)}return $}throw Error("Hint array in the linearization dictionary is invalid.")}(P),objectNumberFirst:q(P,"O"),endFirst:q(P,"E"),numPages:q(P,"N"),mainXRefEntriesOffset:q(P,"T"),pageFirst:P.has("P")?q(P,"P",!0):0}}}class R9{constructor(Z=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=Z}addCodespaceRange(Z,q,X){this.codespaceRanges[Z-1].push(q,X),this.numCodespaceRanges++}mapCidRange(Z,q,X){if(q-Z>l9)throw Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;Z<=q;)this._map[Z++]=X++}mapBfRange(Z,q,X){if(q-Z>l9)throw Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");let z=X.length-1;for(;Z<=q;){this._map[Z++]=X;let R=X.charCodeAt(z)+1;R>255?X=X.substring(0,z-1)+String.fromCharCode(X.charCodeAt(z-1)+1)+"\x00":X=X.substring(0,z)+String.fromCharCode(R)}}mapBfRangeToArray(Z,q,X){if(q-Z>l9)throw Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");let z=X.length,R=0;for(;Z<=q&&R<z;)this._map[Z]=X[R++],++Z}mapOne(Z,q){this._map[Z]=q}lookup(Z){return this._map[Z]}contains(Z){return this._map[Z]!==void 0}forEach(Z){let q=this._map,X=q.length;if(X<=65536)for(let z=0;z<X;z++)q[z]!==void 0&&Z(z,q[z]);else for(let z in q)Z(z,q[z])}charCodeOf(Z){let q=this._map;if(q.length<=65536)return q.indexOf(Z);for(let X in q)if(q[X]===Z)return 0|X;return-1}getMap(){return this._map}readCharCode(Z,q,X){let z=0,R=this.codespaceRanges;for(let G=0,P=R.length;G<P;G++){z=(z<<8|Z.charCodeAt(q+G))>>>0;let Q=R[G];for(let Y=0,W=Q.length;Y<W;){let $=Q[Y++],_=Q[Y++];if(z>=$&&z<=_)return X.charcode=z,void(X.length=G+1)}}X.charcode=0,X.length=1}getCharCodeLength(Z){let q=this.codespaceRanges;for(let X=0,z=q.length;X<z;X++){let R=q[X];for(let G=0,P=R.length;G<P;){let Q=R[G++],Y=R[G++];if(Z>=Q&&Z<=Y)return X+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if(this.name!=="Identity-H"&&this.name!=="Identity-V")return!1;if(this._map.length!==65536)return!1;for(let Z=0;Z<65536;Z++)if(this._map[Z]!==Z)return!1;return!0}}function o4(Z){let q=0;for(let X=0;X<Z.length;X++)q=q<<8|Z.charCodeAt(X);return q>>>0}function O5(Z){if(typeof Z!="string")throw new h("Malformed CMap: expected string.")}function zQ(Z){if(!Number.isInteger(Z))throw new h("Malformed CMap: expected int.")}function TI(Z,q){for(;;){let X=q.getObj();if(X===b8)break;if(k8(X,"endbfchar"))return;O5(X);let z=o4(X);X=q.getObj(),O5(X);let R=X;Z.mapOne(z,R)}}function NI(Z,q){for(;;){let X=q.getObj();if(X===b8)break;if(k8(X,"endbfrange"))return;O5(X);let z=o4(X);X=q.getObj(),O5(X);let R=o4(X);if(X=q.getObj(),Number.isInteger(X)||typeof X=="string"){let G=Number.isInteger(X)?String.fromCharCode(X):X;Z.mapBfRange(z,R,G)}else{if(!k8(X,"["))break;{X=q.getObj();let G=[];for(;!k8(X,"]")&&X!==b8;)G.push(X),X=q.getObj();Z.mapBfRangeToArray(z,R,G)}}}throw new h("Invalid bf range.")}function CI(Z,q){for(;;){let X=q.getObj();if(X===b8)break;if(k8(X,"endcidchar"))return;O5(X);let z=o4(X);X=q.getObj(),zQ(X);let R=X;Z.mapOne(z,R)}}function FI(Z,q){for(;;){let X=q.getObj();if(X===b8)break;if(k8(X,"endcidrange"))return;O5(X);let z=o4(X);X=q.getObj(),O5(X);let R=o4(X);X=q.getObj(),zQ(X);let G=X;Z.mapCidRange(z,R,G)}}function vI(Z,q){for(;;){let X=q.getObj();if(X===b8)break;if(k8(X,"endcodespacerange"))return;if(typeof X!="string")break;let z=o4(X);if(X=q.getObj(),typeof X!="string")break;let R=o4(X);Z.addCodespaceRange(X.length,z,R)}throw new h("Invalid codespace range.")}function bI(Z,q){let X=q.getObj();Number.isInteger(X)&&(Z.vertical=!!X)}function SI(Z,q){let X=q.getObj();X instanceof t&&(Z.name=X.name)}async function RQ(Z,q,X,z){let R,G;Z:for(;;)try{let P=q.getObj();if(P===b8)break;if(P instanceof t)P.name==="WMode"?bI(Z,q):P.name==="CMapName"&&SI(Z,q),R=P;else if(P instanceof x8)switch(P.cmd){case"endcmap":break Z;case"usecmap":R instanceof t&&(G=R.name);break;case"begincodespacerange":vI(Z,q);break;case"beginbfchar":TI(Z,q);break;case"begincidchar":CI(Z,q);break;case"beginbfrange":NI(Z,q);break;case"begincidrange":FI(Z,q)}}catch(P){if(P instanceof X8)throw P;v("Invalid cMap data: "+P);continue}return!z&&G&&(z=G),z?GQ(Z,X,z):Z}async function GQ(Z,q,X){if(Z.useCMap=await Zq(X,q),Z.numCodespaceRanges===0){let z=Z.useCMap.codespaceRanges;for(let R=0;R<z.length;R++)Z.codespaceRanges[R]=z[R].slice();Z.numCodespaceRanges=Z.useCMap.numCodespaceRanges}return Z.useCMap.forEach(function(z,R){Z.contains(z)||Z.mapOne(z,R)}),Z}async function Zq(Z,q){if(Z==="Identity-H")return new k5(!1,2);if(Z==="Identity-V")return new k5(!0,2);if(!kI.includes(Z))throw Error("Unknown CMap name: "+Z);if(!q)throw Error("Built-in CMap parameters are not provided.");let{cMapData:X,isCompressed:z}=await q(Z),R=new R9(!0);if(z)return new cP().process(X,R,(P)=>GQ(R,q,P));let G=new C0(new W8(X));return RQ(R,G,q,null)}class z7{static async create({encoding:Z,fetchBuiltInCMap:q,useCMap:X}){if(Z instanceof t)return Zq(Z.name,q);if(Z instanceof C1){let z=await RQ(new R9,new C0(Z),q,X);return z.isIdentityCMap?Zq(z.name,q):z}throw Error("Encoding required.")}}function v7(Z){switch(Z){case"WinAnsiEncoding":return F7;case"StandardEncoding":return A4;case"MacRomanEncoding":return QX;case"SymbolSetEncoding":return YX;case"ZapfDingbatsEncoding":return WX;case"ExpertEncoding":return PQ;case"MacExpertEncoding":return mI;default:return null}}function V6(Z,q){let X=q[Z];if(X!==void 0)return X;if(!Z)return-1;if(Z[0]==="u"){let z=Z.length,R;if(z===7&&Z[1]==="n"&&Z[2]==="i")R=Z.substring(3);else{if(!(z>=5&&z<=7))return-1;R=Z.substring(1)}if(R===R.toUpperCase()&&(X=parseInt(R,16),X>=0))return X}return-1}function pI(Z,q=-1){if(q!==-1){let X=o9[q];for(let z=0,R=X.length;z<R;z+=2)if(Z>=X[z]&&Z<=X[z+1])return q}for(let X=0,z=o9.length;X<z;X++){let R=o9[X];for(let G=0,P=R.length;G<P;G+=2)if(Z>=R[G]&&Z<=R[G+1])return X}return-1}function YQ(Z,q){if(q[Z]!==void 0)return Z;let X=V6(Z,q);if(X!==-1){for(let z in q)if(q[z]===X)return z}return v1("Unable to recover a standard glyph name for: "+Z),Z}function WQ(Z,q,X){let z=Object.create(null),R,G,P,Q=!!(Z.flags&T3);if(Z.isInternalFont)for(P=q,G=0;G<P.length;G++)R=X.indexOf(P[G]),z[G]=R>=0?R:0;else if(Z.baseEncodingName)for(P=v7(Z.baseEncodingName),G=0;G<P.length;G++)R=X.indexOf(P[G]),z[G]=R>=0?R:0;else if(Q)for(G in q)z[G]=q[G];else for(P=A4,G=0;G<P.length;G++)R=X.indexOf(P[G]),z[G]=R>=0?R:0;let Y=Z.differences,W;if(Y)for(G in Y){let $=Y[G];if(R=X.indexOf($),R===-1){W||(W=l0());let _=YQ($,W);_!==$&&(R=X.indexOf(_))}z[G]=R>=0?R:0}return z}function t7(Z){return Z.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")}class G9{constructor(Z,q,X){this.bytes=Z.getBytes(),this.properties=q,this.seacAnalysisEnabled=!!X}parse(){let Z=this.properties,q=new $X;this.cff=q;let X=this.parseHeader(),z=this.parseIndex(X.endPos),R=this.parseIndex(z.endPos),G=this.parseIndex(R.endPos),P=this.parseIndex(G.endPos),Q=this.parseDict(R.obj.get(0)),Y=this.createDict(S7,Q,q.strings);q.header=X.obj,q.names=this.parseNameIndex(z.obj),q.strings=this.parseStringIndex(G.obj),q.topDict=Y,q.globalSubrIndex=P.obj,this.parsePrivateDict(q.topDict),q.isCIDFont=Y.hasName("ROS");let W=Y.getByName("CharStrings"),$=this.parseIndex(W).obj,_=Y.getByName("FontMatrix");_&&(Z.fontMatrix=_);let J=Y.getByName("FontBBox"),U,f;if(J&&(Z.ascent=Math.max(J[3],J[1]),Z.descent=Math.min(J[1],J[3]),Z.ascentScaled=!0),q.isCIDFont){let I=this.parseIndex(Y.getByName("FDArray")).obj;for(let B=0,j=I.count;B<j;++B){let V=I.get(B),x=this.createDict(S7,this.parseDict(V),q.strings);this.parsePrivateDict(x),q.fdArray.push(x)}f=null,U=this.parseCharsets(Y.getByName("charset"),$.count,q.strings,!0),q.fdSelect=this.parseFDSelect(Y.getByName("FDSelect"),$.count)}else U=this.parseCharsets(Y.getByName("charset"),$.count,q.strings,!1),f=this.parseEncoding(Y.getByName("Encoding"),Z,q.strings,U.charset);q.charset=U,q.encoding=f;let K=this.parseCharStrings({charStrings:$,localSubrIndex:Y.privateDict.subrsIndex,globalSubrIndex:P.obj,fdSelect:q.fdSelect,fdArray:q.fdArray,privateDict:Y.privateDict});return q.charStrings=K.charStrings,q.seacs=K.seacs,q.widths=K.widths,q}parseHeader(){let Z=this.bytes,q=Z.length,X=0;for(;X<q&&Z[X]!==1;)++X;if(X>=q)throw new h("Invalid CFF header");X!==0&&(v1("cff data is shifted"),Z=Z.subarray(X),this.bytes=Z);let z=Z[0],R=Z[1],G=Z[2],P=Z[3];return{obj:new _X(z,R,G,P),endPos:G}}parseDict(Z){let q=0;function X(){let P=Z[q++];return P===30?function(){let Q="",Y=15,W=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],$=Z.length;for(;q<$;){let _=Z[q++],J=_>>4,U=15&_;if(J===Y)break;if(Q+=W[J],U===Y)break;Q+=W[U]}return parseFloat(Q)}():P===28?(P=I4(Z,q),q+=2,P):P===29?(P=Z[q++],P=P<<8|Z[q++],P=P<<8|Z[q++],P=P<<8|Z[q++],P):P>=32&&P<=246?P-139:P>=247&&P<=250?256*(P-247)+Z[q++]+108:P>=251&&P<=254?-256*(P-251)-Z[q++]-108:(v('CFFParser_parseDict: "'+P+'" is a reserved command.'),NaN)}let z=[],R=[];q=0;let G=Z.length;for(;q<G;){let P=Z[q];P<=21?(P===12&&(P=P<<8|Z[++q]),R.push([P,z]),z=[],++q):z.push(X())}return R}parseIndex(Z){let q=new H4,X=this.bytes,z=X[Z++]<<8|X[Z++],R=[],G,P,Q=Z;if(z!==0){let Y=X[Z++],W=Z+(z+1)*Y-1;for(G=0,P=z+1;G<P;++G){let $=0;for(let _=0;_<Y;++_)$<<=8,$+=X[Z++];R.push(W+$)}Q=R[z]}for(G=0,P=R.length-1;G<P;++G){let Y=R[G],W=R[G+1];q.add(X.subarray(Y,W))}return{obj:q,endPos:Q}}parseNameIndex(Z){let q=[];for(let X=0,z=Z.count;X<z;++X){let R=Z.get(X);q.push($0(R))}return q}parseStringIndex(Z){let q=new P9;for(let X=0,z=Z.count;X<z;++X){let R=Z.get(X);q.add($0(R))}return q}createDict(Z,q,X){let z=new Z(X);for(let[R,G]of q)z.setByKey(R,G);return z}parseCharString(Z,q,X,z){if(!q||Z.callDepth>10)return!1;let{stackSize:R,stack:G}=Z,P=q.length;for(let Q=0;Q<P;){let Y=q[Q++],W=null;if(Y===12){let $=q[Q++];$===0?(q[Q-2]=139,q[Q-1]=22,R=0):W=dI[$]}else if(Y===28)G[R]=I4(q,Q),Q+=2,R++;else if(Y===14){if(R>=4&&(R-=4,this.seacAnalysisEnabled))return Z.seac=G.slice(R,R+4),!1;W=s5[Y]}else if(Y>=32&&Y<=246)G[R]=Y-139,R++;else if(Y>=247&&Y<=254)G[R]=Y<251?(Y-247<<8)+q[Q]+108:-(Y-251<<8)-q[Q]-108,Q++,R++;else if(Y===255)G[R]=(q[Q]<<24|q[Q+1]<<16|q[Q+2]<<8|q[Q+3])/65536,Q+=4,R++;else if(Y===19||Y===20){if(Z.hints+=R>>1,Z.hints===0){q.copyWithin(Q-1,Q,-1),Q-=1,P-=1;continue}Q+=Z.hints+7>>3,R%=2,W=s5[Y]}else{if(Y===10||Y===29){let $=Y===10?X:z;if(!$)return W=s5[Y],v("Missing subrsIndex for "+W.id),!1;let _=32768;$.count<1240?_=107:$.count<33900&&(_=1131);let J=G[--R]+_;if(J<0||J>=$.count||isNaN(J))return W=s5[Y],v("Out of bounds subrIndex for "+W.id),!1;if(Z.stackSize=R,Z.callDepth++,!this.parseCharString(Z,$.get(J),X,z))return!1;Z.callDepth--,R=Z.stackSize;continue}if(Y===11)return Z.stackSize=R,!0;if(Y===0&&Q===q.length)q[Q-1]=14,W=s5[14];else{if(Y===9){q.copyWithin(Q-1,Q,-1),Q-=1,P-=1;continue}W=s5[Y]}}if(W){if(W.stem&&(Z.hints+=R>>1,Y===3||Y===23?Z.hasVStems=!0:!Z.hasVStems||Y!==1&&Y!==18||(v("CFF stem hints are in wrong order"),q[Q-1]=Y===1?3:23)),"min"in W&&!Z.undefStack&&R<W.min)return v("Not enough parameters for "+W.id+"; actual: "+R+", expected: "+W.min),R===0&&(q[Q-1]=14,!0);Z.firstStackClearing&&W.stackClearing&&(Z.firstStackClearing=!1,R-=W.min,R>=2&&W.stem?R%=2:R>1&&v("Found too many parameters for stack-clearing command"),R>0&&(Z.width=G[R-1])),"stackDelta"in W?(("stackFn"in W)&&W.stackFn(G,R),R+=W.stackDelta):W.stackClearing?R=0:W.resetStack?(R=0,Z.undefStack=!1):W.undefStack&&(R=0,Z.undefStack=!0,Z.firstStackClearing=!1)}}return P<q.length&&q.fill(14,P),Z.stackSize=R,!0}parseCharStrings({charStrings:Z,localSubrIndex:q,globalSubrIndex:X,fdSelect:z,fdArray:R,privateDict:G}){let P=[],Q=[],Y=Z.count;for(let W=0;W<Y;W++){let $=Z.get(W),_={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1},J=!0,U=null,f=G;if(z&&R.length){let K=z.getFDIndex(W);K===-1&&(v("Glyph index is not in fd select."),J=!1),K>=R.length&&(v("Invalid fd index for glyph index."),J=!1),J&&(f=R[K].privateDict,U=f.subrsIndex)}else q&&(U=q);if(J&&(J=this.parseCharString(_,$,U,X)),_.width!==null){let K=f.getByName("nominalWidthX");Q[W]=K+_.width}else{let K=f.getByName("defaultWidthX");Q[W]=K}_.seac!==null&&(P[W]=_.seac),J||Z.set(W,new Uint8Array([14]))}return{charStrings:Z,seacs:P,widths:Q}}emptyPrivateDictionary(Z){let q=this.createDict(m7,[],Z.strings);Z.setByKey(18,[0,0]),Z.privateDict=q}parsePrivateDict(Z){if(!Z.hasName("Private"))return void this.emptyPrivateDictionary(Z);let q=Z.getByName("Private");if(!Array.isArray(q)||q.length!==2)return void Z.removeByName("Private");let X=q[0],z=q[1];if(X===0||z>=this.bytes.length)return void this.emptyPrivateDictionary(Z);let R=z+X,G=this.bytes.subarray(z,R),P=this.parseDict(G),Q=this.createDict(m7,P,Z.strings);if(Z.privateDict=Q,Q.getByName("ExpansionFactor")===0&&Q.setByName("ExpansionFactor",0.06),!Q.getByName("Subrs"))return;let Y=Q.getByName("Subrs"),W=z+Y;if(Y===0||W>=this.bytes.length)return void this.emptyPrivateDictionary(Z);let $=this.parseIndex(W);Q.subrsIndex=$.obj}parseCharsets(Z,q,X,z){if(Z===0)return new Z6(!0,n9.ISO_ADOBE,EI);if(Z===1)return new Z6(!0,n9.EXPERT,uI);if(Z===2)return new Z6(!0,n9.EXPERT_SUBSET,gI);let R=this.bytes,G=Z,P=R[Z++],Q=[z?0:".notdef"],Y,W,$;switch(q-=1,P){case 0:for($=0;$<q;$++)Y=R[Z++]<<8|R[Z++],Q.push(z?Y:X.get(Y));break;case 1:for(;Q.length<=q;)for(Y=R[Z++]<<8|R[Z++],W=R[Z++],$=0;$<=W;$++)Q.push(z?Y++:X.get(Y++));break;case 2:for(;Q.length<=q;)for(Y=R[Z++]<<8|R[Z++],W=R[Z++]<<8|R[Z++],$=0;$<=W;$++)Q.push(z?Y++:X.get(Y++));break;default:throw new h("Unknown charset format")}let _=Z,J=R.subarray(G,_);return new Z6(!1,P,Q,J)}parseEncoding(Z,q,X,z){let R=Object.create(null),G=this.bytes,P,Q,Y,W=!1,$=null;if(Z===0||Z===1){W=!0,P=Z;let _=Z?PQ:A4;for(Q=0,Y=z.length;Q<Y;Q++){let J=_.indexOf(z[Q]);J!==-1&&(R[J]=Q)}}else{let _=Z;switch(P=G[Z++],127&P){case 0:let U=G[Z++];for(Q=1;Q<=U;Q++)R[G[Z++]]=Q;break;case 1:let f=G[Z++],K=1;for(Q=0;Q<f;Q++){let I=G[Z++],B=G[Z++];for(let j=I;j<=I+B;j++)R[j]=K++}break;default:throw new h(`Unknown encoding format: ${P} in CFF`)}let J=Z;128&P&&(G[_]&=127,function(){let U=G[Z++];for(Q=0;Q<U;Q++){let f=G[Z++],K=(G[Z++]<<8)+(255&G[Z++]);R[f]=z.indexOf(X.get(K))}}()),$=G.subarray(_,J)}return P&=127,new $Q(W,P,R,$)}parseFDSelect(Z,q){let X=this.bytes,z=X[Z++],R=[],G;switch(z){case 0:for(G=0;G<q;++G){let Q=X[Z++];R.push(Q)}break;case 3:let P=X[Z++]<<8|X[Z++];for(G=0;G<P;++G){let Q=X[Z++]<<8|X[Z++];G===0&&Q!==0&&(v("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),Q=0);let Y=X[Z++],W=X[Z]<<8|X[Z+1];for(let $=Q;$<W;++$)R.push(Y)}Z+=2;break;default:throw new h(`parseFDSelect: Unknown format "${z}".`)}if(R.length!==q)throw new h("parseFDSelect: Invalid font data.");return new _Q(z,R)}}class $X{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new P9,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535)return void v("Not enough space in charstrings to duplicate first glyph.");let Z=this.charStrings.get(0);this.charStrings.add(Z),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(Z){if(Z<0||Z>=this.charStrings.count)return!1;return this.charStrings.get(Z).length>0}}class _X{constructor(Z,q,X,z){this.major=Z,this.minor=q,this.hdrSize=X,this.offSize=z}}class P9{constructor(){this.strings=[]}get(Z){return Z>=0&&Z<=390?s2[Z]:Z-a9<=this.strings.length?this.strings[Z-a9]:s2[0]}getSID(Z){let q=s2.indexOf(Z);return q!==-1?q:(q=this.strings.indexOf(Z),q!==-1?q+a9:-1)}add(Z){this.strings.push(Z)}get count(){return this.strings.length}}class H4{constructor(){this.objects=[],this.length=0}add(Z){this.length+=Z.length,this.objects.push(Z)}set(Z,q){this.length+=q.length-this.objects[Z].length,this.objects[Z]=q}get(Z){return this.objects[Z]}get count(){return this.objects.length}}class JX{constructor(Z,q){this.keyToNameMap=Z.keyToNameMap,this.nameToKeyMap=Z.nameToKeyMap,this.defaults=Z.defaults,this.types=Z.types,this.opcodes=Z.opcodes,this.order=Z.order,this.strings=q,this.values=Object.create(null)}setByKey(Z,q){if(!(Z in this.keyToNameMap))return!1;if(q.length===0)return!0;for(let z of q)if(isNaN(z))return v(`Invalid CFFDict value: "${q}" for key "${Z}".`),!0;let X=this.types[Z];return X!=="num"&&X!=="sid"&&X!=="offset"||(q=q[0]),this.values[Z]=q,!0}setByName(Z,q){if(!(Z in this.nameToKeyMap))throw new h(`Invalid dictionary name "${Z}"`);this.values[this.nameToKeyMap[Z]]=q}hasName(Z){return this.nameToKeyMap[Z]in this.values}getByName(Z){if(!(Z in this.nameToKeyMap))throw new h(`Invalid dictionary name ${Z}"`);let q=this.nameToKeyMap[Z];return q in this.values?this.values[q]:this.defaults[q]}removeByName(Z){delete this.values[this.nameToKeyMap[Z]]}static createTables(Z){let q={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(let X of Z){let z=Array.isArray(X[0])?(X[0][0]<<8)+X[0][1]:X[0];q.keyToNameMap[z]=X[1],q.nameToKeyMap[X[1]]=z,q.types[z]=X[2],q.defaults[z]=X[3],q.opcodes[z]=Array.isArray(X[0])?X[0]:[X[0]],q.order.push(z)}return q}}class Z6{constructor(Z,q,X,z){this.predefined=Z,this.format=q,this.charset=X,this.raw=z}}class $Q{constructor(Z,q,X,z){this.predefined=Z,this.format=q,this.encoding=X,this.raw=z}}class _Q{constructor(Z,q){this.format=Z,this.fdSelect=q}getFDIndex(Z){return Z<0||Z>=this.fdSelect.length?-1:this.fdSelect[Z]}}class zq{constructor(){this.offsets=Object.create(null)}isTracking(Z){return Z in this.offsets}track(Z,q){if(Z in this.offsets)throw new h(`Already tracking location of ${Z}`);this.offsets[Z]=q}offset(Z){for(let q in this.offsets)this.offsets[q]+=Z}setEntryLocation(Z,q,X){if(!(Z in this.offsets))throw new h(`Not tracking location of ${Z}`);let z=X.data,R=this.offsets[Z];for(let G=0,P=q.length;G<P;++G){let Q=5*G+R,Y=Q+1,W=Q+2,$=Q+3,_=Q+4;if(z[Q]!==29||z[Y]!==0||z[W]!==0||z[$]!==0||z[_]!==0)throw new h("writing to an offset that is not empty");let J=q[G];z[Q]=29,z[Y]=J>>24&255,z[W]=J>>16&255,z[$]=J>>8&255,z[_]=255&J}}}class e7{constructor(Z){this.cff=Z}compile(){let Z=this.cff,q={data:[],length:0,add(_){try{this.data.push(..._)}catch{this.data=this.data.concat(_)}this.length=this.data.length}},X=this.compileHeader(Z.header);q.add(X);let z=this.compileNameIndex(Z.names);if(q.add(z),Z.isCIDFont&&Z.topDict.hasName("FontMatrix")){let _=Z.topDict.getByName("FontMatrix");Z.topDict.removeByName("FontMatrix");for(let J of Z.fdArray){let U=_.slice(0);J.hasName("FontMatrix")&&(U=h1.transform(U,J.getByName("FontMatrix"))),J.setByName("FontMatrix",U)}}Z.topDict.getByName("XUID")?.length>16&&Z.topDict.removeByName("XUID"),Z.topDict.setByName("charset",0);let G=this.compileTopDicts([Z.topDict],q.length,Z.isCIDFont);q.add(G.output);let P=G.trackers[0],Q=this.compileStringIndex(Z.strings.strings);q.add(Q);let Y=this.compileIndex(Z.globalSubrIndex);if(q.add(Y),Z.encoding&&Z.topDict.hasName("Encoding"))if(Z.encoding.predefined)P.setEntryLocation("Encoding",[Z.encoding.format],q);else{let _=this.compileEncoding(Z.encoding);P.setEntryLocation("Encoding",[q.length],q),q.add(_)}let W=this.compileCharset(Z.charset,Z.charStrings.count,Z.strings,Z.isCIDFont);P.setEntryLocation("charset",[q.length],q),q.add(W);let $=this.compileCharStrings(Z.charStrings);if(P.setEntryLocation("CharStrings",[q.length],q),q.add($),Z.isCIDFont){P.setEntryLocation("FDSelect",[q.length],q);let _=this.compileFDSelect(Z.fdSelect);q.add(_),G=this.compileTopDicts(Z.fdArray,q.length,!0),P.setEntryLocation("FDArray",[q.length],q),q.add(G.output);let J=G.trackers;this.compilePrivateDicts(Z.fdArray,J,q)}return this.compilePrivateDicts([Z.topDict],[P],q),q.add([0]),q.data}encodeNumber(Z){return Number.isInteger(Z)?this.encodeInteger(Z):this.encodeFloat(Z)}static get EncodeFloatRegExp(){return X1(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(Z){let q=Z.toString(),X=e7.EncodeFloatRegExp.exec(q);if(X){let Q=parseFloat("1e"+((X[2]?+X[2]:0)+X[1].length));q=(Math.round(Z*Q)/Q).toString()}let z,R,G="";for(z=0,R=q.length;z<R;++z){let Q=q[z];G+=Q==="e"?q[++z]==="-"?"c":"b":Q==="."?"a":Q==="-"?"e":Q}G+=1&G.length?"f":"ff";let P=[30];for(z=0,R=G.length;z<R;z+=2)P.push(parseInt(G.substring(z,z+2),16));return P}encodeInteger(Z){let q;return q=Z>=-107&&Z<=107?[Z+139]:Z>=108&&Z<=1131?[247+((Z-=108)>>8),255&Z]:Z>=-1131&&Z<=-108?[251+((Z=-Z-108)>>8),255&Z]:Z>=-32768&&Z<=32767?[28,Z>>8&255,255&Z]:[29,Z>>24&255,Z>>16&255,Z>>8&255,255&Z],q}compileHeader(Z){return[Z.major,Z.minor,4,Z.offSize]}compileNameIndex(Z){let q=new H4;for(let X of Z){let z=Math.min(X.length,127),R=Array(z);for(let G=0;G<z;G++){let P=X[G];(P<"!"||P>"~"||P==="["||P==="]"||P==="("||P===")"||P==="{"||P==="}"||P==="<"||P===">"||P==="/"||P==="%")&&(P="_"),R[G]=P}R=R.join(""),R===""&&(R="Bad_Font_Name"),q.add(w8(R))}return this.compileIndex(q)}compileTopDicts(Z,q,X){let z=[],R=new H4;for(let G of Z){X&&(G.removeByName("CIDFontVersion"),G.removeByName("CIDFontRevision"),G.removeByName("CIDFontType"),G.removeByName("CIDCount"),G.removeByName("UIDBase"));let P=new zq,Q=this.compileDict(G,P);z.push(P),R.add(Q),P.offset(q)}return R=this.compileIndex(R,z),{trackers:z,output:R}}compilePrivateDicts(Z,q,X){for(let z=0,R=Z.length;z<R;++z){let G=Z[z],P=G.privateDict;if(!P||!G.hasName("Private"))throw new h("There must be a private dictionary.");let Q=new zq,Y=this.compileDict(P,Q),W=X.length;if(Q.offset(W),Y.length||(W=0),q[z].setEntryLocation("Private",[Y.length,W],X),X.add(Y),P.subrsIndex&&P.hasName("Subrs")){let $=this.compileIndex(P.subrsIndex);Q.setEntryLocation("Subrs",[Y.length],X),X.add($)}}}compileDict(Z,q){let X=[];for(let z of Z.order){if(!(z in Z.values))continue;let R=Z.values[z],G=Z.types[z];if(Array.isArray(G)||(G=[G]),Array.isArray(R)||(R=[R]),R.length!==0){for(let P=0,Q=G.length;P<Q;++P){let Y=G[P],W=R[P];switch(Y){case"num":case"sid":X.push(...this.encodeNumber(W));break;case"offset":let $=Z.keyToNameMap[z];q.isTracking($)||q.track($,X.length),X.push(29,0,0,0,0);break;case"array":case"delta":X.push(...this.encodeNumber(W));for(let _=1,J=R.length;_<J;++_)X.push(...this.encodeNumber(R[_]));break;default:throw new h(`Unknown data type of ${Y}`)}}X.push(...Z.opcodes[z])}}return X}compileStringIndex(Z){let q=new H4;for(let X of Z)q.add(w8(X));return this.compileIndex(q)}compileCharStrings(Z){let q=new H4;for(let X=0;X<Z.count;X++){let z=Z.get(X);z.length!==0?q.add(z):q.add(new Uint8Array([139,14]))}return this.compileIndex(q)}compileCharset(Z,q,X,z){let R,G=q-1;if(z){let P=G-1;R=new Uint8Array([2,0,1,P>>8&255,255&P])}else{R=new Uint8Array(1+2*G),R[0]=0;let P=0,Q=Z.charset.length,Y=!1;for(let W=1;W<R.length;W+=2){let $=0;if(P<Q){let _=Z.charset[P++];$=X.getSID(_),$===-1&&($=0,Y||(Y=!0,v(`Couldn't find ${_} in CFF strings`)))}R[W]=$>>8&255,R[W+1]=255&$}}return this.compileTypedArray(R)}compileEncoding(Z){return this.compileTypedArray(Z.raw)}compileFDSelect(Z){let q=Z.format,X,z;switch(q){case 0:for(X=new Uint8Array(1+Z.fdSelect.length),X[0]=q,z=0;z<Z.fdSelect.length;z++)X[z+1]=Z.fdSelect[z];break;case 3:let R=0,G=Z.fdSelect[0],P=[q,0,0,R>>8&255,255&R,G];for(z=1;z<Z.fdSelect.length;z++){let Y=Z.fdSelect[z];Y!==G&&(P.push(z>>8&255,255&z,Y),G=Y)}let Q=(P.length-3)/3;P[1]=Q>>8&255,P[2]=255&Q,P.push(z>>8&255,255&z),X=new Uint8Array(P)}return this.compileTypedArray(X)}compileTypedArray(Z){return Array.from(Z)}compileIndex(Z,q=[]){let X=Z.objects,z=X.length;if(z===0)return[0,0];let R=[z>>8&255,255&z],G,P,Q=1;for(G=0;G<z;++G)Q+=X[G].length;P=Q<256?1:Q<65536?2:Q<16777216?3:4,R.push(P);let Y=1;for(G=0;G<z+1;G++)P===1?R.push(255&Y):P===2?R.push(Y>>8&255,255&Y):P===3?R.push(Y>>16&255,Y>>8&255,255&Y):R.push(Y>>>24&255,Y>>16&255,Y>>8&255,255&Y),X[G]&&(Y+=X[G].length);for(G=0;G<z;G++)q[G]&&q[G].offset(R.length),R.push(...X[G]);return R}}function jR(Z){let q=t7(Z);return O7()[q]}function VR(Z){let q=t7(Z);return!!(O7()[q]||Rq()[q]||UX()[q]||Gq()[q])}class q6{constructor(Z=[]){this._map=Z}get length(){return this._map.length}forEach(Z){for(let q in this._map)Z(q,this._map[q].codePointAt(0))}has(Z){return this._map[Z]!==void 0}get(Z){return this._map[Z]}charCodeOf(Z){let q=this._map;if(q.length<=65536)return q.indexOf(Z);for(let X in q)if(q[X]===Z)return 0|X;return-1}amend(Z){for(let q in Z)this._map[q]=Z[q]}}class j0{constructor(Z,q){this.firstChar=Z,this.lastChar=q}get length(){return this.lastChar+1-this.firstChar}forEach(Z){for(let q=this.firstChar,X=this.lastChar;q<=X;q++)Z(q,q)}has(Z){return this.firstChar<=Z&&Z<=this.lastChar}get(Z){if(this.firstChar<=Z&&Z<=this.lastChar)return String.fromCharCode(Z)}charCodeOf(Z){return Number.isInteger(Z)&&Z>=this.firstChar&&Z<=this.lastChar?Z:-1}amend(Z){y1("Should not call amend()")}}class r2{constructor(Z,q){this.properties=q;let X=new G9(Z,q,b7);this.cff=X.parse(),this.cff.duplicateFirstGlyph();let z=new e7(this.cff);this.seacs=this.cff.seacs;try{this.data=z.compile()}catch{v("Failed to compile font "+q.loadedName),this.data=Z}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){let Z=this.cff,q=this.properties,{cidToGidMap:X,cMap:z}=q,R=Z.charset.charset,G,P;if(q.composite){let Y,W;if(X?.length>0){Y=Object.create(null);for(let $=0,_=X.length;$<_;$++){let J=X[$];J!==void 0&&(Y[J]=$)}}if(G=Object.create(null),Z.isCIDFont)for(P=0;P<R.length;P++){let $=R[P];W=z.charCodeOf($),Y?.[W]!==void 0&&(W=Y[W]),G[W]=P}else for(P=0;P<Z.charStrings.count;P++)W=z.charCodeOf(P),G[W]=P;return G}let Q=Z.encoding?Z.encoding.encoding:null;return q.isInternalFont&&(Q=q.defaultEncoding),G=WQ(q,Q,R),G}hasGlyphId(Z){return this.cff.hasGlyphId(Z)}_createBuiltInEncoding(){let{charset:Z,encoding:q}=this.cff;if(!Z||!q)return;let X=Z.charset,z=q.encoding,R=[];for(let G in z){let P=z[G];if(P>=0){let Q=X[P];Q&&(R[G]=Q)}}R.length>0&&(this.properties.builtInEncoding=R)}}function R5(Z,q){return I4(Z,q)/16384}function Pq(Z){let q=Z.length,X=32768;return q<1240?X=107:q<33900&&(X=1131),X}function oI(Z,q,X){let z=S1(Z,q+2)===1?n1(Z,q+8):n1(Z,q+16),R=S1(Z,q+z),G,P,Q;if(R===4){S1(Z,q+z+2);let Y=S1(Z,q+z+6)>>1;for(P=q+z+14,G=[],Q=0;Q<Y;Q++,P+=2)G[Q]={end:S1(Z,P)};for(P+=2,Q=0;Q<Y;Q++,P+=2)G[Q].start=S1(Z,P);for(Q=0;Q<Y;Q++,P+=2)G[Q].idDelta=S1(Z,P);for(Q=0;Q<Y;Q++,P+=2){let W=S1(Z,P);if(W!==0){G[Q].ids=[];for(let $=0,_=G[Q].end-G[Q].start+1;$<_;$++)G[Q].ids[$]=S1(Z,P+W),W+=2}}return G}if(R===12){let Y=n1(Z,q+z+12);for(P=q+z+16,G=[],Q=0;Q<Y;Q++)q=n1(Z,P),G.push({start:q,end:n1(Z,P+4),idDelta:n1(Z,P+8)-q}),P+=12;return G}throw new h(`unsupported cmap: ${R}`)}function aI(Z,q,X,z){let R=new G9(new W8(Z,q,X-q),{},z).parse();return{glyphs:R.charStrings.objects,subrs:R.topDict.privateDict?.subrsIndex?.objects,gsubrs:R.globalSubrIndex?.objects,isCFFCIDFont:R.isCIDFont,fdSelect:R.fdSelect,fdArray:R.fdArray}}function N3(Z,q){let X=q.codePointAt(0),z=0,R=0,G=Z.length-1;for(;R<G;){let P=R+G+1>>1;X<Z[P].start?G=P-1:R=P}return Z[R].start<=X&&X<=Z[R].end&&(z=Z[R].idDelta+(Z[R].ids?Z[R].ids[X-Z[R].start]:X)&65535),{charCode:X,glyphId:z}}function JQ(Z,q,X){function z(J,U){W&&q.add("L",W),W=[J,U],q.add("M",[J,U])}function R(J,U){q.add("L",[J,U])}function G(J,U,f,K){q.add("Q",[J,U,f,K])}let P=0,Q=I4(Z,P),Y,W=null,$=0,_=0;if(P+=10,Q<0)do{Y=S1(Z,P);let J=S1(Z,P+2),U,f;P+=4,1&Y?(2&Y?(U=I4(Z,P),f=I4(Z,P+2)):(U=S1(Z,P),f=S1(Z,P+2)),P+=4):2&Y?(U=s0(Z,P++),f=s0(Z,P++)):(U=Z[P++],f=Z[P++]),2&Y?($=U,_=f):($=0,_=0);let K=1,I=1,B=0,j=0;8&Y?(K=I=R5(Z,P),P+=2):64&Y?(K=R5(Z,P),I=R5(Z,P+2),P+=4):128&Y&&(K=R5(Z,P),B=R5(Z,P+2),j=R5(Z,P+4),I=R5(Z,P+6),P+=8);let V=X.glyphs[J];V&&(q.save(),q.transform([K,B,j,I,$,_]),JQ(V,q,X),q.restore())}while(32&Y);else{let J=[],U,f;for(U=0;U<Q;U++)J.push(S1(Z,P)),P+=2;P+=2+S1(Z,P);let K=J.at(-1)+1,I=[];for(;I.length<K;){Y=Z[P++];let j=1;for(8&Y&&(j+=Z[P++]);j-- >0;)I.push({flags:Y})}for(U=0;U<K;U++){switch(18&I[U].flags){case 0:$+=I4(Z,P),P+=2;break;case 2:$-=Z[P++];break;case 18:$+=Z[P++]}I[U].x=$}for(U=0;U<K;U++){switch(36&I[U].flags){case 0:_+=I4(Z,P),P+=2;break;case 4:_-=Z[P++];break;case 36:_+=Z[P++]}I[U].y=_}let B=0;for(P=0;P<Q;P++){let j=J[P],V=I.slice(B,j+1);if(1&V[0].flags)V.push(V[0]);else if(1&V.at(-1).flags)V.unshift(V.at(-1));else{let x={flags:1,x:(V[0].x+V.at(-1).x)/2,y:(V[0].y+V.at(-1).y)/2};V.unshift(x),V.push(x)}for(z(V[0].x,V[0].y),U=1,f=V.length;U<f;U++)1&V[U].flags?R(V[U].x,V[U].y):1&V[U+1].flags?(G(V[U].x,V[U].y,V[U+1].x,V[U+1].y),U++):G(V[U].x,V[U].y,(V[U].x+V[U+1].x)/2,(V[U].y+V[U+1].y)/2);B=j+1}}}function Qq(Z,q,X,z){function R(J,U){_&&q.add("L",_),_=[J,U],q.add("M",[J,U])}function G(J,U){q.add("L",[J,U])}function P(J,U,f,K,I,B){q.add("C",[J,U,f,K,I,B])}let Q=[],Y=0,W=0,$=0,_=null;(function J(U){let f=0;for(;f<U.length;){let K,I,B,j,V,x,M,H,A,T=!1,k=U[f++];switch(k){case 1:case 3:case 18:case 23:$+=Q.length>>1,T=!0;break;case 4:W+=Q.pop(),R(Y,W),T=!0;break;case 5:for(;Q.length>0;)Y+=Q.shift(),W+=Q.shift(),G(Y,W);break;case 6:for(;Q.length>0&&(Y+=Q.shift(),G(Y,W),Q.length!==0);)W+=Q.shift(),G(Y,W);break;case 7:for(;Q.length>0&&(W+=Q.shift(),G(Y,W),Q.length!==0);)Y+=Q.shift(),G(Y,W);break;case 8:for(;Q.length>0;)K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+Q.shift(),P(K,B,I,j,Y,W);break;case 10:if(H=Q.pop(),A=null,X.isCFFCIDFont){let y=X.fdSelect.getFDIndex(z);if(y>=0&&y<X.fdArray.length){let O=X.fdArray[y],D;O.privateDict?.subrsIndex&&(D=O.privateDict.subrsIndex.objects),D&&(H+=Pq(D),A=D[H])}else v("Invalid fd index for glyph index.")}else A=X.subrs[H+X.subrsBias];A&&J(A);break;case 11:return;case 12:switch(k=U[f++],k){case 34:K=Y+Q.shift(),I=K+Q.shift(),V=W+Q.shift(),Y=I+Q.shift(),P(K,W,I,V,Y,V),K=Y+Q.shift(),I=K+Q.shift(),Y=I+Q.shift(),P(K,V,I,W,Y,W);break;case 35:K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+Q.shift(),P(K,B,I,j,Y,W),K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+Q.shift(),P(K,B,I,j,Y,W),Q.pop();break;case 36:K=Y+Q.shift(),V=W+Q.shift(),I=K+Q.shift(),x=V+Q.shift(),Y=I+Q.shift(),P(K,V,I,x,Y,x),K=Y+Q.shift(),I=K+Q.shift(),M=x+Q.shift(),Y=I+Q.shift(),P(K,x,I,M,Y,W);break;case 37:let y=Y,O=W;K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+Q.shift(),P(K,B,I,j,Y,W),K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I,W=j,Math.abs(Y-y)>Math.abs(W-O)?Y+=Q.shift():W+=Q.shift(),P(K,B,I,j,Y,W);break;default:throw new h(`unknown operator: 12 ${k}`)}break;case 14:if(Q.length>=4){let y=Q.pop(),O=Q.pop();W=Q.pop(),Y=Q.pop(),q.save(),q.translate(Y,W);let D=N3(X.cmap,String.fromCharCode(X.glyphNameMap[A4[y]]));Qq(X.glyphs[D.glyphId],q,X,D.glyphId),q.restore(),D=N3(X.cmap,String.fromCharCode(X.glyphNameMap[A4[O]])),Qq(X.glyphs[D.glyphId],q,X,D.glyphId)}return;case 19:case 20:$+=Q.length>>1,f+=$+7>>3,T=!0;break;case 21:W+=Q.pop(),Y+=Q.pop(),R(Y,W),T=!0;break;case 22:Y+=Q.pop(),R(Y,W),T=!0;break;case 24:for(;Q.length>2;)K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+Q.shift(),P(K,B,I,j,Y,W);Y+=Q.shift(),W+=Q.shift(),G(Y,W);break;case 25:for(;Q.length>6;)Y+=Q.shift(),W+=Q.shift(),G(Y,W);K=Y+Q.shift(),B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+Q.shift(),P(K,B,I,j,Y,W);break;case 26:for(Q.length%2&&(Y+=Q.shift());Q.length>0;)K=Y,B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I,W=j+Q.shift(),P(K,B,I,j,Y,W);break;case 27:for(Q.length%2&&(W+=Q.shift());Q.length>0;)K=Y+Q.shift(),B=W,I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j,P(K,B,I,j,Y,W);break;case 28:Q.push(I4(U,f)),f+=2;break;case 29:H=Q.pop()+X.gsubrsBias,A=X.gsubrs[H],A&&J(A);break;case 30:for(;Q.length>0&&(K=Y,B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+(Q.length===1?Q.shift():0),P(K,B,I,j,Y,W),Q.length!==0);)K=Y+Q.shift(),B=W,I=K+Q.shift(),j=B+Q.shift(),W=j+Q.shift(),Y=I+(Q.length===1?Q.shift():0),P(K,B,I,j,Y,W);break;case 31:for(;Q.length>0&&(K=Y+Q.shift(),B=W,I=K+Q.shift(),j=B+Q.shift(),W=j+Q.shift(),Y=I+(Q.length===1?Q.shift():0),P(K,B,I,j,Y,W),Q.length!==0);)K=Y,B=W+Q.shift(),I=K+Q.shift(),j=B+Q.shift(),Y=I+Q.shift(),W=j+(Q.length===1?Q.shift():0),P(K,B,I,j,Y,W);break;default:if(k<32)throw new h(`unknown operator: ${k}`);k<247?Q.push(k-139):k<251?Q.push(256*(k-247)+U[f++]+108):k<255?Q.push(256*-(k-251)-U[f++]-108):(Q.push((U[f]<<24|U[f+1]<<16|U[f+2]<<8|U[f+3])/65536),f+=4)}T&&(Q.length=0)}})(Z)}class UQ{cmds=[];transformStack=[];currentTransform=[1,0,0,1,0,0];add(Z,q){if(q){let{currentTransform:X}=this;for(let z=0,R=q.length;z<R;z+=2)h1.applyTransform(q,X,z);this.cmds.push(`${Z}${q.join(" ")}`)}else this.cmds.push(Z)}transform(Z){this.currentTransform=h1.transform(this.currentTransform,Z)}translate(Z,q){this.transform([1,0,0,1,Z,q])}save(){this.transformStack.push(this.currentTransform.slice())}restore(){this.currentTransform=this.transformStack.pop()||[1,0,0,1,0,0]}getSVG(){return this.cmds.join("")}}class fX{constructor(Z){this.fontMatrix=Z,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(Z){let{charCode:q,glyphId:X}=N3(this.cmap,Z),z,R=this.compiledGlyphs[X];if(R===void 0){try{R=this.compileGlyph(this.glyphs[X],X)}catch(G){R="",z=G}this.compiledGlyphs[X]=R}if(this.compiledCharCodeToGlyphId[q]??=X,z)throw z;return R}compileGlyph(Z,q){if(!Z?.length||Z[0]===14)return"";let X=this.fontMatrix;if(this.isCFFCIDFont){let R=this.fdSelect.getFDIndex(q);if(R>=0&&R<this.fdArray.length)X=this.fdArray[R].getByName("FontMatrix")||x5;else v("Invalid fd index for glyph index.")}t1(e8(X,6),"Expected a valid fontMatrix.");let z=new UQ;return z.transform(X.slice()),this.compileGlyphImpl(Z,z,q),z.add("Z"),z.getSVG()}compileGlyphImpl(){y1("Children classes should implement this.")}hasBuiltPath(Z){let{charCode:q,glyphId:X}=N3(this.cmap,Z);return this.compiledGlyphs[X]!==void 0&&this.compiledCharCodeToGlyphId[q]!==void 0}}class BQ{static create(Z,q){let X=new Uint8Array(Z.data),z,R,G,P,Q,Y,W=S1(X,4);for(let $=0,_=12;$<W;$++,_+=16){let J=$0(X.subarray(_,_+4)),U=n1(X,_+8),f=n1(X,_+12);switch(J){case"cmap":z=oI(X,U);break;case"glyf":R=X.subarray(U,U+f);break;case"loca":G=X.subarray(U,U+f);break;case"head":Y=S1(X,U+18),Q=S1(X,U+50);break;case"CFF ":P=aI(X,U,U+f,q)}}if(R){let $=Y?[1/Y,0,0,1/Y,0,0]:Z.fontMatrix;return new fQ(function(_,J,U){let f,K;U?(f=4,K=n1):(f=2,K=(j,V)=>2*S1(j,V));let I=[],B=K(J,0);for(let j=f;j<J.length;j+=f){let V=K(J,j);I.push(_.subarray(B,V)),B=V}return I}(R,G,Q),z,$)}return new KQ(P,z,Z.fontMatrix)}}class IQ{constructor({glyfTable:Z,isGlyphLocationsLong:q,locaTable:X,numGlyphs:z}){this.glyphs=[];let R=new DataView(X.buffer,X.byteOffset,X.byteLength),G=new DataView(Z.buffer,Z.byteOffset,Z.byteLength),P=q?4:2,Q=q?R.getUint32(0):2*R.getUint16(0),Y=0;for(let W=0;W<z;W++){Y+=P;let $=q?R.getUint32(Y):2*R.getUint16(Y);if($===Q){this.glyphs.push(new y7({}));continue}let _=y7.parse(Q,G);this.glyphs.push(_),Q=$}}getSize(){return Math.sumPrecise(this.glyphs.map((Z)=>Z.getSize()+3&-4))}write(){let Z=this.getSize(),q=new DataView(new ArrayBuffer(Z)),X=Z>131070,z=X?4:2,R=new DataView(new ArrayBuffer((this.glyphs.length+1)*z));X?R.setUint32(0,0):R.setUint16(0,0);let G=0,P=0;for(let Q of this.glyphs)G+=Q.write(G,q),G=G+3&-4,P+=z,X?R.setUint32(P,G):R.setUint16(P,G>>1);return{isLocationLong:X,loca:new Uint8Array(R.buffer),glyf:new Uint8Array(q.buffer)}}scale(Z){for(let q=0,X=this.glyphs.length;q<X;q++)this.glyphs[q].scale(Z[q])}}class y7{constructor({header:Z=null,simple:q=null,composites:X=null}){this.header=Z,this.simple=q,this.composites=X}static parse(Z,q){let[X,z]=KX.parse(Z,q);if(Z+=X,z.numberOfContours<0){let G=[];for(;;){let[P,Q]=IX.parse(Z,q);if(Z+=P,G.push(Q),!(32&Q.flags))break}return new y7({header:z,composites:G})}let R=BX.parse(Z,q,z.numberOfContours);return new y7({header:z,simple:R})}getSize(){if(!this.header)return 0;let Z=this.simple?this.simple.getSize():Math.sumPrecise(this.composites.map((q)=>q.getSize()));return this.header.getSize()+Z}write(Z,q){if(!this.header)return 0;let X=Z;if(Z+=this.header.write(Z,q),this.simple)Z+=this.simple.write(Z,q);else for(let z of this.composites)Z+=z.write(Z,q);return Z-X}scale(Z){if(!this.header)return;let q=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(q,Z),this.simple)this.simple.scale(q,Z);else for(let X of this.composites)X.scale(q,Z)}}class KX{constructor({numberOfContours:Z,xMin:q,yMin:X,xMax:z,yMax:R}){this.numberOfContours=Z,this.xMin=q,this.yMin=X,this.xMax=z,this.yMax=R}static parse(Z,q){return[10,new KX({numberOfContours:q.getInt16(Z),xMin:q.getInt16(Z+2),yMin:q.getInt16(Z+4),xMax:q.getInt16(Z+6),yMax:q.getInt16(Z+8)})]}getSize(){return 10}write(Z,q){return q.setInt16(Z,this.numberOfContours),q.setInt16(Z+2,this.xMin),q.setInt16(Z+4,this.yMin),q.setInt16(Z+6,this.xMax),q.setInt16(Z+8,this.yMax),10}scale(Z,q){this.xMin=Math.round(Z+(this.xMin-Z)*q),this.xMax=Math.round(Z+(this.xMax-Z)*q)}}class jQ{constructor({flags:Z,xCoordinates:q,yCoordinates:X}){this.xCoordinates=q,this.yCoordinates=X,this.flags=Z}}class BX{constructor({contours:Z,instructions:q}){this.contours=Z,this.instructions=q}static parse(Z,q,X){let z=[];for(let K=0;K<X;K++){let I=q.getUint16(Z);Z+=2,z.push(I)}let R=z[X-1]+1,G=q.getUint16(Z);Z+=2;let P=new Uint8Array(q).slice(Z,Z+G);Z+=G;let Q=[];for(let K=0;K<R;Z++,K++){let I=q.getUint8(Z);if(Q.push(I),8&I){let B=q.getUint8(++Z);I^=8;for(let j=0;j<B;j++)Q.push(I);K+=B}}let Y=[],W=[],$=[],_=[],J=[],U=0,f=0;for(let K=0;K<R;K++){let I=Q[K];if(2&I){let B=q.getUint8(Z++);f+=16&I?B:-B,W.push(f)}else 16&I||(f+=q.getInt16(Z),Z+=2),W.push(f);z[U]===K&&(U++,Y.push(W),W=[])}f=0,U=0;for(let K=0;K<R;K++){let I=Q[K];if(4&I){let B=q.getUint8(Z++);f+=32&I?B:-B,$.push(f)}else 32&I||(f+=q.getInt16(Z),Z+=2),$.push(f);_.push(1&I|64&I),z[U]===K&&(W=Y[U],U++,J.push(new jQ({flags:_,xCoordinates:W,yCoordinates:$})),$=[],_=[])}return new BX({contours:J,instructions:P})}getSize(){let Z=2*this.contours.length+2+this.instructions.length,q=0,X=0;for(let z of this.contours){Z+=z.flags.length;for(let R=0,G=z.xCoordinates.length;R<G;R++){let P=z.xCoordinates[R],Q=z.yCoordinates[R],Y=Math.abs(P-q);Y>255?Z+=2:Y>0&&(Z+=1),q=P,Y=Math.abs(Q-X),Y>255?Z+=2:Y>0&&(Z+=1),X=Q}}return Z}write(Z,q){let X=Z,z=[],R=[],G=[],P=0,Q=0;for(let Y of this.contours){for(let W=0,$=Y.xCoordinates.length;W<$;W++){let _=Y.flags[W],J=Y.xCoordinates[W],U=J-P;if(U===0)_|=16,z.push(0);else{let K=Math.abs(U);K<=255?(_|=U>=0?18:2,z.push(K)):z.push(U)}P=J;let f=Y.yCoordinates[W];if(U=f-Q,U===0)_|=32,R.push(0);else{let K=Math.abs(U);K<=255?(_|=U>=0?36:4,R.push(K)):R.push(U)}Q=f,G.push(_)}q.setUint16(Z,z.length-1),Z+=2}q.setUint16(Z,this.instructions.length),Z+=2,this.instructions.length&&(new Uint8Array(q.buffer,0,q.buffer.byteLength).set(this.instructions,Z),Z+=this.instructions.length);for(let Y of G)q.setUint8(Z++,Y);for(let Y=0,W=z.length;Y<W;Y++){let $=z[Y],_=G[Y];2&_?q.setUint8(Z++,$):16&_||(q.setInt16(Z,$),Z+=2)}for(let Y=0,W=R.length;Y<W;Y++){let $=R[Y],_=G[Y];4&_?q.setUint8(Z++,$):32&_||(q.setInt16(Z,$),Z+=2)}return Z-X}scale(Z,q){for(let X of this.contours)if(X.xCoordinates.length!==0)for(let z=0,R=X.xCoordinates.length;z<R;z++)X.xCoordinates[z]=Math.round(Z+(X.xCoordinates[z]-Z)*q)}}class IX{constructor({flags:Z,glyphIndex:q,argument1:X,argument2:z,transf:R,instructions:G}){this.flags=Z,this.glyphIndex=q,this.argument1=X,this.argument2=z,this.transf=R,this.instructions=G}static parse(Z,q){let X=Z,z=[],R=q.getUint16(Z),G=q.getUint16(Z+2),P,Q;Z+=4,1&R?(2&R?(P=q.getInt16(Z),Q=q.getInt16(Z+2)):(P=q.getUint16(Z),Q=q.getUint16(Z+2)),Z+=4,R^=1):(2&R?(P=q.getInt8(Z),Q=q.getInt8(Z+1)):(P=q.getUint8(Z),Q=q.getUint8(Z+1)),Z+=2),8&R?(z.push(q.getUint16(Z)),Z+=2):64&R?(z.push(q.getUint16(Z),q.getUint16(Z+2)),Z+=4):128&R&&(z.push(q.getUint16(Z),q.getUint16(Z+2),q.getUint16(Z+4),q.getUint16(Z+6)),Z+=8);let Y=null;if(256&R){let W=q.getUint16(Z);Z+=2,Y=new Uint8Array(q).slice(Z,Z+W),Z+=W}return[Z-X,new IX({flags:R,glyphIndex:G,argument1:P,argument2:Q,transf:z,instructions:Y})]}getSize(){let Z=4+2*this.transf.length;return 256&this.flags&&(Z+=2+this.instructions.length),Z+=2,2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(Z+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(Z+=2),Z}write(Z,q){let X=Z;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),q.setUint16(Z,this.flags),q.setUint16(Z+2,this.glyphIndex),Z+=4,1&this.flags?(2&this.flags?(q.setInt16(Z,this.argument1),q.setInt16(Z+2,this.argument2)):(q.setUint16(Z,this.argument1),q.setUint16(Z+2,this.argument2)),Z+=4):(q.setUint8(Z,this.argument1),q.setUint8(Z+1,this.argument2),Z+=2),256&this.flags&&(q.setUint16(Z,this.instructions.length),Z+=2,this.instructions.length&&(new Uint8Array(q.buffer,0,q.buffer.byteLength).set(this.instructions,Z),Z+=this.instructions.length)),Z-X}scale(Z,q){}}function T2(Z,q,X){Z[q]=X>>8&255,Z[q+1]=255&X}function i9(Z,q,X){Z[q]=X>>24&255,Z[q+1]=X>>16&255,Z[q+2]=X>>8&255,Z[q+3]=255&X}function tI(Z,q,X){if(X instanceof Uint8Array)Z.set(X,q);else if(typeof X=="string")for(let z=0,R=X.length;z<R;z++)Z[q++]=255&X.charCodeAt(z);else for(let z of X)Z[q++]=255&z}class p7{constructor(Z){this.sfnt=Z,this.tables=Object.create(null)}static getSearchParams(Z,q){let X=1,z=0;for(;(X^Z)>X;)X<<=1,z++;let R=X*q;return{range:R,entry:z,rangeShift:q*Z-R}}toArray(){let Z=this.sfnt,q=this.tables,X=Object.keys(q);X.sort();let z=X.length,R,G,P,Q,Y,W=12+16*z,$=[W];for(R=0;R<z;R++)Q=q[X[R]],W+=(Q.length+3&-4)>>>0,$.push(W);let _=new Uint8Array(W);for(R=0;R<z;R++)Q=q[X[R]],tI(_,$[R],Q);Z==="true"&&(Z=D8(65536)),_[0]=255&Z.charCodeAt(0),_[1]=255&Z.charCodeAt(1),_[2]=255&Z.charCodeAt(2),_[3]=255&Z.charCodeAt(3),T2(_,4,z);let J=p7.getSearchParams(z,16);for(T2(_,6,J.range),T2(_,8,J.entry),T2(_,10,J.rangeShift),W=12,R=0;R<z;R++){Y=X[R],_[W]=255&Y.charCodeAt(0),_[W+1]=255&Y.charCodeAt(1),_[W+2]=255&Y.charCodeAt(2),_[W+3]=255&Y.charCodeAt(3);let U=0;for(G=$[R],P=$[R+1];G<P;G+=4)U=U+n1(_,G)>>>0;i9(_,W+4,U),i9(_,W+8,$[R]),i9(_,W+12,q[Y].length),W+=16}return _}addTable(Z,q){if(Z in this.tables)throw Error("Table "+Z+" already exists");this.tables[Z]=q}}class VQ{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(Z,q,X){let z=Z.length,R,G,P,Q=!1;for(let Y=0;Y<z;Y++){let W=Z[Y];if(W<32){switch(W===12&&(W=(W<<8)+Z[++Y]),W){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){Q=!0;break}let f=this.stack.pop();this.stack.push(0,f);break}Q=this.executeCommand(1,eI);break;case 5:Q=this.executeCommand(2,Zj);break;case 6:Q=this.executeCommand(1,qj);break;case 7:Q=this.executeCommand(1,Xj);break;case 8:Q=this.executeCommand(6,zj);break;case 10:if(this.stack.length<1){Q=!0;break}if(P=this.stack.pop(),!q[P]){Q=!0;break}Q=this.convert(q[P],q,X);break;case 11:return Q;case 13:if(this.stack.length<2){Q=!0;break}R=this.stack.pop(),G=this.stack.pop(),this.lsb=G,this.width=R,this.stack.push(R,G),Q=this.executeCommand(2,xR);break;case 14:this.output.push(t9[0]);break;case 21:if(this.flexing)break;Q=this.executeCommand(2,HR);break;case 22:if(this.flexing){this.stack.push(0);break}Q=this.executeCommand(1,xR);break;case 30:Q=this.executeCommand(4,Gj);break;case 31:Q=this.executeCommand(4,Pj);break;case 3078:if(X){let f=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-f,Q=this.executeCommand(0,t9)}else Q=this.executeCommand(4,t9);break;case 3079:if(this.stack.length<4){Q=!0;break}this.stack.pop(),R=this.stack.pop();let $=this.stack.pop();G=this.stack.pop(),this.lsb=G,this.width=R,this.stack.push(R,G,$),Q=this.executeCommand(3,HR);break;case 3084:if(this.stack.length<2){Q=!0;break}let _=this.stack.pop(),J=this.stack.pop();this.stack.push(J/_);break;case 3088:if(this.stack.length<2){Q=!0;break}P=this.stack.pop();let U=this.stack.pop();if(P===0&&U===3){let f=this.stack.splice(-17,17);this.stack.push(f[2]+f[0],f[3]+f[1],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14]),Q=this.executeCommand(13,Rj,!0),this.flexing=!1,this.stack.push(f[15],f[16])}else P===1&&U===0&&(this.flexing=!0);break;case 3089:break;default:v('Unknown type 1 charstring command of "'+W+'"')}if(Q)break}else W<=246?W-=139:W=W<=250?256*(W-247)+Z[++Y]+108:W<=254?-256*(W-251)-Z[++Y]-108:(255&Z[++Y])<<24|(255&Z[++Y])<<16|(255&Z[++Y])<<8|255&Z[++Y],this.stack.push(W)}return Q}executeCommand(Z,q,X){let z=this.stack.length;if(Z>z)return!0;let R=z-Z;for(let G=R;G<z;G++){let P=this.stack[G];Number.isInteger(P)?this.output.push(28,P>>8&255,255&P):(P=65536*P|0,this.output.push(255,P>>24&255,P>>16&255,P>>8&255,255&P))}return this.output.push(...q),X?this.stack.splice(R,Z):this.stack.length=0,!1}}function c0(Z){return Z>=48&&Z<=57||Z>=65&&Z<=70||Z>=97&&Z<=102}function MR(Z,q,X){if(X>=Z.length)return new Uint8Array(0);let z,R,G=0|q;for(z=0;z<X;z++)G=52845*(Z[z]+G)+22719&65535;let P=Z.length-X,Q=new Uint8Array(P);for(z=X,R=0;R<P;z++,R++){let Y=Z[z];Q[R]=Y^G>>8,G=52845*(Y+G)+22719&65535}return Q}function AR(Z){return Z===47||Z===91||Z===93||Z===123||Z===125||Z===40||Z===41}class Yq{constructor(Z,q,X){if(q){let z=Z.getBytes(),R=!((c0(z[0])||M0(z[0]))&&c0(z[1])&&c0(z[2])&&c0(z[3])&&c0(z[4])&&c0(z[5])&&c0(z[6])&&c0(z[7]));Z=new W8(R?MR(z,55665,4):function(G,P,Q){let Y=0|P,W=G.length,$=new Uint8Array(W>>>1),_,J;for(_=0,J=0;_<W;_++){let U=G[_];if(!c0(U))continue;let f;for(_++;_<W&&!c0(f=G[_]);)_++;if(_<W){let K=parseInt(String.fromCharCode(U,f),16);$[J++]=K^Y>>8,Y=52845*(K+Y)+22719&65535}}return $.slice(Q,J)}(z,55665,4))}this.seacAnalysisEnabled=!!X,this.stream=Z,this.nextChar()}readNumberArray(){this.getToken();let Z=[];for(;;){let q=this.getToken();if(q===null||q==="]"||q==="}")break;Z.push(parseFloat(q||0))}return Z}readNumber(){let Z=this.getToken();return parseFloat(Z||0)}readInt(){let Z=this.getToken();return 0|parseInt(Z||0,10)}readBoolean(){return this.getToken()==="true"?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let Z=!1,q=this.currentChar;for(;;){if(q===-1)return null;if(Z)q!==10&&q!==13||(Z=!1);else if(q===37)Z=!0;else if(!M0(q))break;q=this.nextChar()}if(AR(q))return this.nextChar(),String.fromCharCode(q);let X="";do X+=String.fromCharCode(q),q=this.nextChar();while(q>=0&&!M0(q)&&!AR(q));return X}readCharStrings(Z,q){return q===-1?Z:MR(Z,4330,q)}extractFontProgram(Z){let q=this.stream,X=[],z=[],R=Object.create(null);R.lenIV=4;let G={subrs:[],charstrings:[],properties:{privateData:R}},P,Q,Y,W;for(;(P=this.getToken())!==null;)if(P==="/")switch(P=this.getToken(),P){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();P=this.getToken(),P!==null&&P!=="end";){if(P!=="/")continue;let _=this.getToken();Q=this.readInt(),this.getToken(),Y=Q>0?q.getBytes(Q):new Uint8Array(0),W=G.properties.privateData.lenIV;let J=this.readCharStrings(Y,W);this.nextChar(),P=this.getToken(),P==="noaccess"?this.getToken():P==="/"&&this.prevChar(),z.push({glyph:_,encoded:J})}break;case"Subrs":for(this.readInt(),this.getToken();this.getToken()==="dup";){let _=this.readInt();Q=this.readInt(),this.getToken(),Y=Q>0?q.getBytes(Q):new Uint8Array(0),W=G.properties.privateData.lenIV;let J=this.readCharStrings(Y,W);this.nextChar(),P=this.getToken(),P==="noaccess"&&this.getToken(),X[_]=J}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":let $=this.readNumberArray();$.length>0&&$.length;break;case"StemSnapH":case"StemSnapV":G.properties.privateData[P]=this.readNumberArray();break;case"StdHW":case"StdVW":G.properties.privateData[P]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":G.properties.privateData[P]=this.readNumber();break;case"ExpansionFactor":G.properties.privateData[P]=this.readNumber()||0.06;break;case"ForceBold":G.properties.privateData[P]=this.readBoolean()}for(let{encoded:$,glyph:_}of z){let J=new VQ,U=J.convert($,X,this.seacAnalysisEnabled),f=J.output;U&&(f=[14]);let K={glyphName:_,charstring:f,width:J.width,lsb:J.lsb,seac:J.seac};if(_===".notdef"?G.charstrings.unshift(K):G.charstrings.push(K),Z.builtInEncoding){let I=Z.builtInEncoding.indexOf(_);I>-1&&Z.widths[I]===void 0&&I>=Z.firstChar&&I<=Z.lastChar&&(Z.widths[I]=J.width)}}return G}extractFontHeader(Z){let q;for(;(q=this.getToken())!==null;)if(q==="/")switch(q=this.getToken(),q){case"FontMatrix":let X=this.readNumberArray();Z.fontMatrix=X;break;case"Encoding":let z=this.getToken(),R;if(/^\d+$/.test(z)){R=[];let P=0|parseInt(z,10);this.getToken();for(let Q=0;Q<P;Q++){for(q=this.getToken();q!=="dup"&&q!=="def";)if(q=this.getToken(),q===null)return;if(q==="def")break;let Y=this.readInt();this.getToken();let W=this.getToken();R[Y]=W,this.getToken()}}else R=v7(z);Z.builtInEncoding=R;break;case"FontBBox":let G=this.readNumberArray();Z.ascent=Math.max(G[3],G[1]),Z.descent=Math.min(G[1],G[3]),Z.ascentScaled=!0}}}function LR(Z,q,X){let z=Z.length,R=q.length,G=z-R,P=X,Q=!1;for(;P<G;){let Y=0;for(;Y<R&&Z[P+Y]===q[Y];)Y++;if(Y>=R){for(P+=Y;P<z&&M0(Z[P]);)P++;Q=!0;break}P++}return{found:Q,length:P}}class HQ{constructor(Z,q,X){let z=X.length1;X.length2;let R=q.peekBytes(6),G=R[0]===128&&R[1]===1;G&&(q.skip(6),z=R[5]<<24|R[4]<<16|R[3]<<8|R[2]);let P=function(J,U){let f=[101,101,120,101,99],K=J.pos,I,B,j,V;try{I=J.getBytes(U),B=I.length}catch{}if(B===U&&(j=LR(I,f,U-2*f.length),j.found&&j.length===U))return{stream:new W8(I),length:U};for(v('Invalid "Length1" property in Type1 font -- trying to recover.'),J.pos=K;j=LR(J.peekBytes(2048),f,0),j.length!==0;)if(J.pos+=j.length,j.found){V=J.pos-K;break}return J.pos=K,V?{stream:new W8(J.getBytes(V)),length:V}:(v('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new W8(J.getBytes(U)),length:U})}(q,z);new Yq(P.stream,!1,b7).extractFontHeader(X),G&&(R=q.getBytes(6),R[5],R[4],R[3],R[2]);let Q=function(J){let U=J.getBytes();if(U.length===0)throw new h("getEexecBlock - no font program found.");return{stream:new W8(U),length:U.length}}(q),Y=new Yq(Q.stream,!0,b7).extractFontProgram(X);for(let J in Y.properties)X[J]=Y.properties[J];let W=Y.charstrings,$=this.getType2Charstrings(W),_=this.getType2Subrs(Y.subrs);this.charstrings=W,this.data=this.wrap(Z,$,this.charstrings,_,X),this.seacs=this.getSeacs(Y.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){let Z=[".notdef"];for(let{glyphName:q}of this.charstrings)Z.push(q);return Z}getGlyphMapping(Z){let q=this.charstrings;if(Z.composite){let P=Object.create(null);for(let Q=0,Y=q.length;Q<Y;Q++)P[Z.cMap.charCodeOf(Q)]=Q+1;return P}let X=[".notdef"],z,R;for(R=0;R<q.length;R++)X.push(q[R].glyphName);let G=Z.builtInEncoding;if(G){z=Object.create(null);for(let P in G)R=X.indexOf(G[P]),R>=0&&(z[P]=R)}return WQ(Z,z,X)}hasGlyphId(Z){if(Z<0||Z>=this.numGlyphs)return!1;if(Z===0)return!0;return this.charstrings[Z-1].charstring.length>0}getSeacs(Z){let q=[];for(let X=0,z=Z.length;X<z;X++){let R=Z[X];R.seac&&(q[X+1]=R.seac)}return q}getType2Charstrings(Z){let q=[];for(let X of Z)q.push(X.charstring);return q}getType2Subrs(Z){let q=0,X=Z.length;q=X<1133?107:X<33769?1131:32768;let z=[],R;for(R=0;R<q;R++)z.push([11]);for(R=0;R<X;R++)z.push(Z[R]);return z}wrap(Z,q,X,z,R){let G=new $X;G.header=new _X(1,0,4,4),G.names=[Z];let P=new S7;P.setByName("version",391),P.setByName("Notice",392),P.setByName("FullName",393),P.setByName("FamilyName",394),P.setByName("Weight",395),P.setByName("Encoding",null),P.setByName("FontMatrix",R.fontMatrix),P.setByName("FontBBox",R.bbox),P.setByName("charset",null),P.setByName("CharStrings",null),P.setByName("Private",null),G.topDict=P;let Q=new P9;Q.add("Version 0.11"),Q.add("See original notice"),Q.add(Z),Q.add(Z),Q.add("Medium"),G.strings=Q,G.globalSubrIndex=new H4;let Y=q.length,W=[".notdef"],$,_;for($=0;$<Y;$++){let I=X[$].glyphName;s2.indexOf(I)===-1&&Q.add(I),W.push(I)}G.charset=new Z6(!1,0,W);let J=new H4;for(J.add([139,14]),$=0;$<Y;$++)J.add(q[$]);G.charStrings=J;let U=new m7;U.setByName("Subrs",null);let f=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for($=0,_=f.length;$<_;$++){let I=f[$];if(!(I in R.privateData))continue;let B=R.privateData[I];if(Array.isArray(B))for(let j=B.length-1;j>0;j--)B[j]-=B[j-1];U.setByName(I,B)}G.topDict.privateDict=U;let K=new H4;for($=0,_=z.length;$<_;$++)K.add(z[$]);return U.subrsIndex=K,new e7(G).compile()}}function kR(Z){if(!Z.fontMatrix)return;if(Z.fontMatrix[0]===x5[0])return;let q=0.001/Z.fontMatrix[0],X=Z.widths;for(let z in X)X[z]*=q;Z.defaultWidth*=q}function TR(Z){if(!Z.fallbackToUnicode)return;if(Z.toUnicode instanceof j0)return;let q=[];for(let X in Z.fallbackToUnicode)Z.toUnicode.has(X)||(q[X]=Z.fallbackToUnicode[X]);q.length>0&&Z.toUnicode.amend(q)}class xQ{constructor(Z,q,X,z,R,G,P,Q,Y){this.originalCharCode=Z,this.fontChar=q,this.unicode=X,this.accent=z,this.width=R,this.vmetric=G,this.operatorListId=P,this.isSpace=Q,this.isInFont=Y}get category(){return X1(this,"category",function(Z){let q=qq.get(Z);if(q)return q;let X=Z.match(DI),z={isWhitespace:!!X?.[1],isZeroWidthDiacritic:!!X?.[2],isInvisibleFormatMark:!!X?.[3]};return qq.set(Z,z),z}(this.unicode),!0)}}function G5(Z,q){return(Z<<8)+q}function E6(Z,q,X){Z[q+1]=X,Z[q]=X>>>8}function f0(Z,q){let X=(Z<<8)+q;return 32768&X?X-65536:X}function l1(Z){return String.fromCharCode(Z>>8&255,255&Z)}function P5(Z){return Z>32767?Z=32767:Z<-32768&&(Z=-32768),String.fromCharCode(Z>>8&255,255&Z)}function MQ(Z){return $0(Z.peekBytes(4))==="ttcf"}function Wj(Z,{type:q,subtype:X,composite:z}){let R,G;return function(P){let Q=P.peekBytes(4);return n1(Q,0)===65536||$0(Q)==="true"}(Z)||MQ(Z)?R=z?"CIDFontType2":"TrueType":!function(P){return $0(P.peekBytes(4))==="OTTO"}(Z)?!function(P){let Q=P.peekBytes(2);return Q[0]===37&&Q[1]===33||Q[0]===128&&Q[1]===1}(Z)?!function(P){let Q=P.peekBytes(4);return Q[0]>=1&&Q[3]>=1&&Q[3]<=4}(Z)?(v("getFontFileType: Unable to detect correct font file Type/Subtype."),R=q,G=X):z?(R="CIDFontType0",G="CIDFontType0C"):(R=q==="MMType1"?"MMType1":"Type1",G="Type1C"):R=z?"CIDFontType0":q==="MMType1"?"MMType1":"Type1":R=z?"CIDFontType2":"OpenType",[R,G]}function N2(Z,q){for(let X in q)Z[+X]=q[X]}function e9(Z,q,X){let z=[],R;for(let G=0,P=Z.length;G<P;G++)R=V6(Z[G],q),R!==-1&&(z[G]=R);for(let G in X)R=V6(X[G],q),R!==-1&&(z[+G]=R);return z}function $j(Z){return Z.platform===1&&Z.encoding===0&&Z.language===0}function NR(Z){return Z.platform===3&&Z.encoding===1&&Z.language===1033}function ZZ(Z,q,X=!1){switch(q.length){case 1:return q.charCodeAt(0);case 2:return q.charCodeAt(0)<<8|q.charCodeAt(1)}let z=`Unsupported CID string (charCode ${Z}): "${q}".`;if(X)throw new h(z);return v(z),q}function CR(Z,q,X,z){let R=Object.create(null),G=new Map,P=[],Q=new Set,Y=0,W=Y4[Y][0],$=Y4[Y][1],_=(U)=>Y4[0][0]<=U&&U<=Y4[0][1]||Y4[1][0]<=U&&U<=Y4[1][1],J=null;for(let U in Z){let f=Z[U];if(!q(f))continue;if(W>$){if(Y++,Y>=Y4.length){v("Ran out of space in font private use area.");break}W=Y4[Y][0],$=Y4[Y][1]}let K=W++;f===0&&(f=X);let I=z.get(U);if(typeof I=="string")if(I.length===1)I=I.codePointAt(0);else{if(!J){J=new Map;for(let B=64256;B<=64335;B++){let j=String.fromCharCode(B).normalize("NFKD");j.length>1&&J.set(j,B)}}I=J.get(I)||I.codePointAt(0)}!I||_(I)||Q.has(f)||(G.set(I,f),Q.add(f)),R[K]=f,P[U]=K}return{toFontChar:P,charCodeToGlyphId:R,toUnicodeExtraMap:G,nextAvailableFontCharCode:W}}function FR(Z,q,X){let z=function(O,D,n){let b=[];for(let L in O)O[L]>=n||b.push({fontCharCode:0|L,glyphId:O[L]});if(D)for(let[L,m]of D)m>=n||b.push({fontCharCode:L,glyphId:m});b.length===0&&b.push({fontCharCode:0,glyphId:0}),b.sort((L,m)=>L.fontCharCode-m.fontCharCode);let l=[],N=b.length;for(let L=0;L<N;){let m=b[L].fontCharCode,d=[b[L].glyphId];++L;let e=m;for(;L<N&&e+1===b[L].fontCharCode&&(d.push(b[L].glyphId),++e,++L,e!==65535););l.push([m,e,d])}return l}(Z,q,X),R=z.at(-1)[1]>65535?2:1,G,P,Q,Y,W="\x00\x00"+l1(R)+"\x00\x03\x00\x01"+D8(4+8*R);for(G=z.length-1;G>=0&&!(z[G][0]<=65535);--G);let $=G+1;z[G][0]<65535&&z[G][1]===65535&&(z[G][1]=65534);let _=z[G][1]<65535?1:0,J=$+_,U=p7.getSearchParams(J,2),f,K,I,B,j="",V="",x="",M="",H="",A=0;for(G=0,P=$;G<P;G++){f=z[G],K=f[0],I=f[1],j+=l1(K),V+=l1(I),B=f[2];let O=!0;for(Q=1,Y=B.length;Q<Y;++Q)if(B[Q]!==B[Q-1]+1){O=!1;break}if(O)x+=l1(B[0]-K&65535),M+=l1(0);else{let D=2*(J-G)+2*A;for(A+=I-K+1,x+=l1(0),M+=l1(D),Q=0,Y=B.length;Q<Y;++Q)H+=l1(B[Q])}}_>0&&(V+="ÿÿ",j+="ÿÿ",x+="\x00\x01",M+="\x00\x00");let T="\x00\x00"+l1(2*J)+l1(U.range)+l1(U.entry)+l1(U.rangeShift)+V+"\x00\x00"+j+x+M+H,k="",y="";if(R>1){for(W+=`\x00\x03\x00
|
|
4
|
-
`+D8(4+8*R+4+T.length),k="",G=0,P=z.length;G<P;G++){f=z[G],K=f[0],B=f[2];let O=B[0];for(Q=1,Y=B.length;Q<Y;++Q)B[Q]!==B[Q-1]+1&&(I=f[0]+Q-1,k+=D8(K)+D8(I)+D8(O),K=I+1,O=B[Q]);k+=D8(K)+D8(f[1])+D8(O)}y="\x00\f\x00\x00"+D8(k.length+16)+"\x00\x00\x00\x00"+D8(k.length/12)}return W+"\x00\x04"+l1(T.length+4)+T+y+k}function vR(Z,q,X){X||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let z=0,R=0,G=0,P=0,Q=null,Y=0,W=-1;if(q){for(let B in q)if(B|=0,(Q>B||!Q)&&(Q=B),Y<B&&(Y=B),W=pI(B,W),W<32)z|=1<<W;else if(W<64)R|=1<<W-32;else if(W<96)G|=1<<W-64;else{if(!(W<123))throw new h("Unicode ranges Bits > 123 are reserved for internal usage");P|=1<<W-96}Y>65535&&(Y=65535)}else Q=0,Y=255;let $=Z.bbox||[0,0,0,0],_=X.unitsPerEm||(Z.fontMatrix?1/Math.max(...Z.fontMatrix.slice(0,4).map(Math.abs)):1000),J=Z.ascentScaled?1:_/W5,U=X.ascent||Math.round(J*(Z.ascent||$[3])),f=X.descent||Math.round(J*(Z.descent||$[1]));f>0&&Z.descent>0&&$[1]<0&&(f=-f);let K=X.yMax||U,I=-X.yMin||-f;return"\x00\x03\x02$\x01ô\x00\x05\x00\x00\x02\x02»\x00\x00\x00\x02\x02»\x00\x00\x01ß\x001\x01\x02\x00\x00\x00\x00\x06"+String.fromCharCode(Z.fixedPitch?9:0)+"\x00\x00\x00\x00\x00\x00"+D8(z)+D8(R)+D8(G)+D8(P)+"*21*"+l1(Z.italicAngle?1:0)+l1(Q||Z.firstChar)+l1(Y||Z.lastChar)+l1(U)+l1(f)+"\x00d"+l1(K)+l1(I)+"\x00\x00\x00\x00\x00\x00\x00\x00"+l1(Z.xHeight)+l1(Z.capHeight)+l1(0)+l1(Q||Z.firstChar)+"\x00\x03"}function bR(Z){return"\x00\x03\x00\x00"+D8(Math.floor(65536*Z.italicAngle))+"\x00\x00\x00\x00"+D8(Z.fixedPitch?1:0)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}function _j(Z){return Z.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function qZ(Z,q){q||(q=[[],[]]);let X=[q[0][0]||"Original licence",q[0][1]||Z,q[0][2]||"Unknown",q[0][3]||"uniqueID",q[0][4]||Z,q[0][5]||"Version 0.11",q[0][6]||_j(Z),q[0][7]||"Unknown",q[0][8]||"Unknown",q[0][9]||"Unknown"],z=[],R,G,P,Q,Y;for(R=0,G=X.length;R<G;R++){Y=q[1][R]||X[R];let I=[];for(P=0,Q=Y.length;P<Q;P++)I.push(l1(Y.charCodeAt(P)));z.push(I.join(""))}let W=[X,z],$=["\x00\x01","\x00\x03"],_=["\x00\x00","\x00\x01"],J=["\x00\x00","\x04\t"],U=X.length*$.length,f="\x00\x00"+l1(U)+l1(12*U+6),K=0;for(R=0,G=$.length;R<G;R++){let I=W[R];for(P=0,Q=I.length;P<Q;P++)Y=I[P],f+=$[R]+_[R]+J[R]+l1(P)+l1(Y.length)+l1(K),K+=Y.length}return f+=X.join("")+z.join(""),f}class Wq{constructor(Z,q,X,z){this.name=Z,this.psName=null,this.mimetype=null,this.disableFontFace=z.disableFontFace,this.fontExtraProperties=z.fontExtraProperties,this.loadedName=X.loadedName,this.isType3Font=X.isType3Font,this.missingFile=!1,this.cssFontInfo=X.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let R=!!(X.flags&QQ);if(!R&&!X.isSimulatedFlags){let W=O7(),$=Rq(),_=UX();for(let J of Z.split("+")){let U=J.replaceAll(/[,_]/g,"-");if(U=W[U]||$[U]||U,U=U.split("-",1)[0],_[U]){R=!0;break}}}this.isSerifFont=R,this.isSymbolicFont=!!(X.flags&T3),this.isMonospace=!!(X.flags&Xq);let{type:G,subtype:P}=X;this.type=G,this.subtype=P,this.systemFontInfo=X.systemFontInfo;let Q=Z.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!Q,this.isInvalidPDFjsFont?this.fallbackName=Q[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif",this.systemFontInfo?.guessFallback&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=X.differences,this.widths=X.widths,this.defaultWidth=X.defaultWidth,this.composite=X.composite,this.cMap=X.cMap,this.capHeight=X.capHeight/W5,this.ascent=X.ascent/W5,this.descent=X.descent/W5,this.lineHeight=this.ascent-this.descent,this.fontMatrix=X.fontMatrix,this.bbox=X.bbox,this.defaultEncoding=X.defaultEncoding,this.toUnicode=X.toUnicode,this.toFontChar=[],X.type==="Type3"){for(let W=0;W<256;W++)this.toFontChar[W]=this.differences[W]||X.defaultEncoding[W];return}if(this.cidEncoding=X.cidEncoding||"",this.vertical=!!X.vertical,this.vertical&&(this.vmetrics=X.vmetrics,this.defaultVMetrics=X.defaultVMetrics),!q||q.isEmpty)return q&&v('Font file is empty in "'+Z+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(X);let Y;[G,P]=Wj(q,X),G===this.type&&P===this.subtype||v1(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${G}/${P}.`);try{switch(G){case"MMType1":v1("MMType1 font ("+Z+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";let W=P==="Type1C"||P==="CIDFontType0C"?new r2(q,X):new HQ(Z,q,X);kR(X),Y=this.convert(Z,W,X);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",Y=this.checkAndRepair(Z,q,X),kR(X),this.isOpenType&&(G="OpenType");break;default:throw new h(`Font ${G} is not supported`)}}catch(W){return v(W),void this.fallbackToSystemFont(X)}TR(X),this.data=Y,this.type=G,this.subtype=P,this.fontMatrix=X.fontMatrix,this.widths=X.widths,this.defaultWidth=X.defaultWidth,this.toUnicode=X.toUnicode,this.seacMap=X.seacMap}get renderer(){return X1(this,"renderer",BQ.create(this,b7))}exportData(){let Z=Object.create(null);for(let X of Qj){let z=this[X];z!==void 0&&(Z[X]=z)}if(!this.fontExtraProperties)return{data:Z};let q=Object.create(null);for(let X of Yj){let z=this[X];z!==void 0&&(q[X]=z)}return{data:Z,extra:q}}fallbackToSystemFont(Z){this.missingFile=!0;let{name:q,type:X}=this,z=t7(q),R=O7(),G=Rq(),P=!!R[z],Q=!(!G[z]||!R[G[z]]);z=R[z]||G[z]||z;let Y=iI()[z];Y&&(isNaN(this.ascent)&&(this.ascent=Y.ascent/W5),isNaN(this.descent)&&(this.descent=Y.descent/W5),isNaN(this.capHeight)&&(this.capHeight=Y.capHeight/W5)),this.bold=/bold/gi.test(z),this.italic=/oblique|italic/gi.test(z),this.black=/Black/g.test(q);let W=/Narrow/g.test(q);if(this.remeasure=(!P||W)&&Object.keys(this.widths).length>0,(P||Q)&&X==="CIDFontType2"&&this.cidEncoding.startsWith("Identity-")){let $=Z.cidToGidMap,_=[];if(N2(_,IR()),/Arial-?Black/i.test(q)?N2(_,rI()):/Calibri/i.test(q)&&N2(_,lI()),$){for(let J in _){let U=_[J];$[U]!==void 0&&(_[+J]=$[U])}$.length!==this.toUnicode.length&&Z.hasIncludedToUnicodeMap&&this.toUnicode instanceof j0&&this.toUnicode.forEach(function(J,U){let f=_[J];$[f]===void 0&&(_[+J]=U)})}this.toUnicode instanceof j0||this.toUnicode.forEach(function(J,U){_[+J]=U}),this.toFontChar=_,this.toUnicode=new q6(_)}else if(/Symbol/i.test(z))this.toFontChar=e9(YX,l0(),this.differences);else if(/Dingbats/i.test(z))this.toFontChar=e9(WX,OI(),this.differences);else if(P||Q){let $=e9(this.defaultEncoding,l0(),this.differences);X!=="CIDFontType2"||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof j0||this.toUnicode.forEach(function(_,J){$[+_]=J}),this.toFontChar=$}else{let $=l0(),_=[];this.toUnicode.forEach((J,U)=>{if(!this.composite){let f=V6(this.differences[J]||this.defaultEncoding[J],$);f!==-1&&(U=f)}_[+J]=U}),this.composite&&this.toUnicode instanceof j0&&/Tahoma|Verdana/i.test(q)&&N2(_,IR()),this.toFontChar=_}TR(Z),this.loadedName=z.split("-",1)[0]}checkAndRepair(Z,q,X){let z=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function R(N,L){let m=Object.create(null);m["OS/2"]=null,m.cmap=null,m.head=null,m.hhea=null,m.hmtx=null,m.maxp=null,m.name=null,m.post=null;for(let d=0;d<L;d++){let e=G(N);z.includes(e.tag)&&(e.length!==0&&(m[e.tag]=e))}return m}function G(N){let L=N.getString(4),m=N.getInt32()>>>0,d=N.getInt32()>>>0,e=N.getInt32()>>>0,E=N.pos;N.pos=N.start||0,N.skip(d);let p=N.getBytes(e);return N.pos=E,L==="head"&&(p[8]=p[9]=p[10]=p[11]=0,p[17]|=32),{tag:L,checksum:m,length:e,offset:d,data:p}}function P(N){return{version:N.getString(4),numTables:N.getUint16(),searchRange:N.getUint16(),entrySelector:N.getUint16(),rangeShift:N.getUint16()}}function Q(N,L,m,d,e,E){let p={length:0,sizeOfInstructions:0};if(L<0||L>=N.length||m>N.length||m-L<=12)return p;let F=N.subarray(L,m),s=f0(F[2],F[3]),w=f0(F[4],F[5]),c=f0(F[6],F[7]),o=f0(F[8],F[9]);s>c&&(E6(F,2,c),E6(F,6,s)),w>o&&(E6(F,4,o),E6(F,8,w));let Q1=f0(F[0],F[1]);if(Q1<0)return Q1<-1||(d.set(F,e),p.length=F.length),p;let r,q1=10,R1=0;for(r=0;r<Q1;r++)R1=(F[q1]<<8|F[q1+1])+1,q1+=2;let V1=q1,f1=F[q1]<<8|F[q1+1];p.sizeOfInstructions=f1,q1+=2+f1;let Y1=q1,x1=0;for(r=0;r<R1;r++){let $1=F[q1++];192&$1&&(F[q1-1]=63&$1);let T1=2;2&$1?T1=1:16&$1&&(T1=0);let B1=2;4&$1?B1=1:32&$1&&(B1=0);let W1=T1+B1;if(x1+=W1,8&$1){let J1=F[q1++];J1===0&&(F[q1-1]^=8),r+=J1,x1+=J1*W1}}if(x1===0)return p;let U1=q1+x1;return U1>F.length?p:!E&&f1>0?(d.set(F.subarray(0,V1),e),d.set([0,0],e+V1),d.set(F.subarray(Y1,U1),e+V1+2),U1-=f1,F.length-U1>3&&(U1=U1+3&-4),p.length=U1,p):F.length-U1>3?(U1=U1+3&-4,d.set(F.subarray(0,U1),e),p.length=U1,p):(d.set(F,e),p.length=F.length,p)}function Y(N){let L=(q.start||0)+N.offset;q.pos=L;let m=[[],[]],d=[],e=N.length,E=L+e;if(q.getUint16()!==0||e<6)return[m,d];let p=q.getUint16(),F=q.getUint16(),s,w;for(s=0;s<p&&q.pos+12<=E;s++){let c={platform:q.getUint16(),encoding:q.getUint16(),language:q.getUint16(),name:q.getUint16(),length:q.getUint16(),offset:q.getUint16()};($j(c)||NR(c))&&d.push(c)}for(s=0,w=d.length;s<w;s++){let c=d[s];if(c.length<=0)continue;let o=L+F+c.offset;if(o+c.length>E)continue;q.pos=o;let Q1=c.name;if(c.encoding){let r="";for(let q1=0,R1=c.length;q1<R1;q1+=2)r+=String.fromCharCode(q.getUint16());m[1][Q1]=r}else m[0][Q1]=q.getString(c.length)}return[m,d]}let W=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function $(N,L){let m,d,e,E,p,F=N.data,s=0,w=0,c=0,o=[],Q1=[],r=[],q1=L.tooComplexToFollowFunctions,R1=!1,V1=0,f1=0;for(let x1=F.length;s<x1;){let U1=F[s++];if(U1===64)if(d=F[s++],R1||f1)s+=d;else for(m=0;m<d;m++)o.push(F[s++]);else if(U1===65)if(d=F[s++],R1||f1)s+=2*d;else for(m=0;m<d;m++)e=F[s++],o.push(e<<8|F[s++]);else if((248&U1)==176)if(d=U1-176+1,R1||f1)s+=d;else for(m=0;m<d;m++)o.push(F[s++]);else if((248&U1)==184)if(d=U1-184+1,R1||f1)s+=2*d;else for(m=0;m<d;m++)e=F[s++],o.push(f0(e,F[s++]));else if(U1!==43||q1)if(U1!==44||q1){if(U1===45)if(R1)R1=!1,w=s;else{if(p=Q1.pop(),!p)return v("TT: ENDF bad stack"),void(L.hintsValid=!1);E=r.pop(),F=p.data,s=p.i,L.functionsStackDeltas[E]=o.length-p.stackTop}else if(U1===137)(R1||f1)&&(v("TT: nested IDEFs not allowed"),q1=!0),R1=!0,c=s;else if(U1===88)++V1;else if(U1===27)f1=V1;else if(U1===89)f1===V1&&(f1=0),--V1;else if(U1===28&&!R1&&!f1){let $1=o.at(-1);$1>0&&(s+=$1-1)}}else(R1||f1)&&(v("TT: nested FDEFs not allowed"),q1=!0),R1=!0,c=s,E=o.pop(),L.functionsDefined[E]={data:F,i:s};else if(!R1&&!f1){if(E=o.at(-1),isNaN(E))v1("TT: CALL empty stack (or invalid entry).");else if(L.functionsUsed[E]=!0,E in L.functionsStackDeltas){let $1=o.length+L.functionsStackDeltas[E];if($1<0)return v("TT: CALL invalid functions stack delta."),void(L.hintsValid=!1);o.length=$1}else if(E in L.functionsDefined&&!r.includes(E)){if(Q1.push({data:F,i:s,stackTop:o.length-1}),r.push(E),p=L.functionsDefined[E],!p)return v("TT: CALL non-existent function"),void(L.hintsValid=!1);F=p.data,s=p.i}}if(!R1&&!f1){let $1=0;for(U1<=142?$1=W[U1]:U1>=192&&U1<=223?$1=-1:U1>=224&&($1=-2),U1>=113&&U1<=117&&(d=o.pop(),isNaN(d)||($1=2*-d));$1<0&&o.length>0;)o.pop(),$1++;for(;$1>0;)o.push(NaN),$1--}}L.tooComplexToFollowFunctions=q1;let Y1=[F];s>F.length&&Y1.push(new Uint8Array(s-F.length)),c>w&&(v("TT: complementing a missing function tail"),Y1.push(new Uint8Array([34,45]))),function(x1,U1){if(U1.length>1){let $1,T1,B1=0;for($1=0,T1=U1.length;$1<T1;$1++)B1+=U1[$1].length;B1=B1+3&-4;let W1=new Uint8Array(B1),J1=0;for($1=0,T1=U1.length;$1<T1;$1++)W1.set(U1[$1],J1),J1+=U1[$1].length;x1.data=W1,x1.length=B1}}(N,Y1)}let _,J,U,f;if(MQ(q=new W8(new Uint8Array(q.getBytes())))){let N=function(L,m){let{numFonts:d,offsetTable:e}=function(F){let s=F.getString(4);t1(s==="ttcf","Must be a TrueType Collection font.");let w=F.getUint16(),c=F.getUint16(),o=F.getInt32()>>>0,Q1=[];for(let q1=0;q1<o;q1++)Q1.push(F.getInt32()>>>0);let r={ttcTag:s,majorVersion:w,minorVersion:c,numFonts:o,offsetTable:Q1};switch(w){case 1:return r;case 2:return r.dsigTag=F.getInt32()>>>0,r.dsigLength=F.getInt32()>>>0,r.dsigOffset=F.getInt32()>>>0,r}throw new h(`Invalid TrueType Collection majorVersion: ${w}.`)}(L),E=m.split("+"),p;for(let F=0;F<d;F++){L.pos=(L.start||0)+e[F];let s=P(L),w=R(L,s.numTables);if(!w.name)throw new h('TrueType Collection font must contain a "name" table.');let[c]=Y(w.name);for(let o=0,Q1=c.length;o<Q1;o++)for(let r=0,q1=c[o].length;r<q1;r++){let R1=c[o][r]?.replaceAll(/\s/g,"");if(R1){if(R1===m)return{header:s,tables:w};if(!(E.length<2))for(let V1 of E)R1===V1&&(p={name:V1,header:s,tables:w})}}}if(p)return v(`TrueType Collection does not contain "${m}" font, falling back to "${p.name}" font instead.`),{header:p.header,tables:p.tables};throw new h(`TrueType Collection does not contain "${m}" font.`)}(q,this.name);_=N.header,J=N.tables}else _=P(q),J=R(q,_.numTables);let K=!J["CFF "];if(K){if(!J.loca)throw new h('Required "loca" table is not found');J.glyf||(v('Required "glyf" table is not found -- trying to recover.'),J.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{let N=X.composite&&(X.cidToGidMap?.length>0||!(X.cMap instanceof k5));if(_.version==="OTTO"&&!N||!J.head||!J.hhea||!J.maxp||!J.post)return f=new W8(J["CFF "].data),U=new r2(f,X),this.convert(Z,U,X);delete J.glyf,delete J.loca,delete J.fpgm,delete J.prep,delete J["cvt "],this.isOpenType=!0}if(!J.maxp)throw new h('Required "maxp" table is not found');q.pos=(q.start||0)+J.maxp.offset;let I=q.getInt32(),B=q.getUint16();if(I!==65536&&I!==20480){if(J.maxp.length===6)I=20480;else{if(!(J.maxp.length>=32))throw new h('"maxp" table has a wrong version number');I=65536}j=J.maxp.data,x=I,j[(V=0)+3]=255&x,j[V+2]=x>>>8,j[V+1]=x>>>16,j[V]=x>>>24}var j,V,x;if(X.scaleFactors?.length===B&&K){let{scaleFactors:N}=X,L=G5(J.head.data[50],J.head.data[51]),m=new IQ({glyfTable:J.glyf.data,isGlyphLocationsLong:L,locaTable:J.loca.data,numGlyphs:B});m.scale(N);let{glyf:d,loca:e,isLocationLong:E}=m.write();J.glyf.data=d,J.loca.data=e,E!==!!L&&(J.head.data[50]=0,J.head.data[51]=E?1:0);let p=J.hmtx.data;for(let F=0;F<B;F++){let s=4*F,w=Math.round(N[F]*G5(p[s],p[s+1]));p[s]=w>>8&255,p[s+1]=255&w,E6(p,s+2,Math.round(N[F]*f0(p[s+2],p[s+3])))}}let M=B+1,H=!0;M>65535&&(H=!1,M=B,v("Not enough space in glyfs to duplicate first glyph."));let A=0,T=0;if(I>=65536&&J.maxp.length>=32)q.pos+=8,q.getUint16()>2&&(J.maxp.data[14]=0,J.maxp.data[15]=2),q.pos+=4,A=q.getUint16(),q.pos+=4,T=q.getUint16();J.maxp.data[4]=M>>8,J.maxp.data[5]=255&M;let k=function(N,L,m,d){let e={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(N&&$(N,e),L&&$(L,e),N&&function(E,p){if(!E.tooComplexToFollowFunctions){if(E.functionsDefined.length>p)return v("TT: more functions defined than expected"),void(E.hintsValid=!1);for(let F=0,s=E.functionsUsed.length;F<s;F++){if(F>p)return v("TT: invalid function id: "+F),void(E.hintsValid=!1);if(E.functionsUsed[F]&&!E.functionsDefined[F])return v("TT: undefined function: "+F),void(E.hintsValid=!1)}}}(e,d),m&&1&m.length){let E=new Uint8Array(m.length+1);E.set(m.data),m.data=E}return e.hintsValid}(J.fpgm,J.prep,J["cvt "],A);if(k||(delete J.fpgm,delete J.prep,delete J["cvt "]),function(N,L,m,d,e,E){if(!L)return void(m&&(m.data=null));N.pos=(N.start||0)+L.offset,N.pos+=4,N.pos+=2,N.pos+=2,N.pos+=2,N.pos+=2,N.pos+=2,N.pos+=2,N.pos+=2,N.pos+=2,N.pos+=2;let p=N.getUint16();N.pos+=8,N.pos+=2;let F=N.getUint16();if(p!==0)2&G5(d.data[44],d.data[45])||(L.data[22]=0,L.data[23]=0);F>e&&(v1(`The numOfMetrics (${F}) should not be greater than the numGlyphs (${e}).`),F=e,L.data[34]=(65280&F)>>8,L.data[35]=255&F);let s=e-F-(m.length-4*F>>1);if(s>0){let w=new Uint8Array(m.length+2*s);w.set(m.data),E&&(w[m.length]=m.data[2],w[m.length+1]=m.data[3]),m.data=w}}(q,J.hhea,J.hmtx,J.head,M,H),!J.head)throw new h('Required "head" table is not found');(function(N,L,m){let d=N.data,e=(E=d[0],p=d[1],F=d[2],s=d[3],(E<<24)+(p<<16)+(F<<8)+s);var E,p,F,s;e>>16!=1&&(v1("Attempting to fix invalid version in head table: "+e),d[0]=0,d[1]=1,d[2]=0,d[3]=0);let w=G5(d[50],d[51]);if(w<0||w>1){v1("Attempting to fix invalid indexToLocFormat in head table: "+w);let c=L+1;if(m===c<<1)d[50]=0,d[51]=0;else{if(m!==c<<2)throw new h("Could not fix indexToLocFormat: "+w);d[50]=0,d[51]=1}}})(J.head,B,K?J.loca.length:0);let y=Object.create(null);if(K){let N=G5(J.head.data[50],J.head.data[51]),L=function(m,d,e,E,p,F,s){let w,c,o;E?(w=4,c=function(W1,J1){return W1[J1]<<24|W1[J1+1]<<16|W1[J1+2]<<8|W1[J1+3]},o=function(W1,J1,w1){W1[J1]=w1>>>24&255,W1[J1+1]=w1>>16&255,W1[J1+2]=w1>>8&255,W1[J1+3]=255&w1}):(w=2,c=function(W1,J1){return W1[J1]<<9|W1[J1+1]<<1},o=function(W1,J1,w1){W1[J1]=w1>>9&255,W1[J1+1]=w1>>1&255});let Q1=F?e+1:e,r=w*(1+Q1),q1=new Uint8Array(r);q1.set(m.data.subarray(0,r)),m.data=q1;let R1=d.data,V1=R1.length,f1=new Uint8Array(V1),Y1,x1,U1=[];for(Y1=0,x1=0;Y1<e+1;Y1++,x1+=w){let W1=c(q1,x1);W1>V1&&(W1=V1),U1.push({index:Y1,offset:W1,endOffset:0})}for(U1.sort((W1,J1)=>W1.offset-J1.offset),Y1=0;Y1<e;Y1++)U1[Y1].endOffset=U1[Y1+1].offset;for(U1.sort((W1,J1)=>W1.index-J1.index),Y1=0;Y1<e;Y1++){let{offset:W1,endOffset:J1}=U1[Y1];if(W1!==0||J1!==0)break;let w1=U1[Y1+1].offset;if(w1!==0){U1[Y1].endOffset=w1;break}}let $1=U1.at(-2);$1.offset!==0&&$1.endOffset===0&&($1.endOffset=V1);let T1=Object.create(null),B1=0;for(o(q1,0,B1),Y1=0,x1=w;Y1<e;Y1++,x1+=w){let W1=Q(R1,U1[Y1].offset,U1[Y1].endOffset,f1,B1,p),J1=W1.length;J1===0&&(T1[Y1]=!0),W1.sizeOfInstructions>s&&(s=W1.sizeOfInstructions),B1+=J1,o(q1,x1,B1)}if(B1===0){let W1=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(Y1=0,x1=w;Y1<Q1;Y1++,x1+=w)o(q1,x1,W1.length);d.data=W1}else if(F){let W1=c(q1,w);f1.length>W1+B1?d.data=f1.subarray(0,W1+B1):(d.data=new Uint8Array(W1+B1),d.data.set(f1.subarray(0,B1))),d.data.set(f1.subarray(0,W1),B1),o(m.data,q1.length-w,B1+W1)}else d.data=f1.subarray(0,B1);return{missingGlyphs:T1,maxSizeOfInstructions:s}}(J.loca,J.glyf,B,N,k,H,T);y=L.missingGlyphs,I>=65536&&J.maxp.length>=32&&(J.maxp.data[26]=L.maxSizeOfInstructions>>8,J.maxp.data[27]=255&L.maxSizeOfInstructions)}if(!J.hhea)throw new h('Required "hhea" table is not found');J.hhea.data[10]===0&&J.hhea.data[11]===0&&(J.hhea.data[10]=255,J.hhea.data[11]=255);let O={unitsPerEm:G5(J.head.data[18],J.head.data[19]),yMax:f0(J.head.data[42],J.head.data[43]),yMin:f0(J.head.data[38],J.head.data[39]),ascent:f0(J.hhea.data[4],J.hhea.data[5]),descent:f0(J.hhea.data[6],J.hhea.data[7]),lineGap:f0(J.hhea.data[8],J.hhea.data[9])};this.ascent=O.ascent/O.unitsPerEm,this.descent=O.descent/O.unitsPerEm,this.lineGap=O.lineGap/O.unitsPerEm,this.cssFontInfo?.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,J.post&&function(N,L,m){let d=(q.start||0)+N.offset;q.pos=d;let e=d+N.length,E=q.getInt32(),p;q.skip(28);let F,s=!0;switch(E){case 65536:p=BR;break;case 131072:let w=q.getUint16();if(w!==m){s=!1;break}let c=[];for(F=0;F<w;++F){let r=q.getUint16();if(r>=32768){s=!1;break}c.push(r)}if(!s)break;let o=[],Q1=[];for(;q.pos<e;){let r=q.getByte();for(Q1.length=r,F=0;F<r;++F)Q1[F]=String.fromCharCode(q.getByte());o.push(Q1.join(""))}for(p=[],F=0;F<w;++F){let r=c[F];r<258?p.push(BR[r]):p.push(o[r-258])}break;case 196608:break;default:v("Unknown/unsupported post table version "+E),s=!1,L.defaultEncoding&&(p=L.defaultEncoding)}L.glyphNames=p}(J.post,X,B),J.post={tag:"post",data:bR(X)};let D=Object.create(null);function n(N){return!y[N]}if(X.composite){let N=X.cidToGidMap||[],L=N.length===0;X.cMap.forEach(function(m,d){if(typeof d=="string"&&(d=ZZ(m,d,!0)),d>65535)throw new h("Max size of CID is 65,535");let e=-1;L?e=d:N[d]!==void 0&&(e=N[d]),e>=0&&e<B&&n(e)&&(D[m]=e)})}else{let N=function(p,F,s,w){if(!p)return v("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let c,o=(F.start||0)+p.offset;F.pos=o,F.skip(2);let Q1=F.getUint16(),r,q1=!1;for(let T1=0;T1<Q1;T1++){let B1=F.getUint16(),W1=F.getUint16(),J1=F.getInt32()>>>0,w1=!1;if(r?.platformId!==B1||r?.encodingId!==W1){if(B1!==0||W1!==0&&W1!==1&&W1!==3)if(B1===1&&W1===0)w1=!0;else if(B1!==3||W1!==1||!w&&r){if(s&&B1===3&&W1===0){w1=!0;let U0=!0;if(T1<Q1-1){let i1=F.peekBytes(2);G5(i1[0],i1[1])<B1&&(U0=!1)}U0&&(q1=!0)}}else w1=!0,s||(q1=!0);else w1=!0;if(w1&&(r={platformId:B1,encodingId:W1,offset:J1}),q1)break}}if(r&&(F.pos=o+r.offset),!r||F.peekByte()===-1)return v("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let R1=F.getUint16(),V1=!1,f1=[],Y1,x1;if(R1===0){for(F.skip(4),Y1=0;Y1<256;Y1++){let T1=F.getByte();T1&&f1.push({charCode:Y1,glyphId:T1})}V1=!0}else if(R1===2){F.skip(4);let T1=[],B1=0;for(let J1=0;J1<256;J1++){let w1=F.getUint16()>>3;T1.push(w1),B1=Math.max(w1,B1)}let W1=[];for(let J1=0;J1<=B1;J1++)W1.push({firstCode:F.getUint16(),entryCount:F.getUint16(),idDelta:f0(F.getByte(),F.getByte()),idRangePos:F.pos+F.getUint16()});for(let J1=0;J1<256;J1++)if(T1[J1]===0)F.pos=W1[0].idRangePos+2*J1,x1=F.getUint16(),f1.push({charCode:J1,glyphId:x1});else{let w1=W1[T1[J1]];for(Y1=0;Y1<w1.entryCount;Y1++){let U0=(J1<<8)+Y1+w1.firstCode;F.pos=w1.idRangePos+2*Y1,x1=F.getUint16(),x1!==0&&(x1=(x1+w1.idDelta)%65536),f1.push({charCode:U0,glyphId:x1})}}}else if(R1===4){F.skip(4);let T1=F.getUint16()>>1;F.skip(6);let B1=[],W1;for(W1=0;W1<T1;W1++)B1.push({end:F.getUint16()});for(F.skip(2),W1=0;W1<T1;W1++)B1[W1].start=F.getUint16();for(W1=0;W1<T1;W1++)B1[W1].delta=F.getUint16();let J1,w1=0;for(W1=0;W1<T1;W1++){c=B1[W1];let i1=F.getUint16();i1?(J1=(i1>>1)-(T1-W1),c.offsetIndex=J1,w1=Math.max(w1,J1+c.end-c.start+1)):c.offsetIndex=-1}let U0=[];for(Y1=0;Y1<w1;Y1++)U0.push(F.getUint16());for(W1=0;W1<T1;W1++){c=B1[W1],o=c.start;let{end:i1,delta:q5}=c;for(J1=c.offsetIndex,Y1=o;Y1<=i1;Y1++)Y1!==65535&&(x1=J1<0?Y1:U0[J1+Y1-o],x1=x1+q5&65535,f1.push({charCode:Y1,glyphId:x1}))}}else if(R1===6){F.skip(4);let T1=F.getUint16(),B1=F.getUint16();for(Y1=0;Y1<B1;Y1++){x1=F.getUint16();let W1=T1+Y1;f1.push({charCode:W1,glyphId:x1})}}else{if(R1!==12)return v("cmap table has unsupported format: "+R1),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{F.skip(10);let T1=F.getInt32()>>>0;for(Y1=0;Y1<T1;Y1++){let B1=F.getInt32()>>>0,W1=F.getInt32()>>>0,J1=F.getInt32()>>>0;for(let w1=B1;w1<=W1;w1++)f1.push({charCode:w1,glyphId:J1++})}}}f1.sort((T1,B1)=>T1.charCode-B1.charCode);let U1=[],$1=new Set;for(let T1 of f1){let{charCode:B1}=T1;$1.has(B1)||($1.add(B1),U1.push(T1))}return{platformId:r.platformId,encodingId:r.encodingId,mappings:U1,hasShortCmap:V1}}(J.cmap,q,this.isSymbolicFont,X.hasEncoding),L=N.platformId,m=N.encodingId,d=N.mappings,e=[],E=!1;if(!X.hasEncoding||X.baseEncodingName!=="MacRomanEncoding"&&X.baseEncodingName!=="WinAnsiEncoding"||(e=v7(X.baseEncodingName)),X.hasEncoding&&!this.isSymbolicFont&&(L===3&&m===1||L===1&&m===0)){let p=l0();for(let F=0;F<256;F++){let s;if(s=this.differences[F]!==void 0?this.differences[F]:e.length&&e[F]!==""?e[F]:A4[F],!s)continue;let w=YQ(s,p),c;if(L===3&&m===1?c=p[w]:L===1&&m===0&&(c=QX.indexOf(w)),c===void 0){if(!X.glyphNames&&X.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof j0)){let o=this.toUnicode.get(F);o&&(c=o.codePointAt(0))}if(c===void 0)continue}for(let o of d)if(o.charCode===c){D[F]=o.glyphId;break}}}else if(L===0){for(let p of d)D[p.charCode]=p.glyphId;E=!0}else if(L===3&&m===0)for(let p of d){let F=p.charCode;F>=61440&&F<=61695&&(F&=255),D[F]=p.glyphId}else for(let p of d)D[p.charCode]=p.glyphId;if(X.glyphNames&&(e.length||this.differences.length))for(let p=0;p<256;++p){if(!E&&D[p]!==void 0)continue;let F=this.differences[p]||e[p];if(!F)continue;let s=X.glyphNames.indexOf(F);s>0&&n(s)&&(D[p]=s)}}D.length===0&&(D[0]=0);let b=M-1;if(H||(b=0),!X.cssFontInfo){let N=CR(D,n,b,this.toUnicode);this.toFontChar=N.toFontChar,J.cmap={tag:"cmap",data:FR(N.charCodeToGlyphId,N.toUnicodeExtraMap,M)},J["OS/2"]&&function(L,m){m.pos=(m.start||0)+L.offset;let d=m.getUint16();m.skip(60);let e=m.getUint16();return!(d<4&&768&e)&&(!(m.getUint16()>m.getUint16())&&(m.skip(6),m.getUint16()!==0&&(L.data[8]=L.data[9]=0,!0)))}(J["OS/2"],q)||(J["OS/2"]={tag:"OS/2",data:vR(X,N.charCodeToGlyphId,O)})}if(!K)try{f=new W8(J["CFF "].data),U=new G9(f,X,b7).parse(),U.duplicateFirstGlyph();let N=new e7(U);J["CFF "].data=N.compile()}catch{v("Failed to compile font "+X.loadedName)}if(J.name){let[N,L]=Y(J.name);J.name.data=qZ(Z,N),this.psName=N[0][6]||null,X.composite||function(m,d,e){if(m.isInternalFont)return;if(m.hasIncludedToUnicodeMap)return;if(m.hasEncoding)return;if(m.toUnicode instanceof j0)return;if(!d)return;if(e.length===0)return;if(m.defaultEncoding===F7)return;for(let s of e)if(!NR(s))return;let E=F7,p=[],F=l0();for(let s in E){let w=E[s];if(w==="")continue;let c=F[w];c!==void 0&&(p[s]=String.fromCharCode(c))}p.length>0&&m.toUnicode.amend(p)}(X,this.isSymbolicFont,L)}else J.name={tag:"name",data:qZ(this.name)};let l=new p7(_.version);for(let N in J)l.addTable(N,J[N].data);return l.toArray()}convert(Z,q,X){X.fixedPitch=!1,X.builtInEncoding&&function(f,K){if(f.isInternalFont)return;if(f.hasIncludedToUnicodeMap)return;if(K===f.defaultEncoding)return;if(f.toUnicode instanceof j0)return;let I=[],B=l0();for(let j in K){if(f.hasEncoding&&(f.baseEncodingName||f.differences[j]!==void 0))continue;let V=V6(K[j],B);V!==-1&&(I[j]=String.fromCharCode(V))}I.length>0&&f.toUnicode.amend(I)}(X,X.builtInEncoding);let z=1;q instanceof r2&&(z=q.numGlyphs-1);let R=q.getGlyphMapping(X),G=null,P=R,Q=null;X.cssFontInfo||(G=CR(R,q.hasGlyphId.bind(q),z,this.toUnicode),this.toFontChar=G.toFontChar,P=G.charCodeToGlyphId,Q=G.toUnicodeExtraMap);let Y=q.numGlyphs;function W(f,K){let I=null;for(let B in f)K===f[B]&&(I||=[]).push(0|B);return I}function $(f,K){for(let I in f)if(K===f[I])return 0|I;return G.charCodeToGlyphId[G.nextAvailableFontCharCode]=K,G.nextAvailableFontCharCode++}let _=q.seacs;if(G&&_?.length){let f=X.fontMatrix||x5,K=q.getCharset(),I=Object.create(null);for(let B in _){B|=0;let j=_[B],V=A4[j[2]],x=A4[j[3]],M=K.indexOf(V),H=K.indexOf(x);if(M<0||H<0)continue;let A={x:j[0]*f[0]+j[1]*f[2]+f[4],y:j[0]*f[1]+j[1]*f[3]+f[5]},T=W(R,B);if(T)for(let k of T){let y=G.charCodeToGlyphId,O=$(y,M),D=$(y,H);I[k]={baseFontCharCode:O,accentFontCharCode:D,accentOffset:A}}}X.seacMap=I}let J=X.fontMatrix?1/Math.max(...X.fontMatrix.slice(0,4).map(Math.abs)):1000,U=new p7("OTTO");return U.addTable("CFF ",q.data),U.addTable("OS/2",vR(X,P)),U.addTable("cmap",FR(P,Q,Y)),U.addTable("head","\x00\x01\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00_\x0F<õ\x00\x00"+P5(J)+"\x00\x00\x00\x00\v~'\x00\x00\x00\x00\v~'\x00\x00"+P5(X.descent)+"\x0Fÿ"+P5(X.ascent)+l1(X.italicAngle?2:0)+"\x00\x11\x00\x00\x00\x00\x00\x00"),U.addTable("hhea","\x00\x01\x00\x00"+P5(X.ascent)+P5(X.descent)+"\x00\x00ÿÿ\x00\x00\x00\x00\x00\x00"+P5(X.capHeight)+P5(Math.tan(X.italicAngle)*X.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+l1(Y)),U.addTable("hmtx",function(){let f=q.charstrings,K=q.cff?q.cff.widths:null,I="\x00\x00\x00\x00";for(let B=1,j=Y;B<j;B++){let V=0;if(f){let x=f[B-1];V="width"in x?x.width:0}else K&&(V=Math.ceil(K[B]||0));I+=l1(V)+l1(0)}return I}()),U.addTable("maxp","\x00\x00P\x00"+l1(Y)),U.addTable("name",qZ(Z)),U.addTable("post",bR(X)),U.toArray()}get _spaceWidth(){let Z=["space","minus","one","i","I"],q;for(let X of Z){if(X in this.widths){q=this.widths[X];break}let z=l0()[X],R=0;if(this.composite&&this.cMap.contains(z)&&(R=this.cMap.lookup(z),typeof R=="string"&&(R=ZZ(z,R))),!R&&this.toUnicode&&(R=this.toUnicode.charCodeOf(z)),R<=0&&(R=z),q=this.widths[R],q)break}return X1(this,"_spaceWidth",q||this.defaultWidth)}_charToGlyph(Z,q=!1){let X,z,R,G=this._glyphCache[Z];if(G?.isSpace===q)return G;let P=Z;this.cMap?.contains(Z)&&(P=this.cMap.lookup(Z),typeof P=="string"&&(P=ZZ(Z,P))),z=this.widths[P],typeof z!="number"&&(z=this.defaultWidth);let Q=this.vmetrics?.[P],Y=this.toUnicode.get(Z)||Z;typeof Y=="number"&&(Y=String.fromCharCode(Y));let W=this.toFontChar[Z]!==void 0;if(X=this.toFontChar[Z]||Z,this.missingFile){let U=this.differences[Z]||this.defaultEncoding[Z];U!==".notdef"&&U!==""||this.type!=="Type1"||(X=32,U===""&&(z||=this._spaceWidth,Y=String.fromCharCode(X))),X=($=X)>=65520&&$<=65535?0:$>=62976&&$<=63743?yI()[$]||$:$===173?45:$}var $;this.isType3Font&&(R=X);let _=null;if(this.seacMap?.[Z]){W=!0;let U=this.seacMap[Z];X=U.baseFontCharCode,_={fontChar:String.fromCodePoint(U.accentFontCharCode),offset:U.accentOffset}}let J="";if(typeof X=="number"&&(X<=1114111?J=String.fromCodePoint(X):v(`charToGlyph - invalid fontCharCode: ${X}`)),this.missingFile&&this.vertical&&J.length===1){let U=wI()[J.charCodeAt(0)];U&&(J=Y=String.fromCharCode(U))}return G=new xQ(Z,J,Y,_,z,Q,R,q,W),this._glyphCache[Z]=G}charsToGlyphs(Z){let q=this._charsCache[Z];if(q)return q;if(q=[],this.cMap){let X=Object.create(null),z=Z.length,R=0;for(;R<z;){this.cMap.readCharCode(Z,R,X);let{charcode:G,length:P}=X;R+=P;let Q=this._charToGlyph(G,P===1&&Z.charCodeAt(R-1)===32);q.push(Q)}}else for(let X=0,z=Z.length;X<z;++X){let R=Z.charCodeAt(X),G=this._charToGlyph(R,R===32);q.push(G)}return this._charsCache[Z]=q}getCharPositions(Z){let q=[];if(this.cMap){let X=Object.create(null),z=0;for(;z<Z.length;){this.cMap.readCharCode(Z,z,X);let R=X.length;q.push([z,z+R]),z+=R}}else for(let X=0,z=Z.length;X<z;++X)q.push([X,X+1]);return q}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(Z){let q=[],X=[],z=()=>q.length%2==1,R=this.toUnicode instanceof j0?(G)=>this.toUnicode.charCodeOf(G):(G)=>this.toUnicode.charCodeOf(String.fromCodePoint(G));for(let G=0,P=Z.length;G<P;G++){let Q=Z.codePointAt(G);if(Q>55295&&(Q<57344||Q>65533)&&G++,this.toUnicode){let Y=R(Q);if(Y!==-1){z()&&(q.push(X.join("")),X.length=0);for(let W=(this.cMap?this.cMap.getCharCodeLength(Y):1)-1;W>=0;W--)X.push(String.fromCharCode(Y>>8*W&255));continue}}z()||(q.push(X.join("")),X.length=0),X.push(String.fromCodePoint(Q))}return q.push(X.join("")),q}}class $q{constructor(Z){this.error=Z,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(Z){return[Z]}exportData(){return{error:this.error}}}class NQ{constructor(){y1("Cannot initialize Pattern.")}static parseShading(Z,q,X,z,R,G){let P=Z instanceof C1?Z.dict:Z,Q=P.get("ShadingType");try{switch(Q){case _q:case l2:return new CQ(P,q,X,z,R,G);case AQ:case LQ:case kQ:case TQ:return new p4(Z,q,X,z,R,G);default:throw new h("Unsupported ShadingType: "+Q)}}catch(Y){if(Y instanceof X8)throw Y;return v(Y),new bQ}}}class _6{static SMALL_NUMBER=0.000001;getIR(){y1("Abstract method `getIR` called.")}}class FQ{constructor(Z,q){this.stream=Z,this.context=q,this.buffer=0,this.bufferLength=0;let X=q.numComps;this.tmpCompsBuf=new Float32Array(X);let z=q.colorSpace.numComps;this.tmpCsCompsBuf=q.colorFn?new Float32Array(z):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;let Z=this.stream.getByte();return!(Z<0)&&(this.buffer=Z,this.bufferLength=8,!0)}readBits(Z){let{stream:q}=this,{buffer:X,bufferLength:z}=this;if(Z===32){if(z===0)return q.getInt32()>>>0;X=X<<24|q.getByte()<<16|q.getByte()<<8|q.getByte();let R=q.getByte();return this.buffer=R&(1<<z)-1,(X<<8-z|(255&R)>>z)>>>0}if(Z===8&&z===0)return q.getByte();for(;z<Z;)X=X<<8|q.getByte(),z+=8;return z-=Z,this.bufferLength=z,this.buffer=X&(1<<z)-1,X>>z}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){let{bitsPerCoordinate:Z,decode:q}=this.context,X=this.readBits(Z),z=this.readBits(Z),R=Z<32?1/((1<<Z)-1):0.00000000023283064365386963;return[X*R*(q[1]-q[0])+q[0],z*R*(q[3]-q[2])+q[2]]}readComponents(){let{bitsPerComponent:Z,colorFn:q,colorSpace:X,decode:z,numComps:R}=this.context,G=Z<32?1/((1<<Z)-1):0.00000000023283064365386963,P=this.tmpCompsBuf;for(let Y=0,W=4;Y<R;Y++,W+=2){let $=this.readBits(Z);P[Y]=$*G*(z[W+1]-z[W])+z[W]}let Q=this.tmpCsCompsBuf;return q?.(P,0,Q,0),X.getRgb(Q,0)}}function SR(Z){return vQ[Z]||=function(q){let X=[];for(let z=0;z<=q;z++){let R=z/q,G=1-R;X.push(new Float32Array([G**3,3*R*G**2,3*R**2*G,R**3]))}return X}(Z)}function mR(Z,q,X){let z=g4(q.getArray("Matrix"),w0),R=T4(q.getArray("BBox"),null);if(!R||R[2]-R[0]===0||R[3]-R[1]===0)throw new h("Invalid getTilingPatternIR /BBox array.");let G=q.get("XStep");if(typeof G!="number")throw new h("Invalid getTilingPatternIR /XStep value.");let P=q.get("YStep");if(typeof P!="number")throw new h("Invalid getTilingPatternIR /YStep value.");let Q=q.get("PaintType");if(!Number.isInteger(Q))throw new h("Invalid getTilingPatternIR /PaintType value.");let Y=q.get("TilingType");if(!Number.isInteger(Y))throw new h("Invalid getTilingPatternIR /TilingType value.");return["TilingPattern",X,Z,z,R,G,P,Q,Y]}function jX(Z){let q=t7(Z);return hj()[q]}function SQ(Z){let q=function(G){let P=jX(G);if(!P)return null;let{baseWidths:Q,baseMapping:Y,factors:W}=P,$=W?Q.map((f,K)=>f*W[K]):Q,_,J=-2,U=[];for(let[f,K]of Y.map((I,B)=>[I,B]).sort(([I],[B])=>I-B))f!==-1&&(f===J+1?(_.push($[K]),J+=1):(J=f,_=[$[K]],U.push(f,_)));return U}(Z),X=new S(null);X.set("BaseFont",t.get(Z)),X.set("Type",t.get("Font")),X.set("Subtype",t.get("CIDFontType2")),X.set("Encoding",t.get("Identity-H")),X.set("CIDToGIDMap",t.get("Identity")),X.set("W",q),X.set("FirstChar",q[0]),X.set("LastChar",q.at(-2)+q.at(-1).length-1);let z=new S(null);X.set("FontDescriptor",z);let R=new S(null);return R.set("Ordering","Identity"),R.set("Registry","Adobe"),R.set("Supplement",0),X.set("CIDSystemInfo",R),X}class mQ{constructor(Z){this.lexer=Z,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(Z){return this.token.type===Z&&(this.nextToken(),!0)}expect(Z){if(this.accept(Z))return!0;throw new h(`Unexpected symbol: found ${this.token.type} expected ${Z}.`)}parse(){return this.nextToken(),this.expect(r8.LBRACE),this.parseBlock(),this.expect(r8.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(r8.NUMBER))this.operators.push(this.prev.value);else if(this.accept(r8.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(r8.LBRACE))return;this.parseCondition()}}parseCondition(){let Z=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(r8.RBRACE),this.accept(r8.IF))this.operators[Z]=this.operators.length,this.operators[Z+1]="jz";else{if(!this.accept(r8.LBRACE))throw new h("PS Function: error parsing conditional.");{let q=this.operators.length;this.operators.push(null,null);let X=this.operators.length;this.parseBlock(),this.expect(r8.RBRACE),this.expect(r8.IFELSE),this.operators[q]=this.operators.length,this.operators[q+1]="j",this.operators[Z]=X,this.operators[Z+1]="jz"}}}}class H0{static get opCache(){return X1(this,"opCache",Object.create(null))}constructor(Z,q){this.type=Z,this.value=q}static getOperator(Z){return H0.opCache[Z]||=new H0(r8.OPERATOR,Z)}static get LBRACE(){return X1(this,"LBRACE",new H0(r8.LBRACE,"{"))}static get RBRACE(){return X1(this,"RBRACE",new H0(r8.RBRACE,"}"))}static get IF(){return X1(this,"IF",new H0(r8.IF,"IF"))}static get IFELSE(){return X1(this,"IFELSE",new H0(r8.IFELSE,"IFELSE"))}}class OQ{constructor(Z){this.stream=Z,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let Z=!1,q=this.currentChar;for(;;){if(q<0)return b8;if(Z)q!==10&&q!==13||(Z=!1);else if(q===37)Z=!0;else if(!M0(q))break;q=this.nextChar()}switch(0|q){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new H0(r8.NUMBER,this.getNumber());case 123:return this.nextChar(),H0.LBRACE;case 125:return this.nextChar(),H0.RBRACE}let X=this.strBuf;for(X.length=0,X[0]=String.fromCharCode(q);(q=this.nextChar())>=0&&(q>=65&&q<=90||q>=97&&q<=122);)X.push(String.fromCharCode(q));let z=X.join("");switch(z.toLowerCase()){case"if":return H0.IF;case"ifelse":return H0.IFELSE;default:return H0.getOperator(z)}}getNumber(){let Z=this.currentChar,q=this.strBuf;for(q.length=0,q[0]=String.fromCharCode(Z);(Z=this.nextChar())>=0&&(Z>=48&&Z<=57||Z===45||Z===46);)q.push(String.fromCharCode(Z));let X=parseFloat(q.join(""));if(isNaN(X))throw new h(`Invalid floating point number: ${X}`);return X}}class t4{constructor(Z){this._onlyRefs=Z?.onlyRefs===!0,this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new t8}getByName(Z){this._onlyRefs&&y1("Should not call `getByName` method.");let q=this._nameRefMap.get(Z);return q?this.getByRef(q):this._imageMap.get(Z)||null}getByRef(Z){return this._imageCache.get(Z)||null}set(Z,q,X){y1("Abstract method `set` called.")}}class X6{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=50000000;#Z=new U8;constructor(){this._refCache=new t8,this._imageCache=new t8}get#q(){let Z=0;for(let q of this._imageCache)Z+=q.byteSize;return Z}get#z(){return!(this._imageCache.size<X6.MIN_IMAGES_TO_CACHE)&&!(this.#q<X6.MAX_BYTE_SIZE)}shouldCache(Z,q){let X=this._refCache.get(Z);return X||(X=new Set,this._refCache.put(Z,X)),X.add(q),!(X.size<X6.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(Z)&&this.#z)}addDecodeFailed(Z){this.#Z.put(Z)}hasDecodeFailed(Z){return this.#Z.has(Z)}addByteSize(Z,q){let X=this._imageCache.get(Z);X&&(X.byteSize||(X.byteSize=q))}getData(Z,q){let X=this._refCache.get(Z);if(!X)return null;if(X.size<X6.NUM_PAGES_THRESHOLD)return null;let z=this._imageCache.get(Z);return z?(X.add(q),z):null}setData(Z,q){if(!this._refCache.has(Z))throw Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(Z)||(this.#z?v("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(Z,q))}clear(Z=!1){Z||(this.#Z.clear(),this._refCache.clear()),this._imageCache.clear()}}class HX{constructor({xref:Z,isEvalSupported:q=!0}){this.xref=Z,this.isEvalSupported=q!==!1}create(Z,q=!1){let X,z;if(Z instanceof P1?X=Z:Z instanceof S?X=Z.objId:Z instanceof C1&&(X=Z.dict?.objId),X){let G=this._localFunctionCache.getByRef(X);if(G)return G}let R=this.xref.fetchIfRef(Z);if(Array.isArray(R)){if(!q)throw Error('PDFFunctionFactory.create - expected "parseArray" argument.');z=fq.parseArray(this,R)}else z=fq.parse(this,R);return X&&this._localFunctionCache.set(null,X,z),z}get _localFunctionCache(){return X1(this,"_localFunctionCache",new yQ)}}function L0(Z){return Array.isArray(Z)?e8(Z,null)?Z:Z.map((q)=>+q):null}class fq{static getSampleArray(Z,q,X,z){let R,G,P=1;for(R=0,G=Z.length;R<G;R++)P*=Z[R];P*=q;let Q=Array(P),Y=0,W=0,$=1/(2**X-1),_=z.getBytes((P*X+7)/8),J=0;for(R=0;R<P;R++){for(;Y<X;)W<<=8,W|=_[J++],Y+=8;Y-=X,Q[R]=(W>>Y)*$,W&=(1<<Y)-1}return Q}static parse(Z,q){let X=q.dict||q;switch(X.get("FunctionType")){case 0:return this.constructSampled(Z,q,X);case 1:break;case 2:return this.constructInterpolated(Z,X);case 3:return this.constructStiched(Z,X);case 4:return this.constructPostScript(Z,q,X)}throw new h("Unknown type of function")}static parseArray(Z,q){let{xref:X}=Z,z=[];for(let R of q)z.push(this.parse(Z,X.fetchIfRef(R)));return function(R,G,P,Q){for(let Y=0,W=z.length;Y<W;Y++)z[Y](R,G,P,Q+Y)}}static constructSampled(Z,q,X){function z(K){let I=K.length,B=[],j=0;for(let V=0;V<I;V+=2)B[j++]=[K[V],K[V+1]];return B}function R(K,I,B,j,V){return j+(V-j)/(B-I)*(K-I)}let G=L0(X.getArray("Domain")),P=L0(X.getArray("Range"));if(!G||!P)throw new h("No domain or range");let Q=G.length/2,Y=P.length/2;G=z(G),P=z(P);let W=L0(X.getArray("Size")),$=X.get("BitsPerSample"),_=X.get("Order")||1;_!==1&&v1("No support for cubic spline interpolation: "+_);let J=L0(X.getArray("Encode"));if(J)J=z(J);else{J=[];for(let K=0;K<Q;++K)J.push([0,W[K]-1])}let U=L0(X.getArray("Decode"));U=U?z(U):P;let f=this.getSampleArray(W,Y,$,q);return function(K,I,B,j){let V=1<<Q,x=new Float64Array(V).fill(1),M=new Uint32Array(V),H,A,T=Y,k=1;for(H=0;H<Q;++H){let y=G[H][0],O=G[H][1],D=R(E8(K[I+H],y,O),y,O,J[H][0],J[H][1]),n=W[H];D=E8(D,0,n-1);let b=D<n-1?Math.floor(D):D-1,l=b+1-D,N=D-b,L=b*T,m=L+T;for(A=0;A<V;A++)A&k?(x[A]*=N,M[A]+=m):(x[A]*=l,M[A]+=L);T*=n,k<<=1}for(A=0;A<Y;++A){let y=0;for(H=0;H<V;H++)y+=f[M[H]+A]*x[H];y=R(y,0,1,U[A][0],U[A][1]),B[j+A]=E8(y,P[A][0],P[A][1])}}}static constructInterpolated(Z,q){let X=L0(q.getArray("C0"))||[0],z=L0(q.getArray("C1"))||[1],R=q.get("N"),G=[];for(let Q=0,Y=X.length;Q<Y;++Q)G.push(z[Q]-X[Q]);let P=G.length;return function(Q,Y,W,$){let _=R===1?Q[Y]:Q[Y]**R;for(let J=0;J<P;++J)W[$+J]=X[J]+_*G[J]}}static constructStiched(Z,q){let X=L0(q.getArray("Domain"));if(!X)throw new h("No domain");if(X.length/2!==1)throw new h("Bad domain for stiched function");let{xref:z}=Z,R=[];for(let Y of q.get("Functions"))R.push(this.parse(Z,z.fetchIfRef(Y)));let G=L0(q.getArray("Bounds")),P=L0(q.getArray("Encode")),Q=new Float32Array(1);return function(Y,W,$,_){let J=E8(Y[W],X[0],X[1]),U=G.length,f;for(f=0;f<U&&!(J<G[f]);++f);let K=X[0];f>0&&(K=G[f-1]);let I=X[1];f<G.length&&(I=G[f]);let B=P[2*f],j=P[2*f+1];Q[0]=K===I?B:B+(J-K)*(j-B)/(I-K),R[f](Q,0,$,_)}}static constructPostScript(Z,q,X){let z=L0(X.getArray("Domain")),R=L0(X.getArray("Range"));if(!z)throw new h("No domain.");if(!R)throw new h("No range.");let G=new OQ(q),P=new mQ(G).parse();if(Z.isEvalSupported&&Z0.isEvalSupported){let U=new dQ().compile(P,z,R);if(U)return Function("src","srcOffset","dest","destOffset",U)}v1("Unable to compile PS function");let Q=R.length>>1,Y=z.length>>1,W=new EQ(P),$=Object.create(null),_=8192,J=new Float32Array(Y);return function(U,f,K,I){let B,j,V="",x=J;for(B=0;B<Y;B++)j=U[f+B],x[B]=j,V+=j+"_";let M=$[V];if(M!==void 0)return void K.set(M,I);let H=new Float32Array(Q),A=W.execute(x),T=A.length-Q;for(B=0;B<Q;B++){j=A[T+B];let k=R[2*B];j<k?j=k:(k=R[2*B+1],j>k&&(j=k)),H[B]=j}_>0&&(_--,$[V]=H),K.set(H,I)}}}function XZ(Z){let q;if(Z instanceof S)q=Z;else{if(!(Z instanceof C1))return!1;q=Z.dict}return q.has("FunctionType")}class C3{static MAX_STACK_SIZE=100;constructor(Z){this.stack=Z?Array.from(Z):[]}push(Z){if(this.stack.length>=C3.MAX_STACK_SIZE)throw Error("PostScript function stack overflow.");this.stack.push(Z)}pop(){if(this.stack.length<=0)throw Error("PostScript function stack underflow.");return this.stack.pop()}copy(Z){if(this.stack.length+Z>=C3.MAX_STACK_SIZE)throw Error("PostScript function stack overflow.");let q=this.stack;for(let X=q.length-Z,z=Z-1;z>=0;z--,X++)q.push(q[X])}index(Z){this.push(this.stack[this.stack.length-Z-1])}roll(Z,q){let X=this.stack,z=X.length-Z,R=X.length-1,G=z+(q-Math.floor(q/Z)*Z);for(let P=z,Q=R;P<Q;P++,Q--){let Y=X[P];X[P]=X[Q],X[Q]=Y}for(let P=z,Q=G-1;P<Q;P++,Q--){let Y=X[P];X[P]=X[Q],X[Q]=Y}for(let P=G,Q=R;P<Q;P++,Q--){let Y=X[P];X[P]=X[Q],X[Q]=Y}}}class EQ{constructor(Z){this.operators=Z}execute(Z){let q=new C3(Z),X=0,z=this.operators,R=z.length,G,P,Q;for(;X<R;)if(G=z[X++],typeof G!="number")switch(G){case"jz":Q=q.pop(),P=q.pop(),P||(X=Q);break;case"j":P=q.pop(),X=P;break;case"abs":P=q.pop(),q.push(Math.abs(P));break;case"add":Q=q.pop(),P=q.pop(),q.push(P+Q);break;case"and":Q=q.pop(),P=q.pop(),typeof P=="boolean"&&typeof Q=="boolean"?q.push(P&&Q):q.push(P&Q);break;case"atan":Q=q.pop(),P=q.pop(),P=Math.atan2(P,Q)/Math.PI*180,P<0&&(P+=360),q.push(P);break;case"bitshift":Q=q.pop(),P=q.pop(),P>0?q.push(P<<Q):q.push(P>>Q);break;case"ceiling":P=q.pop(),q.push(Math.ceil(P));break;case"copy":P=q.pop(),q.copy(P);break;case"cos":P=q.pop(),q.push(Math.cos(P%360/180*Math.PI));break;case"cvi":P=0|q.pop(),q.push(P);break;case"cvr":break;case"div":Q=q.pop(),P=q.pop(),q.push(P/Q);break;case"dup":q.copy(1);break;case"eq":Q=q.pop(),P=q.pop(),q.push(P===Q);break;case"exch":q.roll(2,1);break;case"exp":Q=q.pop(),P=q.pop(),q.push(P**Q);break;case"false":q.push(!1);break;case"floor":P=q.pop(),q.push(Math.floor(P));break;case"ge":Q=q.pop(),P=q.pop(),q.push(P>=Q);break;case"gt":Q=q.pop(),P=q.pop(),q.push(P>Q);break;case"idiv":Q=q.pop(),P=q.pop(),q.push(P/Q|0);break;case"index":P=q.pop(),q.index(P);break;case"le":Q=q.pop(),P=q.pop(),q.push(P<=Q);break;case"ln":P=q.pop(),q.push(Math.log(P));break;case"log":P=q.pop(),q.push(Math.log10(P));break;case"lt":Q=q.pop(),P=q.pop(),q.push(P<Q);break;case"mod":Q=q.pop(),P=q.pop(),q.push(P%Q);break;case"mul":Q=q.pop(),P=q.pop(),q.push(P*Q);break;case"ne":Q=q.pop(),P=q.pop(),q.push(P!==Q);break;case"neg":P=q.pop(),q.push(-P);break;case"not":P=q.pop(),typeof P=="boolean"?q.push(!P):q.push(~P);break;case"or":Q=q.pop(),P=q.pop(),typeof P=="boolean"&&typeof Q=="boolean"?q.push(P||Q):q.push(P|Q);break;case"pop":q.pop();break;case"roll":Q=q.pop(),P=q.pop(),q.roll(P,Q);break;case"round":P=q.pop(),q.push(Math.round(P));break;case"sin":P=q.pop(),q.push(Math.sin(P%360/180*Math.PI));break;case"sqrt":P=q.pop(),q.push(Math.sqrt(P));break;case"sub":Q=q.pop(),P=q.pop(),q.push(P-Q);break;case"true":q.push(!0);break;case"truncate":P=q.pop(),P=P<0?Math.ceil(P):Math.floor(P),q.push(P);break;case"xor":Q=q.pop(),P=q.pop(),typeof P=="boolean"&&typeof Q=="boolean"?q.push(P!==Q):q.push(P^Q);break;default:throw new h(`Unknown operator ${G}`)}else q.push(G);return q.stack}}class w5{constructor(Z){this.type=Z}visit(Z){y1("abstract method")}}class Iq{constructor(){this.parts=[]}visitArgument(Z){this.parts.push("Math.max(",Z.min,", Math.min(",Z.max,", src[srcOffset + ",Z.index,"]))")}visitVariable(Z){this.parts.push("v",Z.index)}visitLiteral(Z){this.parts.push(Z.number)}visitBinaryOperation(Z){this.parts.push("("),Z.arg1.visit(this),this.parts.push(" ",Z.op," "),Z.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(Z){this.parts.push("var "),Z.variable.visit(this),this.parts.push(" = "),Z.arg.visit(this),this.parts.push(";")}visitMin(Z){this.parts.push("Math.min("),Z.arg.visit(this),this.parts.push(", ",Z.max,")")}toString(){return this.parts.join("")}}function sj(Z,q){return q.type==="literal"&&q.number===0?Z:Z.type==="literal"&&Z.number===0?q:q.type==="literal"&&Z.type==="literal"?new r4(Z.number+q.number):new Q9("+",Z,q,Z.min+q.min,Z.max+q.max)}function rj(Z,q){if(q.type==="literal"){if(q.number===0)return new r4(0);if(q.number===1)return Z;if(Z.type==="literal")return new r4(Z.number*q.number)}if(Z.type==="literal"){if(Z.number===0)return new r4(0);if(Z.number===1)return q}let X=Math.min(Z.min*q.min,Z.min*q.max,Z.max*q.min,Z.max*q.max),z=Math.max(Z.min*q.min,Z.min*q.max,Z.max*q.min,Z.max*q.max);return new Q9("*",Z,q,X,z)}function lj(Z,q){if(q.type==="literal"){if(q.number===0)return Z;if(Z.type==="literal")return new r4(Z.number-q.number)}return q.type==="binary"&&q.op==="-"&&Z.type==="literal"&&Z.number===1&&q.arg1.type==="literal"&&q.arg1.number===1?q.arg2:new Q9("-",Z,q,Z.min-q.max,Z.max-q.min)}function oj(Z,q){return Z.min>=q?new r4(q):Z.max<=q?Z:new gQ(Z,q)}class dQ{compile(Z,q,X){let z=[],R=[],G=q.length>>1,P=X.length>>1,Q,Y,W,$,_,J,U,f,K=0;for(let B=0;B<G;B++)z.push(new uQ(B,q[2*B],q[2*B+1]));for(let B=0,j=Z.length;B<j;B++)if(f=Z[B],typeof f!="number")switch(f){case"add":if(z.length<2)return null;$=z.pop(),W=z.pop(),z.push(sj(W,$));break;case"cvr":if(z.length<1)return null;break;case"mul":if(z.length<2)return null;$=z.pop(),W=z.pop(),z.push(rj(W,$));break;case"sub":if(z.length<2)return null;$=z.pop(),W=z.pop(),z.push(lj(W,$));break;case"exch":if(z.length<2)return null;_=z.pop(),J=z.pop(),z.push(_,J);break;case"pop":if(z.length<1)return null;z.pop();break;case"index":if(z.length<1)return null;if(W=z.pop(),W.type!=="literal")return null;if(Q=W.number,Q<0||!Number.isInteger(Q)||z.length<Q)return null;if(_=z[z.length-Q-1],_.type==="literal"||_.type==="var"){z.push(_);break}U=new Kq(K++,_.min,_.max),z[z.length-Q-1]=U,z.push(U),R.push(new Bq(U,_));break;case"dup":if(z.length<1)return null;if(typeof Z[B+1]=="number"&&Z[B+2]==="gt"&&Z[B+3]===B+7&&Z[B+4]==="jz"&&Z[B+5]==="pop"&&Z[B+6]===Z[B+1]){W=z.pop(),z.push(oj(W,Z[B+1])),B+=6;break}if(_=z.at(-1),_.type==="literal"||_.type==="var"){z.push(_);break}U=new Kq(K++,_.min,_.max),z[z.length-1]=U,z.push(U),R.push(new Bq(U,_));break;case"roll":if(z.length<2)return null;if($=z.pop(),W=z.pop(),$.type!=="literal"||W.type!=="literal")return null;if(Y=$.number,Q=W.number,Q<=0||!Number.isInteger(Q)||!Number.isInteger(Y)||z.length<Q)return null;if(Y=(Y%Q+Q)%Q,Y===0)break;z.push(...z.splice(z.length-Q,Q-Y));break;default:return null}else z.push(new r4(f));if(z.length!==P)return null;let I=[];for(let B of R){let j=new Iq;B.visit(j),I.push(j.toString())}for(let B=0,j=z.length;B<j;B++){let V=z[B],x=new Iq;V.visit(x);let M=X[2*B],H=X[2*B+1],A=[x.toString()];M>V.min&&(A.unshift("Math.max(",M,", "),A.push(")")),H<V.max&&(A.unshift("Math.min(",H,", "),A.push(")")),A.unshift("dest[destOffset + ",B,"] = "),A.push(";"),I.push(A.join(""))}return I.join(`
|
|
5
|
-
`)}}function OR(Z){return!!(1&Z)}function ij(Z){return!(1&Z)}function tj(Z,q,X){let z,R;for(z=q,R=Z.length;z<R;++z)if(Z[z]!==X)return z;return z}function yR(Z,q,X){for(let z=q,R=X-1;z<R;++z,--R){let G=Z[z];Z[z]=Z[R],Z[R]=G}}function zZ(Z,q,X=!1){let z="ltr";return X?z="ttb":q||(z="rtl"),{str:Z,dir:z}}function cQ(Z,q=-1,X=!1){let z=!0,R=Z.length;if(R===0||X)return zZ(Z,z,X);v4.length=R,c1.length=R;let G,P,Q=0;for(G=0;G<R;++G){v4[G]=Z.charAt(G);let B=Z.charCodeAt(G),j="L";B<=255?j=aj[B]:1424<=B&&B<=1524?j="R":1536<=B&&B<=1791?(j=nj[255&B],j||v("Bidi: invalid Unicode character "+B.toString(16))):(1792<=B&&B<=2220||64336<=B&&B<=65023||65136<=B&&B<=65279)&&(j="AL"),j!=="R"&&j!=="AL"&&j!=="AN"||Q++,c1[G]=j}if(Q===0)return z=!0,zZ(Z,z);q===-1&&(Q/R<0.3&&R>4?(z=!0,q=0):(z=!1,q=1));let Y=[];for(G=0;G<R;++G)Y[G]=q;let W=OR(q)?"R":"L",$=W,_=$,J,U=$;for(G=0;G<R;++G)c1[G]==="NSM"?c1[G]=U:U=c1[G];for(U=$,G=0;G<R;++G)J=c1[G],J==="EN"?c1[G]=U==="AL"?"AN":"EN":J!=="R"&&J!=="L"&&J!=="AL"||(U=J);for(G=0;G<R;++G)J=c1[G],J==="AL"&&(c1[G]="R");for(G=1;G<R-1;++G)c1[G]==="ES"&&c1[G-1]==="EN"&&c1[G+1]==="EN"&&(c1[G]="EN"),c1[G]!=="CS"||c1[G-1]!=="EN"&&c1[G-1]!=="AN"||c1[G+1]!==c1[G-1]||(c1[G]=c1[G-1]);for(G=0;G<R;++G)if(c1[G]==="EN"){for(let B=G-1;B>=0&&c1[B]==="ET";--B)c1[B]="EN";for(let B=G+1;B<R&&c1[B]==="ET";++B)c1[B]="EN"}for(G=0;G<R;++G)J=c1[G],J!=="WS"&&J!=="ES"&&J!=="ET"&&J!=="CS"||(c1[G]="ON");for(U=$,G=0;G<R;++G)J=c1[G],J==="EN"?c1[G]=U==="L"?"L":"EN":J!=="R"&&J!=="L"||(U=J);for(G=0;G<R;++G)if(c1[G]==="ON"){let B=tj(c1,G+1,"ON"),j=$;G>0&&(j=c1[G-1]);let V=_;B+1<R&&(V=c1[B+1]),j!=="L"&&(j="R"),V!=="L"&&(V="R"),j===V&&c1.fill(j,G,B),G=B-1}for(G=0;G<R;++G)c1[G]==="ON"&&(c1[G]=W);for(G=0;G<R;++G)J=c1[G],ij(Y[G])?J==="R"?Y[G]+=1:J!=="AN"&&J!=="EN"||(Y[G]+=2):J!=="L"&&J!=="AN"&&J!=="EN"||(Y[G]+=1);let f,K=-1,I=99;for(G=0,P=Y.length;G<P;++G)f=Y[G],K<f&&(K=f),I>f&&OR(f)&&(I=f);for(f=K;f>=I;--f){let B=-1;for(G=0,P=Y.length;G<P;++G)Y[G]<f?B>=0&&(yR(v4,B,G),B=-1):B<0&&(B=G);B>=0&&yR(v4,B,Y.length)}for(G=0,P=v4.length;G<P;++G){let B=v4[G];B!=="<"&&B!==">"||(v4[G]="")}return zZ(v4.join(""),z)}function wR(Z){let q=new Set(["thin","extralight","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultracondensed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return Z.split(/[- ,+]+/g).filter((X)=>!q.has(X.toLowerCase())).join(" ")}function jq({alias:Z,local:q,path:X,fallback:z,style:R,ultimate:G},P,Q,Y=!0,W=!0,$=""){let _={style:null,ultimate:null};if(q){let J=$?` ${$}`:"";for(let U of q)P.push(`local(${U}${J})`)}if(Z){let J=U7.get(Z),U=$||function(f){switch(f){case f5:return"Bold";case K5:return"Italic";case B5:return"Bold Italic";default:if(f?.weight==="bold")return"Bold";if(f?.style==="italic")return"Italic"}return""}(R);Object.assign(_,jq(J,P,Q,Y&&!z,W&&!X,U))}if(R&&(_.style=R),G&&(_.ultimate=G),Y&&z){let J=U7.get(z),{ultimate:U}=jq(J,P,Q,Y,W&&!X,$);_.ultimate||=U}return W&&X&&Q&&P.push(`url(${Q}${X})`),_}function ER(Z,q,X,z,R,G){if(z.startsWith("InvalidPDFjsFont_"))return null;G!=="TrueType"&&G!=="Type1"||!/^[A-Z]{6}\+/.test(z)||(z=z.slice(7));let P=z=t7(z),Q=Z.get(P);if(Q)return Q;let Y=U7.get(z);if(!Y){for(let[I,B]of ZV)if(z.startsWith(I)){z=`${B}${z.substring(I.length)}`,Y=U7.get(z);break}}let W=!1;Y||(Y=U7.get(R),W=!0);let $=`${q.getDocId()}_s${q.createFontId()}`;if(!Y){if(!hZ(z))return v(`Cannot substitute the font because of its name: ${z}`),Z.set(P,null),null;let I=/bold/gi.test(z),B=/oblique|italic/gi.test(z),j=I&&B&&B5||I&&f5||B&&K5||$5;return Q={css:`"${wR(z)}",${$}`,guessFallback:!0,loadedName:$,baseFontName:z,src:`local(${z})`,style:j},Z.set(P,Q),Q}let _=[];W&&hZ(z)&&_.push(`local(${z})`);let{style:J,ultimate:U}=jq(Y,_,X),f=U===null,K=f?"":`,${U}`;return Q={css:`"${wR(z)}",${$}${K}`,guessFallback:f,loadedName:$,baseFontName:z,src:_.join(","),style:J},Z.set(P,Q),Q}function gR(Z,q,X,z,R,G){let P=R*G,Q;Q=q<=8?new Uint8Array(P):q<=16?new Uint16Array(P):new Uint32Array(P);let Y=X/R,W=z/G,$,_,J,U,f=0,K=new Uint16Array(R),I=X;for($=0;$<R;$++)K[$]=Math.floor($*Y);for($=0;$<G;$++)for(J=Math.floor($*W)*I,_=0;_<R;_++)U=J+K[_],Q[f++]=Z[U];return Q}class d4{constructor({xref:Z,res:q,image:X,isInline:z=!1,smask:R=null,mask:G=null,isMask:P=!1,pdfFunctionFactory:Q,globalColorSpaceCache:Y,localColorSpaceCache:W}){this.image=X;let $=X.dict,_=$.get("F","Filter"),J;if(_ instanceof t)J=_.name;else if(Array.isArray(_)){let I=Z.fetchIfRef(_[0]);I instanceof t&&(J=I.name)}switch(J){case"JPXDecode":({width:X.width,height:X.height,componentsCount:X.numComps,bitsPerComponent:X.bitsPerComponent}=i7.parseImageProperties(X.stream)),X.stream.reset();let I=Q0.getReducePowerForJPX(X.width,X.height,X.numComps);if(this.jpxDecoderOptions={numComponents:0,isIndexedColormap:!1,smaskInData:$.has("SMaskInData"),reducePower:I},I){let B=2**I;X.width=Math.ceil(X.width/B),X.height=Math.ceil(X.height/B)}break;case"JBIG2Decode":X.bitsPerComponent=1,X.numComps=1}let U=$.get("W","Width"),f=$.get("H","Height");if(Number.isInteger(X.width)&&X.width>0&&Number.isInteger(X.height)&&X.height>0&&(X.width!==U||X.height!==f))v("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),U=X.width,f=X.height;else{let I=typeof U=="number"&&U>0,B=typeof f=="number"&&f>0;if(!I||!B){if(!X.fallbackDims)throw new h(`Invalid image width: ${U} or height: ${f}`);v("PDFImage - using the Width/Height of the parent image, for SMask/Mask data."),I||(U=X.fallbackDims.width),B||(f=X.fallbackDims.height)}}this.width=U,this.height=f,this.interpolate=$.get("I","Interpolate"),this.imageMask=$.get("IM","ImageMask")||!1,this.matte=$.get("Matte")||!1;let K=X.bitsPerComponent;if(!K&&(K=$.get("BPC","BitsPerComponent"),!K)){if(!this.imageMask)throw new h(`Bits per component missing in image: ${this.imageMask}`);K=1}if(this.bpc=K,!this.imageMask){let I=$.getRaw("CS")||$.getRaw("ColorSpace"),B=!!I;if(B)this.jpxDecoderOptions?.smaskInData&&(I=t.get("DeviceRGBA"));else if(this.jpxDecoderOptions)I=t.get("DeviceRGBA");else switch(X.numComps){case 1:I=t.get("DeviceGray");break;case 3:I=t.get("DeviceRGB");break;case 4:I=t.get("DeviceCMYK");break;default:throw Error(`Images with ${X.numComps} color components not supported.`)}this.colorSpace=g1.parse({cs:I,xref:Z,resources:z?q:null,pdfFunctionFactory:Q,globalColorSpaceCache:Y,localColorSpaceCache:W}),this.numComps=this.colorSpace.numComps,this.jpxDecoderOptions&&(this.jpxDecoderOptions.numComponents=B?this.numComps:0,this.jpxDecoderOptions.isIndexedColormap=this.colorSpace.name==="Indexed")}if(this.decode=$.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,K)||P&&!m8.isDefaultDecode(this.decode,1))){this.needsDecode=!0;let I=(1<<K)-1;this.decodeCoefficients=[],this.decodeAddends=[];let B=this.colorSpace?.name==="Indexed";for(let j=0,V=0;j<this.decode.length;j+=2,++V){let x=this.decode[j],M=this.decode[j+1];this.decodeCoefficients[V]=B?(M-x)/I:M-x,this.decodeAddends[V]=B?x:I*x}}if(R)R.fallbackDims??={width:U,height:f},this.smask=new d4({xref:Z,res:q,image:R,isInline:z,pdfFunctionFactory:Q,globalColorSpaceCache:Y,localColorSpaceCache:W});else if(G)if(G instanceof C1)G.dict.get("IM","ImageMask")?(G.fallbackDims??={width:U,height:f},this.mask=new d4({xref:Z,res:q,image:G,isInline:z,isMask:!0,pdfFunctionFactory:Q,globalColorSpaceCache:Y,localColorSpaceCache:W})):v("Ignoring /Mask in image without /ImageMask.");else this.mask=G}static async buildImage({xref:Z,res:q,image:X,isInline:z=!1,pdfFunctionFactory:R,globalColorSpaceCache:G,localColorSpaceCache:P}){let Q=X,Y=null,W=null,$=X.dict.get("SMask"),_=X.dict.get("Mask");return $?$ instanceof C1?Y=$:v("Unsupported /SMask format."):_&&(_ instanceof C1||Array.isArray(_)?W=_:v("Unsupported /Mask format.")),new d4({xref:Z,res:q,image:Q,isInline:z,smask:Y,mask:W,pdfFunctionFactory:R,globalColorSpaceCache:G,localColorSpaceCache:P})}static async createMask({image:Z,isOffscreenCanvasSupported:q=!1}){let{dict:X}=Z,z=X.get("W","Width"),R=X.get("H","Height"),G=X.get("I","Interpolate"),P=X.getArray("D","Decode"),Q=P?.[0]>0,Y=(z+7>>3)*R,W=Z.getBytes(Y),$=z===1&&R===1&&Q===(W.length===0||!!(128&W[0]));if($)return{isSingleOpaquePixel:$};if(q){if(Q0.needsToBeResized(z,R)){let I=new Uint8ClampedArray(z*R*4);return lZ({src:W,dest:I,width:z,height:R,nonBlackColor:0,inverseDecode:Q}),Q0.createImage({kind:U4,data:I,width:z,height:R,interpolate:G})}let U=new OffscreenCanvas(z,R),f=U.getContext("2d"),K=f.createImageData(z,R);return lZ({src:W,dest:K.data,width:z,height:R,nonBlackColor:0,inverseDecode:Q}),f.putImageData(K,0,0),{data:null,width:z,height:R,interpolate:G,bitmap:U.transferToImageBitmap()}}let _=W.byteLength,J;if(Z instanceof a8&&(!Q||Y===_)?J=W:Q?(J=new Uint8Array(Y),J.set(W),J.fill(255,_)):J=new Uint8Array(W),Q)for(let U=0;U<_;U++)J[U]^=255;return{data:J,width:z,height:R,interpolate:G}}get drawWidth(){return Math.max(this.width,this.smask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(Z){let q=this.bpc,X=this.numComps,z=this.decodeAddends,R=this.decodeCoefficients,G=(1<<q)-1,P,Q;if(q===1){for(P=0,Q=Z.length;P<Q;P++)Z[P]=+!Z[P];return}let Y=0;for(P=0,Q=this.width*this.height;P<Q;P++)for(let W=0;W<X;W++)Z[Y]=E8(z[W]+Z[Y]*R[W],0,G),Y++}getComponents(Z){let q=this.bpc;if(q===8)return Z;let X=this.width,z=this.height,R=this.numComps,G=X*z*R,P,Q=0;P=q<=8?new Uint8Array(G):q<=16?new Uint16Array(G):new Uint32Array(G);let Y=X*R,W=(1<<q)-1,$,_,J=0;if(q===1){let U,f,K;for(let I=0;I<z;I++){for(f=J+(-8&Y),K=J+Y;J<f;)_=Z[Q++],P[J]=_>>7&1,P[J+1]=_>>6&1,P[J+2]=_>>5&1,P[J+3]=_>>4&1,P[J+4]=_>>3&1,P[J+5]=_>>2&1,P[J+6]=_>>1&1,P[J+7]=1&_,J+=8;if(J<K)for(_=Z[Q++],U=128;J<K;)P[J++]=+!!(_&U),U>>=1}}else{let U=0;for(_=0,J=0,$=G;J<$;++J){for(J%Y===0&&(_=0,U=0);U<q;)_=_<<8|Z[Q++],U+=8;let f=U-q,K=_>>f;K<0?K=0:K>W&&(K=W),P[J]=K,_&=(1<<f)-1,U=f}}return P}async fillOpacity(Z,q,X,z,R){let G=this.smask,P=this.mask,Q,Y,W,$,_,J;if(G)Y=G.width,W=G.height,Q=new Uint8ClampedArray(Y*W),await G.fillGrayBuffer(Q),Y===q&&W===X||(Q=gR(Q,G.bpc,Y,W,q,X));else if(P)if(P instanceof d4){for(Y=P.width,W=P.height,Q=new Uint8ClampedArray(Y*W),P.numComps=1,await P.fillGrayBuffer(Q),$=0,_=Y*W;$<_;++$)Q[$]=255-Q[$];Y===q&&W===X||(Q=gR(Q,P.bpc,Y,W,q,X))}else{if(!Array.isArray(P))throw new h("Unknown mask format.");{Q=new Uint8ClampedArray(q*X);let U=this.numComps;for($=0,_=q*X;$<_;++$){let f=0,K=$*U;for(J=0;J<U;++J){let I=R[K+J],B=2*J;if(I<P[B]||I>P[B+1]){f=255;break}}Q[$]=f}}}if(Q)for($=0,J=3,_=q*z;$<_;++$,J+=4)Z[J]=Q[$];else for($=0,J=3,_=q*z;$<_;++$,J+=4)Z[J]=255}undoPreblend(Z,q,X){let z=this.smask?.matte;if(!z)return;let R=this.colorSpace.getRgb(z,0),G=R[0],P=R[1],Q=R[2],Y=q*X*4;for(let W=0;W<Y;W+=4){let $=Z[W+3];if($===0){Z[W]=255,Z[W+1]=255,Z[W+2]=255;continue}let _=255/$;Z[W]=(Z[W]-G)*_+G,Z[W+1]=(Z[W+1]-P)*_+P,Z[W+2]=(Z[W+2]-Q)*_+Q}}async createImageData(Z=!1,q=!1){let X=this.drawWidth,z=this.drawHeight,R={width:X,height:z,interpolate:this.interpolate,kind:0,data:null},G=this.numComps,P=this.width,Q=this.height,Y=this.bpc,W=P*G*Y+7>>3,$=q&&Q0.needsToBeResized(X,z);if(!this.smask&&!this.mask&&this.colorSpace.name==="DeviceRGBA"){R.kind=U4;let x=R.data=await this.getImageBytes(Q*P*4,{});return q?$?Q0.createImage(R,!1):this.createBitmap(U4,X,z,x):R}if(!Z){let x;if(this.colorSpace.name==="DeviceGray"&&Y===1?x=X3:this.colorSpace.name!=="DeviceRGB"||Y!==8||this.needsDecode||(x=W7),x&&!this.smask&&!this.mask&&X===P&&z===Q){let M=await this.#Z(P,Q);if(M)return M;let H=await this.getImageBytes(Q*W,{});if(q)return $?Q0.createImage({data:H,kind:x,width:X,height:z,interpolate:this.interpolate},this.needsDecode):this.createBitmap(x,P,Q,H);if(R.kind=x,R.data=H,this.needsDecode){t1(x===X3,"PDFImage.createImageData: The image must be grayscale.");let A=R.data;for(let T=0,k=A.length;T<k;T++)A[T]^=255}return R}if(this.image instanceof v6&&!this.smask&&!this.mask&&!this.needsDecode){let M=Q*W;if(q&&!$){let H=!1;switch(this.colorSpace.name){case"DeviceGray":M*=4,H=!0;break;case"DeviceRGB":M=M/3*4,H=!0;break;case"DeviceCMYK":H=!0}if(H){let A=await this.#Z(X,z);if(A)return A;let T=await this.getImageBytes(M,{drawWidth:X,drawHeight:z,forceRGBA:!0});return this.createBitmap(U4,X,z,T)}}else switch(this.colorSpace.name){case"DeviceGray":M*=3;case"DeviceRGB":case"DeviceCMYK":return R.kind=W7,R.data=await this.getImageBytes(M,{drawWidth:X,drawHeight:z,forceRGB:!0}),$?Q0.createImage(R):R}}}let _=await this.getImageBytes(Q*W,{internal:!0}),J=0|_.length/W*z/Q,U=this.getComponents(_),f,K,I,B,j,V;if(q&&!$&&(I=new OffscreenCanvas(X,z),B=I.getContext("2d"),j=B.createImageData(X,z),V=j.data),R.kind=U4,Z||this.smask||this.mask)q&&!$||(V=new Uint8ClampedArray(X*z*4)),f=1,K=!0,await this.fillOpacity(V,X,z,J,U);else{if(!q||$)R.kind=W7,V=new Uint8ClampedArray(X*z*3),f=0;else new Uint32Array(V.buffer).fill(Z0.isLittleEndian?4278190080:255),f=1;K=!1}if(this.needsDecode&&this.decodeBuffer(U),this.colorSpace.fillRgb(V,P,Q,X,z,J,Y,U,f),K&&this.undoPreblend(V,X,J),q&&!$)return B.putImageData(j,0,0),{data:null,width:X,height:z,bitmap:I.transferToImageBitmap(),interpolate:this.interpolate};return R.data=V,$?Q0.createImage(R):R}async fillGrayBuffer(Z){let q=this.numComps;if(q!==1)throw new h(`Reading gray scale from a color image: ${q}`);let X=this.width,z=this.height,R=this.bpc,G=X*q*R+7>>3,P=await this.getImageBytes(z*G,{internal:!0}),Q=this.getComponents(P),Y,W;if(R===1){if(W=X*z,this.needsDecode)for(Y=0;Y<W;++Y)Z[Y]=Q[Y]-1&255;else for(Y=0;Y<W;++Y)Z[Y]=255&-Q[Y];return}this.needsDecode&&this.decodeBuffer(Q),W=X*z;let $=255/((1<<R)-1);for(Y=0;Y<W;++Y)Z[Y]=$*Q[Y]}createBitmap(Z,q,X,z){let R=new OffscreenCanvas(q,X),G=R.getContext("2d"),P;return Z===U4?P=new ImageData(z,q,X):(P=G.createImageData(q,X),EP({kind:Z,src:z,dest:new Uint32Array(P.data.buffer),width:q,height:X,inverseDecode:this.needsDecode})),G.putImageData(P,0,0),{data:null,width:q,height:X,bitmap:R.transferToImageBitmap(),interpolate:this.interpolate}}async#Z(Z,q){let X=await this.image.getTransferableImage();return X?{data:null,width:Z,height:q,bitmap:X,interpolate:this.interpolate}:null}async getImageBytes(Z,{drawWidth:q,drawHeight:X,forceRGBA:z=!1,forceRGB:R=!1,internal:G=!1}){this.image.reset(),this.image.drawWidth=q||this.width,this.image.drawHeight=X||this.height,this.image.forceRGBA=!!z,this.image.forceRGB=!!R;let P=await this.image.getImageData(Z,this.jpxDecoderOptions);return G||this.image instanceof a8?P:(t1(P instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(P))}}function hQ(Z,q=!1){if(Array.isArray(Z)){for(let X of Z){let z=hQ(X,!0);if(z)return z}return v(`Unsupported blend mode Array: ${Z}`),"source-over"}if(!(Z instanceof t))return q?null:"source-over";switch(Z.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 q?null:(v(`Unsupported blend mode: ${Z.name}`),"source-over")}function RZ(Z,{objId:q,fn:X,args:z,optionalContent:R,hasMask:G}){q&&Z.addDependency(q),Z.addImageOps(X,z,R,G),X===I6&&z[0]?.count>0&&z[0].count++}class D7{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){return!(++this.checked<D7.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+D7.TIME_SLOT_DURATION_MS,this.checked=0}}class H6{constructor({xref:Z,handler:q,pageIndex:X,idFactory:z,fontCache:R,builtInCMapCache:G,standardFontDataCache:P,globalColorSpaceCache:Q,globalImageCache:Y,systemFontCache:W,options:$=null}){this.xref=Z,this.handler=q,this.pageIndex=X,this.idFactory=z,this.fontCache=R,this.builtInCMapCache=G,this.standardFontDataCache=P,this.globalColorSpaceCache=Q,this.globalImageCache=Y,this.systemFontCache=W,this.options=$||XV,this.type3FontRefs=null,this._regionalImageCache=new DQ,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this)}get _pdfFunctionFactory(){return X1(this,"_pdfFunctionFactory",new HX({xref:this.xref,isEvalSupported:this.options.isEvalSupported}))}get parsingType3Font(){return!!this.type3FontRefs}clone(Z=null){let q=Object.create(this);return q.options=Object.assign(Object.create(null),this.options,Z),q}hasBlendModes(Z,q){if(!(Z instanceof S))return!1;if(Z.objId&&q.has(Z.objId))return!1;let X=new U8(q);Z.objId&&X.put(Z.objId);let z=[Z],R=this.xref;for(;z.length;){let G=z.shift(),P=G.get("ExtGState");if(P instanceof S)for(let Y of P.getRawValues()){if(Y instanceof P1){if(X.has(Y))continue;try{Y=R.fetch(Y)}catch($){X.put(Y),v1(`hasBlendModes - ignoring ExtGState: "${$}".`);continue}}if(!(Y instanceof S))continue;Y.objId&&X.put(Y.objId);let W=Y.get("BM");if(W instanceof t){if(W.name!=="Normal")return!0}else if(W!==void 0&&Array.isArray(W)){for(let $ of W)if($ instanceof t&&$.name!=="Normal")return!0}}let Q=G.get("XObject");if(Q instanceof S)for(let Y of Q.getRawValues()){if(Y instanceof P1){if(X.has(Y))continue;try{Y=R.fetch(Y)}catch($){X.put(Y),v1(`hasBlendModes - ignoring XObject: "${$}".`);continue}}if(!(Y instanceof C1))continue;Y.dict.objId&&X.put(Y.dict.objId);let W=Y.dict.get("Resources");W instanceof S&&(W.objId&&X.has(W.objId)||(z.push(W),W.objId&&X.put(W.objId)))}}for(let G of X)q.put(G);return!1}async fetchBuiltInCMap(Z){let q=this.builtInCMapCache.get(Z);if(q)return q;let X;return X=this.options.useWorkerFetch?{cMapData:await ZR(`${this.options.cMapUrl}${Z}.bcmap`),isCompressed:!0}:await this.handler.sendWithPromise("FetchBinaryData",{type:"cMapReaderFactory",name:Z}),this.builtInCMapCache.set(Z,X),X}async fetchStandardFontData(Z){let q=this.standardFontDataCache.get(Z);if(q)return new W8(q);if(this.options.useSystemFonts&&Z!=="Symbol"&&Z!=="ZapfDingbats")return null;let X=sI()[Z],z;try{z=this.options.useWorkerFetch?await ZR(`${this.options.standardFontDataUrl}${X}`):await this.handler.sendWithPromise("FetchBinaryData",{type:"standardFontDataFactory",filename:X})}catch(R){return v(R),null}return this.standardFontDataCache.set(Z,z),new W8(z)}async buildFormXObject(Z,q,X,z,R,G,P,Q){let{dict:Y}=q,W=g4(Y.getArray("Matrix"),null),$=T4(Y.getArray("BBox"),null),_,J;Y.has("OC")&&(_=await this.parseMarkedContentProps(Y.get("OC"),Z)),_!==void 0&&z.addOp(i0,["OC",_]);let U=Y.get("Group");if(U){J={matrix:W,bbox:$,smask:X,isolated:!1,knockout:!1};let I=null;if(Q8(U.get("S"),"Transparency")&&(J.isolated=U.get("I")||!1,J.knockout=U.get("K")||!1,U.has("CS"))){let B=this._getColorSpace(U.getRaw("CS"),Z,P);I=B instanceof m8?B:await this._handleColorSpace(B)}X?.backdrop&&(I||=g1.rgb,X.backdrop=I.getRgbHex(X.backdrop,0)),z.addOp(EB,[J])}let f=[W&&new Float32Array(W),!U&&$&&new Float32Array($)||null];z.addOp(UP,f);let K=Y.get("Resources");await this.getOperatorList({stream:q,task:R,resources:K instanceof S?K:Z,operatorList:z,initialState:G,prevRefs:Q}),z.addOp(wB,[]),U&&z.addOp(uB,[J]),_!==void 0&&z.addOp(B6,[])}_sendImgData(Z,q,X=!1){let z=q?[q.bitmap||q.data.buffer]:null;return this.parsingType3Font||X?this.handler.send("commonobj",[Z,"Image",q],z):this.handler.send("obj",[Z,this.pageIndex,"Image",q],z)}async buildPaintImageXObject({resources:Z,image:q,isInline:X=!1,operatorList:z,cacheKey:R,localImageCache:G,localColorSpaceCache:P}){let{maxImageSize:Q,ignoreErrors:Y,isOffscreenCanvasSupported:W}=this.options,{dict:$}=q,_=$.objId,J=$.get("W","Width"),U=$.get("H","Height");if(!J||typeof J!="number"||!U||typeof U!="number")return void v("Image dimensions are missing, or not numbers.");if(Q!==-1&&J*U>Q){if(!Y)throw Error("Image exceeded maximum allowed size and was removed.");return void v("Image exceeded maximum allowed size and was removed.")}let f;$.has("OC")&&(f=await this.parseMarkedContentProps($.get("OC"),Z));let K,I,B;if($.get("IM","ImageMask")){if(K=await d4.createMask({image:q,isOffscreenCanvasSupported:W&&!this.parsingType3Font}),K.isSingleOpaquePixel){if(I=hB,B=[],z.addImageOps(I,B,f),R){let A={fn:I,args:B,optionalContent:f};G.set(R,_,A),_&&this._regionalImageCache.set(null,_,A)}return}if(this.parsingType3Font)return B=function({data:A,width:T,height:k}){if(T>1000||k>1000)return null;let y=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),O=T+1,D=new Uint8Array(O*(k+1)),n,b,l,N=T+7&-8,L=new Uint8Array(N*k),m=0;for(let Q1 of A){let r=128;for(;r>0;)L[m++]=Q1&r?0:255,r>>=1}let d=0;for(m=0,L[m]!==0&&(D[0]=1,++d),b=1;b<T;b++)L[m]!==L[m+1]&&(D[b]=L[m]?2:1,++d),m++;for(L[m]!==0&&(D[b]=2,++d),n=1;n<k;n++){m=n*N,l=n*O,L[m-N]!==L[m]&&(D[l]=L[m]?1:8,++d);let Q1=(L[m]?4:0)+(L[m-N]?8:0);for(b=1;b<T;b++)Q1=(Q1>>2)+(L[m+1]?4:0)+(L[m-N+1]?8:0),y[Q1]&&(D[l+b]=y[Q1],++d),m++;if(L[m-N]!==L[m]&&(D[l+b]=L[m]?2:4,++d),d>1000)return null}for(m=N*(k-1),l=n*O,L[m]!==0&&(D[l]=8,++d),b=1;b<T;b++)L[m]!==L[m+1]&&(D[l+b]=L[m]?4:8,++d),m++;if(L[m]!==0&&(D[l+b]=4,++d),d>1000)return null;let e=new Int32Array([0,O,-1,0,-O,0,0,0,1]),E=[],{a:p,b:F,c:s,d:w,e:c,f:o}=new DOMMatrix().scaleSelf(1/T,-1/k).translateSelf(0,-k);for(n=0;d&&n<=k;n++){let Q1=n*O,r=Q1+T;for(;Q1<r&&!D[Q1];)Q1++;if(Q1===r)continue;let q1=Q1%O,R1=n;E.push(Z7,p*q1+s*R1+c,F*q1+w*R1+o);let V1=Q1,f1=D[Q1];do{let Y1=e[f1];do Q1+=Y1;while(!D[Q1]);let x1=D[Q1];x1!==5&&x1!==10?(f1=x1,D[Q1]=0):(f1=x1&51*f1>>4,D[Q1]&=f1>>2|f1<<2),q1=Q1%O,R1=Q1/O|0,E.push(Y5,p*q1+s*R1+c,F*q1+w*R1+o),D[Q1]||--d}while(V1!==Q1);--n}return[lB,[new Float32Array(E)],new Float32Array([0,0,T,k])]}(K),B?void z.addImageOps(A5,B,f):(v("Cannot compile Type3 glyph."),void z.addImageOps(I6,[K],f));let H=`mask_${this.idFactory.createObjId()}`;if(z.addDependency(H),K.dataLen=K.bitmap?K.width*K.height*4:K.data.length,this._sendImgData(H,K),I=I6,B=[{data:H,width:K.width,height:K.height,interpolate:K.interpolate,count:1}],z.addImageOps(I,B,f),R){let A={objId:H,fn:I,args:B,optionalContent:f};G.set(R,_,A),_&&this._regionalImageCache.set(null,_,A)}return}let j=$.has("SMask")||$.has("Mask");if(X&&J+U<200&&!j){try{K=await new d4({xref:this.xref,res:Z,image:q,isInline:X,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:P}).createImageData(!0,!1),z.addImageOps(B3,[K],f)}catch(H){let A=`Unable to decode inline image: "${H}".`;if(!Y)throw Error(A);v(A)}return}let V=`img_${this.idFactory.createObjId()}`,x=!1,M=null;if(this.parsingType3Font?V=`${this.idFactory.getDocId()}_type3_${V}`:R&&_&&(x=this.globalImageCache.shouldCache(_,this.pageIndex),x&&(t1(!X,"Cannot cache an inline image globally."),V=`${this.idFactory.getDocId()}_${V}`)),z.addDependency(V),I=wZ,B=[V,J,U],z.addImageOps(I,B,f,j),x){if(M={objId:V,fn:I,args:B,optionalContent:f,hasMask:j,byteSize:0},this.globalImageCache.hasDecodeFailed(_))return this.globalImageCache.setData(_,M),void this._sendImgData(V,null,x);if(J*U>250000||j){let H=await this.handler.sendWithPromise("commonobj",[V,"CopyLocalImage",{imageRef:_}]);if(H)return this.globalImageCache.setData(_,M),void this.globalImageCache.addByteSize(_,H)}}if(d4.buildImage({xref:this.xref,res:Z,image:q,isInline:X,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:P}).then(async(H)=>(K=await H.createImageData(!1,W),K.dataLen=K.bitmap?K.width*K.height*4:K.data.length,K.ref=_,x&&this.globalImageCache.addByteSize(_,K.dataLen),this._sendImgData(V,K,x))).catch((H)=>(v(`Unable to decode image "${V}": "${H}".`),_&&this.globalImageCache.addDecodeFailed(_),this._sendImgData(V,null,x))),R){let H={objId:V,fn:I,args:B,optionalContent:f,hasMask:j};G.set(R,_,H),_&&(this._regionalImageCache.set(null,_,H),x&&(t1(M,"The global cache-data must be available."),this.globalImageCache.setData(_,M)))}}handleSMask(Z,q,X,z,R,G,P){let Q=Z.get("G"),Y={subtype:Z.get("S").name,backdrop:Z.get("BC")},W=Z.get("TR");if(XZ(W)){let $=this._pdfFunctionFactory.create(W),_=new Uint8Array(256),J=new Float32Array(1);for(let U=0;U<256;U++)J[0]=U/255,$(J,0,J,0),_[U]=255*J[0]|0;Y.transferMap=_}return this.buildFormXObject(q,Q,Y,X,z,R.state.clone({newPath:!0}),G,P)}handleTransferFunction(Z){let q;if(Array.isArray(Z))q=Z;else{if(!XZ(Z))return null;q=[Z]}let X=[],z=0,R=0;for(let G of q){let P=this.xref.fetchIfRef(G);if(z++,Q8(P,"Identity")){X.push(null);continue}if(!XZ(P))return null;let Q=this._pdfFunctionFactory.create(P),Y=new Uint8Array(256),W=new Float32Array(1);for(let $=0;$<256;$++)W[0]=$/255,Q(W,0,W,0),Y[$]=255*W[0]|0;X.push(Y),R++}return z!==1&&z!==4||R===0?null:X}handleTilingType(Z,q,X,z,R,G,P,Q){let Y=new O8,W=S.merge({xref:this.xref,dictArray:[R.get("Resources"),X]});return this.getOperatorList({stream:z,task:P,resources:W,operatorList:Y}).then(function(){let $=Y.getIR(),_=mR($,R,q);G.addDependencies(Y.dependencies),G.addOp(Z,_),R.objId&&Q.set(null,R.objId,{operatorListIR:$,dict:R})}).catch(($)=>{if(!($ instanceof p8)){if(!this.options.ignoreErrors)throw $;v(`handleTilingType - ignoring pattern: "${$}".`)}})}async handleSetFont(Z,q,X,z,R,G,P=null,Q=null){let Y=q?.[0]instanceof t?q[0].name:null,W=await this.loadFont(Y,X,Z,R,P,Q);return W.font.isType3Font&&z.addDependencies(W.type3Dependencies),G.font=W.font,W.send(this.handler),W.loadedName}handleText(Z,q){let X=q.font,z=X.charsToGlyphs(Z);if(X.data)(!!(q.textRenderingMode&QB)||q.fillColorSpace.name==="Pattern"||X.disableFontFace)&&H6.buildFontPaths(X,z,this.handler,this.options);return z}ensureStateFont(Z){if(Z.font)return;let q=new h("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw q;v(`ensureStateFont: "${q}".`)}async setGState({resources:Z,gState:q,operatorList:X,cacheKey:z,task:R,stateManager:G,localGStateCache:P,localColorSpaceCache:Q,seenRefs:Y}){let W=q.objId,$=!0,_=[],J=Promise.resolve();for(let[U,f]of q)switch(U){case"Type":break;case"LW":if(typeof f!="number"){v(`Invalid LW (line width): ${f}`);break}_.push([U,Math.abs(f)]);break;case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":_.push([U,f]);break;case"Font":$=!1,J=J.then(()=>this.handleSetFont(Z,null,f[0],X,R,G.state).then(function(I){X.addDependency(I),_.push([U,[I,f[1]]])}));break;case"BM":_.push([U,hQ(f)]);break;case"SMask":if(Q8(f,"None")){_.push([U,!1]);break}f instanceof S?($=!1,J=J.then(()=>this.handleSMask(f,Z,X,R,G,Q,Y)),_.push([U,!0])):v("Unsupported SMask type");break;case"TR":let K=this.handleTransferFunction(f);_.push([U,K]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":v1("graphic state operator "+U);break;default:v1("Unknown graphic state operator "+U)}await J,_.length>0&&X.addOp(I5,[_]),$&&P.set(z,W,_)}loadFont(Z,q,X,z,R=null,G=null){let P=async()=>new o2({loadedName:"g_font_error",font:new $q(`Font "${Z}" is not available.`),dict:q}),Q;if(q)q instanceof P1&&(Q=q);else{let K=X.get("Font");K&&(Q=K.getRaw(Z))}if(Q){if(this.type3FontRefs?.has(Q))return P();if(this.fontCache.has(Q))return this.fontCache.get(Q);try{q=this.xref.fetchIfRef(Q)}catch(K){v(`loadFont - lookup failed: "${K}".`)}}if(!(q instanceof S)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return v(`Font "${Z}" is not available.`),P();v(`Font "${Z}" is not available -- attempting to fallback to a default font.`),q=R||H6.fallbackFontDict}if(q.cacheKey&&this.fontCache.has(q.cacheKey))return this.fontCache.get(q.cacheKey);let{promise:Y,resolve:W}=Promise.withResolvers(),$;try{$=this.preEvaluateFont(q),$.cssFontInfo=G}catch(K){return v(`loadFont - preEvaluateFont failed: "${K}".`),P()}let{descriptor:_,hash:J}=$,U=Q instanceof P1,f;if(J&&_ instanceof S){let K=_.fontAliases||=Object.create(null);if(K[J]){let I=K[J].aliasRef;if(U&&I&&this.fontCache.has(I))return this.fontCache.putAlias(Q,I),this.fontCache.get(Q)}else K[J]={fontID:this.idFactory.createFontId()};U&&(K[J].aliasRef=Q),f=K[J].fontID}else f=this.idFactory.createFontId();return t1(f?.startsWith("f"),'The "fontID" must be (correctly) defined.'),U?this.fontCache.put(Q,Y):(q.cacheKey=`cacheKey_${f}`,this.fontCache.put(q.cacheKey,Y)),q.loadedName=`${this.idFactory.getDocId()}_${f}`,this.translateFont($).then(async(K)=>{let I=new o2({loadedName:q.loadedName,font:K,dict:q});if(K.isType3Font)try{await I.loadType3Data(this,X,z)}catch(B){throw Error(`Type3 font load error: ${B}`)}W(I)}).catch((K)=>{v(`loadFont - translateFont failed: "${K}".`),W(new o2({loadedName:q.loadedName,font:new $q(K?.message),dict:q}))}),Y}buildPath(Z,q,X){let{pathMinMax:z,pathBuffer:R}=X;switch(0|Z){case bZ:{let G=X.currentPointX=q[0],P=X.currentPointY=q[1],Q=q[2],Y=q[3],W=G+Q,$=P+Y;Q===0||Y===0?R.push(Z7,G,P,Y5,W,$,B2):R.push(Z7,G,P,Y5,W,P,Y5,W,$,Y5,G,$,B2),h1.rectBoundingBox(G,P,W,$,z);break}case R3:{let G=X.currentPointX=q[0],P=X.currentPointY=q[1];R.push(Z7,G,P),h1.pointBoundingBox(G,P,z);break}case TZ:{let G=X.currentPointX=q[0],P=X.currentPointY=q[1];R.push(Y5,G,P),h1.pointBoundingBox(G,P,z);break}case NZ:{let{currentPointX:G,currentPointY:P}=X,[Q,Y,W,$,_,J]=q;X.currentPointX=_,X.currentPointY=J,R.push(g2,Q,Y,W,$,_,J),h1.bezierBoundingBox(G,P,Q,Y,W,$,_,J,z);break}case CZ:{let{currentPointX:G,currentPointY:P}=X,[Q,Y,W,$]=q;X.currentPointX=W,X.currentPointY=$,R.push(g2,G,P,Q,Y,W,$),h1.bezierBoundingBox(G,P,G,P,Q,Y,W,$,z);break}case FZ:{let{currentPointX:G,currentPointY:P}=X,[Q,Y,W,$]=q;X.currentPointX=W,X.currentPointY=$,R.push(g2,Q,Y,W,$,W,$),h1.bezierBoundingBox(G,P,Q,Y,W,$,W,$,z);break}case vZ:R.push(B2)}}_getColorSpace(Z,q,X){return g1.parse({cs:Z,xref:this.xref,resources:q,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:X,asyncIfNotCached:!0})}async _handleColorSpace(Z){try{return await Z}catch(q){if(q instanceof p8)return null;if(this.options.ignoreErrors)return v(`_handleColorSpace - ignoring ColorSpace: "${q}".`),null;throw q}}parseShading({shading:Z,resources:q,localColorSpaceCache:X,localShadingPatternCache:z}){let R,G=z.get(Z);if(G)return G;try{R=NQ.parseShading(Z,this.xref,q,this._pdfFunctionFactory,this.globalColorSpaceCache,X).getIR()}catch(P){if(P instanceof p8)return null;if(this.options.ignoreErrors)return v(`parseShading - ignoring shading: "${P}".`),z.set(Z,null),null;throw P}return G=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(G=`${this.idFactory.getDocId()}_type3_${G}`),z.set(Z,G),this.parsingType3Font?this.handler.send("commonobj",[G,"Pattern",R]):this.handler.send("obj",[G,this.pageIndex,"Pattern",R]),G}handleColorN(Z,q,X,z,R,G,P,Q,Y,W){let $=X.pop();if($ instanceof t){let _=R.getRaw($.name),J=_ instanceof P1&&Y.getByRef(_);if(J)try{let f=z.base?z.base.getRgbHex(X,0):null,K=mR(J.operatorListIR,J.dict,f);return void Z.addOp(q,K)}catch{}let U=this.xref.fetchIfRef(_);if(U){let f=U instanceof C1?U.dict:U,K=f.get("PatternType");if(K===zV){let I=z.base?z.base.getRgbHex(X,0):null;return this.handleTilingType(q,I,G,U,f,Z,P,Y)}if(K===RV){let I=f.get("Shading"),B=this.parseShading({shading:I,resources:G,localColorSpaceCache:Q,localShadingPatternCache:W});if(B){let j=g4(f.getArray("Matrix"),null);Z.addOp(q,["Shading",B,j])}return}throw new h(`Unknown PatternType: ${K}`)}}throw new h(`Unknown PatternName: ${$}`)}_parseVisibilityExpression(Z,q,X){if(++q>10)return void v("Visibility expression is too deeply nested");let z=Z.length,R=this.xref.fetchIfRef(Z[0]);if(!(z<2)&&R instanceof t){switch(R.name){case"And":case"Or":case"Not":X.push(R.name);break;default:return void v(`Invalid operator ${R.name} in visibility expression`)}for(let G=1;G<z;G++){let P=Z[G],Q=this.xref.fetchIfRef(P);if(Array.isArray(Q)){let Y=[];X.push(Y),this._parseVisibilityExpression(Q,q,Y)}else P instanceof P1&&X.push(P.toString())}}else v("Invalid visibility expression")}async parseMarkedContentProps(Z,q){let X;if(Z instanceof t)X=q.get("Properties").get(Z.name);else{if(!(Z instanceof S))throw new h("Optional content properties malformed.");X=Z}let z=X.get("Type")?.name;if(z==="OCG")return{type:z,id:X.objId};if(z==="OCMD"){let R=X.get("VE");if(Array.isArray(R)){let P=[];if(this._parseVisibilityExpression(R,0,P),P.length>0)return{type:"OCMD",expression:P}}let G=X.get("OCGs");if(Array.isArray(G)||G instanceof S){let P=[];if(Array.isArray(G))for(let Q of G)P.push(Q.toString());else P.push(G.objId);return{type:z,ids:P,policy:X.get("P")instanceof t?X.get("P").name:null,expression:null}}if(G instanceof P1)return{type:z,id:G.toString()}}return null}getOperatorList({stream:Z,task:q,resources:X,operatorList:z,initialState:R=null,fallbackFontDict:G=null,prevRefs:P=null}){let Q=Z.dict?.objId,Y=new U8(P);if(Q){if(P?.has(Q))throw Error(`getOperatorList - ignoring circular reference: ${Q}`);Y.put(Q)}if(X||=S.empty,R||=new xX,!z)throw Error('getOperatorList: missing "operatorList" parameter');let W=this,$=this.xref,_=new Jq,J=new VX,U=new Uq,f=new pQ,K=new Map,I=X.get("XObject")||S.empty,B=X.get("Pattern")||S.empty,j=new f7(R),V=new l4(Z,$,j),x=new D7;function M(H){for(let A=0,T=V.savedStatesDepth;A<T;A++)z.addOp(Y0,[])}return new Promise(function H(A,T){let k=function(L){Promise.all([L,z.ready]).then(function(){try{H(A,T)}catch(m){T(m)}},T)};q.ensureNotTerminated(),x.reset();let y={},O,D,n,b,l,N;for(;!(O=x.check())&&(y.args=null,V.read(y));){let{args:L,fn:m}=y;switch(0|m){case DZ:if(N=L[0]instanceof t,l=L[0].name,N){let w=_.getByName(l);if(w){RZ(z,w),L=null;continue}}return void k(new Promise(function(w,c){if(!N)throw new h("XObject must be referred to by name.");let o=I.getRaw(l);if(o instanceof P1){let r=_.getByRef(o)||W._regionalImageCache.getByRef(o)||W.globalImageCache.getData(o,W.pageIndex);if(r)return RZ(z,r),void w();o=$.fetch(o)}if(!(o instanceof C1))throw new h("XObject should be a stream");let Q1=o.dict.get("Subtype");if(!(Q1 instanceof t))throw new h("XObject should have a Name subtype");if(Q1.name==="Form")return j.save(),void W.buildFormXObject(X,o,null,z,q,j.state.clone({newPath:!0}),J,Y).then(function(){j.restore(),w()},c);if(Q1.name!=="Image"){if(Q1.name!=="PS")throw new h(`Unhandled XObject subtype ${Q1.name}`);v1("Ignored XObject subtype PS"),w()}else W.buildPaintImageXObject({resources:X,image:o,operatorList:z,cacheKey:l,localImageCache:_,localColorSpaceCache:J}).then(w,c)}).catch(function(w){if(!(w instanceof p8)){if(!W.options.ignoreErrors)throw w;v(`getOperatorList - ignoring XObject: "${w}".`)}}));case s4:let d=L[1];return void k(W.handleSetFont(X,L,null,z,q,j.state,G).then(function(w){z.addDependency(w),z.addOp(s4,[w,d])}));case QP:let e=L[0].cacheKey;if(e){let w=_.getByName(e);if(w){RZ(z,w),L=null;continue}}return void k(W.buildPaintImageXObject({resources:X,image:L[0],isInline:!0,operatorList:z,cacheKey:e,localImageCache:_,localColorSpaceCache:J}));case B4:if(!j.state.font){W.ensureStateFont(j.state);continue}L[0]=W.handleText(L[0],j.state);break;case $3:if(!j.state.font){W.ensureStateFont(j.state);continue}let E=[],p=j.state;for(let w of L[0])typeof w=="string"?E.push(...W.handleText(w,p)):typeof w=="number"&&E.push(w);L[0]=E,m=B4;break;case _3:if(!j.state.font){W.ensureStateFont(j.state);continue}z.addOp(u2),L[0]=W.handleText(L[0],j.state),m=B4;break;case J3:if(!j.state.font){W.ensureStateFont(j.state);continue}z.addOp(u2),z.addOp(yZ,[L.shift()]),z.addOp(OZ,[L.shift()]),L[0]=W.handleText(L[0],j.state),m=B4;break;case XP:j.state.textRenderingMode=L[0];break;case Z9:{let w=W._getColorSpace(L[0],X,J);if(w instanceof m8){j.state.fillColorSpace=w;continue}return void k(W._handleColorSpace(w).then((c)=>{j.state.fillColorSpace=c||g1.gray}))}case iq:{let w=W._getColorSpace(L[0],X,J);if(w instanceof m8){j.state.strokeColorSpace=w;continue}return void k(W._handleColorSpace(w).then((c)=>{j.state.strokeColorSpace=c||g1.gray}))}case q9:b=j.state.fillColorSpace,L=[b.getRgbHex(L,0)],m=n0;break;case tq:b=j.state.strokeColorSpace,L=[b.getRgbHex(L,0)],m=y4;break;case a7:j.state.fillColorSpace=g1.gray,L=[g1.gray.getRgbHex(L,0)],m=n0;break;case eq:j.state.strokeColorSpace=g1.gray,L=[g1.gray.getRgbHex(L,0)],m=y4;break;case n7:j.state.fillColorSpace=g1.cmyk,L=[g1.cmyk.getRgbHex(L,0)],m=n0;break;case ZX:j.state.strokeColorSpace=g1.cmyk,L=[g1.cmyk.getRgbHex(L,0)],m=y4;break;case n0:j.state.fillColorSpace=g1.rgb,L=[g1.rgb.getRgbHex(L,0)];break;case y4:j.state.strokeColorSpace=g1.rgb,L=[g1.rgb.getRgbHex(L,0)];break;case f3:if(b=j.state.patternFillColorSpace,!b){if(e8(L,null)){L=[g1.gray.getRgbHex(L,0)],m=n0;break}L=[],m=rB;break}if(b.name==="Pattern")return void k(W.handleColorN(z,f3,L,b,B,X,q,J,f,K));L=[b.getRgbHex(L,0)],m=n0;break;case U3:if(b=j.state.patternStrokeColorSpace,!b){if(e8(L,null)){L=[g1.gray.getRgbHex(L,0)],m=y4;break}L=[],m=sB;break}if(b.name==="Pattern")return void k(W.handleColorN(z,U3,L,b,B,X,q,J,f,K));L=[b.getRgbHex(L,0)],m=y4;break;case K3:let F;try{let w=X.get("Shading");if(!w)throw new h("No shading resource found");if(F=w.get(L[0].name),!F)throw new h("No shading object found")}catch(w){if(w instanceof p8)continue;if(W.options.ignoreErrors){v(`getOperatorList - ignoring Shading: "${w}".`);continue}throw w}let s=W.parseShading({shading:F,resources:X,localColorSpaceCache:J,localShadingPatternCache:K});if(!s)continue;L=[s],m=K3;break;case I5:if(N=L[0]instanceof t,l=L[0].name,N){let w=U.getByName(l);if(w){w.length>0&&z.addOp(I5,[w]),L=null;continue}}return void k(new Promise(function(w,c){if(!N)throw new h("GState must be referred to by name.");let o=X.get("ExtGState");if(!(o instanceof S))throw new h("ExtGState should be a dictionary.");let Q1=o.get(l);if(!(Q1 instanceof S))throw new h("GState should be a dictionary.");W.setGState({resources:X,gState:Q1,operatorList:z,cacheKey:l,task:q,stateManager:j,localGStateCache:U,localColorSpaceCache:J,seenRefs:Y}).then(w,c)}).catch(function(w){if(!(w instanceof p8)){if(!W.options.ignoreErrors)throw w;v(`getOperatorList - ignoring ExtGState: "${w}".`)}}));case nG:{let[w]=L;if(typeof w!="number"){v(`Invalid setLineWidth: ${w}`);continue}L[0]=Math.abs(w);break}case iG:{let w=L[1];if(typeof w!="number"){v(`Invalid setDash: ${w}`);continue}let c=L[0];if(!Array.isArray(c)){v(`Invalid setDash: ${c}`);continue}c.some((o)=>typeof o!="number")&&(L[0]=c.filter((o)=>typeof o=="number"));break}case R3:case TZ:case NZ:case CZ:case FZ:case vZ:case bZ:W.buildPath(m,L,j.state);continue;case oq:case G3:case SZ:case eG:case aq:case nq:case P3:case Q3:case mZ:{let{state:{pathBuffer:w,pathMinMax:c}}=j;m!==G3&&m!==P3&&m!==Q3||w.push(B2),w.length===0?z.addOp(A5,[m,[null],null]):(z.addOp(A5,[m,[new Float32Array(w)],c.slice()]),w.length=0,c.set([1/0,1/0,-1/0,-1/0],0));continue}case S5:z.addOp(m,[new Float32Array(L)]);continue;case YP:case WP:case _P:case JP:continue;case i0:if(!(L[0]instanceof t)){v(`Expected name for beginMarkedContentProps arg0=${L[0]}`),z.addOp(i0,["OC",null]);continue}if(L[0].name==="OC")return void k(W.parseMarkedContentProps(L[1],X).then((w)=>{z.addOp(i0,["OC",w])}).catch((w)=>{if(!(w instanceof p8)){if(W.options.ignoreErrors)return v(`getOperatorList - ignoring beginMarkedContentProps: "${w}".`),void z.addOp(i0,["OC",null]);throw w}}));L=[L[0].name,L[1]instanceof S?L[1].get("MCID"):null];break;default:if(L!==null){for(D=0,n=L.length;D<n&&!(L[D]instanceof S);D++);if(D<n){v("getOperatorList - ignoring operator: "+m);continue}}}z.addOp(m,L)}O?k(dR):(M(),A())}).catch((H)=>{if(!(H instanceof p8)){if(this.options.ignoreErrors)return v(`getOperatorList - ignoring errors during "${q.name}" task: "${H}".`),void M();throw H}})}getTextContent({stream:Z,task:q,resources:X,stateManager:z=null,includeMarkedContent:R=!1,sink:G,seenStyles:P=new Set,viewBox:Q,lang:Y=null,markedContentData:W=null,disableNormalization:$=!1,keepWhiteSpace:_=!1,prevRefs:J=null,intersector:U=null}){let f=Z.dict?.objId,K=new U8(J);if(f){if(J?.has(f))throw Error(`getTextContent - ignoring circular reference: ${f}`);K.put(f)}X||=S.empty,z||=new f7(new sQ),R&&(W||={level:0});let I={items:[],styles:Object.create(null),lang:Y},B={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},j=[" "," "],V=0;function x(r){let q1=(V+1)%2,R1=j[V]!==" "&&j[q1]===" ";return j[V]=r,V=q1,!_&&R1}function M(){return!_&&j[V]!==" "&&j[(V+1)%2]===" "}function H(){j[0]=j[1]=" ",V=0}let A=this,T=this.xref,k=[],y=null,O=new Jq,D=new Uq,n=new l4(Z,T,z),b;function l({width:r=0,height:q1=0,transform:R1=B.prevTransform,fontName:V1=B.fontName}){U?.addExtraChar(" "),I.items.push({str:" ",dir:"ltr",width:r,height:q1,transform:R1,fontName:V1,hasEOL:!1})}function N(){let r=b.font,q1=[b.fontSize*b.textHScale,0,0,b.fontSize,0,b.textRise];if(r.isType3Font&&(b.fontSize<=1||r.isCharBBox)&&!N7(b.fontMatrix,x5)){let R1=r.bbox[3]-r.bbox[1];R1>0&&(q1[3]*=R1*b.fontMatrix[3])}return h1.transform(b.ctm,h1.transform(b.textMatrix,q1))}function L(){if(B.initialized)return B;let{font:r,loadedName:q1}=b;if(!P.has(q1)&&(P.add(q1),I.styles[q1]={fontFamily:r.fallbackName,ascent:r.ascent,descent:r.descent,vertical:r.vertical},A.options.fontExtraProperties&&r.systemFontInfo)){let x1=I.styles[q1];x1.fontSubstitution=r.systemFontInfo.css,x1.fontSubstitutionLoadedName=r.systemFontInfo.loadedName}B.fontName=q1;let R1=B.transform=N();r.vertical?(B.width=B.totalWidth=Math.hypot(R1[0],R1[1]),B.height=B.totalHeight=0,B.vertical=!0):(B.width=B.totalWidth=0,B.height=B.totalHeight=Math.hypot(R1[2],R1[3]),B.vertical=!1);let V1=Math.hypot(b.textLineMatrix[0],b.textLineMatrix[1]),f1=Math.hypot(b.ctm[0],b.ctm[1]);B.textAdvanceScale=f1*V1;let{fontSize:Y1}=b;return B.trackingSpaceMin=0.102*Y1,B.notASpace=0.03*Y1,B.negativeSpaceMax=-0.2*Y1,B.spaceInFlowMin=0.102*Y1,B.spaceInFlowMax=0.6*Y1,B.hasEOL=!1,B.initialized=!0,B}function m(){if(!B.initialized)return;let r=Math.hypot(b.textLineMatrix[0],b.textLineMatrix[1]),q1=Math.hypot(b.ctm[0],b.ctm[1])*r;q1!==B.textAdvanceScale&&(B.vertical?(B.totalHeight+=B.height*B.textAdvanceScale,B.height=0):(B.totalWidth+=B.width*B.textAdvanceScale,B.width=0),B.textAdvanceScale=q1)}function d(r){let q1=r.str.join("");var R1;$||(R1=q1,d9||(d9=/([\u00a0\u00b5\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+)/gu,tz=new Map([["ſt","ſt"]])),q1=R1.replaceAll(d9,(f1,Y1,x1)=>Y1?Y1.normalize("NFKC"):tz.get(x1)));let V1=cQ(q1,-1,r.vertical);return{str:V1.str,dir:V1.dir,width:Math.abs(r.totalWidth),height:Math.abs(r.totalHeight),transform:r.transform,fontName:r.fontName,hasEOL:r.hasEOL}}async function e(r,q1){let R1=await A.loadFont(r,q1,X,q);b.loadedName=R1.loadedName,b.font=R1.font,b.fontMatrix=R1.font.fontMatrix||x5}function E(r,q1,R1){let V1=Math.hypot(R1[0],R1[1]);return[(R1[0]*r+R1[1]*q1)/V1,(R1[2]*r+R1[3]*q1)/V1]}function p(r){let q1=N(),R1=q1[4],V1=q1[5];if(b.font?.vertical){if(R1<Q[0]||R1>Q[2]||V1+r<Q[1]||V1>Q[3])return!1}else if(R1+r<Q[0]||R1>Q[2]||V1<Q[1]||V1>Q[3])return!1;if(!b.font||!B.prevTransform)return!0;let f1=B.prevTransform[4],Y1=B.prevTransform[5];if(f1===R1&&Y1===V1)return!0;let x1=-1;switch(q1[0]&&q1[1]===0&&q1[2]===0?x1=q1[0]>0?0:180:q1[1]&&q1[0]===0&&q1[3]===0&&(x1=q1[1]>0?90:270),x1){case 0:break;case 90:[R1,V1]=[V1,R1],[f1,Y1]=[Y1,f1];break;case 180:[R1,V1,f1,Y1]=[-R1,-V1,-f1,-Y1];break;case 270:[R1,V1]=[-V1,-R1],[f1,Y1]=[-Y1,-f1];break;default:[R1,V1]=E(R1,V1,q1),[f1,Y1]=E(f1,Y1,B.prevTransform)}if(b.font.vertical){let B1=(Y1-V1)/B.textAdvanceScale,W1=R1-f1,J1=Math.sign(B.height);return B1<J1*B.negativeSpaceMax?Math.abs(W1)>0.5*B.width?(s(),!0):(H(),c(),!0):Math.abs(W1)>B.width?(s(),!0):(B1<=J1*B.notASpace&&H(),B1<=J1*B.trackingSpaceMin?M()?(H(),c(),l({height:Math.abs(B1)})):B.height+=B1:w(B1,B.prevTransform,J1)||(B.str.length===0?(H(),l({height:Math.abs(B1)})):B.height+=B1),Math.abs(W1)>0.25*B.width&&c(),!0)}let U1=(R1-f1)/B.textAdvanceScale,$1=V1-Y1,T1=Math.sign(B.width);return U1<T1*B.negativeSpaceMax?Math.abs($1)>0.5*B.height?(s(),!0):(H(),c(),!0):Math.abs($1)>B.height?(s(),!0):(U1<=T1*B.notASpace&&H(),U1<=T1*B.trackingSpaceMin?M()?(H(),c(),l({width:Math.abs(U1)})):B.width+=U1:w(U1,B.prevTransform,T1)||(B.str.length===0?(H(),l({width:Math.abs(U1)})):B.width+=U1),Math.abs($1)>0.25*B.height&&c(),!0)}function F({chars:r,extraSpacing:q1}){let R1=b.font;if(!r){let Y1=b.charSpacing+q1;return Y1&&(R1.vertical?b.translateTextMatrix(0,-Y1):b.translateTextMatrix(Y1*b.textHScale,0)),void(_&&p(0))}let V1=R1.charsToGlyphs(r),f1=b.fontMatrix[0]*b.fontSize;for(let Y1=0,x1=V1.length;Y1<x1;Y1++){let U1=V1[Y1],{category:$1,originalCharCode:T1}=U1;if($1.isInvisibleFormatMark)continue;let B1=b.charSpacing+(Y1+1===x1?q1:0),W1=U1.width;R1.vertical&&(W1=U1.vmetric?U1.vmetric[0]:-W1);let J1=W1*f1;if(T1===32&&(B1+=b.wordSpacing),!_&&$1.isWhitespace){R1.vertical?(B1+=-J1,b.translateTextMatrix(0,-B1)):(B1+=J1,b.translateTextMatrix(B1*b.textHScale,0)),x(" ");continue}if(!$1.isZeroWidthDiacritic&&!p(J1)){R1.vertical?b.translateTextMatrix(0,J1):b.translateTextMatrix(J1*b.textHScale,0);continue}let w1=L();$1.isZeroWidthDiacritic&&(J1=0),R1.vertical?(U?.addGlyph(N(),0,J1,U1.unicode),b.translateTextMatrix(0,J1),J1=Math.abs(J1),w1.height+=J1):(J1*=b.textHScale,U?.addGlyph(N(),J1,0,U1.unicode),b.translateTextMatrix(J1,0),w1.width+=J1),J1&&(w1.prevTransform=N());let U0=U1.unicode;x(U0)&&(w1.str.push(" "),U?.addExtraChar(" ")),U||w1.str.push(U0),B1&&(R1.vertical?b.translateTextMatrix(0,-B1):b.translateTextMatrix(B1*b.textHScale,0))}}function s(){U?.addExtraChar(`
|
|
6
|
-
`),H(),B.initialized?(B.hasEOL=!0,c()):I.items.push({str:"",dir:"ltr",width:0,height:0,transform:N(),fontName:b.loadedName,hasEOL:!0})}function w(r,q1,R1){if(R1*B.spaceInFlowMin<=r&&r<=R1*B.spaceInFlowMax)return B.initialized&&(H(),B.str.push(" "),U?.addExtraChar(" ")),!1;let V1=B.fontName,f1=0;return B.vertical&&(f1=r,r=0),c(),H(),l({width:Math.abs(r),height:Math.abs(f1),transform:q1||N(),fontName:V1}),!0}function c(){B.initialized&&B.str&&(B.vertical?B.totalHeight+=B.height*B.textAdvanceScale:B.totalWidth+=B.width*B.textAdvanceScale,I.items.push(d(B)),B.initialized=!1,B.str.length=0)}function o(r=!1){let q1=I.items.length;q1!==0&&(r&&q1<10||(G?.enqueue(I,q1),I.items=[],I.styles=Object.create(null)))}let Q1=new D7;return new Promise(function r(q1,R1){let V1=function(T1){o(!0),Promise.all([T1,G?.ready]).then(function(){try{r(q1,R1)}catch(B1){R1(B1)}},R1)};q.ensureNotTerminated(),Q1.reset();let f1={},Y1,x1,U1,$1=[];for(;!(Y1=Q1.check())&&($1.length=0,f1.args=$1,n.read(f1));){let T1=b;b=z.state;let B1=f1.fn;switch($1=f1.args,0|B1){case s4:let W1=$1[0].name,J1=$1[1];if(b.font&&W1===b.fontName&&J1===b.fontSize)break;return c(),b.fontName=W1,b.fontSize=J1,void V1(e(W1,null));case zP:b.textRise=$1[0];break;case ZP:b.textHScale=$1[0]/100;break;case qP:b.leading=$1[0];break;case RP:b.translateTextLineMatrix($1[0],$1[1]),b.textMatrix=b.textLineMatrix.slice();break;case GP:b.leading=-$1[1],b.translateTextLineMatrix($1[0],$1[1]),b.textMatrix=b.textLineMatrix.slice();break;case u2:b.carriageReturn();break;case S5:b.setTextMatrix($1[0],$1[1],$1[2],$1[3],$1[4],$1[5]),b.setTextLineMatrix($1[0],$1[1],$1[2],$1[3],$1[4],$1[5]),m();break;case OZ:b.charSpacing=$1[0];break;case yZ:b.wordSpacing=$1[0];break;case Y3:b.textMatrix=w0.slice(),b.textLineMatrix=w0.slice();break;case $3:if(!z.state.font){A.ensureStateFont(z.state);continue}let w1=(b.font.vertical?1:-1)*b.fontSize/1000,U0=$1[0];for(let i1=0,q5=U0.length;i1<q5;i1++){let y8=U0[i1];if(typeof y8=="string")k.push(y8);else if(typeof y8=="number"&&y8!==0){let O0=k.join("");k.length=0,F({chars:O0,extraSpacing:y8*w1})}}if(k.length>0){let i1=k.join("");k.length=0,F({chars:i1,extraSpacing:0})}break;case B4:if(!z.state.font){A.ensureStateFont(z.state);continue}F({chars:$1[0],extraSpacing:0});break;case _3:if(!z.state.font){A.ensureStateFont(z.state);continue}b.carriageReturn(),F({chars:$1[0],extraSpacing:0});break;case J3:if(!z.state.font){A.ensureStateFont(z.state);continue}b.wordSpacing=$1[0],b.charSpacing=$1[1],b.carriageReturn(),F({chars:$1[2],extraSpacing:0});break;case DZ:if(c(),y??=X.get("XObject")||S.empty,U1=$1[0]instanceof t,x1=$1[0].name,U1&&O.getByName(x1))break;return void V1(new Promise(function(i1,q5){if(!U1)throw new h("XObject must be referred to by name.");let y8=y.getRaw(x1);if(y8 instanceof P1){if(O.getByRef(y8))return void i1();if(A.globalImageCache.getData(y8,A.pageIndex))return void i1();y8=T.fetch(y8)}if(!(y8 instanceof C1))throw new h("XObject should be a stream");let{dict:O0}=y8,g5=O0.get("Subtype");if(!(g5 instanceof t))throw new h("XObject should have a Name subtype");if(g5.name!=="Form")return O.set(x1,O0.objId,!0),void i1();let nK=z.state.clone(),yz=new f7(nK),pz=g4(O0.getArray("Matrix"),null);pz&&yz.transform(pz);let Dz=O0.get("Resources");o();let wz={enqueueInvoked:!1,enqueue(iK,tK){this.enqueueInvoked=!0,G.enqueue(iK,tK)},get desiredSize(){return G.desiredSize??0},get ready(){return G.ready}};A.getTextContent({stream:y8,task:q,resources:Dz instanceof S?Dz:X,stateManager:yz,includeMarkedContent:R,sink:G&&wz,seenStyles:P,viewBox:Q,lang:Y,markedContentData:W,disableNormalization:$,keepWhiteSpace:_,prevRefs:K}).then(function(){wz.enqueueInvoked||O.set(x1,O0.objId,!0),i1()},q5)}).catch(function(i1){if(!(i1 instanceof p8)){if(!A.options.ignoreErrors)throw i1;v(`getTextContent - ignoring XObject: "${i1}".`)}}));case I5:if(U1=$1[0]instanceof t,x1=$1[0].name,U1&&D.getByName(x1))break;return void V1(new Promise(function(i1,q5){if(!U1)throw new h("GState must be referred to by name.");let y8=X.get("ExtGState");if(!(y8 instanceof S))throw new h("ExtGState should be a dictionary.");let O0=y8.get(x1);if(!(O0 instanceof S))throw new h("GState should be a dictionary.");let g5=O0.get("Font");if(!g5)return D.set(x1,O0.objId,!0),void i1();c(),b.fontName=null,b.fontSize=g5[1],e(null,g5[0]).then(i1,q5)}).catch(function(i1){if(!(i1 instanceof p8)){if(!A.options.ignoreErrors)throw i1;v(`getTextContent - ignoring ExtGState: "${i1}".`)}}));case $P:c(),R&&(W.level++,I.items.push({type:"beginMarkedContent",tag:$1[0]instanceof t?$1[0].name:null}));break;case i0:if(c(),R){W.level++;let i1=null;$1[1]instanceof S&&(i1=$1[1].get("MCID")),I.items.push({type:"beginMarkedContentProps",id:Number.isInteger(i1)?`${A.idFactory.getPageObjId()}_mc${i1}`:null,tag:$1[0]instanceof t?$1[0].name:null})}break;case B6:if(c(),R){if(W.level===0)break;W.level--,I.items.push({type:"endMarkedContent"})}break;case Y0:!T1||T1.font===b.font&&T1.fontSize===b.fontSize&&T1.fontName===b.fontName||c()}if(I.items.length>=(G?.desiredSize??1)){Y1=!0;break}}Y1?V1(dR):(c(),o(),q1())}).catch((r)=>{if(!(r instanceof p8)){if(this.options.ignoreErrors)return v(`getTextContent - ignoring errors during "${q.name}" task: "${r}".`),c(),void o();throw r}})}async extractDataStructures(Z,q){let X=this.xref,z,R=this.readToUnicode(q.toUnicode);if(q.composite){let _=Z.get("CIDSystemInfo");_ instanceof S&&(q.cidSystemInfo={registry:E1(_.get("Registry")),ordering:E1(_.get("Ordering")),supplement:_.get("Supplement")});try{let J=Z.get("CIDToGIDMap");J instanceof C1&&(z=J.getBytes())}catch(J){if(!this.options.ignoreErrors)throw J;v(`extractDataStructures - ignoring CIDToGIDMap data: "${J}".`)}}let G=[],P,Q=null;if(Z.has("Encoding")){if(P=Z.get("Encoding"),P instanceof S){if(Q=P.get("BaseEncoding"),Q=Q instanceof t?Q.name:null,P.has("Differences")){let _=P.get("Differences"),J=0;for(let U of _){let f=X.fetchIfRef(U);if(typeof f=="number")J=f;else{if(!(f instanceof t))throw new h(`Invalid entry in 'Differences' array: ${f}`);G[J++]=f.name}}}}else if(P instanceof t)Q=P.name;else{if(!this.options.ignoreErrors)throw new h("Encoding is not a Name nor a Dict");v("Encoding is not a Name nor a Dict")}Q!=="MacRomanEncoding"&&Q!=="MacExpertEncoding"&&Q!=="WinAnsiEncoding"&&(Q=null)}let Y=!q.file||q.isInternalFont,W=Gq()[q.name];if(Q&&Y&&W&&(Q=null),Q)q.defaultEncoding=v7(Q);else{let _=!!(q.flags&T3),J=!!(q.flags&KR);q.type==="TrueType"&&_&&J&&G.length!==0&&(q.flags&=-5,_=!1),P=A4,q.type!=="TrueType"||J||(P=F7),(_||W)&&(P=QX,Y&&(/Symbol/i.test(q.name)?P=YX:/Dingbats/i.test(q.name)?P=WX:/Wingdings/i.test(q.name)&&(P=F7))),q.defaultEncoding=P}q.differences=G,q.baseEncodingName=Q,q.hasEncoding=!!Q||G.length>0,q.dict=Z,q.toUnicode=await R;let $=await this.buildToUnicode(q);return q.toUnicode=$,z&&(q.cidToGidMap=this.readCidToGidMap(z,$)),q}_simpleFontToUnicode(Z,q=!1){t1(!Z.composite,"Must be a simple font.");let X=[],z=Z.defaultEncoding.slice(),R=Z.baseEncodingName,G=Z.differences;for(let Q in G){let Y=G[Q];Y!==".notdef"&&(z[Q]=Y)}let P=l0();for(let Q in z){let Y=z[Q];if(Y==="")continue;let W=P[Y];if(W!==void 0){X[Q]=String.fromCharCode(W);continue}let $=0;switch(Y[0]){case"G":Y.length===3&&($=parseInt(Y.substring(1),16));break;case"g":Y.length===5&&($=parseInt(Y.substring(1),16));break;case"C":case"c":if(Y.length>=3&&Y.length<=4){let _=Y.substring(1);if(q){$=parseInt(_,16);break}if($=+_,Number.isNaN($)&&Number.isInteger(parseInt(_,16)))return this._simpleFontToUnicode(Z,!0)}break;case"u":W=V6(Y,P),W!==-1&&($=W);break;default:switch(Y){case"f_h":case"f_t":case"T_h":X[Q]=Y.replaceAll("_","");continue}}if($>0&&$<=1114111&&Number.isInteger($)){if(R&&$===+Q){let _=v7(R);if(_&&(Y=_[Q])){X[Q]=String.fromCharCode(P[Y]);continue}}X[Q]=String.fromCodePoint($)}}return X}async buildToUnicode(Z){if(Z.hasIncludedToUnicodeMap=Z.toUnicode?.length>0,Z.hasIncludedToUnicodeMap)return!Z.composite&&Z.hasEncoding&&(Z.fallbackToUnicode=this._simpleFontToUnicode(Z)),Z.toUnicode;if(!Z.composite)return new q6(this._simpleFontToUnicode(Z));if(Z.composite&&(Z.cMap.builtInCMap&&!(Z.cMap instanceof k5)||Z.cidSystemInfo?.registry==="Adobe"&&(Z.cidSystemInfo.ordering==="GB1"||Z.cidSystemInfo.ordering==="CNS1"||Z.cidSystemInfo.ordering==="Japan1"||Z.cidSystemInfo.ordering==="Korea1"))){let{registry:q,ordering:X}=Z.cidSystemInfo,z=t.get(`${q}-${X}-UCS2`),R=await z7.create({encoding:z,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),G=[],P=[];return Z.cMap.forEach(function(Q,Y){if(Y>65535)throw new h("Max size of CID is 65,535");let W=R.lookup(Y);if(W){P.length=0;for(let $=0,_=W.length;$<_;$+=2)P.push((W.charCodeAt($)<<8)+W.charCodeAt($+1));G[Q]=String.fromCharCode(...P)}}),new q6(G)}return new j0(Z.firstChar,Z.lastChar)}async readToUnicode(Z){if(!Z)return null;if(Z instanceof t){let q=await z7.create({encoding:Z,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});return q instanceof k5?new j0(0,65535):new q6(q.getMap())}if(Z instanceof C1)try{let q=await z7.create({encoding:Z,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});if(q instanceof k5)return new j0(0,65535);let X=Array(q.length);return q.forEach(function(z,R){if(typeof R=="number")return void(X[z]=String.fromCodePoint(R));R.length%2!=0&&(R="\x00"+R);let G=[];for(let P=0;P<R.length;P+=2){let Q=R.charCodeAt(P)<<8|R.charCodeAt(P+1);if((63488&Q)!=55296){G.push(Q);continue}P+=2;let Y=R.charCodeAt(P)<<8|R.charCodeAt(P+1);G.push(((1023&Q)<<10)+(1023&Y)+65536)}X[z]=String.fromCodePoint(...G)}),new q6(X)}catch(q){if(q instanceof p8)return null;if(this.options.ignoreErrors)return v(`readToUnicode - ignoring ToUnicode data: "${q}".`),null;throw q}return null}readCidToGidMap(Z,q){let X=[];for(let z=0,R=Z.length;z<R;z++){let G=Z[z++]<<8|Z[z],P=z>>1;(G!==0||q.has(P))&&(X[P]=G)}return X}extractWidths(Z,q,X){let z=this.xref,R=[],G=0,P=[],Q;if(X.composite){let $=Z.get("DW");G=typeof $=="number"?Math.ceil($):1000;let _=Z.get("W");if(Array.isArray(_))for(let J=0,U=_.length;J<U;J++){let f=z.fetchIfRef(_[J++]);if(!Number.isInteger(f))break;let K=z.fetchIfRef(_[J]);if(Array.isArray(K))for(let I of K){let B=z.fetchIfRef(I);typeof B=="number"&&(R[f]=B),f++}else{if(!Number.isInteger(K))break;{let I=z.fetchIfRef(_[++J]);if(typeof I!="number")continue;for(let B=f;B<=K;B++)R[B]=I}}}if(X.vertical){let J=Z.getArray("DW2"),U=e8(J,2)?J:[880,-1000];if(Q=[U[1],0.5*G,U[0]],U=Z.get("W2"),Array.isArray(U))for(let f=0,K=U.length;f<K;f++){let I=z.fetchIfRef(U[f++]);if(!Number.isInteger(I))break;let B=z.fetchIfRef(U[f]);if(Array.isArray(B))for(let j=0,V=B.length;j<V;j++){let x=[z.fetchIfRef(B[j++]),z.fetchIfRef(B[j++]),z.fetchIfRef(B[j])];e8(x,null)&&(P[I]=x),I++}else{if(!Number.isInteger(B))break;{let j=[z.fetchIfRef(U[++f]),z.fetchIfRef(U[++f]),z.fetchIfRef(U[++f])];if(!e8(j,null))continue;for(let V=I;V<=B;V++)P[V]=j}}}}}else{let $=Z.get("Widths");if(Array.isArray($)){let _=X.firstChar;for(let U of $){let f=z.fetchIfRef(U);typeof f=="number"&&(R[_]=f),_++}let J=q.get("MissingWidth");G=typeof J=="number"?J:0}else{let _=Z.get("BaseFont");if(_ instanceof t){let J=this.getBaseFontMetrics(_.name);R=this.buildCharCodeToWidth(J.widths,X),G=J.defaultWidth}}}let Y=!0,W=G;for(let $ in R){let _=R[$];if(_)if(W){if(W!==_){Y=!1;break}}else W=_}Y?X.flags|=Xq:X.flags&=-2,X.defaultWidth=G,X.widths=R,X.defaultVMetrics=Q,X.vmetrics=P}isSerifFont(Z){let q=Z.split("-",1)[0];return q in UX()||/serif/gi.test(q)}getBaseFontMetrics(Z){let q=0,X=Object.create(null),z=!1,R=O7()[Z]||Z,G=nI();R in G||(R=this.isSerifFont(Z)?"Times-Roman":"Helvetica");let P=G[R];return typeof P=="number"?(q=P,z=!0):X=P(),{defaultWidth:q,monospace:z,widths:X}}buildCharCodeToWidth(Z,q){let X=Object.create(null),z=q.differences,R=q.defaultEncoding;for(let G=0;G<256;G++)G in z&&Z[z[G]]?X[G]=Z[z[G]]:(G in R)&&Z[R[G]]&&(X[G]=Z[R[G]]);return X}preEvaluateFont(Z){let q=Z,X=Z.get("Subtype");if(!(X instanceof t))throw new h("invalid font Subtype");let z,R=!1;if(X.name==="Type0"){let W=Z.get("DescendantFonts");if(!W)throw new h("Descendant fonts are not specified");if(!((Z=Array.isArray(W)?this.xref.fetchIfRef(W[0]):W)instanceof S))throw new h("Descendant font is not a dictionary.");if(X=Z.get("Subtype"),!(X instanceof t))throw new h("invalid font Subtype");R=!0}let G=Z.get("FirstChar");Number.isInteger(G)||(G=0);let P=Z.get("LastChar");Number.isInteger(P)||(P=R?65535:255);let Q=Z.get("FontDescriptor"),Y=Z.get("ToUnicode")||q.get("ToUnicode");if(Q){z=new qV;let W=q.getRaw("Encoding");if(W instanceof t)z.update(W.name);else if(W instanceof P1)z.update(W.toString());else if(W instanceof S){for(let _ of W.getRawValues())if(_ instanceof t)z.update(_.name);else if(_ instanceof P1)z.update(_.toString());else if(Array.isArray(_)){let J=_.length,U=Array(J);for(let f=0;f<J;f++){let K=_[f];K instanceof t?U[f]=K.name:(typeof K=="number"||K instanceof P1)&&(U[f]=K.toString())}z.update(U.join())}}if(z.update(`${G}-${P}`),Y instanceof C1){let _=Y.str||Y,J=_.buffer?new Uint8Array(_.buffer.buffer,0,_.bufferLength):new Uint8Array(_.bytes.buffer,_.start,_.end-_.start);z.update(J)}else Y instanceof t&&z.update(Y.name);let $=Z.get("Widths")||q.get("Widths");if(Array.isArray($)){let _=[];for(let J of $)(typeof J=="number"||J instanceof P1)&&_.push(J.toString());z.update(_.join())}if(R){z.update("compositeFont");let _=Z.get("W")||q.get("W");if(Array.isArray(_)){let U=[];for(let f of _)if(typeof f=="number"||f instanceof P1)U.push(f.toString());else if(Array.isArray(f)){let K=[];for(let I of f)(typeof I=="number"||I instanceof P1)&&K.push(I.toString());U.push(`[${K.join()}]`)}z.update(U.join())}let J=Z.getRaw("CIDToGIDMap")||q.getRaw("CIDToGIDMap");J instanceof t?z.update(J.name):J instanceof P1?z.update(J.toString()):J instanceof C1&&z.update(J.peekBytes())}}return{descriptor:Q,dict:Z,baseDict:q,composite:R,type:X.name,firstChar:G,lastChar:P,toUnicode:Y,hash:z?z.hexdigest():""}}async translateFont({descriptor:Z,dict:q,baseDict:X,composite:z,type:R,firstChar:G,lastChar:P,toUnicode:Q,cssFontInfo:Y}){let W=R==="Type3";if(!Z){if(!W){let N=q.get("BaseFont");if(!(N instanceof t))throw new h("Base font is not specified");N=N.name.replaceAll(/[,_]/g,"-");let L=this.getBaseFontMetrics(N),m=N.split("-",1)[0],d=(this.isSerifFont(m)?QQ:0)|(L.monospace?Xq:0)|(Gq()[m]?T3:KR),e={type:R,name:N,loadedName:X.loadedName,systemFontInfo:null,widths:L.widths,defaultWidth:L.defaultWidth,isSimulatedFlags:!0,flags:d,firstChar:G,lastChar:P,toUnicode:Q,xHeight:0,capHeight:0,italicAngle:0,isType3Font:W},E=q.get("Widths"),p=jR(N),F=null;p&&(F=await this.fetchStandardFontData(p),e.isInternalFont=!!F),!e.isInternalFont&&this.options.useSystemFonts&&(e.systemFontInfo=ER(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,N,p,R));let s=await this.extractDataStructures(q,e);if(Array.isArray(E)){let w=[],c=G;for(let o of E){let Q1=this.xref.fetchIfRef(o);typeof Q1=="number"&&(w[c]=Q1),c++}s.widths=w}else s.widths=this.buildCharCodeToWidth(L.widths,s);return new Wq(N,F,s,this.options)}Z=S.empty}let $=Z.get("FontName"),_=q.get("BaseFont");typeof $=="string"&&($=t.get($)),typeof _=="string"&&(_=t.get(_));let J=$?.name,U=_?.name;if(W?J||($=t.get(R)):J!==U&&(v1(`The FontDescriptor's FontName is "${J}" but should be the same as the Font's BaseFont "${U}".`),J&&U&&(U.startsWith(J)||!VR(J)&&VR(U))&&($=null),$||=_),!($ instanceof t))throw new h("invalid font name");let f,K,I,B,j;try{if(f=Z.get("FontFile","FontFile2","FontFile3"),f){if(!(f instanceof C1))throw new h("FontFile should be a stream");if(f.isEmpty)throw new h("FontFile is empty")}}catch(N){if(!this.options.ignoreErrors)throw N;v(`translateFont - fetching "${$.name}" font file: "${N}".`),f=null}let V=!1,x=null,M=null;if(f){if(f.dict){let N=f.dict.get("Subtype");N instanceof t&&(K=N.name),I=f.dict.get("Length1"),B=f.dict.get("Length2"),j=f.dict.get("Length3")}}else if(Y){let N=jX($.name);N&&(Y.fontFamily=`${Y.fontFamily}-PdfJS-XFA`,Y.metrics=N.metrics||null,x=N.factors||null,f=await this.fetchStandardFontData(N.name),V=!!f,X=q=SQ($.name),z=!0)}else if(!W){let N=jR($.name);N&&(f=await this.fetchStandardFontData(N),V=!!f),!V&&this.options.useSystemFonts&&(M=ER(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,$.name,N,R))}let H=g4(q.getArray("FontMatrix"),x5),A=T4(Z.getArray("FontBBox")||q.getArray("FontBBox"),W?[0,0,0,0]:void 0),T=Z.get("Ascent");typeof T!="number"&&(T=void 0);let k=Z.get("Descent");typeof k!="number"&&(k=void 0);let y=Z.get("XHeight");typeof y!="number"&&(y=0);let O=Z.get("CapHeight");typeof O!="number"&&(O=0);let D=Z.get("Flags");Number.isInteger(D)||(D=0);let n=Z.get("ItalicAngle");typeof n!="number"&&(n=0);let b={type:R,name:$.name,subtype:K,file:f,length1:I,length2:B,length3:j,isInternalFont:V,loadedName:X.loadedName,composite:z,fixedPitch:!1,fontMatrix:H,firstChar:G,lastChar:P,toUnicode:Q,bbox:A,ascent:T,descent:k,xHeight:y,capHeight:O,flags:D,italicAngle:n,isType3Font:W,cssFontInfo:Y,scaleFactors:x,systemFontInfo:M};if(z){let N=X.get("Encoding");N instanceof t&&(b.cidEncoding=N.name);let L=await z7.create({encoding:N,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});b.cMap=L,b.vertical=b.cMap.vertical}let l=await this.extractDataStructures(q,b);return this.extractWidths(q,Z,l),new Wq($.name,f,l,this.options)}static buildFontPaths(Z,q,X,z){function R(G){let P=`${Z.loadedName}_path_${G}`;try{if(Z.renderer.hasBuiltPath(G))return;X.send("commonobj",[P,"FontPath",Z.renderer.getPathJs(G)])}catch(Q){if(z.ignoreErrors)return void v(`buildFontPaths - ignoring ${P} glyph: "${Q}".`);throw Q}}for(let G of q){R(G.fontChar);let P=G.accent;P?.fontChar&&R(P.fontChar)}}static get fallbackFontDict(){let Z=new S;return Z.set("BaseFont",t.get("Helvetica")),Z.set("Type",t.get("FallbackType")),Z.set("Subtype",t.get("FallbackType")),Z.set("Encoding",t.get("WinAnsiEncoding")),X1(this,"fallbackFontDict",Z)}}class o2{#Z=!1;#q=null;constructor({loadedName:Z,font:q,dict:X}){this.loadedName=Z,this.font=q,this.dict=X,this.type3Dependencies=q.isType3Font?new Set:null}send(Z){if(this.#Z)return;this.#Z=!0;let q=this.font.exportData(),X=[];q.data&&(q.data.charProcOperatorList&&(q.charProcOperatorList=q.data.charProcOperatorList),q.data=ej.write(q.data),X.push(q.data)),Z.send("commonobj",[this.loadedName,"Font",q],X)}fallback(Z,q){this.font.data&&(this.font.disableFontFace=!0,H6.buildFontPaths(this.font,this.font.glyphCacheValues,Z,q))}loadType3Data(Z,q,X){if(this.#q)return this.#q;let{font:z,type3Dependencies:R}=this;t1(z.isType3Font,"Must be a Type3 font.");let G=Z.clone({ignoreErrors:!1}),P=new U8(Z.type3FontRefs);this.dict.objId&&!P.has(this.dict.objId)&&P.put(this.dict.objId),G.type3FontRefs=P;let Q=Promise.resolve(),Y=this.dict.get("CharProcs"),W=this.dict.get("Resources")||q,$=Object.create(null),[_,J,U,f]=z.bbox,K=U-_,I=f-J,B=Math.hypot(K,I);for(let j of Y.getKeys())Q=Q.then(()=>{let V=Y.get(j),x=new O8;return G.getOperatorList({stream:V,task:X,resources:W,operatorList:x}).then(()=>{switch(x.fnArray[0]){case pZ:this.#z(x,B);break;case PP:B||this.#X(x)}$[j]=x.getIR();for(let M of x.dependencies)R.add(M)}).catch(function(M){v(`Type3 font resource "${j}" is not available.`);let H=new O8;$[j]=H.getIR()})});return this.#q=Q.then(()=>{z.charProcOperatorList=$,this._bbox&&(z.isCharBBox=!0,z.bbox=this._bbox)}),this.#q}#z(Z,q=NaN){let X=h1.normalizeRect(Z.argsArray[0].slice(2)),z=X[2]-X[0],R=X[3]-X[1],G=Math.hypot(z,R);z===0||R===0?(Z.fnArray.splice(0,1),Z.argsArray.splice(0,1)):(q===0||Math.round(G/q)>=10)&&(this._bbox??=[1/0,1/0,-1/0,-1/0],h1.rectBoundingBox(...X,this._bbox));let P=0,Q=Z.length;for(;P<Q;){switch(Z.fnArray[P]){case pZ:break;case iq:case Z9:case tq:case U3:case q9:case f3:case eq:case a7:case y4:case n0:case ZX:case n7:case K3:case tG:Z.fnArray.splice(P,1),Z.argsArray.splice(P,1),Q--;continue;case I5:let[Y]=Z.argsArray[P],W=0,$=Y.length;for(;W<$;){let[_]=Y[W];switch(_){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":Y.splice(W,1),$--;continue}W++}}P++}}#X(Z){let q=1,X=Z.length;for(;q<X;){if(Z.fnArray[q]===A5){let z=Z.argsArray[q][2];this._bbox??=[1/0,1/0,-1/0,-1/0],h1.rectBoundingBox(...z,this._bbox)}q++}}}class f7{constructor(Z=new xX){this.state=Z,this.stateStack=[]}save(){let Z=this.state;this.stateStack.push(this.state),this.state=Z.clone()}restore(){let Z=this.stateStack.pop();Z&&(this.state=Z)}transform(Z){this.state.ctm=h1.transform(this.state.ctm,Z)}}class sQ{constructor(){this.ctm=new Float32Array(w0),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=x5,this.textMatrix=w0.slice(),this.textLineMatrix=w0.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(Z,q,X,z,R,G){let P=this.textMatrix;P[0]=Z,P[1]=q,P[2]=X,P[3]=z,P[4]=R,P[5]=G}setTextLineMatrix(Z,q,X,z,R,G){let P=this.textLineMatrix;P[0]=Z,P[1]=q,P[2]=X,P[3]=z,P[4]=R,P[5]=G}translateTextMatrix(Z,q){let X=this.textMatrix;X[4]=X[0]*Z+X[2]*q+X[4],X[5]=X[1]*Z+X[3]*q+X[5]}translateTextLineMatrix(Z,q){let X=this.textLineMatrix;X[4]=X[0]*Z+X[2]*q+X[4],X[5]=X[1]*Z+X[3]*q+X[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){let Z=Object.create(this);return Z.textMatrix=this.textMatrix.slice(),Z.textLineMatrix=this.textLineMatrix.slice(),Z.fontMatrix=this.fontMatrix.slice(),Z}}class xX{constructor(){this.ctm=new Float32Array(w0),this.font=null,this.textRenderingMode=PB,this._fillColorSpace=this._strokeColorSpace=g1.gray,this.patternFillColorSpace=null,this.patternStrokeColorSpace=null,this.currentPointX=this.currentPointY=0,this.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0]),this.pathBuffer=[]}get fillColorSpace(){return this._fillColorSpace}set fillColorSpace(Z){this._fillColorSpace=this.patternFillColorSpace=Z}get strokeColorSpace(){return this._strokeColorSpace}set strokeColorSpace(Z){this._strokeColorSpace=this.patternStrokeColorSpace=Z}clone({newPath:Z=!1}={}){let q=Object.create(this);return Z&&(q.pathBuffer=[],q.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0])),q}}class l4{static get opMap(){return X1(this,"opMap",Object.assign(Object.create(null),{w:{id:nG,numArgs:1,variableArgs:!1},J:{id:vB,numArgs:1,variableArgs:!1},j:{id:bB,numArgs:1,variableArgs:!1},M:{id:SB,numArgs:1,variableArgs:!1},d:{id:iG,numArgs:2,variableArgs:!1},ri:{id:tG,numArgs:1,variableArgs:!1},i:{id:mB,numArgs:1,variableArgs:!1},gs:{id:I5,numArgs:1,variableArgs:!1},q:{id:y0,numArgs:0,variableArgs:!1},Q:{id:Y0,numArgs:0,variableArgs:!1},cm:{id:_4,numArgs:6,variableArgs:!1},m:{id:R3,numArgs:2,variableArgs:!1},l:{id:TZ,numArgs:2,variableArgs:!1},c:{id:NZ,numArgs:6,variableArgs:!1},v:{id:CZ,numArgs:4,variableArgs:!1},y:{id:FZ,numArgs:4,variableArgs:!1},h:{id:vZ,numArgs:0,variableArgs:!1},re:{id:bZ,numArgs:4,variableArgs:!1},S:{id:oq,numArgs:0,variableArgs:!1},s:{id:G3,numArgs:0,variableArgs:!1},f:{id:SZ,numArgs:0,variableArgs:!1},F:{id:SZ,numArgs:0,variableArgs:!1},"f*":{id:eG,numArgs:0,variableArgs:!1},B:{id:aq,numArgs:0,variableArgs:!1},"B*":{id:nq,numArgs:0,variableArgs:!1},b:{id:P3,numArgs:0,variableArgs:!1},"b*":{id:Q3,numArgs:0,variableArgs:!1},n:{id:mZ,numArgs:0,variableArgs:!1},W:{id:OB,numArgs:0,variableArgs:!1},"W*":{id:yB,numArgs:0,variableArgs:!1},BT:{id:Y3,numArgs:0,variableArgs:!1},ET:{id:W3,numArgs:0,variableArgs:!1},Tc:{id:OZ,numArgs:1,variableArgs:!1},Tw:{id:yZ,numArgs:1,variableArgs:!1},Tz:{id:ZP,numArgs:1,variableArgs:!1},TL:{id:qP,numArgs:1,variableArgs:!1},Tf:{id:s4,numArgs:2,variableArgs:!1},Tr:{id:XP,numArgs:1,variableArgs:!1},Ts:{id:zP,numArgs:1,variableArgs:!1},Td:{id:RP,numArgs:2,variableArgs:!1},TD:{id:GP,numArgs:2,variableArgs:!1},Tm:{id:S5,numArgs:6,variableArgs:!1},"T*":{id:u2,numArgs:0,variableArgs:!1},Tj:{id:B4,numArgs:1,variableArgs:!1},TJ:{id:$3,numArgs:1,variableArgs:!1},"'":{id:_3,numArgs:1,variableArgs:!1},'"':{id:J3,numArgs:3,variableArgs:!1},d0:{id:PP,numArgs:2,variableArgs:!1},d1:{id:pZ,numArgs:6,variableArgs:!1},CS:{id:iq,numArgs:1,variableArgs:!1},cs:{id:Z9,numArgs:1,variableArgs:!1},SC:{id:tq,numArgs:4,variableArgs:!0},SCN:{id:U3,numArgs:33,variableArgs:!0},sc:{id:q9,numArgs:4,variableArgs:!0},scn:{id:f3,numArgs:33,variableArgs:!0},G:{id:eq,numArgs:1,variableArgs:!1},g:{id:a7,numArgs:1,variableArgs:!1},RG:{id:y4,numArgs:3,variableArgs:!1},rg:{id:n0,numArgs:3,variableArgs:!1},K:{id:ZX,numArgs:4,variableArgs:!1},k:{id:n7,numArgs:4,variableArgs:!1},sh:{id:K3,numArgs:1,variableArgs:!1},BI:{id:pB,numArgs:0,variableArgs:!1},ID:{id:DB,numArgs:0,variableArgs:!1},EI:{id:QP,numArgs:1,variableArgs:!1},Do:{id:DZ,numArgs:1,variableArgs:!1},MP:{id:YP,numArgs:1,variableArgs:!1},DP:{id:WP,numArgs:2,variableArgs:!1},BMC:{id:$P,numArgs:1,variableArgs:!1},BDC:{id:i0,numArgs:2,variableArgs:!1},EMC:{id:B6,numArgs:0,variableArgs:!1},BX:{id:_P,numArgs:0,variableArgs:!1},EX:{id:JP,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}static MAX_INVALID_PATH_OPS=10;constructor(Z,q,X=new f7){this.parser=new f4({lexer:new C0(Z,l4.opMap),xref:q}),this.stateManager=X,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(Z){let q=Z.args;for(;;){let X=this.parser.getObj();if(X instanceof x8){let z=X.cmd,R=l4.opMap[z];if(!R){v(`Unknown command "${z}".`);continue}let{id:G,numArgs:P}=R,Q=q!==null?q.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=G>=R3&&G<=mZ,R.variableArgs)Q>P&&v1(`Command ${z}: expected [0, ${P}] args, but received ${Q} args.`);else{if(Q!==P){let Y=this.nonProcessedArgs;for(;Q>P;)Y.push(q.shift()),Q--;for(;Q<P&&Y.length!==0;)q===null&&(q=[]),q.unshift(Y.pop()),Q++}if(Q<P){let Y=`command ${z}: expected ${P} args, but received ${Q} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>l4.MAX_INVALID_PATH_OPS)throw new h(`Invalid ${Y}`);v(`Skipping ${Y}`),q!==null&&(q.length=0);continue}}return this.preprocessCommand(G,q),Z.fn=G,Z.args=q,!0}if(X===b8)return!1;if(X!==null&&(q===null&&(q=[]),q.push(X),q.length>33))throw new h("Too many arguments")}}preprocessCommand(Z,q){switch(0|Z){case y0:this.stateManager.save();break;case Y0:this.stateManager.restore();break;case _4:this.stateManager.transform(q)}}}function MX(Z){return new rQ(Z).parse()}function q4(Z,q){if(Z[0]===Z[1]&&Z[1]===Z[2])return`${O1(Z[0]/255)} ${q?"g":"G"}`;return Array.from(Z,(X)=>O1(X/255)).join(" ")+" "+(q?"rg":"RG")}class t0{constructor(Z,q){this.xref=Z,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=q;let X=new OffscreenCanvas(1,1);this.ctxMeasure=X.getContext("2d",{willReadFrequently:!0}),t0._fontNameId||(t0._fontNameId=1),this.fontName=t.get(`InvalidPDFjsFont_${q}_${t0._fontNameId++}`)}get fontDescriptorRef(){if(!t0._fontDescriptorRef){let Z=new S(this.xref);Z.setIfName("Type","FontDescriptor"),Z.set("FontName",this.fontName),Z.set("FontFamily","MyriadPro Regular"),Z.set("FontBBox",[0,0,0,0]),Z.setIfName("FontStretch","Normal"),Z.set("FontWeight",400),Z.set("ItalicAngle",0),t0._fontDescriptorRef=this.xref.getNewPersistentRef(Z)}return t0._fontDescriptorRef}get descendantFontRef(){let Z=new S(this.xref);Z.set("BaseFont",this.fontName),Z.setIfName("Type","Font"),Z.setIfName("Subtype","CIDFontType0"),Z.setIfName("CIDToGIDMap","Identity"),Z.set("FirstChar",this.firstChar),Z.set("LastChar",this.lastChar),Z.set("FontDescriptor",this.fontDescriptorRef),Z.set("DW",1000);let q=[],X=[...this.widths.entries()].sort(),z=null,R=null;for(let[P,Q]of X)z?P===z+R.length?R.push(Q):(q.push(z,R),z=P,R=[Q]):(z=P,R=[Q]);z&&q.push(z,R),Z.set("W",q);let G=new S(this.xref);return G.set("Ordering","Identity"),G.set("Registry","Adobe"),G.set("Supplement",0),Z.set("CIDSystemInfo",G),this.xref.getNewPersistentRef(Z)}get baseFontRef(){let Z=new S(this.xref);return Z.set("BaseFont",this.fontName),Z.setIfName("Type","Font"),Z.setIfName("Subtype","Type0"),Z.setIfName("Encoding","Identity-H"),Z.set("DescendantFonts",[this.descendantFontRef]),Z.setIfName("ToUnicode","Identity-H"),this.xref.getNewPersistentRef(Z)}get resources(){let Z=new S(this.xref),q=new S(this.xref);return q.set(this.fontName.name,this.baseFontRef),Z.set("Font",q),Z}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(Z){let q=this._createContext();for(let X of Z.split(/\r\n?|\n/))for(let z of X.split("")){let R=z.charCodeAt(0);if(this.widths.has(R))continue;let G=q.measureText(z),P=Math.ceil(G.width);this.widths.set(R,P),this.firstChar=Math.min(R,this.firstChar),this.lastChar=Math.max(R,this.lastChar)}return this.resources}static getFirstPositionInfo(Z,q,X){let[z,R,G,P]=Z,Q=G-z,Y=P-R;q%180!=0&&([Q,Y]=[Y,Q]);let W=M5*X;return{coords:[0,Y+Ez*X-W],bbox:[0,0,Q,Y],matrix:q!==0?M3(q,Y,W):void 0}}createAppearance(Z,q,X,z,R,G){let P=this._createContext(),Q=[],Y=-1/0;for(let O of Z.split(/\r\n?|\n/)){Q.push(O);let D=P.measureText(O).width;Y=Math.max(Y,D);for(let n of ZI(O)){let b=String.fromCodePoint(n),l=this.widths.get(n);if(l===void 0){let N=P.measureText(b);l=Math.ceil(N.width),this.widths.set(n,l),this.firstChar=Math.min(n,this.firstChar),this.lastChar=Math.max(n,this.lastChar)}}}Y*=z/1000;let[W,$,_,J]=q,U=_-W,f=J-$;X%180!=0&&([U,f]=[f,U]);let K=1;Y>U&&(K=U/Y);let I=1,B=M5*z,j=Ez*z,V=B*Q.length;V>f&&(I=f/V);let x=z*Math.min(K,I),M=["q",`0 0 ${O1(U)} ${O1(f)} re W n`,"BT",`1 0 0 1 0 ${O1(f+j)} Tm 0 Tc ${q4(R,!0)}`,`/${this.fontName.name} ${O1(x)} Tf`],{resources:H}=this;if((G=typeof G=="number"&&G>=0&&G<=1?G:1)!==1){M.push("/R0 gs");let O=new S(this.xref),D=new S(this.xref);D.set("ca",G),D.set("CA",G),D.setIfName("Type","ExtGState"),O.set("R0",D),H.set("ExtGState",O)}let A=O1(B);for(let O of Q)M.push(`0 -${A} Td <${XI(O)}> Tj`);M.push("ET","Q");let T=M.join(`
|
|
7
|
-
`),k=new S(this.xref);if(k.setIfName("Subtype","Form"),k.setIfName("Type","XObject"),k.set("BBox",[0,0,U,f]),k.set("Length",T.length),k.set("Resources",H),X){let O=M3(X,U,f);k.set("Matrix",O)}let y=new o8(T);return y.dict=k,y}}class AX{constructor(Z,q,X){this.root=Z,this.xref=q,this._type=X}getAll(){let Z=new Map;if(!this.root)return Z;let q=this.xref,X=new U8;X.put(this.root);let z=[this.root];for(;z.length>0;){let R=q.fetchIfRef(z.shift());if(!(R instanceof S))continue;if(R.has("Kids")){let P=R.get("Kids");if(!Array.isArray(P))continue;for(let Q of P){if(X.has(Q))throw new h(`Duplicate entry in "${this._type}" tree.`);z.push(Q),X.put(Q)}continue}let G=R.get(this._type);if(Array.isArray(G))for(let P=0,Q=G.length;P<Q;P+=2)Z.set(q.fetchIfRef(G[P]),q.fetchIfRef(G[P+1]))}return Z}getRaw(Z){if(!this.root)return null;let q=this.xref,X=q.fetchIfRef(this.root),z=0;for(;X.has("Kids");){if(++z>10)return v(`Search depth limit reached for "${this._type}" tree.`),null;let G=X.get("Kids");if(!Array.isArray(G))return null;let P=0,Q=G.length-1;for(;P<=Q;){let Y=P+Q>>1,W=q.fetchIfRef(G[Y]),$=W.get("Limits");if(Z<q.fetchIfRef($[0]))Q=Y-1;else{if(!(Z>q.fetchIfRef($[1]))){X=W;break}P=Y+1}}if(P>Q)return null}let R=X.get(this._type);if(Array.isArray(R)){let G=0,P=R.length-2;for(;G<=P;){let Q=G+P>>1,Y=Q+(1&Q),W=q.fetchIfRef(R[Y]);if(Z<W)P=Y-2;else{if(!(Z>W))return R[Y+1];G=Y+2}}}return null}get(Z){return this.xref.fetchIfRef(this.getRaw(Z))}}function LX(){vQ=Object.create(null),IP=Object.create(null),jP=Object.create(null),d2=Object.create(null),qq.clear(),i7.cleanup()}function cR(Z){return Z instanceof S?Z.has("UF")?Z.get("UF"):Z.has("F")?Z.get("F"):Z.has("Unix")?Z.get("Unix"):Z.has("Mac")?Z.get("Mac"):Z.has("DOS")?Z.get("DOS"):null:null}class F3{#Z=!1;constructor(Z,q,X=!1){Z instanceof S&&(this.xref=q,this.root=Z,Z.has("FS")&&(this.fs=Z.get("FS")),Z.has("RF")&&v("Related file specifications are not supported"),X||(Z.has("EF")?this.#Z=!0:v("Non-embedded file specifications are not supported")))}get filename(){let Z="",q=cR(this.root);return q&&typeof q=="string"&&(Z=E1(q,!0).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")),X1(this,"filename",Z||"unnamed")}get content(){if(!this.#Z)return null;this._contentRef||=cR(this.root?.get("EF"));let Z=null;if(this._contentRef){let q=this.xref.fetchIfRef(this._contentRef);q instanceof C1?Z=q.getBytes():v("Embedded file specification points to non-existing/invalid content")}else v("Embedded file specification does not have any content");return Z}get description(){let Z="",q=this.root?.get("Desc");return q&&typeof q=="string"&&(Z=E1(q)),X1(this,"description",Z)}get serializable(){return{rawFilename:this.filename,filename:(Z=this.filename,Z.substring(Z.lastIndexOf("/")+1)),content:this.content,description:this.description};var Z}}function a5(Z,q){let X=Z[q];return X===" "||X===`
|
|
8
|
-
`||X==="\r"||X==="\t"}class kX{_resolveEntities(Z){return Z.replaceAll(/&([^;]+);/g,(q,X)=>{if(X.substring(0,2)==="#x")return String.fromCodePoint(parseInt(X.substring(2),16));if(X.substring(0,1)==="#")return String.fromCodePoint(parseInt(X.substring(1),10));switch(X){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(X)})}_parseContent(Z,q){let X=[],z=q;function R(){for(;z<Z.length&&a5(Z,z);)++z}for(;z<Z.length&&!a5(Z,z)&&Z[z]!==">"&&Z[z]!=="/";)++z;let G=Z.substring(q,z);for(R();z<Z.length&&Z[z]!==">"&&Z[z]!=="/"&&Z[z]!=="?";){R();let P="",Q="";for(;z<Z.length&&!a5(Z,z)&&Z[z]!=="=";)P+=Z[z],++z;if(R(),Z[z]!=="=")return null;++z,R();let Y=Z[z];if(Y!=='"'&&Y!=="'")return null;let W=Z.indexOf(Y,++z);if(W<0)return null;Q=Z.substring(z,W),X.push({name:P,value:this._resolveEntities(Q)}),z=W+1,R()}return{name:G,attributes:X,parsed:z-q}}_parseProcessingInstruction(Z,q){let X=q;for(;X<Z.length&&!a5(Z,X)&&Z[X]!==">"&&Z[X]!=="?"&&Z[X]!=="/";)++X;let z=Z.substring(q,X);(function(){for(;X<Z.length&&a5(Z,X);)++X})();let R=X;for(;X<Z.length&&(Z[X]!=="?"||Z[X+1]!==">");)++X;return{name:z,value:Z.substring(R,X),parsed:X-q}}parseXml(Z){let q=0;for(;q<Z.length;){let X=q;if(Z[q]==="<"){++X;let z;switch(Z[X]){case"/":if(++X,z=Z.indexOf(">",X),z<0)return void this.onError(rR);this.onEndElement(Z.substring(X,z)),X=z+1;break;case"?":++X;let R=this._parseProcessingInstruction(Z,X);if(Z.substring(X+R.parsed,X+R.parsed+2)!=="?>")return void this.onError(YV);this.onPi(R.name,R.value),X+=R.parsed+2;break;case"!":if(Z.substring(X+1,X+3)==="--"){if(z=Z.indexOf("-->",X+3),z<0)return void this.onError(WV);this.onComment(Z.substring(X+3,z)),X=z+3}else if(Z.substring(X+1,X+8)==="[CDATA["){if(z=Z.indexOf("]]>",X+8),z<0)return void this.onError(QV);this.onCdata(Z.substring(X+8,z)),X=z+3}else{if(Z.substring(X+1,X+8)!=="DOCTYPE")return void this.onError(sR);{let Q=Z.indexOf("[",X+8),Y=!1;if(z=Z.indexOf(">",X+8),z<0)return void this.onError(hR);if(Q>0&&z>Q){if(z=Z.indexOf("]>",X+8),z<0)return void this.onError(hR);Y=!0}let W=Z.substring(X+8,z+(Y?1:0));this.onDoctype(W),X=z+(Y?2:1)}}break;default:let G=this._parseContent(Z,X);if(G===null)return void this.onError(sR);let P=!1;if(Z.substring(X+G.parsed,X+G.parsed+2)==="/>")P=!0;else if(Z.substring(X+G.parsed,X+G.parsed+1)!==">")return void this.onError(rR);this.onBeginElement(G.name,G.attributes,P),X+=G.parsed+(P?2:1)}}else{for(;X<Z.length&&Z[X]!=="<";)X++;let z=Z.substring(q,X);this.onText(this._resolveEntities(z))}q=X}}onResolveEntity(Z){return`&${Z};`}onPi(Z,q){}onComment(Z){}onCdata(Z){}onDoctype(Z){}onText(Z){}onBeginElement(Z,q,X){}onEndElement(Z){}onError(Z){}}class J6{constructor(Z,q){this.nodeName=Z,this.nodeValue=q,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes?.[0]}get nextSibling(){let Z=this.parentNode.childNodes;if(!Z)return;let q=Z.indexOf(this);return q!==-1?Z[q+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((Z)=>Z.textContent).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(Z,q){if(q>=Z.length)return this;let X=Z[q];if(X.name.startsWith("#")&&q<Z.length-1)return this.searchNode(Z,q+1);let z=[],R=this;for(;;){if(X.name===R.nodeName){if(X.pos!==0){if(z.length===0)return null;{let[G]=z.pop(),P=0;for(let Q of G.childNodes)if(X.name===Q.nodeName){if(P===X.pos)return Q.searchNode(Z,q+1);P++}return R.searchNode(Z,q+1)}}{let G=R.searchNode(Z,q+1);if(G!==null)return G}}if(R.childNodes?.length>0)z.push([R,0]),R=R.childNodes[0];else{if(z.length===0)return null;for(;z.length!==0;){let[G,P]=z.pop(),Q=P+1;if(Q<G.childNodes.length){z.push([G,Q]),R=G.childNodes[Q];break}}if(z.length===0)return null}}}dump(Z){if(this.nodeName!=="#text"){if(Z.push(`<${this.nodeName}`),this.attributes)for(let q of this.attributes)Z.push(` ${q.name}="${$6(q.value)}"`);if(this.hasChildNodes()){Z.push(">");for(let q of this.childNodes)q.dump(Z);Z.push(`</${this.nodeName}>`)}else this.nodeValue?Z.push(`>${$6(this.nodeValue)}</${this.nodeName}>`):Z.push("/>")}else Z.push($6(this.nodeValue))}}class oQ{constructor(Z){Z=this._repair(Z);let q=new Z2({lowerCaseName:!0}).parseFromString(Z);this._metadataMap=new Map,this._data=Z,q&&this._parse(q)}_repair(Z){return Z.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,function(q,X){let z=X.replaceAll(/\\([0-3])([0-7])([0-7])/g,function(G,P,Q,Y){return String.fromCharCode(64*P+8*Q+1*Y)}).replaceAll(/&(amp|apos|gt|lt|quot);/g,function(G,P){switch(P){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw Error(`_repair: ${P} isn't defined.`)}),R=[">"];for(let G=0,P=z.length;G<P;G+=2){let Q=256*z.charCodeAt(G)+z.charCodeAt(G+1);Q>=32&&Q<127&&Q!==60&&Q!==62&&Q!==38?R.push(String.fromCharCode(Q)):R.push("&#x"+(65536+Q).toString(16).substring(1)+";")}return R.join("")})}_getSequence(Z){let q=Z.nodeName;return q!=="rdf:bag"&&q!=="rdf:seq"&&q!=="rdf:alt"?null:Z.childNodes.filter((X)=>X.nodeName==="rdf:li")}_parseArray(Z){if(!Z.hasChildNodes())return;let[q]=Z.childNodes,X=this._getSequence(q)||[];this._metadataMap.set(Z.nodeName,X.map((z)=>z.textContent.trim()))}_parse(Z){let q=Z.documentElement;if(q.nodeName!=="rdf:rdf")for(q=q.firstChild;q&&q.nodeName!=="rdf:rdf";)q=q.nextSibling;if(q&&q.nodeName==="rdf:rdf"&&q.hasChildNodes()){for(let X of q.childNodes)if(X.nodeName==="rdf:description")for(let z of X.childNodes){let R=z.nodeName;switch(R){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(z);continue}this._metadataMap.set(R,z.textContent.trim())}}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}class c4{constructor(Z,q,X){this.xref=Z,this.dict=q,this.ref=X instanceof P1?X:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}#Z(Z,q,X){if(!(Z instanceof P1)||q<0)return;this.structParentIds||=new t8;let z=this.structParentIds.get(Z);z||(z=[],this.structParentIds.put(Z,z)),z.push([q,X])}addAnnotationIdToPage(Z,q){this.#Z(Z,q,iQ)}readRoleMap(){let Z=this.dict.get("RoleMap");if(Z instanceof S)for(let[q,X]of Z)X instanceof t&&this.roleMap.set(q,X.name)}static async canCreateStructureTree({catalogRef:Z,pdfManager:q,newAnnotationsByPage:X}){if(!(Z instanceof P1))return v("Cannot save the struct tree: no catalog reference."),!1;let z=0,R=!0;for(let[G,P]of X){let{ref:Q}=await q.getPage(G);if(!(Q instanceof P1)){v(`Cannot save the struct tree: page ${G} has no ref.`),R=!0;break}for(let Y of P)Y.accessibilityData?.type&&(Y.parentTreeId=z++,R=!1)}if(R){for(let G of X.values())for(let P of G)delete P.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:Z,xref:q,catalogRef:X,pdfManager:z,changes:R}){let G=await z.ensureCatalog("cloneDict"),P=new t8;P.put(X,G);let Q=q.getNewTemporaryRef();G.set("StructTreeRoot",Q);let Y=new S(q);Y.set("Type",t.get("StructTreeRoot"));let W=q.getNewTemporaryRef();Y.set("ParentTree",W);let $=[];Y.set("K",$),P.put(Q,Y);let _=new S(q),J=[];_.set("Nums",J);let U=await this.#q({newAnnotationsByPage:Z,structTreeRootRef:Q,structTreeRoot:null,kids:$,nums:J,xref:q,pdfManager:z,changes:R,cache:P});Y.set("ParentTreeNextKey",U),P.put(W,_);for(let[f,K]of P.items())R.put(f,{data:K})}async canUpdateStructTree({pdfManager:Z,newAnnotationsByPage:q}){if(!this.ref)return v("Cannot update the struct tree: no root reference."),!1;let X=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(X)||X<0)return v("Cannot update the struct tree: invalid next key."),!1;let z=this.dict.get("ParentTree");if(!(z instanceof S))return v("Cannot update the struct tree: ParentTree isn't a dict."),!1;let R=z.get("Nums");if(!Array.isArray(R))return v("Cannot update the struct tree: nums isn't an array."),!1;let G=new w7(z,this.xref);for(let Q of q.keys()){let{pageDict:Y}=await Z.getPage(Q);if(!Y.has("StructParents"))continue;let W=Y.get("StructParents");if(!Number.isInteger(W)||!Array.isArray(G.get(W)))return v(`Cannot save the struct tree: page ${Q} has a wrong id.`),!1}let P=!0;for(let[Q,Y]of q){let{pageDict:W}=await Z.getPage(Q);c4.#X({elements:Y,xref:this.xref,pageDict:W,numberTree:G});for(let $ of Y)$.accessibilityData?.type&&($.accessibilityData.structParent>=0||($.parentTreeId=X++),P=!1)}if(P){for(let Q of q.values())for(let Y of Q)delete Y.parentTreeId,delete Y.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:Z,pdfManager:q,changes:X}){let{ref:z,xref:R}=this,G=this.dict.clone(),P=new t8;P.put(z,G);let Q,Y=G.getRaw("ParentTree");Y instanceof P1?Q=R.fetch(Y):(Q=Y,Y=R.getNewTemporaryRef(),G.set("ParentTree",Y)),Q=Q.clone(),P.put(Y,Q);let W=Q.getRaw("Nums"),$=null;W instanceof P1&&($=W,W=R.fetch($)),W=W.slice(),$||Q.set("Nums",W);let _=await c4.#q({newAnnotationsByPage:Z,structTreeRootRef:z,structTreeRoot:this,kids:null,nums:W,xref:R,pdfManager:q,changes:X,cache:P});if(_!==-1){G.set("ParentTreeNextKey",_),$&&P.put($,W);for(let[J,U]of P.items())X.put(J,{data:U})}}static async#q({newAnnotationsByPage:Z,structTreeRootRef:q,structTreeRoot:X,kids:z,nums:R,xref:G,pdfManager:P,changes:Q,cache:Y}){let W=t.get("OBJR"),$,_=-1;for(let[J,U]of Z){let f=await P.getPage(J),{ref:K}=f,I=K instanceof P1;for(let{accessibilityData:B,ref:j,parentTreeId:V,structTreeParent:x}of U){if(!B?.type)continue;let{structParent:M}=B;if(X&&Number.isInteger(M)&&M>=0){let k=($||=new Map).get(J);if(k===void 0)k=new TX(X,f.pageDict).collectObjects(K),$.set(J,k);let y=k?.get(M);if(y){let O=G.fetch(y).clone();c4.#z(O,B),Q.put(y,{data:O});continue}}_=Math.max(_,V);let H=G.getNewTemporaryRef(),A=new S(G);c4.#z(A,B),await this.#R({structTreeParent:x,tagDict:A,newTagRef:H,structTreeRootRef:q,fallbackKids:z,xref:G,cache:Y});let T=new S(G);A.set("K",T),T.set("Type",W),I&&T.set("Pg",K),T.set("Obj",j),Y.put(H,A),R.push(V,H)}}return _+1}static#z(Z,{type:q,title:X,lang:z,alt:R,expanded:G,actualText:P}){Z.set("S",t.get(q)),X&&Z.set("T",x0(X)),z&&Z.set("Lang",x0(z)),R&&Z.set("Alt",x0(R)),G&&Z.set("E",x0(G)),P&&Z.set("ActualText",x0(P))}static#X({elements:Z,xref:q,pageDict:X,numberTree:z}){let R=new Map;for(let Y of Z)if(Y.structTreeParentId){let W=parseInt(Y.structTreeParentId.split("_mc")[1],10),$=R.get(W);$||($=[],R.set(W,$)),$.push(Y)}let G=X.get("StructParents");if(!Number.isInteger(G))return;let P=z.get(G),Q=(Y,W,$)=>{let _=R.get(Y);if(_){let J=W.getRaw("P"),U=q.fetchIfRef(J);if(J instanceof P1&&U instanceof S){let f={ref:$,dict:W};for(let K of _)K.structTreeParent=f}return!0}return!1};for(let Y of P){if(!(Y instanceof P1))continue;let W=q.fetch(Y),$=W.get("K");if(Number.isInteger($))Q($,W,Y);else if(Array.isArray($))for(let _ of $){if(_=q.fetchIfRef(_),Number.isInteger(_)&&Q(_,W,Y))break;if(!(_ instanceof S))continue;if(!Q8(_.get("Type"),"MCR"))break;let J=_.get("MCID");if(Number.isInteger(J)&&Q(J,W,Y))break}}}static async#R({structTreeParent:Z,tagDict:q,newTagRef:X,structTreeRootRef:z,fallbackKids:R,xref:G,cache:P}){let Q,Y=null;Z?({ref:Y}=Z,Q=Z.dict.getRaw("P")||z):Q=z,q.set("P",Q);let W=G.fetchIfRef(Q);if(!W)return void R.push(X);let $=P.get(Q);$||($=W.clone(),P.put(Q,$));let _=$.getRaw("K"),J=_ instanceof P1?P.get(_):null;if(!J){J=G.fetchIfRef(_),J=Array.isArray(J)?J.slice():[_];let f=G.getNewTemporaryRef();$.set("K",f),P.put(f,J)}let U=J.indexOf(Y);J.splice(U>=0?U+1:J.length,0,X)}}class tQ{constructor(Z,q){this.tree=Z,this.xref=Z.xref,this.dict=q,this.kids=[],this.parseKids()}get role(){let Z=this.dict.get("S"),q=Z instanceof t?Z.name:"",{root:X}=this.tree;return X.roleMap.get(q)??q}parseKids(){let Z=null,q=this.dict.getRaw("Pg");q instanceof P1&&(Z=q.toString());let X=this.dict.get("K");if(Array.isArray(X))for(let z of X){let R=this.parseKid(Z,this.xref.fetchIfRef(z));R&&this.kids.push(R)}else{let z=this.parseKid(Z,X);z&&this.kids.push(z)}}parseKid(Z,q){if(Number.isInteger(q))return this.tree.pageDict.objId!==Z?null:new R7({type:aQ,mcid:q,pageObjId:Z});if(!(q instanceof S))return null;let X=q.getRaw("Pg");X instanceof P1&&(Z=X.toString());let z=q.get("Type")instanceof t?q.get("Type").name:null;if(z==="MCR"){if(this.tree.pageDict.objId!==Z)return null;let R=q.getRaw("Stm");return new R7({type:nQ,refObjId:R instanceof P1?R.toString():null,pageObjId:Z,mcid:q.get("MCID")})}if(z==="OBJR"){if(this.tree.pageDict.objId!==Z)return null;let R=q.getRaw("Obj");return new R7({type:Vq,refObjId:R instanceof P1?R.toString():null,pageObjId:Z})}return new R7({type:Hq,dict:q})}}class R7{constructor({type:Z,dict:q=null,mcid:X=null,pageObjId:z=null,refObjId:R=null}){this.type=Z,this.dict=q,this.mcid=X,this.pageObjId=z,this.refObjId=R,this.parentNode=null}}class TX{constructor(Z,q){this.root=Z,this.xref=Z?.xref??null,this.rootDict=Z?.dict??null,this.pageDict=q,this.nodes=[]}collectObjects(Z){if(!(this.root&&this.rootDict&&Z instanceof P1))return null;let q=this.rootDict.get("ParentTree");if(!q)return null;let X=this.root.structParentIds?.get(Z);if(!X)return null;let z=new Map,R=new w7(q,this.xref);for(let[G]of X){let P=R.getRaw(G);P instanceof P1&&z.set(G,P)}return z}parse(Z){if(!(this.root&&this.rootDict&&Z instanceof P1))return;let q=this.rootDict.get("ParentTree");if(!q)return;let X=this.pageDict.get("StructParents"),z=this.root.structParentIds?.get(Z);if(!Number.isInteger(X)&&!z)return;let R=new Map,G=new w7(q,this.xref);if(Number.isInteger(X)){let P=G.get(X);if(Array.isArray(P))for(let Q of P)Q instanceof P1&&this.addNode(this.xref.fetch(Q),R)}if(z)for(let[P,Q]of z){let Y=G.get(P);if(Y){let W=this.addNode(this.xref.fetchIfRef(Y),R);W?.kids?.length===1&&W.kids[0].type===Vq&&(W.kids[0].type=Q)}}}addNode(Z,q,X=0){if(X>40)return v("StructTree MAX_DEPTH reached."),null;if(!(Z instanceof S))return null;if(q.has(Z))return q.get(Z);let z=new tQ(this,Z);q.set(Z,z);let R=Z.get("P");if(!(R instanceof S)||Q8(R.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(Z,z)||q.delete(Z),z;let G=this.addNode(R,q,X+1);if(!G)return z;let P=!1;for(let Q of G.kids)Q.type===Hq&&Q.dict===Z&&(Q.parentNode=z,P=!0);return P||q.delete(Z),z}addTopLevelNode(Z,q){let X=this.rootDict.get("K");if(!X)return!1;if(X instanceof S)return X.objId===Z.objId&&(this.nodes[0]=q,!0);if(!Array.isArray(X))return!0;let z=!1;for(let R=0;R<X.length;R++)X[R]?.toString()===Z.objId&&(this.nodes[R]=q,z=!0);return z}get serializable(){function Z(X,z,R=0){if(R>40)return void v("StructTree too deep to be fully serialized.");let G=Object.create(null);G.role=X.role,G.children=[],z.children.push(G);let P=X.dict.get("Alt");typeof P!="string"&&(P=X.dict.get("ActualText")),typeof P=="string"&&(G.alt=E1(P));let Q=X.dict.get("A");if(Q instanceof S){let W=T4(Q.getArray("BBox"),null);if(W)G.bbox=W;else{let $=Q.get("Width"),_=Q.get("Height");typeof $=="number"&&$>0&&typeof _=="number"&&_>0&&(G.bbox=[0,0,$,_])}}let Y=X.dict.get("Lang");typeof Y=="string"&&(G.lang=E1(Y));for(let W of X.kids){let $=W.type===Hq?W.parentNode:null;$?Z($,G,R+1):W.type===aQ||W.type===nQ?G.children.push({type:"content",id:`p${W.pageObjId}_mc${W.mcid}`}):W.type===Vq?G.children.push({type:"object",id:W.refObjId}):W.type===iQ&&G.children.push({type:"annotation",id:`pdfjs_internal_id_${W.refObjId}`})}}let q=Object.create(null);q.children=[],q.role="Root";for(let X of this.nodes)X&&Z(X,q);return q}}function GZ(Z){return Z instanceof S&&(Z=Z.get("D")),v3(Z)?Z:null}function lR(Z){let q=Z.get("D");if(q){if(q instanceof t&&(q=q.name),typeof q=="string")return E1(q,!0);if(v3(q))return JSON.stringify(q)}return null}class x6{#Z=null;#q=null;builtInCMapCache=new Map;fontCache=new t8;globalColorSpaceCache=new wQ;globalImageCache=new X6;nonBlendModesSet=new U8;pageDictCache=new t8;pageIndexCache=new t8;pageKidsCountCache=new t8;standardFontDataCache=new Map;systemFontCache=new Map;constructor(Z,q){if(this.pdfManager=Z,this.xref=q,this.#q=q.getCatalogObj(),!(this.#q instanceof S))throw new h("Catalog object is not a dictionary.");this.toplevelPagesDict}cloneDict(){return this.#q.clone()}get version(){let Z=this.#q.get("Version");if(Z instanceof t){if(xP.test(Z.name))return X1(this,"version",Z.name);v(`Invalid PDF catalog version: ${Z.name}`)}return X1(this,"version",null)}get lang(){let Z=this.#q.get("Lang");return X1(this,"lang",Z&&typeof Z=="string"?E1(Z):null)}get needsRendering(){let Z=this.#q.get("NeedsRendering");return X1(this,"needsRendering",typeof Z=="boolean"&&Z)}get collection(){let Z=null;try{let q=this.#q.get("Collection");q instanceof S&&q.size>0&&(Z=q)}catch(q){if(q instanceof X8)throw q;v1("Cannot fetch Collection entry; assuming no collection is present.")}return X1(this,"collection",Z)}get acroForm(){let Z=null;try{let q=this.#q.get("AcroForm");q instanceof S&&q.size>0&&(Z=q)}catch(q){if(q instanceof X8)throw q;v1("Cannot fetch AcroForm entry; assuming no forms are present.")}return X1(this,"acroForm",Z)}get acroFormRef(){let Z=this.#q.getRaw("AcroForm");return X1(this,"acroFormRef",Z instanceof P1?Z:null)}get metadata(){let Z=this.#q.getRaw("Metadata");if(!(Z instanceof P1))return X1(this,"metadata",null);let q=null;try{let X=this.xref.fetch(Z,!this.xref.encrypt?.encryptMetadata);if(X instanceof C1&&X.dict instanceof S){let z=X.dict.get("Type"),R=X.dict.get("Subtype");if(Q8(z,"Metadata")&&Q8(R,"XML")){let G=T7(X.getString());G&&(q=new oQ(G).serializable)}}}catch(X){if(X instanceof X8)throw X;v1(`Skipping invalid Metadata: "${X}".`)}return X1(this,"metadata",q)}get markInfo(){let Z=null;try{Z=this.#z()}catch(q){if(q instanceof X8)throw q;v("Unable to read mark info.")}return X1(this,"markInfo",Z)}#z(){let Z=this.#q.get("MarkInfo");if(!(Z instanceof S))return null;let q={Marked:!1,UserProperties:!1,Suspects:!1};for(let X in q){let z=Z.get(X);typeof z=="boolean"&&(q[X]=z)}return q}get structTreeRoot(){let Z=null;try{Z=this.#X()}catch(q){if(q instanceof X8)throw q;v("Unable read to structTreeRoot info.")}return X1(this,"structTreeRoot",Z)}#X(){let Z=this.#q.getRaw("StructTreeRoot"),q=this.xref.fetchIfRef(Z);if(!(q instanceof S))return null;let X=new c4(this.xref,q,Z);return X.init(),X}get toplevelPagesDict(){let Z=this.#q.get("Pages");if(!(Z instanceof S))throw new h("Invalid top-level pages dictionary.");return X1(this,"toplevelPagesDict",Z)}get documentOutline(){let Z=null;try{Z=this.#R()}catch(q){if(q instanceof X8)throw q;v("Unable to read document outline.")}return X1(this,"documentOutline",Z)}#R(){let Z=this.#q.get("Outlines");if(!(Z instanceof S))return null;if(Z=Z.getRaw("First"),!(Z instanceof P1))return null;let q={items:[]},X=[{obj:Z,parent:q}],z=new U8;z.put(Z);let R=this.xref,G=new Uint8ClampedArray(3);for(;X.length>0;){let P=X.shift(),Q=R.fetchIfRef(P.obj);if(Q===null)continue;Q.has("Title")||v("Invalid outline item encountered.");let Y={url:null,dest:null,action:null};x6.parseDestDictionary({destDict:Q,resultObj:Y,docBaseUrl:this.baseUrl,docAttachments:this.attachments});let W=Q.get("Title"),$=Q.get("F")||0,_=Q.getArray("C"),J=Q.get("Count"),U=G;!e8(_,3)||_[0]===0&&_[1]===0&&_[2]===0||(U=g1.rgb.getRgb(_,0));let f={action:Y.action,attachment:Y.attachment,dest:Y.dest,url:Y.url,unsafeUrl:Y.unsafeUrl,newWindow:Y.newWindow,setOCGState:Y.setOCGState,title:typeof W=="string"?E1(W):"",color:U,count:Number.isInteger(J)?J:void 0,bold:!!(2&$),italic:!!(1&$),items:[]};P.parent.items.push(f),Z=Q.getRaw("First"),Z instanceof P1&&!z.has(Z)&&(X.push({obj:Z,parent:f}),z.put(Z)),Z=Q.getRaw("Next"),Z instanceof P1&&!z.has(Z)&&(X.push({obj:Z,parent:P.parent}),z.put(Z))}return q.items.length>0?q.items:null}get permissions(){let Z=null;try{Z=this.#G()}catch(q){if(q instanceof X8)throw q;v("Unable to read permissions.")}return X1(this,"permissions",Z)}#G(){let Z=this.xref.trailer.get("Encrypt");if(!(Z instanceof S))return null;let q=Z.get("P");if(typeof q!="number")return null;q+=4294967296;let X=[];for(let z in az){let R=az[z];q&R&&X.push(R)}return X}get optionalContentConfig(){let Z=null;try{let q=this.#q.get("OCProperties");if(!q)return X1(this,"optionalContentConfig",null);let X=q.get("D");if(!X)return X1(this,"optionalContentConfig",null);let z=q.get("OCGs");if(!Array.isArray(z))return X1(this,"optionalContentConfig",null);let R=new t8;for(let G of z)G instanceof P1&&!R.has(G)&&R.put(G,this.#Q(G));Z=this.#P(X,R)}catch(q){if(q instanceof X8)throw q;v(`Unable to read optional content config: ${q}`)}return X1(this,"optionalContentConfig",Z)}#Q(Z){let q=this.xref.fetch(Z),X={id:Z.toString(),name:null,intent:null,usage:{print:null,view:null},rbGroups:[]},z=q.get("Name");typeof z=="string"&&(X.name=E1(z));let R=q.getArray("Intent");Array.isArray(R)||(R=[R]),R.every((W)=>W instanceof t)&&(X.intent=R.map((W)=>W.name));let G=q.get("Usage");if(!(G instanceof S))return X;let P=X.usage,Q=G.get("Print");if(Q instanceof S){let W=Q.get("PrintState");if(W instanceof t)switch(W.name){case"ON":case"OFF":P.print={printState:W.name}}}let Y=G.get("View");if(Y instanceof S){let W=Y.get("ViewState");if(W instanceof t)switch(W.name){case"ON":case"OFF":P.view={viewState:W.name}}}return X}#P(Z,q){function X(Y){let W=[];if(Array.isArray(Y))for(let $ of Y)$ instanceof P1&&q.has($)&&W.push($.toString());return W}function z(Y,W=0){if(!Array.isArray(Y))return null;let $=[];for(let J of Y){if(J instanceof P1&&q.has(J)){P.put(J),$.push(J.toString());continue}let U=R(J,W);U&&$.push(U)}if(W>0)return $;let _=[];for(let[J]of q.items())P.has(J)||_.push(J.toString());return _.length&&$.push({name:null,order:_}),$}function R(Y,W){if(++W>Q)return v("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;let $=G.fetchIfRef(Y);if(!Array.isArray($))return null;let _=G.fetchIfRef($[0]);if(typeof _!="string")return null;let J=z($.slice(1),W);return J?.length?{name:E1(_),order:J}:null}let G=this.xref,P=new U8,Q=10;return function(Y){if(Array.isArray(Y))for(let W of Y){let $=G.fetchIfRef(W);if(!Array.isArray($)||!$.length)continue;let _=new Set;for(let J of $)J instanceof P1&&q.has(J)&&!_.has(J.toString())&&(_.add(J.toString()),q.get(J).rbGroups.push(_))}}(Z.get("RBGroups")),{name:typeof Z.get("Name")=="string"?E1(Z.get("Name")):null,creator:typeof Z.get("Creator")=="string"?E1(Z.get("Creator")):null,baseState:Z.get("BaseState")instanceof t?Z.get("BaseState").name:null,on:X(Z.get("ON")),off:X(Z.get("OFF")),order:z(Z.get("Order")),groups:[...q]}}setActualNumPages(Z=null){this.#Z=Z}get hasActualNumPages(){return this.#Z!==null}get _pagesCount(){let Z=this.toplevelPagesDict.get("Count");if(!Number.isInteger(Z))throw new h("Page count in top-level pages dictionary is not an integer.");return X1(this,"_pagesCount",Z)}get numPages(){return this.#Z??this._pagesCount}get destinations(){let Z=this.#Y(),q=Object.create(null);for(let X of Z)if(X instanceof _5)for(let[z,R]of X.getAll()){let G=GZ(R);G&&(q[E1(z,!0)]=G)}else if(X instanceof S)for(let[z,R]of X){let G=GZ(R);G&&(q[E1(z,!0)]||=G)}return X1(this,"destinations",q)}getDestination(Z){if(this.hasOwnProperty("destinations"))return this.destinations[Z]??null;let q=this.#Y();for(let X of q)if(X instanceof _5||X instanceof S){let z=GZ(X.get(Z));if(z)return z}if(q.length){let X=this.destinations[Z];if(X)return X}return null}#Y(){let Z=this.#q.get("Names"),q=[];return Z?.has("Dests")&&q.push(new _5(Z.getRaw("Dests"),this.xref)),this.#q.has("Dests")&&q.push(this.#q.get("Dests")),q}get pageLabels(){let Z=null;try{Z=this.#W()}catch(q){if(q instanceof X8)throw q;v("Unable to read page labels.")}return X1(this,"pageLabels",Z)}#W(){let Z=this.#q.getRaw("PageLabels");if(!Z)return null;let q=Array(this.numPages),X=null,z="",R=new w7(Z,this.xref).getAll(),G="",P=1;for(let Q=0,Y=this.numPages;Q<Y;Q++){let W=R.get(Q);if(W!==void 0){if(!(W instanceof S))throw new h("PageLabel is not a dictionary.");if(W.has("Type")&&!Q8(W.get("Type"),"PageLabel"))throw new h("Invalid type in PageLabel dictionary.");if(W.has("S")){let $=W.get("S");if(!($ instanceof t))throw new h("Invalid style in PageLabel dictionary.");X=$.name}else X=null;if(W.has("P")){let $=W.get("P");if(typeof $!="string")throw new h("Invalid prefix in PageLabel dictionary.");z=E1($)}else z="";if(W.has("St")){let $=W.get("St");if(!(Number.isInteger($)&&$>=1))throw new h("Invalid start in PageLabel dictionary.");P=$}else P=1}switch(X){case"D":G=P;break;case"R":case"r":G=tB(P,X==="r");break;case"A":case"a":let $=26,_=X==="a"?97:65,J=P-1;G=String.fromCharCode(_+J%$).repeat(Math.floor(J/$)+1);break;default:if(X)throw new h(`Invalid style "${X}" in PageLabel dictionary.`);G=""}q[Q]=z+G,P++}return q}get pageLayout(){let Z=this.#q.get("PageLayout"),q="";if(Z instanceof t)switch(Z.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":q=Z.name}return X1(this,"pageLayout",q)}get pageMode(){let Z=this.#q.get("PageMode"),q="UseNone";if(Z instanceof t)switch(Z.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":q=Z.name}return X1(this,"pageMode",q)}get viewerPreferences(){let Z=this.#q.get("ViewerPreferences");if(!(Z instanceof S))return X1(this,"viewerPreferences",null);let q=null;for(let[X,z]of Z){let R;switch(X){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":typeof z=="boolean"&&(R=z);break;case"NonFullScreenPageMode":if(z instanceof t)switch(z.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":R=z.name;break;default:R="UseNone"}break;case"Direction":if(z instanceof t)switch(z.name){case"L2R":case"R2L":R=z.name;break;default:R="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(z instanceof t)switch(z.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":R=z.name;break;default:R="CropBox"}break;case"PrintScaling":if(z instanceof t)switch(z.name){case"None":case"AppDefault":R=z.name;break;default:R="AppDefault"}break;case"Duplex":if(z instanceof t)switch(z.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":R=z.name;break;default:R="None"}break;case"PrintPageRange":if(Array.isArray(z)&&z.length%2==0)z.every((G,P,Q)=>Number.isInteger(G)&&G>0&&(P===0||G>=Q[P-1])&&G<=this.numPages)&&(R=z);break;case"NumCopies":Number.isInteger(z)&&z>0&&(R=z);break;default:v(`Ignoring non-standard key in ViewerPreferences: ${X}.`);continue}R!==void 0?(q??=Object.create(null),q[X]=R):v(`Bad value, for key "${X}", in ViewerPreferences: ${z}.`)}return X1(this,"viewerPreferences",q)}get openAction(){let Z=this.#q.get("OpenAction"),q=Object.create(null);if(Z instanceof S){let X=new S(this.xref);X.set("A",Z);let z={url:null,dest:null,action:null};x6.parseDestDictionary({destDict:X,resultObj:z}),Array.isArray(z.dest)?q.dest=z.dest:z.action&&(q.action=z.action)}else v3(Z)&&(q.dest=Z);return X1(this,"openAction",qX(q)>0?q:null)}get attachments(){let Z=this.#q.get("Names"),q=null;if(Z instanceof S&&Z.has("EmbeddedFiles")){let X=new _5(Z.getRaw("EmbeddedFiles"),this.xref);for(let[z,R]of X.getAll()){let G=new F3(R,this.xref);q??=Object.create(null),q[E1(z,!0)]=G.serializable}}return X1(this,"attachments",q)}get xfaImages(){let Z=this.#q.get("Names"),q=null;if(Z instanceof S&&Z.has("XFAImages")){let X=new _5(Z.getRaw("XFAImages"),this.xref);for(let[z,R]of X.getAll())R instanceof C1&&(q??=new Map,q.set(E1(z,!0),R.getBytes()))}return X1(this,"xfaImages",q)}#J(){let Z=this.#q.get("Names"),q=null;function X(R,G){if(!(G instanceof S))return;if(!Q8(G.get("S"),"JavaScript"))return;let P=G.get("JS");if(P instanceof C1)P=P.getString();else if(typeof P!="string")return;P=E1(P,!0).replaceAll("\x00",""),P&&(q||=new Map).set(R,P)}if(Z instanceof S&&Z.has("JavaScript")){let R=new _5(Z.getRaw("JavaScript"),this.xref);for(let[G,P]of R.getAll())X(E1(G,!0),P)}let z=this.#q.get("OpenAction");return z&&X("OpenAction",z),q}get jsActions(){let Z=this.#J(),q=X9(this.xref,this.#q,NB);if(Z){q||=Object.create(null);for(let[X,z]of Z)X in q?q[X].push(z):q[X]=[z]}return X1(this,"jsActions",q)}async cleanup(Z=!1){LX(),this.globalColorSpaceCache.clear(),this.globalImageCache.clear(Z),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.pageDictCache.clear(),this.nonBlendModesSet.clear();for(let{dict:q}of await Promise.all(this.fontCache))delete q.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(Z){let q=[this.toplevelPagesDict],X=new U8,z=this.#q.getRaw("Pages");z instanceof P1&&X.put(z);let R=this.xref,G=this.pageKidsCountCache,P=this.pageIndexCache,Q=this.pageDictCache,Y=0;for(;q.length;){let W=q.pop();if(W instanceof P1){let U=G.get(W);if(U>=0&&Y+U<=Z){Y+=U;continue}if(X.has(W))throw new h("Pages tree contains circular reference.");X.put(W);let f=await(Q.get(W)||R.fetchAsync(W));if(f instanceof S){let K=f.getRaw("Type");if(K instanceof P1&&(K=await R.fetchAsync(K)),Q8(K,"Page")||!f.has("Kids")){if(G.has(W)||G.put(W,1),P.has(W)||P.put(W,Y),Y===Z)return[f,W];Y++;continue}}q.push(f);continue}if(!(W instanceof S))throw new h("Page dictionary kid reference points to wrong type of object.");let{objId:$}=W,_=W.getRaw("Count");if(_ instanceof P1&&(_=await R.fetchAsync(_)),Number.isInteger(_)&&_>=0&&($&&!G.has($)&&G.put($,_),Y+_<=Z)){Y+=_;continue}let J=W.getRaw("Kids");if(J instanceof P1&&(J=await R.fetchAsync(J)),!Array.isArray(J)){let U=W.getRaw("Type");if(U instanceof P1&&(U=await R.fetchAsync(U)),Q8(U,"Page")||!W.has("Kids")){if(Y===Z)return[W,null];Y++;continue}throw new h("Page dictionary kids object is not an array.")}for(let U=J.length-1;U>=0;U--){let f=J[U];q.push(f),W===this.toplevelPagesDict&&f instanceof P1&&!Q.has(f)&&Q.put(f,R.fetchAsync(f))}}throw Error(`Page index ${Z} not found.`)}async getAllPageDicts(Z=!1){let{ignoreErrors:q}=this.pdfManager.evaluatorOptions,X=[{currentNode:this.toplevelPagesDict,posInKids:0}],z=new U8,R=this.#q.getRaw("Pages");R instanceof P1&&z.put(R);let G=new Map,P=this.xref,Q=this.pageIndexCache,Y=0;function W(_,J){J&&!Q.has(J)&&Q.put(J,Y),G.set(Y++,[_,J])}function $(_){if(_ instanceof V4&&!Z)throw _;Z&&q&&Y===0&&(v(`getAllPageDicts - Skipping invalid first page: "${_}".`),_=S.empty),G.set(Y++,[_,null])}for(;X.length>0;){let _=X.at(-1),{currentNode:J,posInKids:U}=_,f=J.getRaw("Kids");if(f instanceof P1)try{f=await P.fetchAsync(f)}catch(j){$(j);break}if(!Array.isArray(f)){$(new h("Page dictionary kids object is not an array."));break}if(U>=f.length){X.pop();continue}let K=f[U],I;if(K instanceof P1){if(z.has(K)){$(new h("Pages tree contains circular reference."));break}z.put(K);try{I=await P.fetchAsync(K)}catch(j){$(j);break}}else I=K;if(!(I instanceof S)){$(new h("Page dictionary kid reference points to wrong type of object."));break}let B=I.getRaw("Type");if(B instanceof P1)try{B=await P.fetchAsync(B)}catch(j){$(j);break}Q8(B,"Page")||!I.has("Kids")?W(I,K instanceof P1?K:null):X.push({currentNode:I,posInKids:0}),_.posInKids++}return G}getPageIndex(Z){let q=this.pageIndexCache.get(Z);if(q!==void 0)return Promise.resolve(q);let X=this.xref,z=0,R=(G)=>function(P){let Q,Y=0;return X.fetchAsync(P).then(function(W){if(V3(P,Z)&&!HP(W,"Page")&&!(W instanceof S&&!W.has("Type")&&W.has("Contents")))throw new h("The reference does not point to a /Page dictionary.");if(!W)return null;if(!(W instanceof S))throw new h("Node must be a dictionary.");return Q=W.getRaw("Parent"),W.getAsync("Parent")}).then(function(W){if(!W)return null;if(!(W instanceof S))throw new h("Parent must be a dictionary.");return W.getAsync("Kids")}).then(function(W){if(!W)return null;let $=[],_=!1;for(let J of W){if(!(J instanceof P1))throw new h("Kid must be a reference.");if(V3(J,P)){_=!0;break}$.push(X.fetchAsync(J).then(function(U){if(!(U instanceof S))throw new h("Kid node must be a dictionary.");U.has("Count")?Y+=U.get("Count"):Y++}))}if(!_)throw new h("Kid reference not found in parent's kids.");return Promise.all($).then(()=>[Y,Q])})}(G).then((P)=>{if(!P)return this.pageIndexCache.put(Z,z),z;let[Q,Y]=P;return z+=Q,R(Y)});return R(Z)}get baseUrl(){let Z=this.#q.get("URI");if(Z instanceof S){let q=Z.get("Base");if(typeof q=="string"){let X=j3(q,null,{tryConvertEncoding:!0});if(X)return X1(this,"baseUrl",X.href)}}return X1(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:Z,resultObj:q,docBaseUrl:X=null,docAttachments:z=null}){if(!(Z instanceof S))return void v("parseDestDictionary: `destDict` must be a dictionary.");let R,G,P=Z.get("A");if(P instanceof S||(Z.has("Dest")?P=Z.get("Dest"):(P=Z.get("AA"),P instanceof S&&(P.has("D")?P=P.get("D"):P.has("U")&&(P=P.get("U"))))),P instanceof S){let Q=P.get("S");if(!(Q instanceof t))return void v("parseDestDictionary: Invalid type in Action dictionary.");let Y=Q.name;switch(Y){case"ResetForm":let W=P.get("Flags"),$=!(1&(typeof W=="number"?W:0)),_=[],J=[];for(let k of P.get("Fields")||[])k instanceof P1?J.push(k.toString()):typeof k=="string"&&_.push(E1(k));q.resetForm={fields:_,refs:J,include:$};break;case"URI":R=P.get("URI"),R instanceof t&&(R="/"+R.name);break;case"GoTo":G=P.get("D");break;case"Launch":case"GoToR":let U=P.get("F");if(U instanceof S){let k=new F3(U,null,!0),{rawFilename:y}=k.serializable;R=y}else typeof U=="string"&&(R=U);let f=lR(P);f&&typeof R=="string"&&(R=R.split("#",1)[0]+"#"+f);let K=P.get("NewWindow");typeof K=="boolean"&&(q.newWindow=K);break;case"GoToE":let I=P.get("T"),B;if(z&&I instanceof S){let k=I.get("R"),y=I.get("N");Q8(k,"C")&&typeof y=="string"&&(B=z[E1(y,!0)])}if(B){q.attachment=B;let k=lR(P);k&&(q.attachmentDest=k)}else v('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":let j=P.get("N");j instanceof t&&(q.action=j.name);break;case"SetOCGState":let V=P.get("State"),x=P.get("PreserveRB");if(!Array.isArray(V)||V.length===0)break;let M=[];for(let k of V)if(k instanceof t)switch(k.name){case"ON":case"OFF":case"Toggle":M.push(k.name)}else k instanceof P1&&M.push(k.toString());if(M.length!==V.length)break;q.setOCGState={state:M,preserveRB:typeof x!="boolean"||x};break;case"JavaScript":let H=P.get("JS"),A;H instanceof C1?A=H.getString():typeof H=="string"&&(A=H);let T=A&&LP(E1(A,!0));if(T){R=T.url,q.newWindow=T.newWindow;break}default:if(Y==="JavaScript"||Y==="SubmitForm")break;v(`parseDestDictionary - unsupported action: "${Y}".`)}}else Z.has("Dest")&&(G=Z.get("Dest"));if(typeof R=="string"){let Q=j3(R,X,{addDefaultProtocol:!0,tryConvertEncoding:!0});Q&&(q.url=Q.href),q.unsafeUrl=R}G&&(G instanceof t&&(G=G.name),typeof G=="string"?q.dest=E1(G,!0):v3(G)&&(q.dest=G))}}function $V(Z){return Z instanceof P1||Z instanceof S||Z instanceof C1||Array.isArray(Z)}function _V(Z,q){if(Z instanceof S)Z=Z.getRawValues();else if(Z instanceof C1)Z=Z.dict.getRawValues();else if(!Array.isArray(Z))return;for(let X of Z)$V(X)&&q.push(X)}class M6{refSet=new U8;constructor(Z,q,X){this.dict=Z,this.keys=q,this.xref=X}async load(){let{keys:Z,dict:q}=this,X=[];for(let z of Z){let R=q.getRaw(z);R!==void 0&&X.push(R)}await this.#Z(X),this.refSet=null}async#Z(Z){let q=[],X=[];for(;Z.length;){let z=Z.pop();if(z instanceof P1){if(this.refSet.has(z))continue;try{this.refSet.put(z),z=this.xref.fetch(z)}catch(R){if(!(R instanceof X8))return v(`ObjectLoader.#walk - requesting all data: "${R}".`),void await this.xref.stream.manager.requestAllChunks();q.push(z),X.push({begin:R.begin,end:R.end})}}if(z instanceof C1){let R=z.getBaseStreams();if(R){let G=!1;for(let P of R)P.isDataLoaded||(G=!0,X.push({begin:P.start,end:P.end}));G&&q.push(z)}}_V(z,Z)}if(X.length){await this.xref.stream.manager.requestRanges(X);for(let z of q)z instanceof P1&&this.refSet.remove(z);await this.#Z(q)}}static async load(Z,q,X){if(X.stream.isDataLoaded)return;await new M6(Z,q,X).load()}}function $9(Z){return Z.startsWith("'")||Z.startsWith('"')?Z.slice(1,-1):Z}function A1({data:Z,defaultValue:q,validate:X}){if(!Z)return q;Z=Z.trim();let z=parseInt(Z,10);return!isNaN(z)&&X(z)?z:q}function b3({data:Z,defaultValue:q,validate:X}){if(!Z)return q;Z=Z.trim();let z=parseFloat(Z);return!isNaN(z)&&X(z)?z:q}function _9({data:Z,defaultValue:q,validate:X}){return Z&&X(Z=Z.trim())?Z:q}function i(Z,q){return _9({data:Z,defaultValue:q[0],validate:(X)=>q.includes(X)})}function _1(Z,q="0"){if(q||="0",!Z)return _1(q);let X=Z.trim().match(fV);if(!X)return _1(q);let[,z,R]=X,G=parseFloat(z);if(isNaN(G))return _1(q);if(G===0)return 0;let P=UV[R];return P?P(G):G}function oR(Z){if(!Z)return{num:1,den:1};let q=Z.split(":",2).map((R)=>parseFloat(R.trim())).filter((R)=>!isNaN(R));if(q.length===1&&q.push(1),q.length===0)return{num:1,den:1};let[X,z]=q;return{num:X,den:z}}function d0(Z){return Z?Z.trim().split(/\s+/).map((q)=>({excluded:q[0]==="-",viewname:q.substring(1)})):[]}class K1{static get FAILURE(){return X1(this,"FAILURE",new K1(!1,null,null,null))}static get EMPTY(){return X1(this,"EMPTY",new K1(!0,null,null,null))}constructor(Z,q,X,z){this.success=Z,this.html=q,this.bbox=X,this.breakNode=z}isBreak(){return!!this.breakNode}static breakNode(Z){return new K1(!1,null,null,Z)}static success(Z,q=null){return new K1(!0,Z,q,null)}}class zY{constructor(Z){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(Z)}add(Z,q=null){for(let z of Z)this.addPdfFont(z);for(let z of this.fonts.values())z.regular||(z.regular=z.italic||z.bold||z.bolditalic);if(!q||q.size===0)return;let X=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(let z of q)this.fonts.set(z,X)}addPdfFont(Z){let q=Z.cssFontInfo,X=q.fontFamily,z=this.fonts.get(X);z||(z=Object.create(null),this.fonts.set(X,z),this.defaultFont||(this.defaultFont=z));let R="",G=parseFloat(q.fontWeight);parseFloat(q.italicAngle)!==0?R=G>=700?"bolditalic":"italic":G>=700&&(R="bold"),R||((Z.name.includes("Bold")||Z.psName?.includes("Bold"))&&(R="bold"),(Z.name.includes("Italic")||Z.name.endsWith("It")||Z.psName?.includes("Italic")||Z.psName?.endsWith("It"))&&(R+="italic")),R||(R="regular"),z[R]=Z}getDefault(){return this.defaultFont}find(Z,q=!0){let X=this.fonts.get(Z)||this.cache.get(Z);if(X)return X;let z=/,|-|_| |bolditalic|bold|italic|regular|it/gi,R=Z.replaceAll(z,"");if(X=this.fonts.get(R),X)return this.cache.set(Z,X),X;R=R.toLowerCase();let G=[];for(let[P,Q]of this.fonts.entries())P.replaceAll(z,"").toLowerCase().startsWith(R)&&G.push(Q);if(G.length===0)for(let[,P]of this.fonts.entries())P.regular.name?.replaceAll(z,"").toLowerCase().startsWith(R)&&G.push(P);if(G.length===0){R=R.replaceAll(/psmt|mt/gi,"");for(let[P,Q]of this.fonts.entries())P.replaceAll(z,"").toLowerCase().startsWith(R)&&G.push(Q)}if(G.length===0)for(let P of this.fonts.values())P.regular.name?.replaceAll(z,"").toLowerCase().startsWith(R)&&G.push(P);return G.length>=1?(G.length!==1&&q&&v(`XFA - Too many choices to guess the correct font: ${Z}`),this.cache.set(Z,G[0]),G[0]):(q&&!this.warned.has(Z)&&(this.warned.add(Z),v(`XFA - Cannot find the font: ${Z}`)),null)}}function FX(Z,q){return Z.posture==="italic"?Z.weight==="bold"?q.bolditalic:q.italic:Z.weight==="bold"?q.bold:q.regular}class kq{constructor(Z,q,X,z){if(this.lineHeight=X,this.paraMargin=q||{top:0,bottom:0,left:0,right:0},!Z)return void([this.pdfFont,this.xfaFont]=this.defaultFont(z));this.xfaFont={typeface:Z.typeface,posture:Z.posture,weight:Z.weight,size:Z.size,letterSpacing:Z.letterSpacing};let R=z.find(Z.typeface);R?(this.pdfFont=FX(Z,R),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(z))):[this.pdfFont,this.xfaFont]=this.defaultFont(z)}defaultFont(Z){let q=Z.find("Helvetica",!1)||Z.find("Myriad Pro",!1)||Z.find("Arial",!1)||Z.getDefault();if(q?.regular){let X=q.regular;return[X,{typeface:X.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class RY{constructor(Z,q,X,z){this.fontFinder=z,this.stack=[new kq(Z,q,X,z)]}pushData(Z,q,X){let z=this.stack.at(-1);for(let G of["typeface","posture","weight","size","letterSpacing"])Z[G]||(Z[G]=z.xfaFont[G]);for(let G of["top","bottom","left","right"])isNaN(q[G])&&(q[G]=z.paraMargin[G]);let R=new kq(Z,q,X||z.lineHeight,this.fontFinder);R.pdfFont||(R.pdfFont=z.pdfFont),this.stack.push(R)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class GY{constructor(Z,q,X,z){this.glyphs=[],this.fontSelector=new RY(Z,q,X,z),this.extraHeight=0}pushData(Z,q,X){this.fontSelector.pushData(Z,q,X)}popFont(Z){return this.fontSelector.popFont()}addPara(){let Z=this.fontSelector.topFont();this.extraHeight+=Z.paraMargin.top+Z.paraMargin.bottom}addString(Z){if(!Z)return;let q=this.fontSelector.topFont(),X=q.xfaFont.size;if(q.pdfFont){let z=q.xfaFont.letterSpacing,R=q.pdfFont,G=R.lineHeight||1.2,P=q.lineHeight||Math.max(1.2,G)*X,Q=G-(R.lineGap===void 0?0.2:R.lineGap),Y=Math.max(1,Q)*X,W=X/1000,$=R.defaultWidth||R.charsToGlyphs(" ")[0].width;for(let _ of Z.split(/[\u2029\n]/)){let J=R.encodeString(_).join(""),U=R.charsToGlyphs(J);for(let f of U){let K=f.width||$;this.glyphs.push([K*W+z,P,Y,f.unicode,!1])}this.glyphs.push([0,0,0,`
|
|
9
|
-
`,!0])}return void this.glyphs.pop()}for(let z of Z.split(/[\u2029\n]/)){for(let R of z.split(""))this.glyphs.push([X,1.2*X,X,R,!1]);this.glyphs.push([0,0,0,`
|
|
10
|
-
`,!0])}this.glyphs.pop()}compute(Z){let q=-1,X=0,z=0,R=0,G=0,P=0,Q=!1,Y=!0;for(let W=0,$=this.glyphs.length;W<$;W++){let[_,J,U,f,K]=this.glyphs[W],I=f===" ",B=Y?U:J;K?(z=Math.max(z,G),G=0,R+=P,P=B,q=-1,X=0,Y=!1):I?G+_>Z?(z=Math.max(z,G),G=0,R+=P,P=B,q=-1,X=0,Q=!0,Y=!1):(P=Math.max(B,P),X=G,G+=_,q=W):G+_>Z?(R+=P,P=B,q!==-1?(W=q,z=Math.max(z,X),G=0,q=-1,X=0):(z=Math.max(z,G),G=_),Q=!0,Y=!1):(G+=_,P=Math.max(B,P))}return z=Math.max(z,G),R+=P+this.extraHeight,{width:1.02*z,height:R,isBroken:Q}}}function jV(Z){return(Z=Z.trim())==="*"?1/0:parseInt(Z,10)||0}function QY(Z,q,X=!0){let z=Z.match(aR);if(!z)return null;let[R]=z,G=[{name:R,cacheName:"."+R,index:0,js:null,formCalc:null,operator:S3}],P=R.length;for(;P<Z.length;){let Q=P;if(Z.charAt(P++)==="["){if(z=Z.slice(P).match(KV),!z)return v("XFA - Invalid index in SOM expression"),null;G.at(-1).index=jV(z[0]),P+=z[0].length+1;continue}let Y;switch(Z.charAt(P)){case".":if(!q)return null;P++,Y=m3;break;case"#":P++,Y=vX;break;case"[":if(X)return v("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;Y=BV;break;case"(":if(X)return v("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;Y=IV;break;default:Y=S3}if(z=Z.slice(P).match(aR),!z)break;[R]=z,P+=R.length,G.push({name:R,cacheName:Z.slice(Q,P),operator:Y,index:0,js:null,formCalc:null})}return G}function D4(Z,q,X,z=!0,R=!0){let G=QY(X,z);if(!G)return null;let P=PY.get(G[0].name),Q,Y=0;P?(Q=!0,Z=[P(Z,q)],Y=1):(Q=q===null,Z=[q||Z]);for(let W=G.length;Y<W;Y++){let{name:$,cacheName:_,operator:J,index:U}=G[Y],f=[];for(let K of Z){if(!K.isXFAObject)continue;let I,B;if(R&&(B=nR.get(K),B||(B=new Map,nR.set(K,B)),I=B.get(_)),!I){switch(J){case S3:I=K[E7]($,!1);break;case m3:I=K[E7]($,!0);break;case vX:I=K[W9]($),I=I.isXFAObjectArray?I.children:[I]}R&&B.set(_,I)}I.length>0&&f.push(I)}if(f.length===0&&!Q&&Y===0){if(!(q=q[L1]()))return null;Y=-1,Z=[q];continue}Z=isFinite(U)?f.filter((K)=>U<K.length).map((K)=>K[U]):f.flat()}return Z.length===0?null:Z}function VV(Z,q,X){let z=QY(X);if(!z)return null;if(z.some((P)=>P.operator===m3))return null;let R=PY.get(z[0].name),G=0;R?(Z=R(Z,q),G=1):Z=q||Z;for(let P=z.length;G<P;G++){let{name:Q,operator:Y,index:W}=z[G];if(!isFinite(W))return z[G].index=0,Z.createNodes(z.slice(G));let $;switch(Y){case S3:$=Z[E7](Q,!1);break;case m3:$=Z[E7](Q,!0);break;case vX:$=Z[W9](Q),$=$.isXFAObjectArray?$.children:[$]}if($.length===0)return Z.createNodes(z.slice(G));if(!(W<$.length))return z[G].index=W-$.length,Z.createNodes(z.slice(G));{let _=$[W];if(!_.isXFAObject)return v("XFA - Cannot create a node."),null;Z=_}}return null}function M1(Z){return typeof Z=="string"?"0px":Number.isInteger(Z)?`${Z}px`:`${Z.toFixed(2)}px`}function WY(Z,q){Z[I8]().layout==="position"&&(Z.minW>0&&(q.minWidth=M1(Z.minW)),Z.maxW>0&&(q.maxWidth=M1(Z.maxW)),Z.minH>0&&(q.minHeight=M1(Z.minH)),Z.maxH>0&&(q.maxHeight=M1(Z.maxH)))}function ZG(Z,q,X,z,R,G){let P=new GY(q,X,z,R);return typeof Z=="string"?P.addString(Z):Z[G4](P),P.compute(G)}function SX(Z,q){let X=null,z=null,R=!1;if((!Z.w||!Z.h)&&Z.value){let G=0,P=0;Z.margin&&(G=Z.margin.leftInset+Z.margin.rightInset,P=Z.margin.topInset+Z.margin.bottomInset);let Q=null,Y=null;Z.para&&(Y=Object.create(null),Q=Z.para.lineHeight===""?null:Z.para.lineHeight,Y.top=Z.para.spaceAbove===""?0:Z.para.spaceAbove,Y.bottom=Z.para.spaceBelow===""?0:Z.para.spaceBelow,Y.left=Z.para.marginLeft===""?0:Z.para.marginLeft,Y.right=Z.para.marginRight===""?0:Z.para.marginRight);let W=Z.font;if(!W){let J=Z[K8](),U=Z[L1]();for(;U&&U!==J;){if(U.font){W=U.font;break}U=U[L1]()}}let $=(Z.w||q.width)-G,_=Z[e1].fontFinder;if(Z.value.exData&&Z.value.exData[a]&&Z.value.exData.contentType==="text/html"){let J=ZG(Z.value.exData[a],W,Y,Q,_,$);z=J.width,X=J.height,R=J.isBroken}else{let J=Z.value[A8]();if(J){let U=ZG(J,W,Y,Q,_,$);z=U.width,X=U.height,R=U.isBroken}}z===null||Z.w||(z+=G),X===null||Z.h||(X+=P)}return{w:z,h:X,isBroken:R}}function $Y(Z,q,X){let z;if(Z.w!==""&&Z.h!=="")z=[Z.x,Z.y,Z.w,Z.h];else{if(!X)return null;let R=Z.w;if(R===""){if(Z.maxW===0){let P=Z[I8]();R=P.layout==="position"&&P.w!==""?0:Z.minW}else R=Math.min(Z.maxW,X.width);q.attributes.style.width=M1(R)}let G=Z.h;if(G===""){if(Z.maxH===0){let P=Z[I8]();G=P.layout==="position"&&P.h!==""?0:Z.minH}else G=Math.min(Z.maxH,X.height);q.attributes.style.height=M1(G)}z=[Z.x,Z.y,R,G]}return z}function U9(Z){let q=Z[I8]();if(q.layout?.includes("row")){let X=q[u],z=Z.colSpan,R;R=z===-1?Math.sumPrecise(X.columnWidths.slice(X.currentColumn)):Math.sumPrecise(X.columnWidths.slice(X.currentColumn,X.currentColumn+z)),isNaN(R)||(Z.w=R)}q.layout&&q.layout!=="position"&&(Z.x=Z.y=0),Z.layout==="table"&&Z.w===""&&Array.isArray(Z.columnWidths)&&(Z.w=Math.sumPrecise(Z.columnWidths))}function _Y(Z){switch(Z.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 X0(Z,...q){let X=Object.create(null);for(let z of q){let R=Z[z];if(R!==null){if(eR.hasOwnProperty(z))eR[z](Z,X);else if(R instanceof g){let G=R[u1]();G?Object.assign(X,G):v(`(DEBUG) - XFA - style for ${z} not implemented yet`)}}}return X}function C5(Z,q){let{attributes:X}=q,{style:z}=X,R={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(X.class.push("xfaWrapped"),Z.border){let{widths:G,insets:P}=Z.border[u],Q,Y,W=P[0],$=P[3],_=P[0]+P[2],J=P[1]+P[3];switch(Z.border.hand){case"even":W-=G[0]/2,$-=G[3]/2,Q=`calc(100% + ${(G[1]+G[3])/2-J}px)`,Y=`calc(100% + ${(G[0]+G[2])/2-_}px)`;break;case"left":W-=G[0],$-=G[3],Q=`calc(100% + ${G[1]+G[3]-J}px)`,Y=`calc(100% + ${G[0]+G[2]-_}px)`;break;case"right":Q=J?`calc(100% - ${J}px)`:"100%",Y=_?`calc(100% - ${_}px)`:"100%"}let U=["xfaBorder"];S6(Z.border)&&U.push("xfaPrintOnly");let f={name:"div",attributes:{class:U,style:{top:`${W}px`,left:`${$}px`,width:Q,height:Y}},children:[]};for(let K of["border","borderWidth","borderColor","borderRadius","borderStyle"])z[K]!==void 0&&(f.attributes.style[K]=z[K],delete z[K]);R.children.push(f,q)}else R.children.push(q);for(let G of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])z[G]!==void 0&&(R.attributes.style[G]=z[G],delete z[G]);return R.attributes.style.position=z.position==="absolute"?"absolute":"relative",delete z.position,z.alignSelf&&(R.attributes.style.alignSelf=z.alignSelf,delete z.alignSelf),R}function JY(Z){let q=_1(Z.textIndent,"0px");if(q>=0)return;let X="padding"+((Z.textAlign==="right"?"right":"left")==="left"?"Left":"Right"),z=_1(Z[X],"0px");Z[X]=z-q+"px"}function mX(Z,q){switch(Z.access){case"nonInteractive":q.push("xfaNonInteractive");break;case"readOnly":q.push("xfaReadOnly");break;case"protected":q.push("xfaDisabled")}}function S6(Z){return Z.relevant.length>0&&!Z.relevant[0].excluded&&Z.relevant[0].viewname==="print"}function UY(Z){let q=Z[K8]()[u].paraStack;return q.length?q.at(-1):null}function fY(Z,q,X){if(X.attributes.class?.includes("xfaRich")){q&&(Z.h===""&&(q.height="auto"),Z.w===""&&(q.width="auto"));let z=UY(Z);if(z){let R=X.attributes.style;switch(R.display="flex",R.flexDirection="column",z.vAlign){case"top":R.justifyContent="start";break;case"bottom":R.justifyContent="end";break;case"middle":R.justifyContent="center"}let G=z[u1]();for(let[P,Q]of Object.entries(G))P in R||(R[P]=Q)}}}function KY(Z,q,X,z){if(!X)return void delete z.fontFamily;let R=$9(Z.typeface);z.fontFamily=`"${R}"`;let G=X.find(R);if(G){let{fontFamily:P}=G.regular.cssFontInfo;P!==R&&(z.fontFamily=`"${P}"`);let Q=UY(q);if(Q&&Q.lineHeight!=="")return;if(z.lineHeight)return;let Y=FX(Z,G);Y&&(z.lineHeight=Math.max(1.2,Y.lineHeight))}}function BY(Z){let q=j3(Z,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return q?q.href:null}function IY(Z,q){return{name:"div",attributes:{class:[Z.layout==="lr-tb"?"xfaLr":"xfaRl"]},children:q}}function jY(Z){if(!Z[u])return null;let q={name:"div",attributes:Z[u].attributes,children:Z[u].children};if(Z[u].failingNode){let X=Z[u].failingNode[q2]();X&&(Z.layout.endsWith("-tb")?q.children.push(IY(Z,[X])):q.children.push(X))}return q.children.length===0?null:q}function VY(Z,q,X){let z=Z[u],R=z.availableSpace,[G,P,Q,Y]=X;switch(Z.layout){case"position":z.width=Math.max(z.width,G+Q),z.height=Math.max(z.height,P+Y),z.children.push(q);break;case"lr-tb":case"rl-tb":z.line&&z.attempt!==1||(z.line=IY(Z,[]),z.children.push(z.line),z.numberInLine=0),z.numberInLine+=1,z.line.children.push(q),z.attempt===0?(z.currentWidth+=Q,z.height=Math.max(z.height,z.prevHeight+Y)):(z.currentWidth=Q,z.prevHeight=z.height,z.height+=Y,z.attempt=0),z.width=Math.max(z.width,z.currentWidth);break;case"rl-row":case"row":{z.children.push(q),z.width+=Q,z.height=Math.max(z.height,Y);let W=M1(z.height);for(let $ of z.children)$.attributes.style.height=W;break}case"table":case"tb":z.width=E8(Q,z.width,R.width),z.height+=Y,z.children.push(q)}}function HY(Z){let q=Z[u].availableSpace,X=Z.margin?Z.margin.topInset+Z.margin.bottomInset:0,z=Z.margin?Z.margin.leftInset+Z.margin.rightInset:0;switch(Z.layout){case"lr-tb":case"rl-tb":return Z[u].attempt===0?{width:q.width-z-Z[u].currentWidth,height:q.height-X-Z[u].prevHeight}:{width:q.width-z,height:q.height-X-Z[u].height};case"rl-row":case"row":return{width:Math.sumPrecise(Z[u].columnWidths.slice(Z[u].currentColumn)),height:q.height-z};case"table":case"tb":return{width:q.width-z,height:q.height-X-Z[u].height};default:return q}}function f9(Z,q){if(Z[K8]()[u].firstUnsplittable===null)return!0;if(Z.w===0||Z.h===0)return!0;let X=Z[I8](),z=X[u]?.attempt||0,[,R,G,P]=function(Q){let Y,W,$=Q.w===""?NaN:Q.w,_=Q.h===""?NaN:Q.h,[J,U]=[0,0];switch(Q.anchorType||""){case"bottomCenter":[J,U]=[$/2,_];break;case"bottomLeft":[J,U]=[0,_];break;case"bottomRight":[J,U]=[$,_];break;case"middleCenter":[J,U]=[$/2,_/2];break;case"middleLeft":[J,U]=[0,_/2];break;case"middleRight":[J,U]=[$,_/2];break;case"topCenter":[J,U]=[$/2,0];break;case"topRight":[J,U]=[$,0]}switch(Q.rotate||0){case 0:[Y,W]=[-J,-U];break;case 90:[Y,W]=[-U,J],[$,_]=[_,-$];break;case 180:[Y,W]=[J,U],[$,_]=[-$,-_];break;case 270:[Y,W]=[U,-J],[$,_]=[-_,$]}return[Q.x+Y+Math.min(0,$),Q.y+W+Math.min(0,_),Math.abs($),Math.abs(_)]}(Z);switch(X.layout){case"lr-tb":case"rl-tb":return z===0?Z[K8]()[u].noLayoutFailure?Z.w!==""?Math.round(G-q.width)<=2:q.width>2:!(Z.h!==""&&Math.round(P-q.height)>2)&&(Z.w!==""?Math.round(G-q.width)<=2||X[u].numberInLine===0&&q.height>2:q.width>2):!!Z[K8]()[u].noLayoutFailure||!(Z.h!==""&&Math.round(P-q.height)>2)&&((Z.w===""||Math.round(G-q.width)<=2||!X[N4]())&&q.height>2);case"table":case"tb":return!!Z[K8]()[u].noLayoutFailure||(Z.h===""||Z[L4]()?(Z.w===""||Math.round(G-q.width)<=2||!X[N4]())&&q.height>2:Math.round(P-q.height)<=2);case"position":if(Z[K8]()[u].noLayoutFailure)return!0;if(Z.h===""||Math.round(P+R-q.height)<=2)return!0;return P+R>Z[K8]()[u].currentContentArea.h;case"rl-row":case"row":return!!Z[K8]()[u].noLayoutFailure||(Z.h===""||Math.round(P-q.height)<=2);default:return!0}}function qG(Z){if(!Z||!Z.border)return{w:0,h:0};let q=Z.border[u8]();return q?{w:q.widths[0]+q.widths[2]+q.insets[0]+q.insets[2],h:q.widths[1]+q.widths[3]+q.insets[1]+q.insets[3]}:{w:0,h:0}}function OX(Z){return Z.margin&&(Z.margin.topInset||Z.margin.rightInset||Z.margin.bottomInset||Z.margin.leftInset)}function yX(Z,q){if(!Z.value){let X=new L9({});Z[Y8](X),Z.value=X}Z.value[_0](q)}function*pX(Z){for(let q of Z[S8]())q instanceof x9?yield*q[L6]():yield q}function X2(Z){return Z.validate?.nullTest==="error"}function K9(Z){for(;Z;){if(!Z.traversal)return void(Z[p0]=Z[L1]()[p0]);if(Z[p0])return;let q=null;for(let R of Z.traversal[S8]())if(R.operation==="next"){q=R;break}if(!q||!q.ref)return void(Z[p0]=Z[L1]()[p0]);let X=Z[K8]();Z[p0]=++X[p0];let z=X[x4](q.ref,Z);if(!z)return;Z=z[0]}}function B9(Z,q){let X=Z.assist;if(X){let z=X[H1]();z&&(q.title=z);let R=X.role.match(HV);if(R){let P=R[1];q.role="heading",q["aria-level"]=P}}if(Z.layout==="table")q.role="table";else if(Z.layout==="row")q.role="row";else{let z=Z[L1]();z.layout==="row"&&(q.role=z.assist?.role==="TH"?"columnheader":"cell")}}function y5(Z){if(!Z.assist)return null;let q=Z.assist;return q.speak&&q.speak[a]!==""?q.speak[a]:q.toolTip?q.toolTip[a]:null}function e4(Z){return K1.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:Z}]})}function I9(Z){let q=Z[K8]();q[u].firstUnsplittable===null&&(q[u].firstUnsplittable=Z,q[u].noLayoutFailure=!0)}function j9(Z){let q=Z[K8]();q[u].firstUnsplittable===Z&&(q[u].noLayoutFailure=!1)}function XG(Z){if(Z[u])return!1;if(Z[u]=Object.create(null),Z.targetType==="auto")return!1;let q=Z[K8](),X=null;if(Z.target){if(X=q[x4](Z.target,Z[L1]()),!X)return!1;X=X[0]}let{currentPageArea:z,currentContentArea:R}=q[u];if(Z.targetType==="pageArea")return X instanceof p5||(X=null),Z.startNew?(Z[u].target=X||z,!0):!(!X||X===z)&&(Z[u].target=X,!0);X instanceof V9||(X=null);let G=X&&X[L1](),P,Q=G;if(Z.startNew)if(X){let Y=G.contentArea.children,W=Y.indexOf(R),$=Y.indexOf(X);W!==-1&&W<$&&(Q=null),P=$-1}else P=z.contentArea.children.indexOf(R);else{if(!X||X===R)return!1;P=G.contentArea.children.indexOf(X)-1,Q=G===z?null:G}return Z[u].target=Q,Z[u].index=P,!0}function zG(Z,q,X){let z=Z[K8](),R=z[u].noLayoutFailure,G=q[I8];q[I8]=()=>Z,z[u].noLayoutFailure=!0;let P=q[H1](X);Z[T5](P.html,P.bbox),z[u].noLayoutFailure=R,q[I8]=G}function v2(Z){let q=new aX({});return q[a]=Z,q}class eW{constructor(Z){this.root=Z,this.datasets=Z.datasets,this.data=Z.datasets?.data||new z4(j8.datasets.id,"data"),this.emptyMerge=this.data[S8]().length===0,this.root.form=this.form=Z.template[D0]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(Z,q,X){if(Z[v0]=q,Z[u7]())if(q[R6]()){let z=q[NX]();Z[_0](v2(z))}else if(Z instanceof H9&&Z.ui?.choiceList?.open==="multiSelect"){let z=q[S8]().map((R)=>R[a].trim()).join(`
|
|
11
|
-
`);Z[_0](v2(z))}else this._isConsumeData()&&v("XFA - Nodes haven't the same type.");else!q[R6]()||this._isMatchTemplate()?this._bindElement(Z,q):v("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(Z,q,X,z){if(!Z)return null;let R,G;for(let P=0;P<3;P++){for(R=X[I7](Z,!1,!0);G=R.next().value,G;)if(q===G[R6]())return G;if(X[B8]===j8.datasets.id&&X[d1]==="data")break;X=X[L1]()}return z?(R=this.data[I7](Z,!0,!1),G=R.next().value,G||(R=this.data[xq](Z,!0),G=R.next().value,G?.[R6]()?G:null)):null}_setProperties(Z,q){if(Z.hasOwnProperty("setProperty"))for(let{ref:X,target:z,connection:R}of Z.setProperty.children){if(R)continue;if(!X)continue;let G=D4(this.root,q,X,!1,!1);if(!G){v(`XFA - Invalid reference: ${X}.`);continue}let[P]=G;if(!P[E4](this.data)){v("XFA - Invalid node: must be a data node.");continue}let Q=D4(this.root,Z,z,!1,!1);if(!Q){v(`XFA - Invalid target: ${z}.`);continue}let[Y]=Q;if(!Y[E4](Z)){v("XFA - Invalid target: must be a property or subproperty.");continue}let W=Y[L1]();if(Y instanceof p3||W instanceof p3){v("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(Y instanceof O3||W instanceof O3){v("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}let $=P[A8](),_=Y[d1];if(Y instanceof J9){let J=Object.create(null);J[_]=$;let U=Reflect.construct(Object.getPrototypeOf(W).constructor,[J]);W[_]=U[_];continue}Y.hasOwnProperty(a)?(Y[v0]=P,Y[a]=$,Y[Z8]()):v("XFA - Invalid node to use in setProperty")}}_bindItems(Z,q){if(!Z.hasOwnProperty("items")||!Z.hasOwnProperty("bindItems")||Z.bindItems.isEmpty())return;for(let R of Z.items.children)Z[h4](R);Z.items.clear();let X=new y3({}),z=new y3({});Z[Y8](X),Z.items.push(X),Z[Y8](z),Z.items.push(z);for(let{ref:R,labelRef:G,valueRef:P,connection:Q}of Z.bindItems.children){if(Q)continue;if(!R)continue;let Y=D4(this.root,q,R,!1,!1);if(Y)for(let W of Y){if(!W[E4](this.datasets)){v(`XFA - Invalid ref (${R}): must be a datasets child.`);continue}let $=D4(this.root,W,G,!0,!1);if(!$){v(`XFA - Invalid label: ${G}.`);continue}let[_]=$;if(!_[E4](this.datasets)){v("XFA - Invalid label: must be a datasets child.");continue}let J=D4(this.root,W,P,!0,!1);if(!J){v(`XFA - Invalid value: ${P}.`);continue}let[U]=J;if(!U[E4](this.datasets)){v("XFA - Invalid value: must be a datasets child.");continue}let f=v2(_[A8]()),K=v2(U[A8]());X[Y8](f),X.text.push(f),z[Y8](K),z.text.push(K)}else v(`XFA - Invalid reference: ${R}.`)}}_bindOccurrences(Z,q,X){let z;if(q.length>1&&(z=Z[D0](),z[h4](z.occur),z.occur=null),this._bindValue(Z,q[0],X),this._setProperties(Z,q[0]),this._bindItems(Z,q[0]),q.length===1)return;let R=Z[L1](),G=Z[d1],P=R[Mq](Z);for(let Q=1,Y=q.length;Q<Y;Q++){let W=q[Q],$=z[D0]();R[G].push($),R[n2](P+Q,$),this._bindValue($,W,X),this._setProperties($,W),this._bindItems($,W)}}_createOccurrences(Z){if(!this.emptyMerge)return;let{occur:q}=Z;if(!q||q.initial<=1)return;let X=Z[L1](),z=Z[d1];if(!(X[z]instanceof C))return;let R;R=Z.name?X[z].children.filter((Q)=>Q.name===Z.name).length:X[z].children.length;let G=X[Mq](Z)+1,P=q.initial-R;if(P){let Q=Z[D0]();Q[h4](Q.occur),Q.occur=null,X[z].push(Q),X[n2](G,Q);for(let Y=1;Y<P;Y++){let W=Q[D0]();X[z].push(W),X[n2](G+Y,W)}}}_getOccurInfo(Z){let{name:q,occur:X}=Z;if(!X||!q)return[1,1];let z=X.max===-1?1/0:X.max;return[X.min,z]}_setAndBind(Z,q){this._setProperties(Z,q),this._bindItems(Z,q),this._bindElement(Z,q)}_bindElement(Z,q){let X=[];this._createOccurrences(Z);for(let z of Z[S8]()){if(z[v0])continue;if(this._mergeMode===void 0&&z[d1]==="subform"){this._mergeMode=z.mergeMode==="consumeData";let $=q[S8]();if($.length>0)this._bindOccurrences(z,[$[0]],null);else if(this.emptyMerge){let _=q[B8]===RG?-1:q[B8],J=z[v0]=new z4(_,z.name||"root");q[Y8](J),this._bindElement(z,J)}continue}if(!z[E5]())continue;let R=!1,G=null,P=null,Q=null;if(z.bind){switch(z.bind.match){case"none":this._setAndBind(z,q);continue;case"global":R=!0;break;case"dataRef":if(!z.bind.ref){v(`XFA - ref is empty in node ${z[d1]}.`),this._setAndBind(z,q);continue}P=z.bind.ref}z.bind.picture&&(G=z.bind.picture[a])}let[Y,W]=this._getOccurInfo(z);if(P){if(Q=D4(this.root,q,P,!0,!1),Q===null){if(Q=VV(this.data,q,P),!Q)continue;this._isConsumeData()&&(Q[e0]=!0),this._setAndBind(z,Q);continue}this._isConsumeData()&&(Q=Q.filter(($)=>!$[e0])),Q.length>W?Q=Q.slice(0,W):Q.length===0&&(Q=null),Q&&this._isConsumeData()&&Q.forEach(($)=>{$[e0]=!0})}else{if(!z.name){this._setAndBind(z,q);continue}if(this._isConsumeData()){let $=[];for(;$.length<W;){let _=this._findDataByNameToConsume(z.name,z[u7](),q,R);if(!_)break;_[e0]=!0,$.push(_)}Q=$.length>0?$:null}else{if(Q=q[I7](z.name,!1,this.emptyMerge).next().value,!Q){if(Y===0){X.push(z);continue}let $=q[B8]===RG?-1:q[B8];Q=z[v0]=new z4($,z.name),this.emptyMerge&&(Q[e0]=!0),q[Y8](Q),this._setAndBind(z,Q);continue}this.emptyMerge&&(Q[e0]=!0),Q=[Q]}}Q?this._bindOccurrences(z,Q,G):Y>0?this._setAndBind(z,q):X.push(z)}X.forEach((z)=>z[L1]()[h4](z))}}class Z${constructor(Z,q){this.data=q,this.dataset=Z.datasets||null}serialize(Z){let q=[[-1,this.data[S8]()]];for(;q.length>0;){let z=q.at(-1),[R,G]=z;if(R+1===G.length){q.pop();continue}let P=G[++z[0]],Q=Z.get(P[a1]);if(Q)P[_0](Q);else{let W=P[eQ]();for(let $ of W.values()){let _=Z.get($[a1]);if(_){$[_0](_);break}}}let Y=P[S8]();Y.length>0&&q.push([-1,Y])}let X=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(let z of this.dataset[S8]())z[d1]!=="data"&&z[V7](X);return this.data[V7](X),X.push("</xfa:datasets>"),X.join("")}}function OV(Z,q,X){let z=Object.create(null);if(!Z)return z;let R=Object.create(null);for(let[G,P]of Z.split(";").map((Q)=>Q.split(":",2))){let Q=vV.get(G);if(Q==="")continue;let Y=P;Q&&(Y=typeof Q=="string"?Q:Q(P,R)),G.endsWith("scale")?z.transform=z.transform?`${z[G]} ${Y}`:Y:z[G.replaceAll(/-([a-zA-Z])/g,(W,$)=>$.toUpperCase())]=Y}if(z.fontFamily&&KY({typeface:z.fontFamily,weight:z.fontWeight||"normal",posture:z.fontStyle||"normal",size:R.fontSize||0},q,q[e1].fontFinder,z),X&&z.verticalAlign&&z.verticalAlign!=="0px"&&z.fontSize){let Q=_1(z.fontSize);z.fontSize=M1(Q*0.583),z.verticalAlign=M1(Math.sign(_1(z.verticalAlign))*Q*0.333)}return X&&z.fontSize&&(z.fontSize=`calc(${z.fontSize} * var(--total-scale-factor))`),JY(z),z}class mU{constructor(Z=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(j8).map(({id:q})=>q)),this._currentNamespace=Z||new Cq(++this._nextNsId)}buildRoot(Z){return new bU(Z)}build({nsPrefix:Z,name:q,attributes:X,namespace:z,prefixes:R}){let G=z!==null;if(G&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(z)),R&&this._addNamespacePrefix(R),X.hasOwnProperty(j5)){let Y=GG.datasets,W=X[j5],$=null;for(let[_,J]of Object.entries(W))if(this._getNamespaceToUse(_)===Y){$={xfa:J};break}$?X[j5]=$:delete X[j5]}let P=this._getNamespaceToUse(Z),Q=P?.[g0](q,X)||new SU;return Q[j7]()&&this._nsAgnosticLevel++,(G||R||Q[j7]())&&(Q[a2]={hasNamespace:G,prefixes:R,nsAgnostic:Q[j7]()}),Q}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(Z){let q=this._namespaces.get(Z);if(q)return q;for(let[X,{check:z}]of Object.entries(j8))if(z(Z)){if(q=GG[X],q)return this._namespaces.set(Z,q),q;break}return q=new Cq(++this._nextNsId),this._namespaces.set(Z,q),q}_addNamespacePrefix(Z){for(let{prefix:q,value:X}of Z){let z=this._searchNamespace(X),R=this._namespacePrefixes.get(q);R||(R=[],this._namespacePrefixes.set(q,R)),R.push(z)}}_getNamespaceToUse(Z){if(!Z)return this._currentNamespace;let q=this._namespacePrefixes.get(Z);return q?.length>0?q.at(-1):(v(`Unknown namespace prefix: ${Z}.`),null)}clean(Z){let{hasNamespace:q,prefixes:X,nsAgnostic:z}=Z;q&&(this._currentNamespace=this._namespaceStack.pop()),X&&X.forEach(({prefix:R})=>{this._namespacePrefixes.get(R).pop()}),z&&this._nsAgnosticLevel--}}class z2{constructor(Z){try{this.root=new s3().parse(z2._createDocument(Z));let q=new eW(this.root);this.form=q.bind(),this.dataHandler=new Z$(this.root,q.getData()),this.form[e1].template=this.form}catch(q){v(`XFA - an error occurred during parsing and binding: ${q}`)}}isValid(){return!(!this.root||!this.form)}_createPagesHelper(){let Z=this.form[XY]();return new Promise((q,X)=>{let z=()=>{try{let R=Z.next();R.done?q(R.value):setTimeout(z,0)}catch(R){X(R)}};setTimeout(z,0)})}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map((Z)=>{let{width:q,height:X}=Z.attributes.style;return[0,0,parseInt(q),parseInt(X)]})}catch(Z){v(`XFA - an error occurred during layout: ${Z}`)}}getBoundingBox(Z){return this.dims[Z]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(Z){this.form[e1].images=Z}setFonts(Z){this.form[e1].fontFinder=new zY(Z);let q=[];for(let X of this.form[e1].usedTypefaces)X=$9(X),this.form[e1].fontFinder.find(X)||q.push(X);return q.length>0?q:null}appendFonts(Z,q){this.form[e1].fontFinder.add(Z,q)}async getPages(){this.pages||await this._createPages();let Z=this.pages;return this.pages=null,Z}serializeData(Z){return this.dataHandler.serialize(Z)}static _createDocument(Z){return Z["/xdp:xdp"]?Object.values(Z).join(""):Z["xdp:xdp"]}static getRichTextAsHtml(Z){if(!Z||typeof Z!="string")return null;try{let q=new s3(k6,!0).parse(Z);if(!["body","xhtml"].includes(q[d1])){let G=k6.body({});G[Y8](q),q=G}let X=q[H1]();if(!X.success)return null;let{html:z}=X,{attributes:R}=z;return R&&(R.class&&(R.class=R.class.filter((G)=>!G.startsWith("xfa"))),R.dir="auto"),{html:z,str:q[A8]()}}catch(q){v(`XFA - an error occurred during parsing of rich text: ${q}`)}return null}}class Z4{static createGlobals(Z){return Promise.all([Z.ensureCatalog("acroForm"),Z.ensureDoc("xfaDatasets"),Z.ensureCatalog("structTreeRoot"),Z.ensureCatalog("baseUrl"),Z.ensureCatalog("attachments"),Z.ensureCatalog("globalColorSpaceCache")]).then(([q,X,z,R,G,P])=>({pdfManager:Z,acroForm:q instanceof S?q:S.empty,xfaDatasets:X,structTreeRoot:z,baseUrl:R,attachments:G,globalColorSpaceCache:P}),(q)=>(v(`createGlobals: "${q}".`),null))}static async create(Z,q,X,z,R,G,P,Q){let Y=R?await this._getPageIndex(Z,q,X.pdfManager):null;return X.pdfManager.ensure(this,"_create",[Z,q,X,z,R,G,P,Y,Q])}static _create(Z,q,X,z,R=!1,G=null,P=null,Q=null,Y=null){let W=Z.fetchIfRef(q);if(!(W instanceof S))return;let $=W.get("Subtype");if($=$ instanceof t?$.name:null,P&&!P.has(N8[$.toUpperCase()]))return null;let{acroForm:_,pdfManager:J}=X,U=q instanceof P1?q.toString():`annot_${z.createObjId()}`,f={xref:Z,ref:q,dict:W,subtype:$,id:U,annotationGlobals:X,collectFields:R,orphanFields:G,needAppearances:!R&&_.get("NeedAppearances")===!0,pageIndex:Q,evaluatorOptions:J.evaluatorOptions,pageRef:Y};switch($){case"Link":return new EU(f);case"Text":return new wU(f);case"Widget":let K=F0({dict:W,key:"FT"});switch(K=K instanceof t?K.name:null,K){case"Tx":return new yU(f);case"Btn":return new pU(f);case"Ch":return new DU(f);case"Sig":return new iX(f)}return v(`Unimplemented widget field type "${K}", falling back to base field type.`),new E0(f);case"Popup":return new k9(f);case"FreeText":return new i2(f);case"Line":return new uU(f);case"Square":return new gU(f);case"Circle":return new dU(f);case"PolyLine":return new tX(f);case"Polygon":return new eX(f);case"Caret":return new cU(f);case"Ink":return new i5(f);case"Highlight":return new t2(f);case"Underline":return new hU(f);case"Squiggly":return new sU(f);case"StrikeOut":return new rU(f);case"Stamp":return new J5(f);case"FileAttachment":return new lU(f);default:return R||v($?`Unimplemented annotation type "${$}", falling back to base annotation.`:"Annotation is missing the required /Subtype."),new O6(f)}}static async _getPageIndex(Z,q,X){try{let z=await Z.fetchIfRefAsync(q);if(!(z instanceof S))return-1;let R=z.getRaw("P");if(R instanceof P1)try{return await X.ensureCatalog("getPageIndex",[R])}catch(P){v1(`_getPageIndex -- not a valid page reference: "${P}".`)}if(z.has("Kids"))return-1;let G=await X.ensureDoc("numPages");for(let P=0;P<G;P++){let Q=await X.getPage(P),Y=await X.ensure(Q,"annotations");for(let W of Y)if(W instanceof P1&&V3(W,q))return P}}catch(z){v(`_getPageIndex: "${z}".`)}return-1}static generateImages(Z,q,X){if(!X)return v("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."),null;let z;for(let{bitmapId:R,bitmap:G}of Z)G&&(z||=new Map,z.set(R,J5.createImage(G,q)));return z}static async saveNewAnnotations(Z,q,X,z,R){let G=Z.xref,P,Q=[],{isOffscreenCanvasSupported:Y}=Z.options;for(let W of X)if(!W.deleted)switch(W.annotationType){case hz:if(!P){let _=new S(G);_.setIfName("BaseFont","Helvetica"),_.setIfName("Type","Font"),_.setIfName("Subtype","Type1"),_.setIfName("Encoding","WinAnsiEncoding"),P=G.getNewTemporaryRef(),R.put(P,{data:_})}Q.push(i2.createNewAnnotation(G,W,R,{evaluator:Z,task:q,baseFontRef:P}));break;case sz:W.quadPoints?Q.push(t2.createNewAnnotation(G,W,R)):Q.push(i5.createNewAnnotation(G,W,R));break;case lz:Q.push(i5.createNewAnnotation(G,W,R));break;case rz:let $=Y?await z?.get(W.bitmapId):null;if($?.imageStream){let{imageStream:_,smaskStream:J}=$;if(J){let f=G.getNewTemporaryRef();R.put(f,{data:J}),_.dict.set("SMask",f)}let U=$.imageRef=G.getNewTemporaryRef();R.put(U,{data:_}),$.imageStream=$.smaskStream=null}Q.push(J5.createNewAnnotation(G,W,R,{image:$}));break;case oz:Q.push(J5.createNewAnnotation(G,W,R,{}))}return{annotations:(await Promise.all(Q)).flat()}}static async printNewAnnotations(Z,q,X,z,R){if(!z)return null;let{options:G,xref:P}=q,Q=[];for(let Y of z)if(!Y.deleted)switch(Y.annotationType){case hz:Q.push(i2.createNewPrintAnnotation(Z,P,Y,{evaluator:q,task:X,evaluatorOptions:G}));break;case sz:Y.quadPoints?Q.push(t2.createNewPrintAnnotation(Z,P,Y,{evaluatorOptions:G})):Q.push(i5.createNewPrintAnnotation(Z,P,Y,{evaluatorOptions:G}));break;case lz:Q.push(i5.createNewPrintAnnotation(Z,P,Y,{evaluatorOptions:G}));break;case rz:let W=G.isOffscreenCanvasSupported?await R?.get(Y.bitmapId):null;if(W?.imageStream){let{imageStream:$,smaskStream:_}=W;_&&$.dict.set("SMask",_),W.imageRef=new v6($,$.length),W.imageStream=W.smaskStream=null}Q.push(J5.createNewPrintAnnotation(Z,P,Y,{image:W,evaluatorOptions:G}));break;case oz:Q.push(J5.createNewPrintAnnotation(Z,P,Y,{evaluatorOptions:G}))}return Promise.all(Q)}}function v5(Z,q=new Uint8ClampedArray(3)){if(!Array.isArray(Z))return q;let X=q||new Uint8ClampedArray(3);switch(Z.length){case 0:return null;case 1:return g1.gray.getRgbItem(Z,0,X,0),X;case 3:return g1.rgb.getRgbItem(Z,0,X,0),X;case 4:return g1.cmyk.getRgbItem(Z,0,X,0),X;default:return q}}function g8(Z,q=null){return Z&&Array.from(Z,(X)=>X/255)||q}function R2(Z,q){let X=Z.getArray("QuadPoints");if(!e8(X,null)||X.length===0||X.length%8>0)return null;let z=new Float32Array(X.length);for(let R=0,G=X.length;R<G;R+=8){let[P,Q,Y,W,$,_,J,U]=X.slice(R,R+8),f=Math.min(P,Y,$,J),K=Math.max(P,Y,$,J),I=Math.min(Q,W,_,U),B=Math.max(Q,W,_,U);if(q!==null&&(f<q[0]||K>q[2]||I<q[1]||B>q[3]))return null;z.set([f,B,K,B,f,I,K,I],R)}return z}function Fq(Z,q,X){let z=new Float32Array([1/0,1/0,-1/0,-1/0]);h1.axialAlignedBoundingBox(q,X,z);let[R,G,P,Q]=z;if(R===P||G===Q)return[1,0,0,1,Z[0],Z[1]];let Y=(Z[2]-Z[0])/(P-R),W=(Z[3]-Z[1])/(Q-G);return[Y,0,0,W,Z[0]-R*Y,Z[1]-G*W]}class O6{constructor(Z){let{dict:q,xref:X,annotationGlobals:z,ref:R,orphanFields:G}=Z,P=G?.get(R);P&&q.set("Parent",P),this.setTitle(q.get("T")),this.setContents(q.get("Contents")),this.setModificationDate(q.get("M")),this.setFlags(q.get("F")),this.setRectangle(q.getArray("Rect")),this.setColor(q.getArray("C")),this.setBorderStyle(q),this.setAppearance(q),this.setOptionalContent(q);let Q=q.get("MK");this.setBorderAndBackgroundColors(Q),this.setRotation(Q,q),this.ref=Z.ref instanceof P1?Z.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);let Y=!!(this.flags&$B),W=!!(this.flags&_B);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:Z.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:Z.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&WB),noHTML:Y&&W,isEditable:!1,structParent:-1},z.structTreeRoot){let _=q.get("StructParent");this.data.structParent=_=Number.isInteger(_)&&_>=0?_:-1,z.structTreeRoot.addAnnotationIdToPage(Z.pageRef,_)}if(Z.collectFields){let _=q.get("Kids");if(Array.isArray(_)){let J=[];for(let U of _)U instanceof P1&&J.push(U.toString());J.length!==0&&(this.data.kidIds=J)}this.data.actions=X9(X,q,oG),this.data.fieldName=this._constructFieldName(q),this.data.pageIndex=Z.pageIndex}let $=q.get("IT");$ instanceof t&&(this.data.it=$.name),this._isOffscreenCanvasSupported=Z.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(Z,q){return!!(Z&q)}_buildFlags(Z,q){let{flags:X}=this;if(Z===void 0){if(q===void 0)return;return q?-5&X:-3&X|K2}return Z?(X|=K2,q?-33&X|$7:-3&X|z3):(X&=-35,q?-5&X:X|K2)}_isViewable(Z){return!this._hasFlag(Z,f2)&&!this._hasFlag(Z,z3)}_isPrintable(Z){return this._hasFlag(Z,K2)&&!this._hasFlag(Z,$7)&&!this._hasFlag(Z,f2)}mustBeViewed(Z,q){let X=Z?.get(this.data.id)?.noView;return X!==void 0?!X:this.viewable&&!this._hasFlag(this.flags,$7)}mustBePrinted(Z){let q=Z?.get(this.data.id)?.noPrint;return q!==void 0?!q:this.printable}mustBeViewedWhenEditing(Z,q=null){return Z?!this.data.isEditable:!q?.has(this.data.id)}get viewable(){return this.data.quadPoints!==null&&(this.flags===0||this._isViewable(this.flags))}get printable(){return this.data.quadPoints!==null&&(this.flags!==0&&this._isPrintable(this.flags))}_parseStringHelper(Z){let q=typeof Z=="string"?E1(Z):"";return{str:q,dir:q&&cQ(q).dir==="rtl"?"rtl":"ltr"}}setDefaultAppearance(Z){let{dict:q,annotationGlobals:X}=Z,z=F0({dict:q,key:"DA"})||X.acroForm.get("DA");this._defaultAppearance=typeof z=="string"?z:"",this.data.defaultAppearanceData=MX(this._defaultAppearance)}setTitle(Z){this._title=this._parseStringHelper(Z)}setContents(Z){this._contents=this._parseStringHelper(Z)}setModificationDate(Z){this.modificationDate=typeof Z=="string"?Z:null}setFlags(Z){this.flags=Number.isInteger(Z)&&Z>0?Z:0,this.flags&f2&&this.constructor.name!=="Annotation"&&(this.flags^=f2)}hasFlag(Z){return this._hasFlag(this.flags,Z)}setRectangle(Z){this.rectangle=T4(Z,[0,0,0,0])}setColor(Z){this.color=v5(Z)}setLineEndings(Z){if(this.lineEndings=["None","None"],Array.isArray(Z)&&Z.length===2)for(let q=0;q<2;q++){let X=Z[q];if(X instanceof t)switch(X.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[q]=X.name;continue}v(`Ignoring invalid lineEnding: ${X}`)}}setRotation(Z,q){this.rotation=0;let X=Z instanceof S?Z.get("R")||0:q.get("Rotate")||0;Number.isInteger(X)&&X!==0&&(X%=360,X<0&&(X+=360),X%90==0&&(this.rotation=X))}setBorderAndBackgroundColors(Z){Z instanceof S?(this.borderColor=v5(Z.getArray("BC"),null),this.backgroundColor=v5(Z.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(Z){if(this.borderStyle=new OU,Z instanceof S)if(Z.has("BS")){let q=Z.get("BS");if(q instanceof S){let X=q.get("Type");X&&!Q8(X,"Border")||(this.borderStyle.setWidth(q.get("W"),this.rectangle),this.borderStyle.setStyle(q.get("S")),this.borderStyle.setDashArray(q.getArray("D")))}}else if(Z.has("Border")){let q=Z.getArray("Border");Array.isArray(q)&&q.length>=3&&(this.borderStyle.setHorizontalCornerRadius(q[0]),this.borderStyle.setVerticalCornerRadius(q[1]),this.borderStyle.setWidth(q[2],this.rectangle),q.length===4&&this.borderStyle.setDashArray(q[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(Z){this.appearance=null;let q=Z.get("AP");if(!(q instanceof S))return;let X=q.get("N");if(X instanceof C1)return void(this.appearance=X);if(!(X instanceof S))return;let z=Z.get("AS");if(!(z instanceof t&&X.has(z.name)))return;let R=X.get(z.name);R instanceof C1&&(this.appearance=R)}setOptionalContent(Z){this.oc=null;let q=Z.get("OC");q instanceof t?v("setOptionalContent: Support for /Name-entry is not implemented."):q instanceof S&&(this.oc=q)}async loadResources(Z,q){let X=await q.dict.getAsync("Resources");return X&&await M6.load(X,Z,X.xref),X}async getOperatorList(Z,q,X,z){let{hasOwnCanvas:R,id:G,rect:P}=this.data,Q=this.appearance,Y=!!(R&&X&q3);if(Y&&(this.width===0||this.height===0))return this.data.hasOwnCanvas=!1,{opList:new O8,separateForm:!1,separateCanvas:!1};if(!Q){if(!Y)return{opList:new O8,separateForm:!1,separateCanvas:!1};Q=new o8(""),Q.dict=new S}let W=Q.dict,$=await this.loadResources(gZ,Q),_=cZ(W.getArray("BBox"),[0,0,1,1]),J=g4(W.getArray("Matrix"),w0),U=Fq(P,_,J),f=new O8,K;return this.oc&&(K=await Z.parseMarkedContentProps(this.oc,null)),K!==void 0&&f.addOp(i0,["OC",K]),f.addOp(fP,[G,P,U,J,Y]),await Z.getOperatorList({stream:Q,task:q,resources:$,operatorList:f,fallbackFontDict:this._fallbackFontDict}),f.addOp(KP,[]),K!==void 0&&f.addOp(B6,[]),this.reset(),{opList:f,separateForm:!1,separateCanvas:Y}}async save(Z,q,X,z){return null}get overlaysTextContent(){return!1}get hasTextContent(){return!1}async extractTextContent(Z,q,X){if(!this.appearance)return;let z=await this.loadResources(dZ,this.appearance),R=[],G=[],P=null,Q={desiredSize:Math.Infinity,ready:!0,enqueue(Y,W){for(let $ of Y.items)$.str!==void 0&&(P||=$.transform.slice(-2),G.push($.str),$.hasEOL&&(R.push(G.join("").trimEnd()),G.length=0))}};if(await Z.getTextContent({stream:this.appearance,task:q,resources:z,includeMarkedContent:!0,keepWhiteSpace:!0,sink:Q,viewBox:X}),this.reset(),G.length&&R.push(G.join("").trimEnd()),R.length>1||R[0]){let Y=this.appearance.dict,W=cZ(Y.getArray("BBox"),null),$=g4(Y.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(P,W,$),this.data.textContent=R}}_transformPoint(Z,q,X){let{rect:z}=this.data;q||=[0,0,1,1],X||=[1,0,0,1,0,0];let R=Fq(z,q,X);R[4]-=z[0],R[5]-=z[1];let G=Z.slice();return h1.applyTransform(G,R),h1.applyTransform(G,X),G}getFieldObject(){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}reset(){for(let Z of this._streams)Z.reset()}_constructFieldName(Z){if(!Z.has("T")&&!Z.has("Parent"))return v("Unknown field name, falling back to empty field name."),"";if(!Z.has("Parent"))return E1(Z.get("T"));let q=[];Z.has("T")&&q.unshift(E1(Z.get("T")));let X=Z,z=new U8;for(Z.objId&&z.put(Z.objId);X.has("Parent")&&(X=X.get("Parent"),X instanceof S&&(!X.objId||!z.has(X.objId)));)X.objId&&z.put(X.objId),X.has("T")&&q.unshift(E1(X.get("T")));return q.join(".")}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class OU{constructor(){this.width=1,this.rawWidth=1,this.style=nz,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(Z,q=[0,0,0,0]){if(Z instanceof t)this.width=0;else if(typeof Z=="number"){if(Z>0){this.rawWidth=Z;let X=(q[2]-q[0])/2,z=(q[3]-q[1])/2;X>0&&z>0&&(Z>X||Z>z)&&(v(`AnnotationBorderStyle.setWidth - ignoring width: ${Z}`),Z=1)}this.width=Z}}setStyle(Z){if(Z instanceof t)switch(Z.name){case"S":this.style=nz;break;case"D":this.style=AB;break;case"B":this.style=LB;break;case"I":this.style=kB;break;case"U":this.style=TB}}setDashArray(Z,q=!1){if(Array.isArray(Z)){let X=!0,z=!0;for(let R of Z){if(!(+R>=0)){X=!1;break}R>0&&(z=!1)}Z.length===0||X&&!z?(this.dashArray=Z,q&&this.setStyle(t.get("D"))):this.width=0}else Z&&(this.width=0)}setHorizontalCornerRadius(Z){Number.isInteger(Z)&&(this.horizontalCornerRadius=Z)}setVerticalCornerRadius(Z){Number.isInteger(Z)&&(this.verticalCornerRadius=Z)}}function w4(Z,q,X){let z=1732584193,R=-271733879,G=-1732584194,P=271733878,Q=X+72&-64,Y=new Uint8Array(Q),W,$;for(W=0;W<X;++W)Y[W]=Z[q++];Y[W++]=128;let _=Q-8;W<_&&(W=_),Y[W++]=X<<3&255,Y[W++]=X>>5&255,Y[W++]=X>>13&255,Y[W++]=X>>21&255,Y[W++]=X>>>29&255,W+=3;let J=new Int32Array(16),{k:U,r:f}=pV;for(W=0;W<Q;){for($=0;$<16;++$,W+=4)J[$]=Y[W]|Y[W+1]<<8|Y[W+2]<<16|Y[W+3]<<24;let K,I,B=z,j=R,V=G,x=P;for($=0;$<64;++$){$<16?(K=j&V|~j&x,I=$):$<32?(K=x&j|~x&V,I=5*$+1&15):$<48?(K=j^V^x,I=3*$+5&15):(K=V^(j|~x),I=7*$&15);let M=x,H=B+K+U[$]+J[I]|0,A=f[$];x=V,V=j,j=j+(H<<A|H>>>32-A)|0,B=M}z=z+B|0,R=R+j|0,G=G+V|0,P=P+x|0}return new Uint8Array([255&z,z>>8&255,z>>16&255,z>>>24&255,255&R,R>>8&255,R>>16&255,R>>>24&255,255&G,G>>8&255,G>>16&255,G>>>24&255,255&P,P>>8&255,P>>16&255,P>>>24&255])}function PG(Z){try{return T7(Z)}catch(q){return v(`UTF-8 decoding failed: "${q}".`),Z}}class aU{constructor(Z){if(Z.datasets)this.node=new Z2({hasAttributes:!0}).parseFromString(Z.datasets).documentElement;else{let q=new oU({hasAttributes:!0});try{q.parseFromString(Z["xdp:xdp"])}catch{}this.node=q.node}}getValue(Z){if(!this.node||!Z)return"";let q=this.node.searchNode(AP(Z),0);if(!q)return"";return q.firstChild?.nodeName==="value"?q.children.map((z)=>PG(z.textContent)):PG(q.textContent)}}class nU{#Z;#q=1/0;#z=1/0;#X=-1/0;#R=-1/0;#G=null;#Q=[];#P=[];#Y=-1;#W=!1;constructor(Z){this.#Z=Z;let q=Z.data.quadPoints;if(q){for(let X=0,z=q.length;X<z;X+=8)this.#q=Math.min(this.#q,q[X]),this.#X=Math.max(this.#X,q[X+2]),this.#z=Math.min(this.#z,q[X+5]),this.#R=Math.max(this.#R,q[X+1]);q.length>8&&(this.#G=q)}else[this.#q,this.#z,this.#X,this.#R]=Z.data.rect}overlaps(Z){return!(this.#q>=Z.#X||this.#X<=Z.#q||this.#z>=Z.#R||this.#R<=Z.#z)}#J(Z,q){if(this.#q>=Z||this.#X<=Z||this.#z>=q||this.#R<=q)return!1;let X=this.#G;if(!X)return!0;if(this.#Y>=0){let z=this.#Y;if(!(X[z]>=Z||X[z+2]<=Z||X[z+5]>=q||X[z+1]<=q))return!0;this.#Y=-1}for(let z=0,R=X.length;z<R;z+=8)if(!(X[z]>=Z||X[z+2]<=Z||X[z+5]>=q||X[z+1]<=q))return this.#Y=z,!0;return!1}addGlyph(Z,q,X){return this.#J(Z,q)?(this.#P.length>0&&(this.#Q.push(this.#P.join("")),this.#P.length=0),this.#Q.push(X),this.#W=!0,!0):(this.disableExtraChars(),!1)}addExtraChar(Z){this.#W&&this.#P.push(Z)}disableExtraChars(){this.#W&&(this.#W=!1,this.#P.length=0)}setText(){this.#Z.data.overlaidText=this.#Q.join("")}}class iU{#Z=new Map;constructor(Z){for(let q of Z){if(!q.data.quadPoints&&!q.data.rect)continue;let X=new nU(q);for(let[z,R]of this.#Z)z.overlaps(X)&&(R?R.add(X):this.#Z.set(z,new Set([X])));this.#Z.set(X,null)}}addGlyph(Z,q,X,z){let R=Z[4]+q/2,G=Z[5]+X/2,P;for(let[Q,Y]of this.#Z)P?P.has(Q)?Q.addGlyph(R,G,z):Q.disableExtraChars():Q.addGlyph(R,G,z)&&(P=Y)}addExtraChar(Z){for(let q of this.#Z.keys())q.addExtraChar(Z)}setText(){for(let Z of this.#Z.keys())Z.setText()}}class G1{constructor(Z,q){this.high=0|Z,this.low=0|q}and(Z){this.high&=Z.high,this.low&=Z.low}xor(Z){this.high^=Z.high,this.low^=Z.low}shiftRight(Z){Z>=32?(this.low=this.high>>>Z-32|0,this.high=0):(this.low=this.low>>>Z|this.high<<32-Z,this.high=this.high>>>Z|0)}rotateRight(Z){let q,X;32&Z?(X=this.low,q=this.high):(q=this.low,X=this.high),Z&=31,this.low=q>>>Z|X<<32-Z,this.high=X>>>Z|q<<32-Z}not(){this.high=~this.high,this.low=~this.low}add(Z){let q=(this.low>>>0)+(Z.low>>>0),X=(this.high>>>0)+(Z.high>>>0);q>4294967295&&(X+=1),this.low=0|q,this.high=0|X}copyTo(Z,q){Z[q]=this.high>>>24&255,Z[q+1]=this.high>>16&255,Z[q+2]=this.high>>8&255,Z[q+3]=255&this.high,Z[q+4]=this.low>>>24&255,Z[q+5]=this.low>>16&255,Z[q+6]=this.low>>8&255,Z[q+7]=255&this.low}assign(Z){this.high=Z.high,this.low=Z.low}}function wV(Z,q,X,z,R){Z.assign(q),Z.and(X),R.assign(q),R.not(),R.and(z),Z.xor(R)}function EV(Z,q,X,z,R){Z.assign(q),Z.and(X),R.assign(q),R.and(z),Z.xor(R),R.assign(X),R.and(z),Z.xor(R)}function uV(Z,q,X){Z.assign(q),Z.rotateRight(28),X.assign(q),X.rotateRight(34),Z.xor(X),X.assign(q),X.rotateRight(39),Z.xor(X)}function gV(Z,q,X){Z.assign(q),Z.rotateRight(14),X.assign(q),X.rotateRight(18),Z.xor(X),X.assign(q),X.rotateRight(41),Z.xor(X)}function dV(Z,q,X){Z.assign(q),Z.rotateRight(1),X.assign(q),X.rotateRight(8),Z.xor(X),X.assign(q),X.shiftRight(7),Z.xor(X)}function cV(Z,q,X){Z.assign(q),Z.rotateRight(19),X.assign(q),X.rotateRight(61),Z.xor(X),X.assign(q),X.shiftRight(6),Z.xor(X)}function tU(Z,q,X,z=!1){let R,G,P,Q,Y,W,$,_;z?(R=new G1(3418070365,3238371032),G=new G1(1654270250,914150663),P=new G1(2438529370,812702999),Q=new G1(355462360,4144912697),Y=new G1(1731405415,4290775857),W=new G1(2394180231,1750603025),$=new G1(3675008525,1694076839),_=new G1(1203062813,3204075428)):(R=new G1(1779033703,4089235720),G=new G1(3144134277,2227873595),P=new G1(1013904242,4271175723),Q=new G1(2773480762,1595750129),Y=new G1(1359893119,2917565137),W=new G1(2600822924,725511199),$=new G1(528734635,4215389547),_=new G1(1541459225,327033209));let J=128*Math.ceil((X+17)/128),U=new Uint8Array(J),f,K;for(f=0;f<X;++f)U[f]=Z[q++];U[f++]=128;let I=J-16;f<I&&(f=I),f+=11,U[f++]=X>>>29&255,U[f++]=X>>21&255,U[f++]=X>>13&255,U[f++]=X>>5&255,U[f++]=X<<3&255;let B=Array(80);for(f=0;f<80;f++)B[f]=new G1(0,0);let{k:j}=DV,V=new G1(0,0),x=new G1(0,0),M=new G1(0,0),H=new G1(0,0),A=new G1(0,0),T=new G1(0,0),k=new G1(0,0),y=new G1(0,0),O=new G1(0,0),D=new G1(0,0),n=new G1(0,0),b=new G1(0,0),l,N;for(f=0;f<J;){for(K=0;K<16;++K)B[K].high=U[f]<<24|U[f+1]<<16|U[f+2]<<8|U[f+3],B[K].low=U[f+4]<<24|U[f+5]<<16|U[f+6]<<8|U[f+7],f+=8;for(K=16;K<80;++K)l=B[K],cV(l,B[K-2],b),l.add(B[K-7]),dV(n,B[K-15],b),l.add(n),l.add(B[K-16]);for(V.assign(R),x.assign(G),M.assign(P),H.assign(Q),A.assign(Y),T.assign(W),k.assign($),y.assign(_),K=0;K<80;++K)O.assign(y),gV(n,A,b),O.add(n),wV(n,A,T,k,b),O.add(n),O.add(j[K]),O.add(B[K]),uV(D,V,b),EV(n,V,x,M,b),D.add(n),l=y,y=k,k=T,T=A,H.add(O),A=H,H=M,M=x,x=V,l.assign(O),l.add(D),V=l;R.add(V),G.add(x),P.add(M),Q.add(H),Y.add(A),W.add(T),$.add(k),_.add(y)}return z?(N=new Uint8Array(48),R.copyTo(N,0),G.copyTo(N,8),P.copyTo(N,16),Q.copyTo(N,24),Y.copyTo(N,32),W.copyTo(N,40)):(N=new Uint8Array(64),R.copyTo(N,0),G.copyTo(N,8),P.copyTo(N,16),Q.copyTo(N,24),Y.copyTo(N,32),W.copyTo(N,40),$.copyTo(N,48),_.copyTo(N,56)),N}function hV(Z,q,X){return tU(Z,q,X,!0)}function R4(Z,q){return Z>>>q|Z<<32-q}function rV(Z,q,X){return Z&q^~Z&X}function lV(Z,q,X){return Z&q^Z&X^q&X}function oV(Z){return R4(Z,2)^R4(Z,13)^R4(Z,22)}function aV(Z){return R4(Z,6)^R4(Z,11)^R4(Z,25)}function nV(Z){return R4(Z,7)^R4(Z,18)^Z>>>3}function iV(Z){return R4(Z,17)^R4(Z,19)^Z>>>10}function vq(Z,q,X){let z=1779033703,R=3144134277,G=1013904242,P=2773480762,Q=1359893119,Y=2600822924,W=528734635,$=1541459225,_=64*Math.ceil((X+9)/64),J=new Uint8Array(_),U,f;for(U=0;U<X;++U)J[U]=Z[q++];J[U++]=128;let K=_-8;U<K&&(U=K),U+=3,J[U++]=X>>>29&255,J[U++]=X>>21&255,J[U++]=X>>13&255,J[U++]=X>>5&255,J[U++]=X<<3&255;let I=new Uint32Array(64),{k:B}=sV;for(U=0;U<_;){for(f=0;f<16;++f)I[f]=J[U]<<24|J[U+1]<<16|J[U+2]<<8|J[U+3],U+=4;for(f=16;f<64;++f)I[f]=iV(I[f-2])+I[f-7]+nV(I[f-15])+I[f-16]|0;let j,V,x=z,M=R,H=G,A=P,T=Q,k=Y,y=W,O=$;for(f=0;f<64;++f)j=O+aV(T)+rV(T,k,y)+B[f]+I[f],V=oV(x)+lV(x,M,H),O=y,y=k,k=T,T=A+j|0,A=H,H=M,M=x,x=j+V|0;z=z+x|0,R=R+M|0,G=G+H|0,P=P+A|0,Q=Q+T|0,Y=Y+k|0,W=W+y|0,$=$+O|0}return new Uint8Array([z>>24&255,z>>16&255,z>>8&255,255&z,R>>24&255,R>>16&255,R>>8&255,255&R,G>>24&255,G>>16&255,G>>8&255,255&G,P>>24&255,P>>16&255,P>>8&255,255&P,Q>>24&255,Q>>16&255,Q>>8&255,255&Q,Y>>24&255,Y>>16&255,Y>>8&255,255&Y,W>>24&255,W>>16&255,W>>8&255,255&W,$>>24&255,$>>16&255,$>>8&255,255&$])}class O4{constructor(Z){this.a=0,this.b=0;let q=new Uint8Array(256),X=Z.length;for(let z=0;z<256;++z)q[z]=z;for(let z=0,R=0;z<256;++z){let G=q[z];R=R+G+Z[z%X]&255,q[z]=q[R],q[R]=G}this.s=q}encryptBlock(Z){let q=this.a,X=this.b,z=this.s,R=Z.length,G=new Uint8Array(R);for(let P=0;P<R;++P){q=q+1&255;let Q=z[q];X=X+Q&255;let Y=z[X];z[q]=Y,z[X]=Q,G[P]=Z[P]^z[Q+Y&255]}return this.a=q,this.b=X,G}decryptBlock(Z){return this.encryptBlock(Z)}encrypt(Z){return this.encryptBlock(Z)}}class Zf{decryptBlock(Z){return Z}encrypt(Z){return Z}}class T9{_s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]);_inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]);_mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);_mixCol=new Uint8Array(256).map((Z,q)=>q<128?q<<1:q<<1^27);constructor(){this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(Z){y1("Cannot call `_expandKey` on the base class")}_decrypt(Z,q){let X,z,R,G=new Uint8Array(16);G.set(Z);for(let P=0,Q=this._keySize;P<16;++P,++Q)G[P]^=q[Q];for(let P=this._cyclesOfRepetition-1;P>=1;--P){X=G[13],G[13]=G[9],G[9]=G[5],G[5]=G[1],G[1]=X,X=G[14],z=G[10],G[14]=G[6],G[10]=G[2],G[6]=X,G[2]=z,X=G[15],z=G[11],R=G[7],G[15]=G[3],G[11]=X,G[7]=z,G[3]=R;for(let Q=0;Q<16;++Q)G[Q]=this._inv_s[G[Q]];for(let Q=0,Y=16*P;Q<16;++Q,++Y)G[Q]^=q[Y];for(let Q=0;Q<16;Q+=4){let Y=this._mix[G[Q]],W=this._mix[G[Q+1]],$=this._mix[G[Q+2]],_=this._mix[G[Q+3]];X=Y^W>>>8^W<<24^$>>>16^$<<16^_>>>24^_<<8,G[Q]=X>>>24&255,G[Q+1]=X>>16&255,G[Q+2]=X>>8&255,G[Q+3]=255&X}}X=G[13],G[13]=G[9],G[9]=G[5],G[5]=G[1],G[1]=X,X=G[14],z=G[10],G[14]=G[6],G[10]=G[2],G[6]=X,G[2]=z,X=G[15],z=G[11],R=G[7],G[15]=G[3],G[11]=X,G[7]=z,G[3]=R;for(let P=0;P<16;++P)G[P]=this._inv_s[G[P]],G[P]^=q[P];return G}_encrypt(Z,q){let X=this._s,z,R,G,P=new Uint8Array(16);P.set(Z);for(let Q=0;Q<16;++Q)P[Q]^=q[Q];for(let Q=1;Q<this._cyclesOfRepetition;Q++){for(let Y=0;Y<16;++Y)P[Y]=X[P[Y]];G=P[1],P[1]=P[5],P[5]=P[9],P[9]=P[13],P[13]=G,G=P[2],R=P[6],P[2]=P[10],P[6]=P[14],P[10]=G,P[14]=R,G=P[3],R=P[7],z=P[11],P[3]=P[15],P[7]=G,P[11]=R,P[15]=z;for(let Y=0;Y<16;Y+=4){let W=P[Y],$=P[Y+1],_=P[Y+2],J=P[Y+3];z=W^$^_^J,P[Y]^=z^this._mixCol[W^$],P[Y+1]^=z^this._mixCol[$^_],P[Y+2]^=z^this._mixCol[_^J],P[Y+3]^=z^this._mixCol[J^W]}for(let Y=0,W=16*Q;Y<16;++Y,++W)P[Y]^=q[W]}for(let Q=0;Q<16;++Q)P[Q]=X[P[Q]];G=P[1],P[1]=P[5],P[5]=P[9],P[9]=P[13],P[13]=G,G=P[2],R=P[6],P[2]=P[10],P[6]=P[14],P[10]=G,P[14]=R,G=P[3],R=P[7],z=P[11],P[3]=P[15],P[7]=G,P[11]=R,P[15]=z;for(let Q=0,Y=this._keySize;Q<16;++Q,++Y)P[Q]^=q[Y];return P}_decryptBlock2(Z,q){let X=Z.length,z=this.buffer,R=this.bufferPosition,G=[],P=this.iv;for(let W=0;W<X;++W){if(z[R]=Z[W],++R,R<16)continue;let $=this._decrypt(z,this._key);for(let _=0;_<16;++_)$[_]^=P[_];P=z,G.push($),z=new Uint8Array(16),R=0}if(this.buffer=z,this.bufferLength=R,this.iv=P,G.length===0)return new Uint8Array(0);let Q=16*G.length;if(q){let W=G.at(-1),$=W[15];if($<=16){for(let _=15,J=16-$;_>=J;--_)if(W[_]!==$){$=0;break}Q-=$,G[G.length-1]=W.subarray(0,16-$)}}let Y=new Uint8Array(Q);for(let W=0,$=0,_=G.length;W<_;++W,$+=16)Y.set(G[W],$);return Y}decryptBlock(Z,q,X=null){let z=Z.length,R=this.buffer,G=this.bufferPosition;if(X)this.iv=X;else{for(let P=0;G<16&&P<z;++P,++G)R[G]=Z[P];if(G<16)return this.bufferLength=G,new Uint8Array(0);this.iv=R,Z=Z.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(Z,q)}encrypt(Z,q){let X=Z.length,z=this.buffer,R=this.bufferPosition,G=[];q||=new Uint8Array(16);for(let Y=0;Y<X;++Y){if(z[R]=Z[Y],++R,R<16)continue;for(let $=0;$<16;++$)z[$]^=q[$];let W=this._encrypt(z,this._key);q=W,G.push(W),z=new Uint8Array(16),R=0}if(this.buffer=z,this.bufferLength=R,this.iv=q,G.length===0)return new Uint8Array(0);let P=16*G.length,Q=new Uint8Array(P);for(let Y=0,W=0,$=G.length;Y<$;++Y,W+=16)Q.set(G[Y],W);return Q}}class qz{_hash(Z,q,X){y1("Abstract method `_hash` called")}checkOwnerPassword(Z,q,X,z){let R=new Uint8Array(Z.length+56);return R.set(Z,0),R.set(q,Z.length),R.set(X,Z.length+q.length),N7(this._hash(Z,R,X),z)}checkUserPassword(Z,q,X){let z=new Uint8Array(Z.length+8);return z.set(Z,0),z.set(q,Z.length),N7(this._hash(Z,z,[]),X)}getOwnerKey(Z,q,X,z){let R=new Uint8Array(Z.length+56);R.set(Z,0),R.set(q,Z.length),R.set(X,Z.length+q.length);let G=this._hash(Z,R,X);return new r3(G).decryptBlock(z,!1,new Uint8Array(16))}getUserKey(Z,q,X){let z=new Uint8Array(Z.length+8);z.set(Z,0),z.set(q,Z.length);let R=this._hash(Z,z,[]);return new r3(R).decryptBlock(X,!1,new Uint8Array(16))}}class bq{constructor(Z,q){this.StringCipherConstructor=Z,this.StreamCipherConstructor=q}createStream(Z,q){let X=new this.StreamCipherConstructor;return new eU(Z,q,function(z,R){return X.decryptBlock(z,R)})}decryptString(Z){let q=new this.StringCipherConstructor,X=w8(Z);return X=q.decryptBlock(X,!0),$0(X)}encryptString(Z){let q=new this.StringCipherConstructor;if(q instanceof T9){let z=16-Z.length%16;Z+=String.fromCharCode(z).repeat(z);let R=new Uint8Array(16);crypto.getRandomValues(R);let G=w8(Z);G=q.encrypt(G,R);let P=new Uint8Array(16+G.length);return P.set(R),P.set(G,16),$0(P)}let X=w8(Z);return X=q.encrypt(X),$0(X)}}class G6{static get _defaultPasswordBytes(){return X1(this,"_defaultPasswordBytes",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]))}#Z(Z,q,X,z,R,G,P,Q,Y,W,$,_){if(q){let U=Math.min(127,q.length);q=q.subarray(0,U)}else q=[];let J=Z===6?new Xf:new qf;return J.checkUserPassword(q,Q,P)?J.getUserKey(q,Y,$):q.length&&J.checkOwnerPassword(q,z,G,X)?J.getOwnerKey(q,R,G,W):null}#q(Z,q,X,z,R,G,P,Q){let Y=40+X.length+Z.length,W=new Uint8Array(Y),$,_,J=0;if(q)for(_=Math.min(32,q.length);J<_;++J)W[J]=q[J];for($=0;J<32;)W[J++]=G6._defaultPasswordBytes[$++];W.set(X,J),J+=X.length,W[J++]=255&R,W[J++]=R>>8&255,W[J++]=R>>16&255,W[J++]=R>>>24&255,W.set(Z,J),J+=Z.length,G>=4&&!Q&&(W.fill(255,J,J+4),J+=4);let U=w4(W,0,J),f=P>>3;if(G>=3)for($=0;$<50;++$)U=w4(U,0,f);let K=U.subarray(0,f),I,B;if(G>=3){J=0,W.set(G6._defaultPasswordBytes,J),J+=32,W.set(Z,J),J+=Z.length,I=new O4(K),B=I.encryptBlock(w4(W,0,J)),_=K.length;let j=new Uint8Array(_);for($=1;$<=19;++$){for(let V=0;V<_;++V)j[V]=K[V]^$;I=new O4(j),B=I.encryptBlock(B)}}else I=new O4(K),B=I.encryptBlock(G6._defaultPasswordBytes);return B.every((j,V)=>z[V]===j)?K:null}#z(Z,q,X,z){let R=new Uint8Array(32),G=0,P=Math.min(32,Z.length);for(;G<P;++G)R[G]=Z[G];let Q=0;for(;G<32;)R[G++]=G6._defaultPasswordBytes[Q++];let Y=w4(R,0,G),W=z>>3;if(X>=3)for(Q=0;Q<50;++Q)Y=w4(Y,0,Y.length);let $,_;if(X>=3){_=q;let J=new Uint8Array(W);for(Q=19;Q>=0;Q--){for(let U=0;U<W;++U)J[U]=Y[U]^Q;$=new O4(J),_=$.encryptBlock(_)}}else $=new O4(Y.subarray(0,W)),_=$.encryptBlock(q);return _}#X(Z,q,X,z=!1){let R=X.length,G=new Uint8Array(R+9);G.set(X);let P=R;return G[P++]=255&Z,G[P++]=Z>>8&255,G[P++]=Z>>16&255,G[P++]=255&q,G[P++]=q>>8&255,z&&(G[P++]=115,G[P++]=65,G[P++]=108,G[P++]=84),w4(G,0,P).subarray(0,Math.min(R+5,16))}#R(Z,q,X,z,R){if(!(q instanceof t))throw new h("Invalid crypt filter name.");let G=this,P=Z.get(q.name),Q=P?.get("CFM");if(!Q||Q.name==="None")return function(){return new Zf};if(Q.name==="V2")return function(){return new O4(G.#X(X,z,R,!1))};if(Q.name==="AESV2")return function(){return new Zz(G.#X(X,z,R,!0))};if(Q.name==="AESV3")return function(){return new r3(R)};throw new h("Unknown crypto method")}constructor(Z,q,X){let z=Z.get("Filter");if(!Q8(z,"Standard"))throw new h("unknown encryption method");this.filterName=z.name,this.dict=Z;let R=Z.get("V");if(!Number.isInteger(R)||R!==1&&R!==2&&R!==4&&R!==5)throw new h("unsupported encryption algorithm");this.algorithm=R;let G=Z.get("Length");if(!G)if(R<=3)G=40;else{let I=Z.get("CF"),B=Z.get("StmF");if(I instanceof S&&B instanceof t)I.suppressEncryption=!0,G=I.get(B.name)?.get("Length")||128,G<40&&(G<<=3)}if(!Number.isInteger(G)||G<40||G%8!=0)throw new h("invalid key length");let P=w8(Z.get("O")),Q=w8(Z.get("U")),Y=P.subarray(0,32),W=Q.subarray(0,32),$=Z.get("P"),_=Z.get("R"),J=(R===4||R===5)&&Z.get("EncryptMetadata")!==!1;this.encryptMetadata=J;let U=w8(q),f,K;if(X){if(_===6)try{X=EZ(X)}catch{v("CipherTransformFactory: Unable to convert UTF8 encoded password.")}f=w8(X)}if(R!==5)K=this.#q(U,f,Y,W,$,_,G,J);else{let I=P.subarray(32,40),B=P.subarray(40,48),j=Q.subarray(0,48),V=Q.subarray(32,40),x=Q.subarray(40,48),M=w8(Z.get("OE")),H=w8(Z.get("UE")),A=w8(Z.get("Perms"));K=this.#Z(_,f,Y,I,B,j,W,V,x,M,H,A)}if(!K){if(!X)throw new L7("No password given",oB);let I=this.#z(f,Y,_,G);K=this.#q(U,I,Y,W,$,_,G,J)}if(!K)throw new L7("Incorrect Password",aB);if(R===4&&K.length<16?(this.encryptionKey=new Uint8Array(16),this.encryptionKey.set(K)):this.encryptionKey=K,R>=4){let I=Z.get("CF");I instanceof S&&(I.suppressEncryption=!0),this.cf=I,this.stmf=Z.get("StmF")||t.get("Identity"),this.strf=Z.get("StrF")||t.get("Identity"),this.eff=Z.get("EFF")||this.stmf}}createCipherTransform(Z,q){if(this.algorithm===4||this.algorithm===5)return new bq(this.#R(this.cf,this.strf,Z,q,this.encryptionKey),this.#R(this.cf,this.stmf,Z,q,this.encryptionKey));let X=this.#X(Z,q,this.encryptionKey,!1),z=function(){return new O4(X)};return new bq(z,z)}}class zf{constructor(Z,q){this.stream=Z,this.pdfManager=q,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new U8,this._newPersistentRefNum=null,this._newTemporaryRefNum=null,this._persistentRefsCache=null}getNewPersistentRef(Z){this._newPersistentRefNum===null&&(this._newPersistentRefNum=this.entries.length||1);let q=this._newPersistentRefNum++;return this._cacheMap.set(q,Z),P1.get(q,0)}getNewTemporaryRef(){if(this._newTemporaryRefNum===null&&(this._newTemporaryRefNum=this.entries.length||1,this._newPersistentRefNum)){this._persistentRefsCache=new Map;for(let Z=this._newTemporaryRefNum;Z<this._newPersistentRefNum;Z++)this._persistentRefsCache.set(Z,this._cacheMap.get(Z)),this._cacheMap.delete(Z)}return P1.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){if(this._newTemporaryRefNum=null,this._persistentRefsCache)for(let[Z,q]of this._persistentRefsCache)this._cacheMap.set(Z,q);this._persistentRefsCache=null}setStartXRef(Z){this.startXRefQueue=[Z]}parse(Z=!1){let q,X,z;Z?(v("Indexing all PDF objects"),q=this.indexObjects()):q=this.readXRef(),q.assignXref(this),this.trailer=q;try{X=q.get("Encrypt")}catch(R){if(R instanceof X8)throw R;v(`XRef.parse - Invalid "Encrypt" reference: "${R}".`)}if(X instanceof S){let R=q.get("ID"),G=R?.length?R[0]:"";X.suppressEncryption=!0,this.encrypt=new G6(X,G,this.pdfManager.password)}try{z=q.get("Root")}catch(R){if(R instanceof X8)throw R;v(`XRef.parse - Invalid "Root" reference: "${R}".`)}if(z instanceof S)try{if(z.get("Pages")instanceof S)return void(this.root=z)}catch(R){if(R instanceof X8)throw R;v(`XRef.parse - Invalid "Pages" reference: "${R}".`)}if(!Z)throw new L5;throw new k7("Invalid Root reference.")}processXRefTable(Z){if("tableState"in this||(this.tableState={entryNum:0,streamPos:Z.lexer.stream.pos,parserBuf1:Z.buf1,parserBuf2:Z.buf2}),!k8(this.readXRefTable(Z),"trailer"))throw new h("Invalid XRef table: could not find trailer dictionary");let q=Z.getObj();if(q instanceof S||!q.dict||(q=q.dict),!(q instanceof S))throw new h("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,q}readXRefTable(Z){let q=Z.lexer.stream,X=this.tableState,z;for(q.pos=X.streamPos,Z.buf1=X.parserBuf1,Z.buf2=X.parserBuf2;;){if(!("firstEntryNum"in X)||!("entryCount"in X)){if(k8(z=Z.getObj(),"trailer"))break;X.firstEntryNum=z,X.entryCount=Z.getObj()}let{firstEntryNum:R,entryCount:G}=X;if(!Number.isInteger(R)||!Number.isInteger(G))throw new h("Invalid XRef table: wrong types in subsection header");for(let P=X.entryNum;P<G;P++){X.streamPos=q.pos,X.entryNum=P,X.parserBuf1=Z.buf1,X.parserBuf2=Z.buf2;let Q={};Q.offset=Z.getObj(),Q.gen=Z.getObj();let Y=Z.getObj();if(Y instanceof x8)switch(Y.cmd){case"f":Q.free=!0;break;case"n":Q.uncompressed=!0}if(!Number.isInteger(Q.offset)||!Number.isInteger(Q.gen)||!Q.free&&!Q.uncompressed)throw new h(`Invalid entry in XRef subsection: ${R}, ${G}`);P===0&&Q.free&&R===1&&(R=0),this.entries[P+R]||(this.entries[P+R]=Q)}X.entryNum=0,X.streamPos=q.pos,X.parserBuf1=Z.buf1,X.parserBuf2=Z.buf2,delete X.firstEntryNum,delete X.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new h("Invalid XRef table: unexpected first object");return z}processXRefStream(Z){if(!("streamState"in this)){let{dict:q,pos:X}=Z,z=q.get("W"),R=q.get("Index")||[0,q.get("Size")];this.streamState={entryRanges:R,byteWidths:z,entryNum:0,streamPos:X}}return this.readXRefStream(Z),delete this.streamState,Z.dict}readXRefStream(Z){let q=this.streamState;Z.pos=q.streamPos;let[X,z,R]=q.byteWidths,G=q.entryRanges;for(;G.length>0;){let[P,Q]=G;if(!Number.isInteger(P)||!Number.isInteger(Q))throw new h(`Invalid XRef range fields: ${P}, ${Q}`);if(!Number.isInteger(X)||!Number.isInteger(z)||!Number.isInteger(R))throw new h(`Invalid XRef entry fields length: ${P}, ${Q}`);for(let Y=q.entryNum;Y<Q;++Y){q.entryNum=Y,q.streamPos=Z.pos;let W=0,$=0,_=0;for(let U=0;U<X;++U){let f=Z.getByte();if(f===-1)throw new h("Invalid XRef byteWidths 'type'.");W=W<<8|f}X===0&&(W=1);for(let U=0;U<z;++U){let f=Z.getByte();if(f===-1)throw new h("Invalid XRef byteWidths 'offset'.");$=$<<8|f}for(let U=0;U<R;++U){let f=Z.getByte();if(f===-1)throw new h("Invalid XRef byteWidths 'generation'.");_=_<<8|f}let J={};switch(J.offset=$,J.gen=_,W){case 0:J.free=!0;break;case 1:J.uncompressed=!0;break;case 2:break;default:throw new h(`Invalid XRef entry type: ${W}`)}this.entries[P+Y]||(this.entries[P+Y]=J)}q.entryNum=0,q.streamPos=Z.pos,G.splice(0,2)}}indexObjects(){function Z(V,x){let M="",H=V[x];for(;H!==10&&H!==13&&H!==60&&!(++x>=V.length);)M+=String.fromCharCode(H),H=V[x];return M}function q(V,x,M){let H=M.length,A=V.length,T=0;for(;x<A;){let k=0;for(;k<H&&V[x+k]===M[k];)++k;if(k>=H)break;x++,T++}return T}let X=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,z=/\b(startxref|\d+\s+\d+\s+obj)\b/g,R=/^(\d+)\s+(\d+)\s+obj\b/,G=new Uint8Array([116,114,97,105,108,101,114]),P=new Uint8Array([115,116,97,114,116,120,114,101,102]),Q=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();let Y=this.stream;Y.pos=0;let W=Y.getBytes(),$=$0(W),_=W.length,J=Y.start,U=[],f=[];for(;J<_;){let V=W[J];if(V===9||V===10||V===13||V===32){++J;continue}if(V===37){do{if(++J,J>=_)break;V=W[J]}while(V!==10&&V!==13);continue}let x=Z(W,J),M;if(x.startsWith("xref")&&(x.length===4||/\s/.test(x[4])))J+=q(W,J,G),U.push(J),J+=q(W,J,P);else if(M=R.exec(x)){let H=0|M[1],A=0|M[2],T=J+x.length,k,y=!1;if(this.entries[H]){if(this.entries[H].gen===A)try{new f4({lexer:new C0(Y.makeSubStream(T))}).getObj(),y=!0}catch(b){b instanceof H3?v(`indexObjects -- checking object (${x}): "${b}".`):y=!0}}else y=!0;y&&(this.entries[H]={offset:J-Y.start,gen:A,uncompressed:!0}),X.lastIndex=T;let O=X.exec($);if(O)k=X.lastIndex+1-J,O[1]!=="endobj"&&(v(`indexObjects: Found "${O[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`),k-=O[1].length+1);else k=_-J;let D=W.subarray(J,J+k),n=q(D,0,Q);n<k&&D[n+5]<64&&(f.push(J-Y.start),this._xrefStms.add(J-Y.start)),J+=k}else if(x.startsWith("trailer")&&(x.length===7||/\s/.test(x[7]))){U.push(J);let H=J+x.length,A;z.lastIndex=H;let T=z.exec($);if(T)A=z.lastIndex+1-J,T[1]!=="startxref"&&(v(`indexObjects: Found "${T[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`),A-=T[1].length+1);else A=_-J;J+=A}else J+=x.length+1}for(let V of f)this.startXRefQueue.push(V),this.readXRef(!0);let K=[],I,B,j=!1;for(let V of U){Y.pos=V;let x=new f4({lexer:new C0(Y),xref:this,allowStreams:!0,recoveryMode:!0});if(!k8(x.getObj(),"trailer"))continue;let M=x.getObj();M instanceof S&&(K.push(M),M.has("Encrypt")&&(j=!0))}for(let V of[...K,"genFallback",...K]){if(V==="genFallback"){if(!B)break;this._generationFallback=!0;continue}let x=!1;try{let M=V.get("Root");if(!(M instanceof S))continue;let H=M.get("Pages");if(!(H instanceof S))continue;let A=H.get("Count");Number.isInteger(A)&&(x=!0)}catch(M){B=M;continue}if(x&&(!j||V.has("Encrypt"))&&V.has("ID"))return V;I=V}if(I)return I;if(this.topDict)return this.topDict;if(!K.length)for(let V in this.entries){if(!Object.hasOwn(this.entries,V))continue;let x=this.entries[V],M=P1.get(parseInt(V),x.gen),H;try{H=this.fetch(M)}catch{continue}if(H instanceof C1&&(H=H.dict),H instanceof S&&H.has("Root"))return H}throw new k7("Invalid PDF structure.")}readXRef(Z=!1){let q=this.stream,X=new Set;for(;this.startXRefQueue.length;){try{let z=this.startXRefQueue[0];if(X.has(z)){v("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}X.add(z),q.pos=z+q.start;let R=new f4({lexer:new C0(q),xref:this,allowStreams:!0}),G,P=R.getObj();if(k8(P,"xref"))G=this.processXRefTable(R),this.topDict||(this.topDict=G),P=G.get("XRefStm"),Number.isInteger(P)&&!this._xrefStms.has(P)&&(this._xrefStms.add(P),this.startXRefQueue.push(P));else{if(!Number.isInteger(P))throw new h("Invalid XRef stream header");if(!(Number.isInteger(R.getObj())&&k8(R.getObj(),"obj")&&(P=R.getObj())instanceof C1))throw new h("Invalid XRef stream");if(G=this.processXRefStream(P),this.topDict||(this.topDict=G),!G)throw new h("Failed to read XRef stream")}P=G.get("Prev"),Number.isInteger(P)?this.startXRefQueue.push(P):P instanceof P1&&this.startXRefQueue.push(P.num)}catch(z){if(z instanceof X8)throw z;v1("(while reading XRef): "+z)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!Z)throw new L5}getEntry(Z){let q=this.entries[Z];return q&&!q.free&&q.offset?q:null}fetchIfRef(Z,q=!1){return Z instanceof P1?this.fetch(Z,q):Z}fetch(Z,q=!1){if(!(Z instanceof P1))throw Error("ref object is not a reference");let X=Z.num,z=this._cacheMap.get(X);if(z!==void 0)return z instanceof S&&!z.objId&&(z.objId=Z.toString()),z;let R=this.getEntry(X);if(R===null)return R;if(this._pendingRefs.has(Z))return this._pendingRefs.remove(Z),v(`Ignoring circular reference: ${Z}.`),iB;this._pendingRefs.put(Z);try{R=R.uncompressed?this.fetchUncompressed(Z,R,q):this.fetchCompressed(Z,R,q),this._pendingRefs.remove(Z)}catch(G){throw this._pendingRefs.remove(Z),G}return R instanceof S?R.objId=Z.toString():R instanceof C1&&(R.dict.objId=Z.toString()),R}fetchUncompressed(Z,q,X=!1){let{gen:z,num:R}=Z;if(q.gen!==z){let $=`Inconsistent generation in XRef: ${Z}`;if(this._generationFallback&&q.gen<z)return v($),this.fetchUncompressed(P1.get(R,q.gen),q,X);throw new V4($)}let G=this.stream.makeSubStream(q.offset+this.stream.start),P=new f4({lexer:new C0(G),xref:this,allowStreams:!0}),Q=P.getObj(),Y=P.getObj(),W=P.getObj();if(Q!==R||Y!==z||!(W instanceof x8))throw new V4(`Bad (uncompressed) XRef entry: ${Z}`);if(W.cmd!=="obj"){if(W.cmd.startsWith("obj")&&(R=parseInt(W.cmd.substring(3),10),!Number.isNaN(R)))return R;throw new V4(`Bad (uncompressed) XRef entry: ${Z}`)}return(q=this.encrypt&&!X?P.getObj(this.encrypt.createCipherTransform(R,z)):P.getObj())instanceof C1||this._cacheMap.set(R,q),q}fetchCompressed(Z,q,X=!1){let z=q.offset,R=this.fetch(P1.get(z,0));if(!(R instanceof C1))throw new h("bad ObjStm stream");let G=R.dict.get("First"),P=R.dict.get("N");if(!Number.isInteger(G)||!Number.isInteger(P))throw new h("invalid first and n parameters for ObjStm stream");let Q=new f4({lexer:new C0(R),xref:this,allowStreams:!0}),Y=Array(P),W=Array(P);for(let J=0;J<P;++J){let U=Q.getObj();if(!Number.isInteger(U))throw new h(`invalid object number in the ObjStm stream: ${U}`);let f=Q.getObj();if(!Number.isInteger(f))throw new h(`invalid object offset in the ObjStm stream: ${f}`);Y[J]=U;let K=this.getEntry(U);K?.offset===z&&K.gen!==J&&(K.gen=J),W[J]=f}let $=(R.start||0)+G,_=Array(P);for(let J=0;J<P;++J){let U=J<P-1?W[J+1]-W[J]:void 0;if(U<0)throw new h("Invalid offset in the ObjStm stream.");Q=new f4({lexer:new C0(R.makeSubStream($+W[J],U,R.dict)),xref:this,allowStreams:!0});let f=Q.getObj();if(_[J]=f,f instanceof C1)continue;let K=Y[J],I=this.entries[K];I&&I.offset===z&&I.gen===J&&this._cacheMap.set(K,f)}if((q=_[q.gen])===void 0)throw new V4(`Bad (compressed) XRef entry: ${Z}`);return q}async fetchIfRefAsync(Z,q){return Z instanceof P1?this.fetchAsync(Z,q):Z}async fetchAsync(Z,q){try{return this.fetch(Z,q)}catch(X){if(!(X instanceof X8))throw X;return await this.pdfManager.requestRange(X.begin,X.end),this.fetchAsync(Z,q)}}getCatalogObj(){return this.root}}class Sq{#Z=!1;#q=null;constructor({pdfManager:Z,xref:q,pageIndex:X,pageDict:z,ref:R,globalIdFactory:G,fontCache:P,builtInCMapCache:Q,standardFontDataCache:Y,globalColorSpaceCache:W,globalImageCache:$,systemFontCache:_,nonBlendModesSet:J,xfaFactory:U}){this.pdfManager=Z,this.pageIndex=X,this.pageDict=z,this.xref=q,this.ref=R,this.fontCache=P,this.builtInCMapCache=Q,this.standardFontDataCache=Y,this.globalColorSpaceCache=W,this.globalImageCache=$,this.systemFontCache=_,this.nonBlendModesSet=J,this.evaluatorOptions=Z.evaluatorOptions,this.xfaFactory=U;let f={obj:0};this._localIdFactory=class extends G{static createObjId(){return`p${X}_${++f.obj}`}static getPageObjId(){return`p${R.toString()}`}}}#z(Z){return new H6({xref:this.xref,handler:Z,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions})}#X(Z,q=!1){let X=F0({dict:this.pageDict,key:Z,getArray:q,stopWhenFound:!1});return Array.isArray(X)?X.length!==1&&X[0]instanceof S?S.merge({xref:this.xref,dictArray:X}):X[0]:X}get content(){return this.pageDict.getArray("Contents")}get resources(){let Z=this.#X("Resources");return X1(this,"resources",Z instanceof S?Z:S.empty)}#R(Z){if(this.xfaData)return this.xfaData.bbox;let q=T4(this.#X(Z,!0),null);if(q){if(q[2]-q[0]>0&&q[3]-q[1]>0)return q;v(`Empty, or invalid, /${Z} entry.`)}return null}get mediaBox(){return X1(this,"mediaBox",this.#R("MediaBox")||tV)}get cropBox(){return X1(this,"cropBox",this.#R("CropBox")||this.mediaBox)}get userUnit(){let Z=this.pageDict.get("UserUnit");return X1(this,"userUnit",typeof Z=="number"&&Z>0?Z:1)}get view(){let{cropBox:Z,mediaBox:q}=this;if(Z!==q&&!N7(Z,q)){let X=h1.intersect(Z,q);if(X&&X[2]-X[0]>0&&X[3]-X[1]>0)return X1(this,"view",X);v("Empty /CropBox and /MediaBox intersection.")}return X1(this,"view",q)}get rotate(){let Z=this.#X("Rotate")||0;return Z%90!=0?Z=0:Z>=360?Z%=360:Z<0&&(Z=(Z%360+360)%360),X1(this,"rotate",Z)}#G(Z,q){if(!this.evaluatorOptions.ignoreErrors)throw Z;v(`getContentStream - ignoring sub-stream (${q}): "${Z}".`)}async getContentStream(){let Z=await this.pdfManager.ensure(this,"content");return Z instanceof C1?Z:Array.isArray(Z)?new uP(Z,this.#G.bind(this)):new A3}get xfaData(){return X1(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async#Q(Z,q,X){let z=[];for(let R of Z)if(R.id){let G=P1.fromString(R.id);if(!G){v(`A non-linked annotation cannot be modified: ${R.id}`);continue}if(R.deleted){if(q.put(G,G),R.popupRef){let P=P1.fromString(R.popupRef);P&&q.put(P,P)}continue}if(R.popup?.deleted){let P=P1.fromString(R.popupRef);P&&q.put(P,P)}X?.put(G),R.ref=G,z.push(this.xref.fetchAsync(G).then((P)=>{P instanceof S&&(R.oldAnnotation=P.clone())},()=>{v(`Cannot fetch \`oldAnnotation\` for: ${G}.`)})),delete R.id}await Promise.all(z)}async saveNewAnnotations(Z,q,X,z,R){if(this.xfaFactory)throw Error("XFA: Cannot save new annotations.");let G=this.#z(Z),P=new t8,Q=new U8;await this.#Q(X,P,Q);let Y=this.pageDict,W=this.annotations.filter((J)=>!(J instanceof P1&&P.has(J))),$=await Z4.saveNewAnnotations(G,q,X,z,R);for(let{ref:J}of $.annotations)J instanceof P1&&!Q.has(J)&&W.push(J);let _=Y.clone();_.set("Annots",W),R.put(this.ref,{data:_});for(let J of P)R.put(J,{data:null})}async save(Z,q,X,z){let R=this.#z(Z),G=await this._parsedAnnotations,P=[];for(let Q of G)P.push(Q.save(R,q,X,z).catch(function(Y){return v(`save - ignoring annotation data during "${q.name}" task: "${Y}".`),null}));return Promise.all(P)}async loadResources(Z){await(this.#q??=this.pdfManager.ensure(this,"resources")),await M6.load(this.resources,Z,this.xref)}async#P(Z,q){let X=Z?.get("Resources");return X instanceof S&&X.size?(await M6.load(X,q,this.xref),S.merge({xref:this.xref,dictArray:[X,this.resources],mergeSubDicts:!0})):this.resources}async getOperatorList({handler:Z,sink:q,task:X,intent:z,cacheKey:R,annotationStorage:G=null,modifiedIds:P=null}){let Q=this.getContentStream(),Y=this.loadResources(gZ),W=this.#z(Z),$=this.xfaFactory?null:kP(G),_=$?.get(this.pageIndex),J=Promise.resolve(null),U=null;if(_){let O=this.pdfManager.ensureDoc("annotationGlobals"),D,n=new Set;for(let{bitmapId:l,bitmap:N}of _)!l||N||n.has(l)||n.add(l);let{isOffscreenCanvasSupported:b}=this.evaluatorOptions;if(n.size>0){let l=_.slice();for(let[N,L]of G)N.startsWith(rG)&&L.bitmap&&n.has(L.bitmapId)&&l.push(L);D=Z4.generateImages(l,this.xref,b)}else D=Z4.generateImages(_,this.xref,b);U=new U8,J=Promise.all([O,this.#Q(_,U,null)]).then(([l])=>l?Z4.printNewAnnotations(l,W,X,_,D):null)}let f=Promise.all([Q,Y]).then(async([O])=>{let D=await this.#P(O.dict,gZ),n=new O8(z,q);return Z.send("StartRenderPage",{transparency:W.hasBlendModes(D,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:R}),await W.getOperatorList({stream:O,task:X,resources:D,operatorList:n}),n}),[K,I,B]=await Promise.all([f,this._parsedAnnotations,J]);if(B){I=I.filter((O)=>!(O.ref&&U.has(O.ref)));for(let O=0,D=B.length;O<D;O++){let n=B[O];if(n.refToReplace){let b=I.findIndex((l)=>l.ref&&V3(l.ref,n.refToReplace));b>=0&&(I.splice(b,1,n),B.splice(O--,1),D--)}}I=I.concat(B)}if(I.length===0||z&zB)return K.flush(!0),{length:K.totalLength};let j=!!(z&sG),V=!!(z&RB),x=!!(z&gz),M=!!(z&q3),H=!!(z&dz),A=[];for(let O of I)(x||M&&O.mustBeViewed(G,j)&&O.mustBeViewedWhenEditing(V,P)||H&&O.mustBePrinted(G))&&A.push(O.getOperatorList(W,X,z,G).catch(function(D){return v(`getOperatorList - ignoring annotation data during "${X.name}" task: "${D}".`),{opList:null,separateForm:!1,separateCanvas:!1}}));let T=await Promise.all(A),k=!1,y=!1;for(let{opList:O,separateForm:D,separateCanvas:n}of T)K.addOpList(O),k||=D,y||=n;return K.flush(!0,{form:k,canvas:y}),{length:K.totalLength}}async extractTextContent({handler:Z,task:q,includeMarkedContent:X,disableNormalization:z,sink:R,intersector:G=null}){let P=this.getContentStream(),Q=this.loadResources(dZ),Y=this.pdfManager.ensureCatalog("lang"),[W,,$]=await Promise.all([P,Q,Y]),_=await this.#P(W.dict,dZ);return this.#z(Z).getTextContent({stream:W,task:q,resources:_,includeMarkedContent:X,disableNormalization:z,sink:R,viewBox:this.view,lang:$,intersector:G})}async getStructTree(){let Z=await this.pdfManager.ensureCatalog("structTreeRoot");if(!Z)return null;await this._parsedAnnotations;try{let q=await this.pdfManager.ensure(this,"_parseStructTree",[Z]);return await this.pdfManager.ensure(q,"serializable")}catch(q){return v(`getStructTree: "${q}".`),null}}_parseStructTree(Z){let q=new TX(Z,this.pageDict);return q.parse(this.ref),q}async getAnnotationsData(Z,q,X){let z=await this._parsedAnnotations;if(z.length===0)return z;let R=[],G=[],P,Q=!!(X&gz),Y=!!(X&q3),W=!!(X&dz),$=[];for(let _ of z){let J=Q||Y&&_.viewable;(J||W&&_.printable)&&R.push(_.data),_.hasTextContent&&J?(P??=this.#z(Z),G.push(_.extractTextContent(P,q,[-1/0,-1/0,1/0,1/0]).catch(function(U){v(`getAnnotationsData - ignoring textContent during "${q.name}" task: "${U}".`)}))):_.overlaysTextContent&&J&&$.push(_)}if($.length>0){let _=new iU($);G.push(this.extractTextContent({handler:Z,task:q,includeMarkedContent:!1,disableNormalization:!1,sink:null,viewBox:this.view,lang:null,intersector:_}).then(()=>{_.setText()}))}return await Promise.all(G),R}get annotations(){let Z=this.#X("Annots");return X1(this,"annotations",Array.isArray(Z)?Z:[])}get _parsedAnnotations(){let Z=this.pdfManager.ensure(this,"annotations").then(async(q)=>{if(q.length===0)return q;let[X,z]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!X)return[];let R=z?.orphanFields,G=[];for(let W of q)G.push(Z4.create(this.xref,W,X,this._localIdFactory,!1,R,null,this.ref).catch(function($){return v(`_parsedAnnotations: "${$}".`),null}));let P=[],Q,Y;for(let W of await Promise.all(G))W&&(W instanceof E0?(Y||=[]).push(W):W instanceof k9?(Q||=[]).push(W):P.push(W));return Y&&P.push(...Y),Q&&P.push(...Q),P});return this.#Z=!0,X1(this,"_parsedAnnotations",Z)}get jsActions(){return X1(this,"jsActions",X9(this.xref,this.pageDict,CB))}async collectAnnotationsByType(Z,q,X,z,R){let{pageIndex:G}=this;if(this.#Z){let Q=await this._parsedAnnotations;for(let{data:Y}of Q)X&&!X.has(Y.annotationType)||(Y.pageIndex=G,z.push(Promise.resolve(Y)));return}let P=await this.pdfManager.ensure(this,"annotations");for(let Q of P)z.push(Z4.create(this.xref,Q,R,this._localIdFactory,!1,null,X,this.ref).then(async(Y)=>{if(!Y)return null;if(Y.data.pageIndex=G,Y.hasTextContent&&Y.viewable){let W=this.#z(Z);await Y.extractTextContent(W,q,[-1/0,-1/0,1/0,1/0])}return Y.data}).catch(function(Y){return v(`collectAnnotationsByType: "${Y}".`),null}))}}function _Z(Z,q,X=1024,z=!1){let R=q.length,G=Z.peekBytes(X),P=G.length-R;if(P<=0)return!1;if(z){let Q=R-1,Y=G.length-1;for(;Y>=Q;){let W=0;for(;W<R&&G[Y-W]===q[Q-W];)W++;if(W>=R)return Z.pos+=Y-Q,!0;Y--}}else{let Q=0;for(;Q<=P;){let Y=0;for(;Y<R&&G[Q+Y]===q[Y];)Y++;if(Y>=R)return Z.pos+=Q,!0;Q++}}return!1}class Xz{#Z=new Map;#q=null;constructor(Z,q){if(q.length<=0)throw new k7("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=Z,this.stream=q,this.xref=new zf(q,Z);let X={font:0};this._globalIdFactory=class{static getDocId(){return`g_${Z.docId}`}static createFontId(){return"f"+ ++X.font}static createObjId(){y1("Abstract method `createObjId` called.")}static getPageObjId(){y1("Abstract method `getPageObjId` called.")}}}parse(Z){this.xref.parse(Z),this.catalog=new x6(this.pdfManager,this.xref)}get linearization(){let Z=null;try{Z=XQ.create(this.stream)}catch(q){if(q instanceof X8)throw q;v1(q)}return X1(this,"linearization",Z)}get startXRef(){let Z=this.stream,q=0;if(this.linearization){if(Z.reset(),_Z(Z,eV)){Z.skip(6);let X=Z.peekByte();for(;M0(X);)Z.pos++,X=Z.peekByte();q=Z.pos-Z.start}}else{let z=YG.length,R=!1,G=Z.end;for(;!R&&G>0;)G-=1024-z,G<0&&(G=0),Z.pos=G,R=_Z(Z,YG,1024,!0);if(R){let P;Z.skip(9);do P=Z.getByte();while(M0(P));let Q="";for(;P>=32&&P<=57;)Q+=String.fromCharCode(P),P=Z.getByte();q=parseInt(Q,10),isNaN(q)&&(q=0)}}return X1(this,"startXRef",q)}checkHeader(){let Z=this.stream;if(Z.reset(),!_Z(Z,QG))return;Z.moveStart(),Z.skip(QG.length);let q,X="";for(;(q=Z.getByte())>32&&X.length<7;)X+=String.fromCharCode(q);xP.test(X)?this.#q=X:v(`Invalid PDF header version: ${X}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let Z=0;return Z=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,X1(this,"numPages",Z)}#z(Z,q=0){return!!Array.isArray(Z)&&Z.every((X)=>{if(!((X=this.xref.fetchIfRef(X))instanceof S))return!1;if(X.has("Kids"))return++q>10?(v("#hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this.#z(X.get("Kids"),q);let z=Q8(X.get("FT"),"Sig"),R=X.get("Rect"),G=Array.isArray(R)&&R.every((P)=>P===0);return z&&G})}#X(Z,q,X=new U8){if(Array.isArray(Z))for(let z of Z){if(z instanceof P1){if(X.has(z))continue;X.put(z)}if(z=this.xref.fetchIfRef(z),!(z instanceof S))continue;if(z.has("Kids")){this.#X(z.get("Kids"),q,X);continue}if(!Q8(z.get("FT"),"Sig"))continue;let R=z.get("V");if(!(R instanceof S))continue;let G=R.get("SubFilter");G instanceof t&&q.add(G.name)}}get _xfaStreams(){let{acroForm:Z}=this.catalog;if(!Z)return null;let q=Z.get("XFA"),X=new Map(["xdp:xdp","template","datasets","config","connectionSet","localeSet","stylesheet","/xdp:xdp"].map((z)=>[z,null]));if(q instanceof C1&&!q.isEmpty)return X.set("xdp:xdp",q),X;if(!Array.isArray(q)||q.length===0)return null;for(let z=0,R=q.length;z<R;z+=2){let G;if(G=z===0?"xdp:xdp":z===R-2?"/xdp:xdp":q[z],!X.has(G))continue;let P=this.xref.fetchIfRef(q[z+1]);P instanceof C1&&!P.isEmpty&&X.set(G,P)}return X}get xfaDatasets(){let Z=this._xfaStreams;if(!Z)return X1(this,"xfaDatasets",null);for(let q of["datasets","xdp:xdp"]){let X=Z.get(q);if(X)try{let z=T7(X.getString());return X1(this,"xfaDatasets",new aU({[q]:z}))}catch{v("XFA - Invalid utf-8 string.");break}}return X1(this,"xfaDatasets",null)}get xfaData(){let Z=this._xfaStreams;if(!Z)return null;let q=Object.create(null);for(let[X,z]of Z)if(z)try{q[X]=T7(z.getString())}catch{return v("XFA - Invalid utf-8 string."),null}return q}get xfaFactory(){let Z;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(Z=this.xfaData),X1(this,"xfaFactory",Z?new z2(Z):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async#R(){let Z=await this.pdfManager.ensureCatalog("xfaImages");Z&&this.xfaFactory.setImages(Z)}async#G(Z,q){let X=await this.pdfManager.ensureCatalog("acroForm");if(!X)return;let z=await X.getAsync("DR");if(!(z instanceof S))return;await M6.load(z,["Font"],this.xref);let R=z.get("Font");if(!(R instanceof S))return;let G=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions,{useSystemFonts:!1}),{builtInCMapCache:P,fontCache:Q,standardFontDataCache:Y}=this.catalog,W=new H6({xref:this.xref,handler:Z,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:Q,builtInCMapCache:P,standardFontDataCache:Y,options:G}),$=new O8,_=[],J={get font(){return _.at(-1)},set font(B){_.push(B)},clone(){return this}},U=(B,j,V)=>W.handleSetFont(z,[t.get(B),1],null,$,q,J,j,V).catch((x)=>(v(`loadXfaFonts: "${x}".`),null)),f=[];for(let[B,j]of R){let V=j.get("FontDescriptor");if(!(V instanceof S))continue;let x=V.get("FontFamily");x=x.replaceAll(/[ ]+(\d)/g,"$1");let M={fontFamily:x,fontWeight:V.get("FontWeight"),italicAngle:-V.get("ItalicAngle")};qI(M)&&f.push(U(B,null,M))}await Promise.all(f);let K=this.xfaFactory.setFonts(_);if(!K)return;G.ignoreErrors=!0,f.length=0,_.length=0;let I=new Set;for(let B of K)jX(`${B}-Regular`)||I.add(B);I.size&&K.push("PdfJS-Fallback");for(let B of K)if(!I.has(B))for(let j of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){let V=`${B}-${j.name}`;f.push(U(V,SQ(V),{fontFamily:B,fontWeight:j.fontWeight,italicAngle:j.italicAngle}))}await Promise.all(f),this.xfaFactory.appendFonts(_,I)}loadXfaResources(Z,q){return Promise.all([this.#G(Z,q).catch(()=>{}),this.#R()])}serializeXfaData(Z){return this.xfaFactory?this.xfaFactory.serializeData(Z):null}get version(){return this.catalog.version||this.#q}get formInfo(){let Z={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},{acroForm:q}=this.catalog;if(!q)return X1(this,"formInfo",Z);try{let X=q.get("Fields"),z=Array.isArray(X)&&X.length>0;Z.hasFields=z;let R=q.get("XFA");Z.hasXfa=Array.isArray(R)&&R.length>0||R instanceof C1&&!R.isEmpty;let G=!!(1&q.get("SigFlags")),P=G&&this.#z(X);Z.hasAcroForm=z&&!P,Z.hasSignatures=G}catch(X){if(X instanceof X8)throw X;v(`Cannot fetch form information: "${X}".`)}return X1(this,"formInfo",Z)}get documentInfo(){let{catalog:Z,formInfo:q,xref:X}=this,z={PDFFormatVersion:this.version,Language:Z.lang,EncryptFilterName:X.encrypt?.filterName??null,IsLinearized:!!this.linearization,IsAcroFormPresent:q.hasAcroForm,IsXFAPresent:q.hasXfa,IsCollectionPresent:!!Z.collection,IsSignaturesPresent:q.hasSignatures},R;try{R=X.trailer.get("Info")}catch(G){if(G instanceof X8)throw G;v1("The document information dictionary is invalid.")}if(!(R instanceof S))return X1(this,"documentInfo",z);for(let[G,P]of R){switch(G){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if(typeof P=="string"){z[G]=E1(P);continue}break;case"Trapped":if(P instanceof t){z[G]=P;continue}break;default:let Q;switch(typeof P){case"string":Q=E1(P);break;case"number":case"boolean":Q=P;break;default:P instanceof t&&(Q=P)}if(Q===void 0){v(`Bad value, for custom key "${G}", in Info: ${P}.`);continue}z.Custom??=Object.create(null),z.Custom[G]=Q;continue}v(`Bad value, for key "${G}", in Info: ${P}.`)}return X1(this,"documentInfo",z)}get fingerprints(){let Z="\x00".repeat(16);function q(G){return typeof G=="string"&&G.length===16&&G!==Z}let X=this.xref.trailer.get("ID"),z,R;return Array.isArray(X)&&q(X[0])?(z=w8(X[0]),X[1]!==X[0]&&q(X[1])&&(R=w8(X[1]))):z=w4(this.stream.getByteRange(0,1024),0,1024),X1(this,"fingerprints",[ez(z),R?ez(R):null])}async#Q(Z){let{catalog:q,linearization:X,xref:z}=this,R=P1.get(X.objectNumberFirst,0);try{let G=await z.fetchAsync(R);if(G instanceof S){let P=G.getRaw("Type");if(P instanceof P1&&(P=await z.fetchAsync(P)),Q8(P,"Page")||!G.has("Type")&&!G.has("Kids")&&G.has("Contents"))return q.pageKidsCountCache.has(R)||q.pageKidsCountCache.put(R,1),q.pageIndexCache.has(R)||q.pageIndexCache.put(R,0),[G,R]}throw new h("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(G){return v(`_getLinearizationPage: "${G.message}".`),q.getPageDict(Z)}}getPage(Z){let q=this.#Z.get(Z);if(q)return q;let{catalog:X,linearization:z,xfaFactory:R}=this,G;return G=R?Promise.resolve([S.empty,null]):z?.pageFirst===Z?this.#Q(Z):X.getPageDict(Z),G=G.then(([P,Q])=>new Sq({pdfManager:this.pdfManager,xref:this.xref,pageIndex:Z,pageDict:P,ref:Q,globalIdFactory:this._globalIdFactory,fontCache:X.fontCache,builtInCMapCache:X.builtInCMapCache,standardFontDataCache:X.standardFontDataCache,globalColorSpaceCache:X.globalColorSpaceCache,globalImageCache:X.globalImageCache,systemFontCache:X.systemFontCache,nonBlendModesSet:X.nonBlendModesSet,xfaFactory:R})),this.#Z.set(Z,G),G}async checkFirstPage(Z=!1){if(!Z)try{await this.getPage(0)}catch(q){if(q instanceof V4)throw this.#Z.delete(0),await this.cleanup(),new L5}}async checkLastPage(Z=!1){let{catalog:q,pdfManager:X}=this,z;q.setActualNumPages();try{if(await Promise.all([X.ensureDoc("xfaFactory"),X.ensureDoc("linearization"),X.ensureCatalog("numPages")]),this.xfaFactory)return;if(z=this.linearization?this.linearization.numPages:q.numPages,!Number.isInteger(z))throw new h("Page count is not an integer.");if(z<=1)return;await this.getPage(z-1)}catch(R){if(this.#Z.delete(z-1),await this.cleanup(),R instanceof V4&&!Z)throw new L5;let G;v(`checkLastPage - invalid /Pages tree /Count: ${z}.`);try{G=await q.getAllPageDicts(Z)}catch(P){if(P instanceof V4&&!Z)throw new L5;return void q.setActualNumPages(1)}for(let[P,[Q,Y]]of G){let W;Q instanceof Error?(W=Promise.reject(Q),W.catch(()=>{})):W=Promise.resolve(new Sq({pdfManager:X,xref:this.xref,pageIndex:P,pageDict:Q,ref:Y,globalIdFactory:this._globalIdFactory,fontCache:q.fontCache,builtInCMapCache:q.builtInCMapCache,standardFontDataCache:q.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:q.globalImageCache,systemFontCache:q.systemFontCache,nonBlendModesSet:q.nonBlendModesSet,xfaFactory:null})),this.#Z.set(P,W)}q.setActualNumPages(G.size)}}async fontFallback(Z,q){let{catalog:X,pdfManager:z}=this;for(let R of await Promise.all(X.fontCache))if(R.loadedName===Z)return void R.fallback(q,z.evaluatorOptions)}async cleanup(Z=!1){return this.catalog?this.catalog.cleanup(Z):LX()}async#P(Z,q,X,z,R,G,P){let{xref:Q}=this;if(!(X instanceof P1)||G.has(X))return;G.put(X);let Y=await Q.fetchAsync(X);if(!(Y instanceof S))return;let W=await Y.getAsync("Subtype");if(W=W instanceof t?W.name:null,W==="Link")return;if(Y.has("T")){let _=E1(await Y.getAsync("T"));Z=Z===""?_:`${Z}.${_}`}else{let _=Y;for(;;){if(_=_.getRaw("Parent")||q,_ instanceof P1){if(G.has(_))break;_=await Q.fetchAsync(_)}if(!(_ instanceof S))break;if(_.has("T")){let J=E1(await _.getAsync("T"));Z=Z===""?J:`${Z}.${J}`;break}}}if(q&&!Y.has("Parent")&&Q8(Y.get("Subtype"),"Widget")&&P.put(X,q),z.has(Z)||z.set(Z,[]),z.get(Z).push(Z4.create(Q,X,R,null,!0,P,null,null).then((_)=>_?.getFieldObject()).catch(function(_){return v(`#collectFieldObjects: "${_}".`),null})),!Y.has("Kids"))return;let $=await Y.getAsync("Kids");if(Array.isArray($))for(let _ of $)await this.#P(Z,X,_,z,R,G,P)}get fieldObjects(){return X1(this,"fieldObjects",this.pdfManager.ensureDoc("formInfo").then(async(Z)=>{if(!Z.hasFields)return null;let q=await this.annotationGlobals;if(!q)return null;let{acroForm:X}=q,z=new U8,R=Object.create(null),G=new Map,P=new t8;for(let Y of X.get("Fields"))await this.#P("",null,Y,G,q,z,P);let Q=[];for(let[Y,W]of G)Q.push(Promise.all(W).then(($)=>{($=$.filter((_)=>!!_)).length>0&&(R[Y]=$)}));return await Promise.all(Q),{allFields:qX(R)>0?R:null,orphanFields:P}}))}get hasJSActions(){return X1(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){let[Z,q]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!Z||!!q?.allFields&&Object.values(q.allFields).some((X)=>X.some((z)=>z.actions!==null))}get calculationOrderIds(){let Z=this.catalog.acroForm?.get("CO");if(!Array.isArray(Z)||Z.length===0)return X1(this,"calculationOrderIds",null);let q=[];for(let X of Z)X instanceof P1&&q.push(X.toString());return X1(this,"calculationOrderIds",q.length?q:null)}get annotationGlobals(){return X1(this,"annotationGlobals",Z4.createGlobals(this.pdfManager))}}class zz{constructor({docBaseUrl:Z,docId:q,enableXfa:X,evaluatorOptions:z,handler:R,password:G}){this._docBaseUrl=function(Q){if(Q){let Y=j3(Q);if(Y)return Y.href;v(`Invalid absolute docBaseUrl: "${Q}".`)}return null}(Z),this._docId=q,this._password=G,this.enableXfa=X,z.isOffscreenCanvasSupported&&=Z0.isOffscreenCanvasSupported,z.isImageDecoderSupported&&=Z0.isImageDecoderSupported,this.evaluatorOptions=Object.freeze(z),Q0.setOptions(z),v6.setOptions(z),O8.setOptions(z);let P={...z,handler:R};i7.setOptions(P),M4.setOptions(P),C7.setOptions(P)}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}ensureDoc(Z,q){return this.ensure(this.pdfDocument,Z,q)}ensureXRef(Z,q){return this.ensure(this.pdfDocument.xref,Z,q)}ensureCatalog(Z,q){return this.ensure(this.pdfDocument.catalog,Z,q)}getPage(Z){return this.pdfDocument.getPage(Z)}fontFallback(Z,q){return this.pdfDocument.fontFallback(Z,q)}cleanup(Z=!1){return this.pdfDocument.cleanup(Z)}async ensure(Z,q,X){y1("Abstract method `ensure` called")}requestRange(Z,q){y1("Abstract method `requestRange` called")}requestLoadedStream(Z=!1){y1("Abstract method `requestLoadedStream` called")}sendProgressiveData(Z){y1("Abstract method `sendProgressiveData` called")}updatePassword(Z){this._password=Z}terminate(Z){y1("Abstract method `terminate` called")}}function BG(){}function K0(Z){if(Z instanceof p8||Z instanceof k7||Z instanceof L7||Z instanceof iz||Z instanceof g9)return Z;switch(Z instanceof Error||typeof Z=="object"&&Z!==null||y1('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),Z.name){case"AbortException":return new p8(Z.message);case"InvalidPDFException":return new k7(Z.message);case"PasswordException":return new L7(Z.message,Z.code);case"ResponseException":return new iz(Z.message,Z.status,Z.missing);case"UnknownErrorException":return new g9(Z.message,Z.details)}return new g9(Z.message,Z.toString())}async function jG(Z,q,X,{encrypt:z=null}){let R=z?.createCipherTransform(Z.num,Z.gen);X.push(`${Z.num} ${Z.gen} obj
|
|
12
|
-
`),q instanceof S?await N9(q,X,R):q instanceof C1?await Gf(q,X,R):(Array.isArray(q)||ArrayBuffer.isView(q))&&await Pf(q,X,R),X.push(`
|
|
13
|
-
endobj
|
|
14
|
-
`)}async function N9(Z,q,X){q.push("<<");for(let z of Z.getKeys())q.push(` /${XX(z)} `),await Qf(Z.getRaw(z),q,X);q.push(">>")}async function Gf(Z,q,X){let z=Z.getBytes(),{dict:R}=Z,[G,P]=await Promise.all([R.getAsync("Filter"),R.getAsync("DecodeParms")]),Q=Q8(Array.isArray(G)?await R.xref.fetchIfRefAsync(G[0]):G,"FlateDecode");if(z.length>=256||Q)try{let W=new CompressionStream("deflate"),$=W.writable.getWriter();await $.ready,$.write(z).then(async()=>{await $.ready,await $.close()}).catch(()=>{});let _=await new Response(W.readable).arrayBuffer(),J,U;z=new Uint8Array(_),G?Q||(J=Array.isArray(G)?[t.get("FlateDecode"),...G]:[t.get("FlateDecode"),G],P&&(U=Array.isArray(P)?[null,...P]:[null,P])):J=t.get("FlateDecode"),J&&R.set("Filter",J),U&&R.set("DecodeParms",U)}catch(W){v1(`writeStream - cannot compress data: "${W}".`)}let Y=$0(z);X&&(Y=X.encryptString(Y)),R.set("Length",Y.length),await N9(R,q,X),q.push(` stream
|
|
15
|
-
`,Y,`
|
|
16
|
-
endstream`)}async function Pf(Z,q,X){q.push("[");let z=!0;for(let R of Z)z?z=!1:q.push(" "),await Qf(R,q,X);q.push("]")}async function Qf(Z,q,X){Z instanceof t?q.push(`/${XX(Z.name)}`):Z instanceof P1?q.push(`${Z.num} ${Z.gen} R`):Array.isArray(Z)||ArrayBuffer.isView(Z)?await Pf(Z,q,X):typeof Z=="string"?(X&&(Z=X.encryptString(Z)),q.push(`(${j6(Z)})`)):typeof Z=="number"?q.push(O1(Z)):typeof Z=="boolean"?q.push(Z.toString()):Z instanceof S?await N9(Z,q,X):Z instanceof C1?await Gf(Z,q,X):Z===null?q.push("null"):v(`Unhandled value in writer: ${typeof Z}, please file a bug.`)}function fZ(Z,q,X,z){for(let R=q+X-1;R>X-1;R--)z[R]=255&Z,Z>>=8;return X+q}function Yf(Z,q,X){let z=Z.length;for(let R=0;R<z;R++)X[q+R]=255&Z.charCodeAt(R);return q+z}function ZH({xfaData:Z,xfaDatasetsRef:q,changes:X,xref:z}){if(Z===null)Z=function(G,P){let Q=new Z2({hasAttributes:!0}).parseFromString(G);for(let{xfa:W}of P){if(!W)continue;let{path:$,value:_}=W;if(!$)continue;let J=AP($),U=Q.documentElement.searchNode(J,0);!U&&J.length>1&&(U=Q.documentElement.searchNode([J.at(-1)],0)),U?U.childNodes=Array.isArray(_)?_.map((f)=>new J6("value",f)):[new J6("#text",_)]:v(`Node not found for path: ${$}`)}let Y=[];return Q.documentElement.dump(Y),Y.join("")}(z.fetchIfRef(q).getString(),X);let R=new o8(Z);R.dict=new S(z),R.dict.setIfName("Type","EmbeddedFile"),X.put(q,{data:R})}function VG(Z){let q=[];for(let{ref:X}of Z)X.num===q.at(-2)+q.at(-1)?q[q.length-1]+=1:q.push(X.num,1);return q}function HG(Z,q,X){if(Array.isArray(q.fileIds)&&q.fileIds.length>0){let z=function(R,G){let P=Math.floor(Date.now()/1000),Q=G.filename||"",Y=[P.toString(),Q,R.toString(),...G.infoMap.values()],W=Math.sumPrecise(Y.map((J)=>J.length)),$=new Uint8Array(W),_=0;for(let J of Y)_=Yf(J,_,$);return $0(w4($,0,$.length))}(Z,q);X.set("ID",[q.fileIds[0],z])}}async function qH({originalData:Z,xrefInfo:q,changes:X,xref:z=null,hasXfa:R=!1,xfaDatasetsRef:G=null,hasXfaDatasetsEntry:P=!1,needAppearances:Q,acroFormRef:Y=null,acroForm:W=null,xfaData:$=null,useXrefStream:_=!1}){await async function({xref:x,acroForm:M,acroFormRef:H,hasXfa:A,hasXfaDatasetsEntry:T,xfaDatasetsRef:k,needAppearances:y,changes:O}){if(!A||T||k||v("XFA - Cannot save it"),!y&&(!A||!k||T))return;let D=M.clone();if(A&&!T){let n=M.get("XFA").slice();n.splice(2,0,"datasets"),n.splice(3,0,k),D.set("XFA",n)}y&&D.set("NeedAppearances",!0),O.put(H,{data:D})}({xref:z,acroForm:W,acroFormRef:Y,hasXfa:R,hasXfaDatasetsEntry:P,xfaDatasetsRef:G,needAppearances:Q,changes:X}),R&&ZH({xfaData:$,xfaDatasetsRef:G,changes:X,xref:z});let J=function(x,M,H){let A=new S(null);A.set("Prev",x.startXRef);let T=x.newRef;return H?(M.put(T,{data:""}),A.set("Size",T.num+1),A.setIfName("Type","XRef")):A.set("Size",T.num),x.rootRef!==null&&A.set("Root",x.rootRef),x.infoRef!==null&&A.set("Info",x.infoRef),x.encryptRef!==null&&A.set("Encrypt",x.encryptRef),A}(q,X,_),U=[],f=await async function(x,M,H=[]){let A=[];for(let[T,{data:k}]of x.items())k!==null&&typeof k!="string"?(await jG(T,k,H,M),A.push({ref:T,data:H.join("")}),H.length=0):A.push({ref:T,data:k});return A.sort((T,k)=>T.ref.num-k.ref.num)}(X,z,U),K=Z.length,I=Z.at(-1);I!==10&&I!==13&&(U.push(`
|
|
17
|
-
`),K+=1);for(let{data:x}of f)x!==null&&U.push(x);await(_?async function(x,M,H,A,T){let k=[],y=0,O=0;for(let{ref:L,data:m}of H){let d;y=Math.max(y,M),m!==null?(d=Math.min(L.gen,65535),k.push([1,M,d]),M+=m.length):(d=Math.min(L.gen+1,65535),k.push([0,0,d])),O=Math.max(O,d)}A.set("Index",VG(H));let D=[1,qR(y),qR(O)];A.set("W",D),HG(M,x,A);let n=Math.sumPrecise(D),b=new Uint8Array(n*k.length),l=new W8(b);l.dict=A;let N=0;for(let[L,m,d]of k)N=fZ(L,D[0],N,b),N=fZ(m,D[1],N,b),N=fZ(d,D[2],N,b);await jG(x.newRef,l,T,{}),T.push(`startxref
|
|
18
|
-
`,M.toString(),`
|
|
19
|
-
%%EOF
|
|
20
|
-
`)}(q,K,f,J,U):async function(x,M,H,A,T){T.push(`xref
|
|
21
|
-
`);let k=VG(H),y=0;for(let{ref:O,data:D}of H)O.num===k[y]&&(T.push(`${k[y]} ${k[y+1]}
|
|
22
|
-
`),y+=2),D!==null?(T.push(`${M.toString().padStart(10,"0")} ${Math.min(O.gen,65535).toString().padStart(5,"0")} n\r
|
|
23
|
-
`),M+=D.length):T.push(`0000000000 ${Math.min(O.gen+1,65535).toString().padStart(5,"0")} f\r
|
|
24
|
-
`);HG(M,x,A),T.push(`trailer
|
|
25
|
-
`),await N9(A,T),T.push(`
|
|
26
|
-
startxref
|
|
27
|
-
`,M.toString(),`
|
|
28
|
-
%%EOF
|
|
29
|
-
`)}(q,K,f,J,U));let B=Z.length+Math.sumPrecise(U.map((x)=>x.length)),j=new Uint8Array(B);j.set(Z);let V=Z.length;for(let x of U)V=Yf(x,V,j);return j}class Wf{constructor(Z){this._msgHandler=Z,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return t1(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new $f(this._msgHandler),this._fullRequestReader}getRangeReader(Z,q){let X=new _f(Z,q,this._msgHandler);return this._rangeRequestReaders.push(X),X}cancelAllRequests(Z){this._fullRequestReader?.cancel(Z);for(let q of this._rangeRequestReaders.slice(0))q.cancel(Z)}}class $f{constructor(Z){this._msgHandler=Z,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;let q=this._msgHandler.sendWithStream("GetReader");this._reader=q.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((X)=>{this._isStreamingSupported=X.isStreamingSupported,this._isRangeSupported=X.isRangeSupported,this._contentLength=X.contentLength})}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){let{value:Z,done:q}=await this._reader.read();return q?{value:void 0,done:!0}:{value:Z.buffer,done:!1}}cancel(Z){this._reader.cancel(Z)}}class _f{constructor(Z,q,X){this._msgHandler=X,this.onProgress=null;let z=this._msgHandler.sendWithStream("GetRangeReader",{begin:Z,end:q});this._reader=z.getReader()}get isStreamingSupported(){return!1}async read(){let{value:Z,done:q}=await this._reader.read();return q?{value:void 0,done:!0}:{value:Z.buffer,done:!1}}cancel(Z){this._reader.cancel(Z)}}class W4{constructor(Z){this.name=Z,this.terminated=!1,this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw Error("Worker task was terminated")}}function IH(Z){Number.isInteger(Z)&&(C9=Z)}function jH(){return C9}function F9(Z){C9>=G2.INFOS&&console.info(`Info: ${Z}`)}function p1(Z){C9>=G2.WARNINGS&&console.warn(`Warning: ${Z}`)}function z8(Z){throw Error(Z)}function o1(Z,q){Z||z8(q)}function Gz(Z,q=null,X=null){if(!Z)return null;if(X&&typeof Z=="string"){if(X.addDefaultProtocol&&Z.startsWith("www."))Z.match(/\./g)?.length>=2&&(Z=`http://${Z}`);if(X.tryConvertEncoding)try{Z=decodeURIComponent(escape(Z))}catch{}}let z=q?URL.parse(Z,q):URL.parse(Z);return function(R){switch(R?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(z)?z:null}function Pz(Z,q,X=!1){let z=URL.parse(Z);return z?(z.hash=q,z.href):X&&Gz(Z,"http://example.com")?Z.split("#",1)[0]+(q?`#${q}`:""):""}function D1(Z,q,X,z=!1){return Object.defineProperty(Z,q,{value:X,enumerable:!z,configurable:!0,writable:!1}),X}function If(Z){typeof Z=="object"&&Z?.length!==void 0||z8("Invalid argument for bytesToString");let q=Z.length,X=8192;if(q<X)return String.fromCharCode.apply(null,Z);let z=[];for(let R=0;R<q;R+=X){let G=Math.min(R+X,q),P=Z.subarray(R,G);z.push(String.fromCharCode.apply(null,P))}return z.join("")}function P2(Z){typeof Z!="string"&&z8("Invalid argument for stringToBytes");let q=Z.length,X=new Uint8Array(q);for(let z=0;z<q;++z)X[z]=255&Z.charCodeAt(z);return X}class T8{static get isLittleEndian(){return D1(this,"isLittleEndian",function(){let Z=new Uint8Array(4);return Z[0]=1,new Uint32Array(Z.buffer,0,1)[0]===1}())}static get isEvalSupported(){return D1(this,"isEvalSupported",function(){try{return Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return D1(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return D1(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){let{platform:Z,userAgent:q}=navigator;return D1(this,"platform",{isAndroid:q.includes("Android"),isLinux:Z.includes("Linux"),isMac:Z.includes("Mac"),isWindows:Z.includes("Win"),isFirefox:q.includes("Firefox")})}static get isCSSRoundSupported(){return D1(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}class j1{static makeHexColor(Z,q,X){return`#${IZ[Z]}${IZ[q]}${IZ[X]}`}static domMatrixToTransform(Z){return[Z.a,Z.b,Z.c,Z.d,Z.e,Z.f]}static scaleMinMax(Z,q){let X;Z[0]?(Z[0]<0&&(X=q[0],q[0]=q[2],q[2]=X),q[0]*=Z[0],q[2]*=Z[0],Z[3]<0&&(X=q[1],q[1]=q[3],q[3]=X),q[1]*=Z[3],q[3]*=Z[3]):(X=q[0],q[0]=q[1],q[1]=X,X=q[2],q[2]=q[3],q[3]=X,Z[1]<0&&(X=q[1],q[1]=q[3],q[3]=X),q[1]*=Z[1],q[3]*=Z[1],Z[2]<0&&(X=q[0],q[0]=q[2],q[2]=X),q[0]*=Z[2],q[2]*=Z[2]),q[0]+=Z[4],q[1]+=Z[5],q[2]+=Z[4],q[3]+=Z[5]}static transform(Z,q){return[Z[0]*q[0]+Z[2]*q[1],Z[1]*q[0]+Z[3]*q[1],Z[0]*q[2]+Z[2]*q[3],Z[1]*q[2]+Z[3]*q[3],Z[0]*q[4]+Z[2]*q[5]+Z[4],Z[1]*q[4]+Z[3]*q[5]+Z[5]]}static multiplyByDOMMatrix(Z,q){return[Z[0]*q.a+Z[2]*q.b,Z[1]*q.a+Z[3]*q.b,Z[0]*q.c+Z[2]*q.d,Z[1]*q.c+Z[3]*q.d,Z[0]*q.e+Z[2]*q.f+Z[4],Z[1]*q.e+Z[3]*q.f+Z[5]]}static applyTransform(Z,q,X=0){let z=Z[X],R=Z[X+1];Z[X]=z*q[0]+R*q[2]+q[4],Z[X+1]=z*q[1]+R*q[3]+q[5]}static applyTransformToBezier(Z,q,X=0){let z=q[0],R=q[1],G=q[2],P=q[3],Q=q[4],Y=q[5];for(let W=0;W<6;W+=2){let $=Z[X+W],_=Z[X+W+1];Z[X+W]=$*z+_*G+Q,Z[X+W+1]=$*R+_*P+Y}}static applyInverseTransform(Z,q){let X=Z[0],z=Z[1],R=q[0]*q[3]-q[1]*q[2];Z[0]=(X*q[3]-z*q[2]+q[2]*q[5]-q[4]*q[3])/R,Z[1]=(-X*q[1]+z*q[0]+q[4]*q[1]-q[5]*q[0])/R}static axialAlignedBoundingBox(Z,q,X){let z=q[0],R=q[1],G=q[2],P=q[3],Q=q[4],Y=q[5],W=Z[0],$=Z[1],_=Z[2],J=Z[3],U=z*W+Q,f=U,K=z*_+Q,I=K,B=P*$+Y,j=B,V=P*J+Y,x=V;if(R!==0||G!==0){let M=R*W,H=R*_,A=G*$,T=G*J;U+=A,I+=A,K+=T,f+=T,B+=M,x+=M,V+=H,j+=H}X[0]=Math.min(X[0],U,K,f,I),X[1]=Math.min(X[1],B,V,j,x),X[2]=Math.max(X[2],U,K,f,I),X[3]=Math.max(X[3],B,V,j,x)}static inverseTransform(Z){let q=Z[0]*Z[3]-Z[1]*Z[2];return[Z[3]/q,-Z[1]/q,-Z[2]/q,Z[0]/q,(Z[2]*Z[5]-Z[4]*Z[3])/q,(Z[4]*Z[1]-Z[5]*Z[0])/q]}static singularValueDecompose2dScale(Z,q){let X=Z[0],z=Z[1],R=Z[2],G=Z[3],P=X**2+z**2,Q=X*R+z*G,Y=R**2+G**2,W=(P+Y)/2,$=Math.sqrt(W**2-(P*Y-Q**2));q[0]=Math.sqrt(W+$||1),q[1]=Math.sqrt(W-$||1)}static normalizeRect(Z){let q=Z.slice(0);return Z[0]>Z[2]&&(q[0]=Z[2],q[2]=Z[0]),Z[1]>Z[3]&&(q[1]=Z[3],q[3]=Z[1]),q}static intersect(Z,q){let X=Math.max(Math.min(Z[0],Z[2]),Math.min(q[0],q[2])),z=Math.min(Math.max(Z[0],Z[2]),Math.max(q[0],q[2]));if(X>z)return null;let R=Math.max(Math.min(Z[1],Z[3]),Math.min(q[1],q[3])),G=Math.min(Math.max(Z[1],Z[3]),Math.max(q[1],q[3]));return R>G?null:[X,R,z,G]}static pointBoundingBox(Z,q,X){X[0]=Math.min(X[0],Z),X[1]=Math.min(X[1],q),X[2]=Math.max(X[2],Z),X[3]=Math.max(X[3],q)}static rectBoundingBox(Z,q,X,z,R){R[0]=Math.min(R[0],Z,X),R[1]=Math.min(R[1],q,z),R[2]=Math.max(R[2],Z,X),R[3]=Math.max(R[3],q,z)}static#Z(Z,q,X,z,R,G,P,Q,Y,W){if(Y<=0||Y>=1)return;let $=1-Y,_=Y*Y,J=_*Y,U=$*($*($*Z+3*Y*q)+3*_*X)+J*z,f=$*($*($*R+3*Y*G)+3*_*P)+J*Q;W[0]=Math.min(W[0],U),W[1]=Math.min(W[1],f),W[2]=Math.max(W[2],U),W[3]=Math.max(W[3],f)}static#q(Z,q,X,z,R,G,P,Q,Y,W,$,_){if(Math.abs(Y)<0.000000000001)return void(Math.abs(W)>=0.000000000001&&this.#Z(Z,q,X,z,R,G,P,Q,-$/W,_));let J=W**2-4*$*Y;if(J<0)return;let U=Math.sqrt(J),f=2*Y;this.#Z(Z,q,X,z,R,G,P,Q,(-W+U)/f,_),this.#Z(Z,q,X,z,R,G,P,Q,(-W-U)/f,_)}static bezierBoundingBox(Z,q,X,z,R,G,P,Q,Y){Y[0]=Math.min(Y[0],Z,P),Y[1]=Math.min(Y[1],q,Q),Y[2]=Math.max(Y[2],Z,P),Y[3]=Math.max(Y[3],q,Q),this.#q(Z,X,R,P,q,z,G,Q,3*(3*(X-R)-Z+P),6*(Z-2*X+R),3*(X-Z),Y),this.#q(Z,X,R,P,q,z,G,Q,3*(3*(z-G)-q+Q),6*(q-2*z+G),3*(z-q),Y)}}function jf(Z){return jZ||(jZ=/([\u00a0\u00b5\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+)/gu,AG=new Map([["ſt","ſt"]])),Z.replaceAll(jZ,(q,X,z)=>X?X.normalize("NFKC"):AG.get(z))}function Qz(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();let Z=new Uint8Array(32);return crypto.getRandomValues(Z),If(Z)}function l8(Z,q,X){return Math.min(Math.max(Z,q),X)}function Vf(Z){return Uint8Array.prototype.toBase64?Z.toBase64():btoa(If(Z))}class r7{static textContent(Z){let q=[],X={items:q,styles:Object.create(null)};return function z(R){if(!R)return;let G=null,P=R.name;if(P==="#text")G=R.value;else{if(!r7.shouldBuildText(P))return;R?.attributes?.textContent?G=R.attributes.textContent:R.value&&(G=R.value)}if(G!==null&&q.push({str:G}),R.children)for(let Q of R.children)z(Q)}(Z),X}static shouldBuildText(Z){return!(Z==="textarea"||Z==="input"||Z==="option"||Z==="select")}}class v9{static setupStorage(Z,q,X,z,R){let G=z.getValue(q,{value:null});switch(X.name){case"textarea":if(G.value!==null&&(Z.textContent=G.value),R==="print")break;Z.addEventListener("input",(P)=>{z.setValue(q,{value:P.target.value})});break;case"input":if(X.attributes.type==="radio"||X.attributes.type==="checkbox"){if(G.value===X.attributes.xfaOn?Z.setAttribute("checked",!0):G.value===X.attributes.xfaOff&&Z.removeAttribute("checked"),R==="print")break;Z.addEventListener("change",(P)=>{z.setValue(q,{value:P.target.checked?P.target.getAttribute("xfaOn"):P.target.getAttribute("xfaOff")})})}else{if(G.value!==null&&Z.setAttribute("value",G.value),R==="print")break;Z.addEventListener("input",(P)=>{z.setValue(q,{value:P.target.value})})}break;case"select":if(G.value!==null){Z.setAttribute("value",G.value);for(let P of X.children)P.attributes.value===G.value?P.attributes.selected=!0:P.attributes.hasOwnProperty("selected")&&delete P.attributes.selected}Z.addEventListener("input",(P)=>{let Q=P.target.options,Y=Q.selectedIndex===-1?"":Q[Q.selectedIndex].value;z.setValue(q,{value:Y})})}}static setAttributes({html:Z,element:q,storage:X=null,intent:z,linkService:R}){let{attributes:G}=q,P=Z instanceof HTMLAnchorElement;G.type==="radio"&&(G.name=`${G.name}-${z}`);for(let[Q,Y]of Object.entries(G))if(Y!=null)switch(Q){case"class":Y.length&&Z.setAttribute(Q,Y.join(" "));break;case"dataId":break;case"id":Z.setAttribute("data-element-id",Y);break;case"style":Object.assign(Z.style,Y);break;case"textContent":Z.textContent=Y;break;default:(!P||Q!=="href"&&Q!=="newWindow")&&Z.setAttribute(Q,Y)}P&&R.addLinkAttributes(Z,G.href,G.newWindow),X&&G.dataId&&this.setupStorage(Z,G.dataId,q,X)}static render(Z){let{annotationStorage:q,linkService:X,xfaHtml:z}=Z,R=Z.intent||"display",G=document.createElement(z.name);z.attributes&&this.setAttributes({html:G,element:z,intent:R,linkService:X});let P=R!=="richText",Q=Z.div;if(Q.append(G),Z.viewport){let $=`matrix(${Z.viewport.transform.join(",")})`;Q.style.transform=$}P&&Q.setAttribute("class","xfaLayer xfaFont");let Y=[];if(z.children.length===0){if(z.value){let $=document.createTextNode(z.value);G.append($),P&&r7.shouldBuildText(z.name)&&Y.push($)}return{textDivs:Y}}let W=[[z,-1,G]];for(;W.length>0;){let[$,_,J]=W.at(-1);if(_+1===$.children.length){W.pop();continue}let U=$.children[++W.at(-1)[1]];if(U===null)continue;let{name:f}=U;if(f==="#text"){let I=document.createTextNode(U.value);Y.push(I),J.append(I);continue}let K=U?.attributes?.xmlns?document.createElementNS(U.attributes.xmlns,f):document.createElement(f);if(J.append(K),U.attributes&&this.setAttributes({html:K,element:U,storage:q,intent:R,linkService:X}),U.children?.length>0)W.push([U,-1,K]);else if(U.value){let I=document.createTextNode(U.value);P&&r7.shouldBuildText(f)&&Y.push(I),K.append(I)}}for(let $ of Q.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))$.setAttribute("readOnly",!0);return{textDivs:Y}}static update(Z){let q=`matrix(${Z.viewport.transform.join(",")})`;Z.div.style.transform=q,Z.div.hidden=!1}}async function y6(Z,q="text"){if(Q7(Z,document.baseURI)){let X=await fetch(Z);if(!X.ok)throw Error(X.statusText);switch(q){case"arraybuffer":return X.arrayBuffer();case"blob":return X.blob();case"json":return X.json()}return X.text()}return new Promise((X,z)=>{let R=new XMLHttpRequest;R.open("GET",Z,!0),R.responseType=q,R.onreadystatechange=()=>{if(R.readyState===XMLHttpRequest.DONE)if(R.status!==200&&R.status!==0)z(Error(R.statusText));else{switch(q){case"arraybuffer":case"blob":case"json":return void X(R.response)}X(R.responseText)}},R.send(null)})}class Q2{constructor({viewBox:Z,userUnit:q,scale:X,rotation:z,offsetX:R=0,offsetY:G=0,dontFlip:P=!1}){this.viewBox=Z,this.userUnit=q,this.scale=X,this.rotation=z,this.offsetX=R,this.offsetY=G,X*=q;let Q=(Z[2]+Z[0])/2,Y=(Z[3]+Z[1])/2,W,$,_,J,U,f,K,I;switch((z%=360)<0&&(z+=360),z){case 180:W=-1,$=0,_=0,J=1;break;case 90:W=0,$=1,_=1,J=0;break;case 270:W=0,$=-1,_=-1,J=0;break;case 0:W=1,$=0,_=0,J=-1;break;default:throw Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}P&&(_=-_,J=-J),W===0?(U=Math.abs(Y-Z[1])*X+R,f=Math.abs(Q-Z[0])*X+G,K=(Z[3]-Z[1])*X,I=(Z[2]-Z[0])*X):(U=Math.abs(Q-Z[0])*X+R,f=Math.abs(Y-Z[1])*X+G,K=(Z[2]-Z[0])*X,I=(Z[3]-Z[1])*X),this.transform=[W*X,$*X,_*X,J*X,U-W*X*Q-_*X*Y,f-$*X*Q-J*X*Y],this.width=K,this.height=I}get rawDims(){let Z=this.viewBox;return D1(this,"rawDims",{pageWidth:Z[2]-Z[0],pageHeight:Z[3]-Z[1],pageX:Z[0],pageY:Z[1]})}clone({scale:Z=this.scale,rotation:q=this.rotation,offsetX:X=this.offsetX,offsetY:z=this.offsetY,dontFlip:R=!1}={}){return new Q2({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:Z,rotation:q,offsetX:X,offsetY:z,dontFlip:R})}convertToViewportPoint(Z,q){let X=[Z,q];return j1.applyTransform(X,this.transform),X}convertToViewportRectangle(Z){let q=[Z[0],Z[1]];j1.applyTransform(q,this.transform);let X=[Z[2],Z[3]];return j1.applyTransform(X,this.transform),[q[0],q[1],X[0],X[1]]}convertToPdfPoint(Z,q){let X=[Z,q];return j1.applyInverseTransform(X,this.transform),X}}function W2(Z){let q=Z.length,X=0;for(;X<q&&Z[X].trim()==="";)X++;return Z.substring(X,X+5).toLowerCase()==="data:"}function b9(Z){return typeof Z=="string"&&/\.pdf$/i.test(Z)}function Hf(Z){return[Z]=Z.split(/[#?]/,1),Z.substring(Z.lastIndexOf("/")+1)}function xf(Z,q="document.pdf"){if(typeof Z!="string")return q;if(W2(Z))return p1('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),q;let X=((P)=>{try{return new URL(P)}catch{try{return new URL(decodeURIComponent(P))}catch{try{return new URL(P,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(P),"https://foo.bar")}catch{return null}}}}})(Z);if(!X)return q;let z=(P)=>{try{let Q=decodeURIComponent(P);return Q.includes("/")?(Q=Q.split("/").at(-1),Q.test(/^\.pdf$/i)?Q:P):Q}catch{return P}},R=/\.pdf$/i,G=X.pathname.split("/").at(-1);if(R.test(G))return z(G);if(X.searchParams.size>0){let P=Array.from(X.searchParams.values()).reverse();for(let Y of P)if(R.test(Y))return z(Y);let Q=Array.from(X.searchParams.keys()).reverse();for(let Y of Q)if(R.test(Y))return z(Y)}if(X.hash){let P=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(X.hash);if(P)return z(P[0])}return q}class pq{started=Object.create(null);times=[];time(Z){Z in this.started&&p1(`Timer is already running for ${Z}`),this.started[Z]=Date.now()}timeEnd(Z){Z in this.started||p1(`Timer has not been started for ${Z}`),this.times.push({name:Z,start:this.started[Z],end:Date.now()}),delete this.started[Z]}toString(){let Z=[],q=0;for(let{name:X}of this.times)q=Math.max(X.length,q);for(let{name:X,start:z,end:R}of this.times)Z.push(`${X.padEnd(q)} ${R-z}ms
|
|
30
|
-
`);return Z.join("")}}function Q7(Z,q){let X=q?URL.parse(Z,q):URL.parse(Z);return X?.protocol==="http:"||X?.protocol==="https:"}function A0(Z){Z.preventDefault()}function J8(Z){Z.preventDefault(),Z.stopPropagation()}class l7{static#Z;static toDateObject(Z){if(Z instanceof Date)return Z;if(!Z||typeof Z!="string")return null;this.#Z||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");let q=this.#Z.exec(Z);if(!q)return null;let X=parseInt(q[1],10),z=parseInt(q[2],10);z=z>=1&&z<=12?z-1:0;let R=parseInt(q[3],10);R=R>=1&&R<=31?R:1;let G=parseInt(q[4],10);G=G>=0&&G<=23?G:0;let P=parseInt(q[5],10);P=P>=0&&P<=59?P:0;let Q=parseInt(q[6],10);Q=Q>=0&&Q<=59?Q:0;let Y=q[7]||"Z",W=parseInt(q[8],10);W=W>=0&&W<=23?W:0;let $=parseInt(q[9],10)||0;return $=$>=0&&$<=59?$:0,Y==="-"?(G+=W,P+=$):Y==="+"&&(G-=W,P-=$),new Date(Date.UTC(X,z,R,G,P,Q))}}function Mf(Z,{scale:q=1,rotation:X=0}){let{width:z,height:R}=Z.attributes.style,G=[0,0,parseInt(z),parseInt(R)];return new Q2({viewBox:G,userUnit:1,scale:q,rotation:X})}function C6(Z){if(Z.startsWith("#")){let q=parseInt(Z.slice(1),16);return[(16711680&q)>>16,(65280&q)>>8,255&q]}return Z.startsWith("rgb(")?Z.slice(4,-1).split(",").map((q)=>parseInt(q)):Z.startsWith("rgba(")?Z.slice(5,-1).split(",").map((q)=>parseInt(q)).slice(0,3):(p1(`Not a valid color format: "${Z}"`),[0,0,0])}function _8(Z){let{a:q,b:X,c:z,d:R,e:G,f:P}=Z.getTransform();return[q,X,z,R,G,P]}function h0(Z){let{a:q,b:X,c:z,d:R,e:G,f:P}=Z.getTransform().invertSelf();return[q,X,z,R,G,P]}function i4(Z,q,X=!1,z=!0){if(q instanceof Q2){let{pageWidth:R,pageHeight:G}=q.rawDims,{style:P}=Z,Q=T8.isCSSRoundSupported,Y=`var(--total-scale-factor) * ${R}px`,W=`var(--total-scale-factor) * ${G}px`,$=Q?`round(down, ${Y}, var(--scale-round-x))`:`calc(${Y})`,_=Q?`round(down, ${W}, var(--scale-round-y))`:`calc(${W})`;X&&q.rotation%180!=0?(P.width=_,P.height=$):(P.width=$,P.height=_)}z&&Z.setAttribute("data-main-rotation",q.rotation)}class u0{constructor(){let{pixelRatio:Z}=u0;this.sx=Z,this.sy=Z}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(Z,q,X,z,R=-1){let G=1/0,P=1/0,Q=1/0;(X=u0.capPixels(X,R))>0&&(G=Math.sqrt(X/(Z*q))),z!==-1&&(P=z/Z,Q=z/q);let Y=Math.min(G,P,Q);return(this.sx>Y||this.sy>Y)&&(this.sx=Y,this.sy=Y,!0)}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(Z,q){if(q>=0){let X=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+q/100));return Z>0?Math.min(Z,X):X}return Z}}class Af{static get isDarkMode(){return D1(this,"isDarkMode",!!window?.matchMedia?.("(prefers-color-scheme: dark)").matches)}}class Wz{static get commentForegroundColor(){let Z=document.createElement("span");Z.classList.add("comment","sidebar");let{style:q}=Z;q.width=q.height="0",q.display="none",q.color="var(--comment-fg-color)",document.body.append(Z);let{color:X}=window.getComputedStyle(Z);return Z.remove(),D1(this,"commentForegroundColor",C6(X))}}function Lf(Z,q,X,z){let R=255*(1-(z=Math.min(Math.max(z??1,0),1)));return[Z=Math.round(Z*z+R),q=Math.round(q*z+R),X=Math.round(X*z+R)]}function LG(Z,q){let X=Z[0]/255,z=Z[1]/255,R=Z[2]/255,G=Math.max(X,z,R),P=Math.min(X,z,R),Q=(G+P)/2;if(G===P)q[0]=q[1]=0;else{let Y=G-P;switch(q[1]=Q<0.5?Y/(G+P):Y/(2-G-P),G){case X:q[0]=60*((z-R)/Y+(z<R?6:0));break;case z:q[0]=60*((R-X)/Y+2);break;case R:q[0]=60*((X-z)/Y+4)}}q[2]=Q}function Dq(Z,q){let X=Z[0],z=Z[1],R=Z[2],G=(1-Math.abs(2*R-1))*z,P=G*(1-Math.abs(X/60%2-1)),Q=R-G/2;switch(Math.floor(X/60)){case 0:q[0]=G+Q,q[1]=P+Q,q[2]=Q;break;case 1:q[0]=P+Q,q[1]=G+Q,q[2]=Q;break;case 2:q[0]=Q,q[1]=G+Q,q[2]=P+Q;break;case 3:q[0]=Q,q[1]=P+Q,q[2]=G+Q;break;case 4:q[0]=P+Q,q[1]=Q,q[2]=G+Q;break;case 5:case 6:q[0]=G+Q,q[1]=Q,q[2]=P+Q}}function kG(Z){return Z<=0.03928?Z/12.92:((Z+0.055)/1.055)**2.4}function TG(Z,q,X){Dq(Z,X),X.map(kG);let z=0.2126*X[0]+0.7152*X[1]+0.0722*X[2];Dq(q,X),X.map(kG);let R=0.2126*X[0]+0.7152*X[1]+0.0722*X[2];return z>R?(z+0.05)/(R+0.05):(R+0.05)/(z+0.05)}function kf(Z,q){let X=Z[0]+256*Z[1]+65536*Z[2]+16777216*q[0]+4294967296*q[1]+1099511627776*q[2],z=NG.get(X);if(z)return z;let R=new Float32Array(9),G=R.subarray(0,3),P=R.subarray(3,6);LG(Z,P);let Q=R.subarray(6,9);LG(q,Q);let Y=Q[2]<0.5,W=Y?12:4.5;if(P[2]=Y?Math.sqrt(P[2]):1-Math.sqrt(1-P[2]),TG(P,Q,G)<W){let $,_;Y?($=P[2],_=1):($=0,_=P[2]);let J=0.005;for(;_-$>J;){let U=P[2]=($+_)/2;Y===TG(P,Q,G)<W?$=U:_=U}P[2]=Y?_:$}return Dq(P,G),z=j1.makeHexColor(Math.round(255*G[0]),Math.round(255*G[1]),Math.round(255*G[2])),NG.set(X,z),z}function $z({html:Z,dir:q,className:X},z){let R=document.createDocumentFragment();if(typeof Z=="string"){let G=document.createElement("p");G.dir=q||"auto";let P=Z.split(/(?:\r\n?|\n)/);for(let Q=0,Y=P.length;Q<Y;++Q){let W=P[Q];G.append(document.createTextNode(W)),Q<Y-1&&G.append(document.createElement("br"))}R.append(G)}else v9.render({xfaHtml:Z,div:R,intent:"richText"});R.firstChild.classList.add("richText",X),z.append(R)}class x7{#Z=null;#q=null;#z;#X=null;#R=null;#G=null;#Q=null;#P=null;static#Y=null;constructor(Z){this.#z=Z,x7.#Y||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){let Z=this.#Z=document.createElement("div");Z.classList.add("editToolbar","hidden"),Z.setAttribute("role","toolbar");let q=this.#z._uiManager._signal;q instanceof AbortSignal&&!q.aborted&&(Z.addEventListener("contextmenu",A0,{signal:q}),Z.addEventListener("pointerdown",x7.#W,{signal:q}));let X=this.#X=document.createElement("div");X.className="buttons",Z.append(X);let z=this.#z.toolbarPosition;if(z){let{style:R}=Z,G=this.#z._uiManager.direction==="ltr"?1-z[0]:z[0];R.insetInlineEnd=100*G+"%",R.top=`calc(${100*z[1]}% + var(--editor-toolbar-vert-offset))`}return Z}get div(){return this.#Z}static#W(Z){Z.stopPropagation()}#J(Z){this.#z._focusEventsAllowed=!1,J8(Z)}#_(Z){this.#z._focusEventsAllowed=!0,J8(Z)}#U(Z){let q=this.#z._uiManager._signal;return q instanceof AbortSignal&&!q.aborted&&(Z.addEventListener("focusin",this.#J.bind(this),{capture:!0,signal:q}),Z.addEventListener("focusout",this.#_.bind(this),{capture:!0,signal:q}),Z.addEventListener("contextmenu",A0,{signal:q}),!0)}hide(){this.#Z.classList.add("hidden"),this.#q?.hideDropdown()}show(){this.#Z.classList.remove("hidden"),this.#R?.shown(),this.#G?.shown()}addDeleteButton(){let{editorType:Z,_uiManager:q}=this.#z,X=document.createElement("button");X.classList.add("basic","deleteButton"),X.tabIndex=0,X.setAttribute("data-l10n-id",x7.#Y[Z]),this.#U(X)&&X.addEventListener("click",(z)=>{q.delete()},{signal:q._signal}),this.#X.append(X)}get#B(){let Z=document.createElement("div");return Z.className="divider",Z}async addAltText(Z){let q=await Z.render();this.#U(q),this.#X.append(q,this.#B),this.#R=Z}addComment(Z,q=null){if(this.#G)return;let X=Z.renderForToolbar();if(!X)return;this.#U(X);let z=this.#Q=this.#B;q?(this.#X.insertBefore(X,q),this.#X.insertBefore(z,q)):this.#X.append(X,z),this.#G=Z,Z.toolbar=this}addColorPicker(Z){if(this.#q)return;this.#q=Z;let q=Z.renderButton();this.#U(q),this.#X.append(q,this.#B)}async addEditSignatureButton(Z){let q=this.#P=await Z.renderEditButton(this.#z);this.#U(q),this.#X.append(q,this.#B)}removeButton(Z){if(Z==="comment")this.#G?.removeToolbarCommentButton(),this.#G=null,this.#Q?.remove(),this.#Q=null}async addButton(Z,q){switch(Z){case"colorPicker":this.addColorPicker(q);break;case"altText":await this.addAltText(q);break;case"editSignature":await this.addEditSignatureButton(q);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(q)}}async addButtonBefore(Z,q,X){let z=this.#X.querySelector(X);z&&Z==="comment"&&this.addComment(q,z)}updateEditSignatureButton(Z){this.#P&&(this.#P.title=Z)}remove(){this.#Z.remove(),this.#q?.destroy(),this.#q=null}}class Tf{#Z=null;#q=null;#z;constructor(Z){this.#z=Z}#X(){let Z=this.#q=document.createElement("div");Z.className="editToolbar",Z.setAttribute("role","toolbar");let q=this.#z._signal;q instanceof AbortSignal&&!q.aborted&&Z.addEventListener("contextmenu",A0,{signal:q});let X=this.#Z=document.createElement("div");return X.className="buttons",Z.append(X),this.#z.hasCommentManager()&&this.#G("commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{this.#z.commentSelection("floating_button")}),this.#G("highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{this.#z.highlightSelection("floating_button")}),Z}#R(Z,q){let X=0,z=0;for(let R of Z){let G=R.y+R.height;if(G<X)continue;let P=R.x+(q?R.width:0);G>X?(z=P,X=G):q?P>z&&(z=P):P<z&&(z=P)}return[q?1-z:z,X]}show(Z,q,X){let[z,R]=this.#R(q,X),{style:G}=this.#q||=this.#X();Z.append(this.#q),G.insetInlineEnd=100*z+"%",G.top=`calc(${100*R}% + var(--editor-toolbar-vert-offset))`}hide(){this.#q.remove()}#G(Z,q,X,z){let R=document.createElement("button");R.classList.add("basic",Z),R.tabIndex=0,R.setAttribute("data-l10n-id",q);let G=document.createElement("span");R.append(G),G.className="visuallyHidden",G.setAttribute("data-l10n-id",X);let P=this.#z._signal;P instanceof AbortSignal&&!P.aborted&&(R.addEventListener("contextmenu",A0,{signal:P}),R.addEventListener("click",z,{signal:P})),this.#Z.append(R)}}function Nf(Z,q,X){for(let z of X)q.addEventListener(z,Z[z].bind(Z))}class Cf{#Z=0;get id(){return`${h7}${this.#Z++}`}}class _z{#Z=Qz();#q=0;#z=null;static get _isSVGFittingCanvas(){let Z=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),q=new Image;return q.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',D1(this,"_isSVGFittingCanvas",q.decode().then(()=>(Z.drawImage(q,0,0,1,1,0,0,1,3),new Uint32Array(Z.getImageData(0,0,1,1).data.buffer)[0]===0)))}async#X(Z,q){this.#z||=new Map;let X=this.#z.get(Z);if(X===null)return null;if(X?.bitmap)return X.refCounter+=1,X;try{let z;if(X||={bitmap:null,id:`image_${this.#Z}_${this.#q++}`,refCounter:0,isSvg:!1},typeof q=="string"?(X.url=q,z=await y6(q,"blob")):q instanceof File?z=X.file=q:q instanceof Blob&&(z=q),z.type==="image/svg+xml"){let R=_z._isSVGFittingCanvas,G=new FileReader,P=new Image,Q=new Promise((Y,W)=>{P.onload=()=>{X.bitmap=P,X.isSvg=!0,Y()},G.onload=async()=>{let $=X.svgUrl=G.result;P.src=await R?`${$}#svgView(preserveAspectRatio(none))`:$},P.onerror=G.onerror=W});G.readAsDataURL(z),await Q}else X.bitmap=await createImageBitmap(z);X.refCounter=1}catch(z){p1(z),X=null}return this.#z.set(Z,X),X&&this.#z.set(X.id,X),X}async getFromFile(Z){let{lastModified:q,name:X,size:z,type:R}=Z;return this.#X(`${q}_${X}_${z}_${R}`,Z)}async getFromUrl(Z){return this.#X(Z,Z)}async getFromBlob(Z,q){let X=await q;return this.#X(Z,X)}async getFromId(Z){this.#z||=new Map;let q=this.#z.get(Z);if(!q)return null;if(q.bitmap)return q.refCounter+=1,q;if(q.file)return this.getFromFile(q.file);if(q.blobPromise){let{blobPromise:X}=q;return delete q.blobPromise,this.getFromBlob(q.id,X)}return this.getFromUrl(q.url)}getFromCanvas(Z,q){this.#z||=new Map;let X=this.#z.get(Z);if(X?.bitmap)return X.refCounter+=1,X;let z=new OffscreenCanvas(q.width,q.height);return z.getContext("2d").drawImage(q,0,0),X={bitmap:z.transferToImageBitmap(),id:`image_${this.#Z}_${this.#q++}`,refCounter:1,isSvg:!1},this.#z.set(Z,X),this.#z.set(X.id,X),X}getSvgUrl(Z){let q=this.#z.get(Z);return q?.isSvg?q.svgUrl:null}deleteId(Z){this.#z||=new Map;let q=this.#z.get(Z);if(!q)return;if(q.refCounter-=1,q.refCounter!==0)return;let{bitmap:X}=q;if(!q.url&&!q.file){let z=new OffscreenCanvas(X.width,X.height);z.getContext("bitmaprenderer").transferFromImageBitmap(X),q.blobPromise=z.convertToBlob()}X.close?.(),q.bitmap=null}isValidId(Z){return Z.startsWith(`image_${this.#Z}_`)}}class Ff{#Z=[];#q=!1;#z;#X=-1;constructor(Z=128){this.#z=Z}add({cmd:Z,undo:q,post:X,mustExec:z,type:R=NaN,overwriteIfSameType:G=!1,keepUndo:P=!1}){if(z&&Z(),this.#q)return;let Q={cmd:Z,undo:q,post:X,type:R};if(this.#X===-1)return this.#Z.length>0&&(this.#Z.length=0),this.#X=0,void this.#Z.push(Q);if(G&&this.#Z[this.#X].type===R)return P&&(Q.undo=this.#Z[this.#X].undo),void(this.#Z[this.#X]=Q);let Y=this.#X+1;Y===this.#z?this.#Z.splice(0,1):(this.#X=Y,Y<this.#Z.length&&this.#Z.splice(Y)),this.#Z.push(Q)}undo(){if(this.#X===-1)return;this.#q=!0;let{undo:Z,post:q}=this.#Z[this.#X];Z(),q?.(),this.#q=!1,this.#X-=1}redo(){if(this.#X<this.#Z.length-1){this.#X+=1,this.#q=!0;let{cmd:Z,post:q}=this.#Z[this.#X];Z(),q?.(),this.#q=!1}}hasSomethingToUndo(){return this.#X!==-1}hasSomethingToRedo(){return this.#X<this.#Z.length-1}cleanType(Z){if(this.#X!==-1){for(let q=this.#X;q>=0;q--)if(this.#Z[q].type!==Z)return this.#Z.splice(q+1,this.#X-q),void(this.#X=q);this.#Z.length=0,this.#X=-1}}destroy(){this.#Z=null}}class p6{constructor(Z){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;let{isMac:q}=T8.platform;for(let[X,z,R={}]of Z)for(let G of X){let P=G.startsWith("mac+");q&&P?(this.callbacks.set(G.slice(4),{callback:z,options:R}),this.allKeys.add(G.split("+").at(-1))):q||P||(this.callbacks.set(G,{callback:z,options:R}),this.allKeys.add(G.split("+").at(-1)))}}#Z(Z){Z.altKey&&this.buffer.push("alt"),Z.ctrlKey&&this.buffer.push("ctrl"),Z.metaKey&&this.buffer.push("meta"),Z.shiftKey&&this.buffer.push("shift"),this.buffer.push(Z.key);let q=this.buffer.join("+");return this.buffer.length=0,q}exec(Z,q){if(!this.allKeys.has(q.key))return;let X=this.callbacks.get(this.#Z(q));if(!X)return;let{callback:z,options:{bubbles:R=!1,args:G=[],checker:P=null}}=X;P&&!P(Z,q)||(z.bind(Z,...G,q)(),R||J8(q))}}class C4{#Z=new AbortController;#q=null;#z=null;#X=new Map;#R=new Map;#G=null;#Q=null;#P=null;#Y=new Ff;#W=null;#J=null;#_=null;#U=0;#B=new Set;#K=null;#$=null;#f=new Set;_editorUndoBar=null;#I=!1;#V=!1;#j=!1;#k=null;#A=null;#H=null;#N=null;#M=!1;#L=null;#v=new Cf;#C=!1;#F=!1;#D=!1;#S=null;#O=null;#w=null;#y=null;#h=null;#T=m1.NONE;#x=new Set;#m=null;#E=null;#g=null;#l=null;#r=null;#o={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#d=[0,0];#p=null;#s=null;#t=null;#e=null;#u=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){let Z=C4.prototype,q=(G)=>G.#s.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&G.hasSomethingToControl(),X=(G,{target:P})=>{if(P instanceof HTMLInputElement){let{type:Q}=P;return Q!=="text"&&Q!=="number"}return!0},z=this.TRANSLATE_SMALL,R=this.TRANSLATE_BIG;return D1(this,"_keyboardManager",new p6([[["ctrl+a","mac+meta+a"],Z.selectAll,{checker:X}],[["ctrl+z","mac+meta+z"],Z.undo,{checker:X}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],Z.redo,{checker:X}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],Z.delete,{checker:X}],[["Enter","mac+Enter"],Z.addNewEditorFromKeyboard,{checker:(G,{target:P})=>!(P instanceof HTMLButtonElement)&&G.#s.contains(P)&&!G.isEnterHandled}],[[" ","mac+ "],Z.addNewEditorFromKeyboard,{checker:(G,{target:P})=>!(P instanceof HTMLButtonElement)&&G.#s.contains(document.activeElement)}],[["Escape","mac+Escape"],Z.unselectAll],[["ArrowLeft","mac+ArrowLeft"],Z.translateSelectedEditors,{args:[-z,0],checker:q}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Z.translateSelectedEditors,{args:[-R,0],checker:q}],[["ArrowRight","mac+ArrowRight"],Z.translateSelectedEditors,{args:[z,0],checker:q}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Z.translateSelectedEditors,{args:[R,0],checker:q}],[["ArrowUp","mac+ArrowUp"],Z.translateSelectedEditors,{args:[0,-z],checker:q}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Z.translateSelectedEditors,{args:[0,-R],checker:q}],[["ArrowDown","mac+ArrowDown"],Z.translateSelectedEditors,{args:[0,z],checker:q}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Z.translateSelectedEditors,{args:[0,R],checker:q}]]))}constructor(Z,q,X,z,R,G,P,Q,Y,W,$,_,J,U,f,K){let I=this._signal=this.#Z.signal;this.#s=Z,this.#t=q,this.#e=X,this.#G=z,this.#W=R,this.#E=G,this.#r=Q,this._eventBus=P,P._on("editingaction",this.onEditingAction.bind(this),{signal:I}),P._on("pagechanging",this.onPageChanging.bind(this),{signal:I}),P._on("scalechanging",this.onScaleChanging.bind(this),{signal:I}),P._on("rotationchanging",this.onRotationChanging.bind(this),{signal:I}),P._on("setpreference",this.onSetPreference.bind(this),{signal:I}),P._on("switchannotationeditorparams",(B)=>this.updateParams(B.type,B.value),{signal:I}),window.addEventListener("pointerdown",()=>{this.#F=!0},{capture:!0,signal:I}),window.addEventListener("pointerup",()=>{this.#F=!1},{capture:!0,signal:I}),this.#Y1(),this.#J1(),this.#q1(),this.#Q=Q.annotationStorage,this.#k=Q.filterFactory,this.#g=Y,this.#N=W||null,this.#I=$,this.#V=_,this.#j=J,this.#h=U||null,this.viewParameters={realScale:n4.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=f||null,this._supportsPinchToZoom=K!==!1,R?.setSidebarUiManager(this)}destroy(){this.#u?.resolve(),this.#u=null,this.#Z?.abort(),this.#Z=null,this._signal=null;for(let Z of this.#R.values())Z.destroy();this.#R.clear(),this.#X.clear(),this.#f.clear(),this.#y?.clear(),this.#q=null,this.#x.clear(),this.#Y.destroy(),this.#G?.destroy(),this.#W?.destroy(),this.#E?.destroy(),this.#L?.hide(),this.#L=null,this.#w?.destroy(),this.#w=null,this.#z=null,this.#A&&(clearTimeout(this.#A),this.#A=null),this.#p&&(clearTimeout(this.#p),this.#p=null),this._editorUndoBar?.destroy(),this.#r=null}combinedSignal(Z){return AbortSignal.any([this._signal,Z.signal])}get mlManager(){return this.#h}get useNewAltTextFlow(){return this.#V}get useNewAltTextWhenAddingImage(){return this.#j}get hcmFilter(){return D1(this,"hcmFilter",this.#g?this.#k.addHCMFilter(this.#g.foreground,this.#g.background):"none")}get direction(){return D1(this,"direction",getComputedStyle(this.#s).direction)}get _highlightColors(){return D1(this,"_highlightColors",this.#N?new Map(this.#N.split(",").map((Z)=>((Z=Z.split("=").map((q)=>q.trim()))[1]=Z[1].toUpperCase(),Z))):null)}get highlightColors(){let{_highlightColors:Z}=this;if(!Z)return D1(this,"highlightColors",null);let q=new Map,X=!!this.#g;for(let[z,R]of Z){let G=z.endsWith("_HCM");X&&G?q.set(z.replace("_HCM",""),R):X||G||q.set(z,R)}return D1(this,"highlightColors",q)}get highlightColorNames(){return D1(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,(Z)=>Z.reverse())):null)}getNonHCMColor(Z){if(!this._highlightColors)return Z;let q=this.highlightColorNames.get(Z);return this._highlightColors.get(q)||Z}getNonHCMColorName(Z){return this.highlightColorNames.get(Z)||Z}setCurrentDrawingSession(Z){Z?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#_=Z}setMainHighlightColorPicker(Z){this.#w=Z}editAltText(Z,q=!1){this.#G?.editAltText(this,Z,q)}hasCommentManager(){return!!this.#W}editComment(Z,q,X,z){this.#W?.showDialog(this,Z,q,X,z)}selectComment(Z,q){this.#R.get(Z)?.getEditorByUID(q)?.toggleComment(!0,!0)}updateComment(Z){this.#W?.updateComment(Z.getData())}updatePopupColor(Z){this.#W?.updatePopupColor(Z)}removeComment(Z){this.#W?.removeComments([Z.uid])}toggleComment(Z,q,X=void 0){this.#W?.toggleCommentPopup(Z,q,X)}makeCommentColor(Z,q){return Z&&this.#W?.makeCommentColor(Z,q)||null}getCommentDialogElement(){return this.#W?.dialogElement||null}async waitForEditorsRendered(Z){if(this.#R.has(Z-1))return;let{resolve:q,promise:X}=Promise.withResolvers(),z=(R)=>{R.pageNumber===Z&&(this._eventBus._off("editorsrendered",z),q())};this._eventBus.on("editorsrendered",z),await X}getSignature(Z){this.#E?.getSignature({uiManager:this,editor:Z})}get signatureManager(){return this.#E}switchToMode(Z,q){this._eventBus.on("annotationeditormodechanged",q,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:Z})}setPreference(Z,q){this._eventBus.dispatch("setpreference",{source:this,name:Z,value:q})}onSetPreference({name:Z,value:q}){if(Z==="enableNewAltTextWhenAddingImage")this.#j=q}onPageChanging({pageNumber:Z}){this.#U=Z-1}focusMainContainer(){this.#s.focus()}findParent(Z,q){for(let X of this.#R.values()){let{x:z,y:R,width:G,height:P}=X.div.getBoundingClientRect();if(Z>=z&&Z<=z+G&&q>=R&&q<=R+P)return X}return null}disableUserSelect(Z=!1){this.#t.classList.toggle("noUserSelect",Z)}addShouldRescale(Z){this.#f.add(Z)}removeShouldRescale(Z){this.#f.delete(Z)}onScaleChanging({scale:Z}){this.commitOrRemove(),this.viewParameters.realScale=Z*n4.PDF_TO_CSS_UNITS;for(let q of this.#f)q.onScaleChanging();this.#_?.onScaleChanging()}onRotationChanging({pagesRotation:Z}){this.commitOrRemove(),this.viewParameters.rotation=Z}#i({anchorNode:Z}){return Z.nodeType===Node.TEXT_NODE?Z.parentElement:Z}#Z1(Z){let{currentLayer:q}=this;if(q.hasTextLayer(Z))return q;for(let X of this.#R.values())if(X.hasTextLayer(Z))return X;return null}highlightSelection(Z="",q=!1){let X=document.getSelection();if(!X||X.isCollapsed)return;let{anchorNode:z,anchorOffset:R,focusNode:G,focusOffset:P}=X,Q=X.toString(),Y=this.#i(X).closest(".textLayer"),W=this.getSelectionBoxes(Y);if(!W)return;X.empty();let $=this.#Z1(Y),_=this.#T===m1.NONE,J=()=>{let U=$?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:Z,boxes:W,anchorNode:z,anchorOffset:R,focusNode:G,focusOffset:P,text:Q});_&&this.showAllEditors("highlight",!0,!0),q&&U?.editComment()};_?this.switchToMode(m1.HIGHLIGHT,J):J()}commentSelection(Z=""){this.highlightSelection(Z,!0)}#P1(){let Z=document.getSelection();if(!Z||Z.isCollapsed)return;let q=this.#i(Z).closest(".textLayer"),X=this.getSelectionBoxes(q);X&&(this.#L||=new Tf(this),this.#L.show(q,X,this.direction==="ltr"))}getAndRemoveDataFromAnnotationStorage(Z){if(!this.#Q)return null;let q=`${h7}${Z}`,X=this.#Q.getRawValue(q);return X&&this.#Q.remove(q),X}addToAnnotationStorage(Z){Z.isEmpty()||!this.#Q||this.#Q.has(Z.id)||this.#Q.setValue(Z.id,Z)}a11yAlert(Z,q=null){let X=this.#e;X&&(X.setAttribute("data-l10n-id",Z),q?X.setAttribute("data-l10n-args",JSON.stringify(q)):X.removeAttribute("data-l10n-args"))}#Q1(){let Z=document.getSelection();if(!Z||Z.isCollapsed)return void(this.#m&&(this.#L?.hide(),this.#m=null,this.#b({hasSelectedText:!1})));let{anchorNode:q}=Z;if(q===this.#m)return;let X=this.#i(Z).closest(".textLayer");if(X){if(this.#L?.hide(),this.#m=q,this.#b({hasSelectedText:!0}),(this.#T===m1.HIGHLIGHT||this.#T===m1.NONE)&&(this.#T===m1.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#M=this.isShiftKeyDown,!this.isShiftKeyDown)){let z=this.#T===m1.HIGHLIGHT?this.#Z1(X):null;if(z?.toggleDrawing(),this.#F){let R=new AbortController,G=this.combinedSignal(R),P=(Q)=>{Q.type==="pointerup"&&Q.button!==0||(R.abort(),z?.toggleDrawing(!0),Q.type==="pointerup"&&this.#a("main_toolbar"))};window.addEventListener("pointerup",P,{signal:G}),window.addEventListener("blur",P,{signal:G})}else z?.toggleDrawing(!0),this.#a("main_toolbar")}}else this.#m&&(this.#L?.hide(),this.#m=null,this.#b({hasSelectedText:!1}))}#a(Z=""){this.#T===m1.HIGHLIGHT?this.highlightSelection(Z):this.#I&&this.#P1()}#Y1(){document.addEventListener("selectionchange",this.#Q1.bind(this),{signal:this._signal})}#W1(){if(this.#H)return;this.#H=new AbortController;let Z=this.combinedSignal(this.#H);window.addEventListener("focus",this.focus.bind(this),{signal:Z}),window.addEventListener("blur",this.blur.bind(this),{signal:Z})}#$1(){this.#H?.abort(),this.#H=null}blur(){if(this.isShiftKeyDown=!1,this.#M&&(this.#M=!1,this.#a("main_toolbar")),!this.hasSelection)return;let{activeElement:Z}=document;for(let q of this.#x)if(q.div.contains(Z)){this.#O=[q,Z],q._focusEventsAllowed=!1;break}}focus(){if(!this.#O)return;let[Z,q]=this.#O;this.#O=null,q.addEventListener("focusin",()=>{Z._focusEventsAllowed=!0},{once:!0,signal:this._signal}),q.focus()}#q1(){if(this.#S)return;this.#S=new AbortController;let Z=this.combinedSignal(this.#S);window.addEventListener("keydown",this.keydown.bind(this),{signal:Z}),window.addEventListener("keyup",this.keyup.bind(this),{signal:Z})}#_1(){this.#S?.abort(),this.#S=null}#X1(){if(this.#J)return;this.#J=new AbortController;let Z=this.combinedSignal(this.#J);document.addEventListener("copy",this.copy.bind(this),{signal:Z}),document.addEventListener("cut",this.cut.bind(this),{signal:Z}),document.addEventListener("paste",this.paste.bind(this),{signal:Z})}#z1(){this.#J?.abort(),this.#J=null}#J1(){let Z=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:Z}),document.addEventListener("drop",this.drop.bind(this),{signal:Z})}addEditListeners(){this.#q1(),this.#X1()}removeEditListeners(){this.#_1(),this.#z1()}dragOver(Z){for(let{type:q}of Z.dataTransfer.items)for(let X of this.#$)if(X.isHandlingMimeForPasting(q))return Z.dataTransfer.dropEffect="copy",void Z.preventDefault()}drop(Z){for(let q of Z.dataTransfer.items)for(let X of this.#$)if(X.isHandlingMimeForPasting(q.type))return X.paste(q,this.currentLayer),void Z.preventDefault()}copy(Z){if(Z.preventDefault(),this.#q?.commitOrRemove(),!this.hasSelection)return;let q=[];for(let X of this.#x){let z=X.serialize(!0);z&&q.push(z)}q.length!==0&&Z.clipboardData.setData("application/pdfjs",JSON.stringify(q))}cut(Z){this.copy(Z),this.delete()}async paste(Z){Z.preventDefault();let{clipboardData:q}=Z;for(let R of q.items)for(let G of this.#$)if(G.isHandlingMimeForPasting(R.type))return void G.paste(R,this.currentLayer);let X=q.getData("application/pdfjs");if(!X)return;try{X=JSON.parse(X)}catch(R){return void p1(`paste: "${R.message}".`)}if(!Array.isArray(X))return;this.unselectAll();let z=this.currentLayer;try{let R=[];for(let Q of X){let Y=await z.deserialize(Q);if(!Y)return;R.push(Y)}let G=()=>{for(let Q of R)this.#R1(Q);this.#G1(R)},P=()=>{for(let Q of R)Q.remove()};this.addCommands({cmd:G,undo:P,mustExec:!0})}catch(R){p1(`paste: "${R.message}".`)}}keydown(Z){this.isShiftKeyDown||Z.key!=="Shift"||(this.isShiftKeyDown=!0),this.#T===m1.NONE||this.isEditorHandlingKeyboard||C4._keyboardManager.exec(this,Z)}keyup(Z){this.isShiftKeyDown&&Z.key==="Shift"&&(this.isShiftKeyDown=!1,this.#M&&(this.#M=!1,this.#a("main_toolbar")))}onEditingAction({name:Z}){switch(Z){case"undo":case"redo":case"delete":case"selectAll":this[Z]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu")}}#b(Z){Object.entries(Z).some(([q,X])=>this.#o[q]!==X)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#o,Z)}),this.#T===m1.HIGHLIGHT&&Z.hasSelectedEditor===!1&&this.#c([[s1.HIGHLIGHT_FREE,!0]]))}#c(Z){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:Z})}setEditingState(Z){Z?(this.#W1(),this.#X1(),this.#b({isEditing:this.#T!==m1.NONE,isEmpty:this.#n(),hasSomethingToUndo:this.#Y.hasSomethingToUndo(),hasSomethingToRedo:this.#Y.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#$1(),this.#z1(),this.#b({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(Z){if(!this.#$){this.#$=Z;for(let q of this.#$)this.#c(q.defaultPropertiesToUpdate)}}getId(){return this.#v.id}get currentLayer(){return this.#R.get(this.#U)}getLayer(Z){return this.#R.get(Z)}get currentPageIndex(){return this.#U}addLayer(Z){this.#R.set(Z.pageIndex,Z),this.#C?Z.enable():Z.disable()}removeLayer(Z){this.#R.delete(Z.pageIndex)}async updateMode(Z,q=null,X=!1,z=!1,R=!1){if(this.#T!==Z&&(!this.#u||(await this.#u.promise,this.#u))){if(this.#u=Promise.withResolvers(),this.#_?.commitOrRemove(),this.#T===m1.POPUP&&this.#W?.hideSidebar(),this.#W?.destroyPopup(),this.#T=Z,Z===m1.NONE){this.setEditingState(!1),this.#f1();for(let G of this.#X.values())G.hideStandaloneCommentButton();return this._editorUndoBar?.hide(),this.toggleComment(null),void this.#u.resolve()}for(let G of this.#X.values())G.addStandaloneCommentButton();Z===m1.SIGNATURE&&await this.#E?.loadSignatures(),this.setEditingState(!0),await this.#U1(),this.unselectAll();for(let G of this.#R.values())G.updateMode(Z);if(Z===m1.POPUP){this.#z||=await this.#r.getAnnotationsByType(new Set(this.#$.map((Q)=>Q._editorType)));let G=new Set,P=[];for(let Q of this.#X.values()){let{annotationElementId:Y,hasComment:W,deleted:$}=Q;Y&&G.add(Y),W&&!$&&P.push(Q.getData())}for(let Q of this.#z){let{id:Y,popupRef:W,contentsObj:$}=Q;W&&$?.str&&!G.has(Y)&&!this.#B.has(Y)&&P.push(Q)}this.#W?.showSidebar(P)}if(!q)return X&&this.addNewEditorFromKeyboard(),void this.#u.resolve();for(let G of this.#X.values())G.uid===q?(this.setSelected(G),R?G.editComment():z?G.enterInEditMode():G.focus()):G.unselect();this.#u.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(Z){Z.mode!==this.#T&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...Z})}updateParams(Z,q){if(this.#$){switch(Z){case s1.CREATE:return void this.currentLayer.addNewEditor(q);case s1.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#l||=new Map).set(Z,q),this.showAllEditors("highlight",q)}if(this.hasSelection)for(let X of this.#x)X.updateParams(Z,q);else for(let X of this.#$)X.updateDefaultParams(Z,q)}}showAllEditors(Z,q,X=!1){for(let z of this.#X.values())z.editorType===Z&&z.show(q);(this.#l?.get(s1.HIGHLIGHT_SHOW_ALL)??!0)!==q&&this.#c([[s1.HIGHLIGHT_SHOW_ALL,q]])}enableWaiting(Z=!1){if(this.#D!==Z){this.#D=Z;for(let q of this.#R.values())Z?q.disableClick():q.enableClick(),q.div.classList.toggle("waiting",Z)}}async#U1(){if(!this.#C){this.#C=!0;let Z=[];for(let q of this.#R.values())Z.push(q.enable());await Promise.all(Z);for(let q of this.#X.values())q.enable()}}#f1(){if(this.unselectAll(),this.#C){this.#C=!1;for(let Z of this.#R.values())Z.disable();for(let Z of this.#X.values())Z.disable()}}*getEditors(Z){for(let q of this.#X.values())q.pageIndex===Z&&(yield q)}getEditor(Z){return this.#X.get(Z)}addEditor(Z){this.#X.set(Z.id,Z)}removeEditor(Z){Z.div.contains(document.activeElement)&&(this.#A&&clearTimeout(this.#A),this.#A=setTimeout(()=>{this.focusMainContainer(),this.#A=null},0)),this.#X.delete(Z.id),Z.annotationElementId&&this.#y?.delete(Z.annotationElementId),this.unselect(Z),Z.annotationElementId&&this.#B.has(Z.annotationElementId)||this.#Q?.remove(Z.id)}addDeletedAnnotationElement(Z){this.#B.add(Z.annotationElementId),this.addChangedExistingAnnotation(Z),Z.deleted=!0}isDeletedAnnotationElement(Z){return this.#B.has(Z)}removeDeletedAnnotationElement(Z){this.#B.delete(Z.annotationElementId),this.removeChangedExistingAnnotation(Z),Z.deleted=!1}#R1(Z){let q=this.#R.get(Z.pageIndex);q?q.addOrRebuild(Z):(this.addEditor(Z),this.addToAnnotationStorage(Z))}setActiveEditor(Z){this.#q!==Z&&(this.#q=Z,Z&&this.#c(Z.propertiesToUpdate))}get#K1(){let Z=null;for(Z of this.#x);return Z}updateUI(Z){this.#K1===Z&&this.#c(Z.propertiesToUpdate)}updateUIForDefaultProperties(Z){this.#c(Z.defaultPropertiesToUpdate)}toggleSelected(Z){if(this.#x.has(Z))return this.#x.delete(Z),Z.unselect(),void this.#b({hasSelectedEditor:this.hasSelection});this.#x.add(Z),Z.select(),this.#c(Z.propertiesToUpdate),this.#b({hasSelectedEditor:!0})}setSelected(Z){this.updateToolbar({mode:Z.mode,editId:Z.id}),this.#_?.commitOrRemove();for(let q of this.#x)q!==Z&&q.unselect();this.#x.clear(),this.#x.add(Z),Z.select(),this.#c(Z.propertiesToUpdate),this.#b({hasSelectedEditor:!0})}isSelected(Z){return this.#x.has(Z)}get firstSelectedEditor(){return this.#x.values().next().value}unselect(Z){Z.unselect(),this.#x.delete(Z),this.#b({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#x.size!==0}get isEnterHandled(){return this.#x.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#Y.undo(),this.#b({hasSomethingToUndo:this.#Y.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#n()}),this._editorUndoBar?.hide()}redo(){this.#Y.redo(),this.#b({hasSomethingToUndo:!0,hasSomethingToRedo:this.#Y.hasSomethingToRedo(),isEmpty:this.#n()})}addCommands(Z){this.#Y.add(Z),this.#b({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#n()})}cleanUndoStack(Z){this.#Y.cleanType(Z)}#n(){if(this.#X.size===0)return!0;if(this.#X.size===1)for(let Z of this.#X.values())return Z.isEmpty();return!1}delete(){this.commitOrRemove();let Z=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!Z)return;let q=Z?[Z]:[...this.#x],X=()=>{for(let z of q)this.#R1(z)};this.addCommands({cmd:()=>{this._editorUndoBar?.show(X,q.length===1?q[0].editorType:q.length);for(let z of q)z.remove()},undo:X,mustExec:!0})}commitOrRemove(){this.#q?.commitOrRemove()}hasSomethingToControl(){return this.#q||this.hasSelection}#G1(Z){for(let q of this.#x)q.unselect();this.#x.clear();for(let q of Z)q.isEmpty()||(this.#x.add(q),q.select());this.#b({hasSelectedEditor:this.hasSelection})}selectAll(){for(let Z of this.#x)Z.commit();this.#G1(this.#X.values())}unselectAll(){if((!this.#q||(this.#q.commitOrRemove(),this.#T===m1.NONE))&&!this.#_?.commitOrRemove()&&this.hasSelection){for(let Z of this.#x)Z.unselect();this.#x.clear(),this.#b({hasSelectedEditor:!1})}}translateSelectedEditors(Z,q,X=!1){if(X||this.commitOrRemove(),!this.hasSelection)return;this.#d[0]+=Z,this.#d[1]+=q;let[z,R]=this.#d,G=[...this.#x];this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>{this.#p=null,this.#d[0]=this.#d[1]=0,this.addCommands({cmd:()=>{for(let P of G)this.#X.has(P.id)&&(P.translateInPage(z,R),P.translationDone())},undo:()=>{for(let P of G)this.#X.has(P.id)&&(P.translateInPage(-z,-R),P.translationDone())},mustExec:!1})},1000);for(let P of G)P.translateInPage(Z,q),P.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#K=new Map;for(let Z of this.#x)this.#K.set(Z,{savedX:Z.x,savedY:Z.y,savedPageIndex:Z.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#K)return!1;this.disableUserSelect(!1);let Z=this.#K;this.#K=null;let q=!1;for(let[{x:z,y:R,pageIndex:G},P]of Z)P.newX=z,P.newY=R,P.newPageIndex=G,q||=z!==P.savedX||R!==P.savedY||G!==P.savedPageIndex;if(!q)return!1;let X=(z,R,G,P)=>{if(this.#X.has(z.id)){let Q=this.#R.get(P);Q?z._setParentAndPosition(Q,R,G):(z.pageIndex=P,z.x=R,z.y=G)}};return this.addCommands({cmd:()=>{for(let[z,{newX:R,newY:G,newPageIndex:P}]of Z)X(z,R,G,P)},undo:()=>{for(let[z,{savedX:R,savedY:G,savedPageIndex:P}]of Z)X(z,R,G,P)},mustExec:!0}),!0}dragSelectedEditors(Z,q){if(this.#K)for(let X of this.#K.keys())X.drag(Z,q)}rebuild(Z){if(Z.parent===null){let q=this.getLayer(Z.pageIndex);q?(q.changeParent(Z),q.addOrRebuild(Z)):(this.addEditor(Z),this.addToAnnotationStorage(Z),Z.rebuild())}else Z.parent.addOrRebuild(Z)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#x.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(Z){return this.#q===Z}getActive(){return this.#q}getMode(){return this.#T}isEditingMode(){return this.#T!==m1.NONE}get imageManager(){return D1(this,"imageManager",new _z)}getSelectionBoxes(Z){if(!Z)return null;let q=document.getSelection();for(let Y=0,W=q.rangeCount;Y<W;Y++)if(!Z.contains(q.getRangeAt(Y).commonAncestorContainer))return null;let{x:X,y:z,width:R,height:G}=Z.getBoundingClientRect(),P;switch(Z.getAttribute("data-main-rotation")){case"90":P=(Y,W,$,_)=>({x:(W-z)/G,y:1-(Y+$-X)/R,width:_/G,height:$/R});break;case"180":P=(Y,W,$,_)=>({x:1-(Y+$-X)/R,y:1-(W+_-z)/G,width:$/R,height:_/G});break;case"270":P=(Y,W,$,_)=>({x:1-(W+_-z)/G,y:(Y-X)/R,width:_/G,height:$/R});break;default:P=(Y,W,$,_)=>({x:(Y-X)/R,y:(W-z)/G,width:$/R,height:_/G})}let Q=[];for(let Y=0,W=q.rangeCount;Y<W;Y++){let $=q.getRangeAt(Y);if(!$.collapsed)for(let{x:_,y:J,width:U,height:f}of $.getClientRects())U!==0&&f!==0&&Q.push(P(_,J,U,f))}return Q.length===0?null:Q}addChangedExistingAnnotation({annotationElementId:Z,id:q}){(this.#P||=new Map).set(Z,q)}removeChangedExistingAnnotation({annotationElementId:Z}){this.#P?.delete(Z)}renderAnnotationElement(Z){let q=this.#P?.get(Z.data.id);if(!q)return;let X=this.#Q.getRawValue(q);X&&(this.#T!==m1.NONE||X.hasBeenModified)&&X.renderAnnotationElement(Z)}setMissingCanvas(Z,q,X){let z=this.#y?.get(Z);z&&(z.setCanvas(q,X),this.#y.delete(Z))}addMissingCanvas(Z,q){(this.#y||=new Map).set(Z,q)}}class o0{#Z=null;#q=!1;#z=null;#X=null;#R=null;#G=null;#Q=!1;#P=null;#Y=null;#W=null;#J=null;#_=!1;static#U=null;static _l10n=null;constructor(Z){this.#Y=Z,this.#_=Z._uiManager.useNewAltTextFlow,o0.#U||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(Z){o0._l10n??=Z}async render(){let Z=this.#z=document.createElement("button");Z.className="altText",Z.tabIndex="0";let q=this.#X=document.createElement("span");Z.append(q),this.#_?(Z.classList.add("new"),Z.setAttribute("data-l10n-id",o0.#U.missing),q.setAttribute("data-l10n-id",o0.#U["missing-label"])):(Z.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),q.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));let X=this.#Y._uiManager._signal;Z.addEventListener("contextmenu",A0,{signal:X}),Z.addEventListener("pointerdown",(R)=>R.stopPropagation(),{signal:X});let z=(R)=>{R.preventDefault(),this.#Y._uiManager.editAltText(this.#Y),this.#_&&this.#Y._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#B}})};return Z.addEventListener("click",z,{capture:!0,signal:X}),Z.addEventListener("keydown",(R)=>{R.target===Z&&R.key==="Enter"&&(this.#Q=!0,z(R))},{signal:X}),await this.#K(),Z}get#B(){return(this.#Z?"added":this.#Z===null&&this.guessedText&&"review")||"missing"}finish(){this.#z&&(this.#z.focus({focusVisible:this.#Q}),this.#Q=!1)}isEmpty(){return this.#_?this.#Z===null:!this.#Z&&!this.#q}hasData(){return this.#_?this.#Z!==null||!!this.#W:this.isEmpty()}get guessedText(){return this.#W}async setGuessedText(Z){this.#Z===null&&(this.#W=Z,this.#J=await o0._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:Z}),this.#K())}toggleAltTextBadge(Z=!1){if(!this.#_||this.#Z)return this.#P?.remove(),void(this.#P=null);if(!this.#P){let q=this.#P=document.createElement("div");q.className="noAltTextBadge",this.#Y.div.append(q)}this.#P.classList.toggle("hidden",!Z)}serialize(Z){let q=this.#Z;return Z||this.#W!==q||(q=this.#J),{altText:q,decorative:this.#q,guessedText:this.#W,textWithDisclaimer:this.#J}}get data(){return{altText:this.#Z,decorative:this.#q}}set data({altText:Z,decorative:q,guessedText:X,textWithDisclaimer:z,cancel:R=!1}){X&&(this.#W=X,this.#J=z),this.#Z===Z&&this.#q===q||(R||(this.#Z=Z,this.#q=q),this.#K())}toggle(Z=!1){this.#z&&(!Z&&this.#G&&(clearTimeout(this.#G),this.#G=null),this.#z.disabled=!Z)}shown(){this.#Y._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#B}})}destroy(){this.#z?.remove(),this.#z=null,this.#X=null,this.#R=null,this.#P?.remove(),this.#P=null}async#K(){let Z=this.#z;if(!Z)return;if(this.#_){if(Z.classList.toggle("done",!!this.#Z),Z.setAttribute("data-l10n-id",o0.#U[this.#B]),this.#X?.setAttribute("data-l10n-id",o0.#U[`${this.#B}-label`]),!this.#Z)return void this.#R?.remove()}else{if(!this.#Z&&!this.#q)return Z.classList.remove("done"),void this.#R?.remove();Z.classList.add("done"),Z.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let q=this.#R;if(!q){this.#R=q=document.createElement("span"),q.className="tooltip",q.setAttribute("role","tooltip"),q.id=`alt-text-tooltip-${this.#Y.id}`;let z=100,R=this.#Y._uiManager._signal;R.addEventListener("abort",()=>{clearTimeout(this.#G),this.#G=null},{once:!0}),Z.addEventListener("mouseenter",()=>{this.#G=setTimeout(()=>{this.#G=null,this.#R.classList.add("show"),this.#Y._reportTelemetry({action:"alt_text_tooltip"})},z)},{signal:R}),Z.addEventListener("mouseleave",()=>{this.#G&&(clearTimeout(this.#G),this.#G=null),this.#R?.classList.remove("show")},{signal:R})}this.#q?q.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(q.removeAttribute("data-l10n-id"),q.textContent=this.#Z),q.parentNode||Z.append(q),this.#Y.getElementForAltText()?.setAttribute("aria-describedby",q.id)}}class Y7{#Z=null;#q=null;#z=!1;#X=null;#R=null;#G=null;#Q=null;#P=null;#Y=!1;#W=null;constructor(Z){this.#X=Z}renderForToolbar(){let Z=this.#q=document.createElement("button");return Z.className="comment",this.#J(Z,!1)}renderForStandalone(){let Z=this.#Z=document.createElement("button");Z.className="annotationCommentButton";let q=this.#X.commentButtonPosition;if(q){let{style:X}=Z;X.insetInlineEnd=`calc(${100*(this.#X._uiManager.direction==="ltr"?1-q[0]:q[0])}% - var(--comment-button-dim))`,X.top=`calc(${100*q[1]}% - var(--comment-button-dim))`;let z=this.#X.commentButtonColor;z&&(X.backgroundColor=z)}return this.#J(Z,!0)}focusButton(){setTimeout(()=>{(this.#Z??this.#q)?.focus()},0)}onUpdatedColor(){if(!this.#Z)return;let Z=this.#X.commentButtonColor;Z&&(this.#Z.style.backgroundColor=Z),this.#X._uiManager.updatePopupColor(this.#X)}get commentButtonWidth(){return(this.#Z?.getBoundingClientRect().width??0)/this.#X.parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(this.#W)return this.#W;if(!this.#Z)return null;let{x:Z,y:q,height:X}=this.#Z.getBoundingClientRect(),{x:z,y:R,width:G,height:P}=this.#X.parent.boundingClientRect;return[(Z-z)/G,(q+X-R)/P]}set commentPopupPositionInLayer(Z){this.#W=Z}hasDefaultPopupPosition(){return this.#W===null}removeStandaloneCommentButton(){this.#Z?.remove(),this.#Z=null}removeToolbarCommentButton(){this.#q?.remove(),this.#q=null}setCommentButtonStates({selected:Z,hasPopup:q}){this.#Z&&(this.#Z.classList.toggle("selected",Z),this.#Z.ariaExpanded=q)}#J(Z,q){if(!this.#X._uiManager.hasCommentManager())return null;Z.tabIndex="0",Z.ariaHasPopup="dialog",q?(Z.ariaControls="commentPopup",Z.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(Z.ariaControlsElements=[this.#X._uiManager.getCommentDialogElement()],Z.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button"));let X=this.#X._uiManager._signal;if(!(X instanceof AbortSignal)||X.aborted)return Z;Z.addEventListener("contextmenu",A0,{signal:X}),q&&(Z.addEventListener("focusin",(R)=>{this.#X._focusEventsAllowed=!1,J8(R)},{capture:!0,signal:X}),Z.addEventListener("focusout",(R)=>{this.#X._focusEventsAllowed=!0,J8(R)},{capture:!0,signal:X})),Z.addEventListener("pointerdown",(R)=>R.stopPropagation(),{signal:X});let z=(R)=>{R.preventDefault(),Z===this.#q?this.edit():this.#X.toggleComment(!0)};return Z.addEventListener("click",z,{capture:!0,signal:X}),Z.addEventListener("keydown",(R)=>{R.target===Z&&R.key==="Enter"&&(this.#z=!0,z(R))},{signal:X}),Z.addEventListener("pointerenter",()=>{this.#X.toggleComment(!1,!0)},{signal:X}),Z.addEventListener("pointerleave",()=>{this.#X.toggleComment(!1,!1)},{signal:X}),Z}edit(Z){let q=this.commentPopupPositionInLayer,X,z;if(q)[X,z]=q;else{[X,z]=this.#X.commentButtonPosition;let{width:W,height:$,x:_,y:J}=this.#X;X=_+X*W,z=J+z*$}let R=this.#X.parent.boundingClientRect,{x:G,y:P,width:Q,height:Y}=R;this.#X._uiManager.editComment(this.#X,G+X*Q,P+z*Y,{...Z,parentDimensions:R})}finish(){this.#q&&(this.#q.focus({focusVisible:this.#z}),this.#z=!1)}isDeleted(){return this.#Y||this.#Q===""}isEmpty(){return this.#Q===null}hasBeenEdited(){return this.isDeleted()||this.#Q!==this.#R}serialize(){return this.data}get data(){return{text:this.#Q,richText:this.#G,date:this.#P,deleted:this.isDeleted()}}set data(Z){if(Z!==this.#Q&&(this.#G=null),Z===null)return this.#Q="",void(this.#Y=!0);this.#Q=Z,this.#P=new Date,this.#Y=!1}setInitialText(Z,q=null){this.#R=Z,this.data=Z,this.#P=null,this.#G=q}shown(){}destroy(){this.#q?.remove(),this.#q=null,this.#Z?.remove(),this.#Z=null,this.#Q="",this.#G=null,this.#P=null,this.#X=null,this.#z=!1,this.#Y=!1}}class $2{#Z;#q=!1;#z=null;#X;#R;#G;#Q;#P=null;#Y;#W=null;#J;#_=null;constructor({container:Z,isPinchingDisabled:q=null,isPinchingStopped:X=null,onPinchStart:z=null,onPinching:R=null,onPinchEnd:G=null,signal:P}){this.#Z=Z,this.#z=X,this.#X=q,this.#R=z,this.#G=R,this.#Q=G,this.#J=new AbortController,this.#Y=AbortSignal.any([P,this.#J.signal]),Z.addEventListener("touchstart",this.#U.bind(this),{passive:!1,signal:this.#Y})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/u0.pixelRatio}#U(Z){if(this.#X?.())return;if(Z.touches.length===1){if(this.#P)return;let z=this.#P=new AbortController,R=AbortSignal.any([this.#Y,z.signal]),G=this.#Z,P={capture:!0,signal:R,passive:!1},Q=(Y)=>{Y.pointerType==="touch"&&(this.#P?.abort(),this.#P=null)};return G.addEventListener("pointerdown",(Y)=>{Y.pointerType==="touch"&&(J8(Y),Q(Y))},P),G.addEventListener("pointerup",Q,P),void G.addEventListener("pointercancel",Q,P)}if(!this.#_){this.#_=new AbortController;let z=AbortSignal.any([this.#Y,this.#_.signal]),R=this.#Z,G={signal:z,capture:!1,passive:!1};R.addEventListener("touchmove",this.#B.bind(this),G);let P=this.#K.bind(this);R.addEventListener("touchend",P,G),R.addEventListener("touchcancel",P,G),G.capture=!0,R.addEventListener("pointerdown",J8,G),R.addEventListener("pointermove",J8,G),R.addEventListener("pointercancel",J8,G),R.addEventListener("pointerup",J8,G),this.#R?.()}if(J8(Z),Z.touches.length!==2||this.#z?.())return void(this.#W=null);let[q,X]=Z.touches;q.identifier>X.identifier&&([q,X]=[X,q]),this.#W={touch0X:q.screenX,touch0Y:q.screenY,touch1X:X.screenX,touch1Y:X.screenY}}#B(Z){if(!this.#W||Z.touches.length!==2)return;J8(Z);let[q,X]=Z.touches;q.identifier>X.identifier&&([q,X]=[X,q]);let{screenX:z,screenY:R}=q,{screenX:G,screenY:P}=X,Q=this.#W,{touch0X:Y,touch0Y:W,touch1X:$,touch1Y:_}=Q,J=$-Y,U=_-W,f=G-z,K=P-R,I=Math.hypot(f,K)||1,B=Math.hypot(J,U)||1;if(!this.#q&&Math.abs(B-I)<=$2.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(Q.touch0X=z,Q.touch0Y=R,Q.touch1X=G,Q.touch1Y=P,!this.#q)return void(this.#q=!0);let j=[(z+G)/2,(R+P)/2];this.#G?.(j,B,I)}#K(Z){Z.touches.length>=2||(this.#_&&(this.#_.abort(),this.#_=null,this.#Q?.()),this.#W&&(J8(Z),this.#W=null,this.#q=!1))}destroy(){this.#J?.abort(),this.#J=null,this.#P?.abort(),this.#P=null}}class Uz{constructor(Z){this.h1=Z?4294967295&Z:CG,this.h2=Z?4294967295&Z:CG}update(Z){let q,X;if(typeof Z=="string"){q=new Uint8Array(2*Z.length),X=0;for(let f=0,K=Z.length;f<K;f++){let I=Z.charCodeAt(f);I<=255?q[X++]=I:(q[X++]=I>>>8,q[X++]=255&I)}}else{if(!ArrayBuffer.isView(Z))throw Error("Invalid data format, must be a string or TypedArray.");q=Z.slice(),X=q.byteLength}let z=X>>2,R=X-4*z,G=new Uint32Array(q.buffer,0,z),P=0,Q=0,Y=this.h1,W=this.h2,$=3432918353,_=461845907,J=11601,U=13715;for(let f=0;f<z;f++)1&f?(P=G[f],P=P*$&T0|P*J&m4,P=P<<15|P>>>17,P=P*_&T0|P*U&m4,Y^=P,Y=Y<<13|Y>>>19,Y=5*Y+3864292196):(Q=G[f],Q=Q*$&T0|Q*J&m4,Q=Q<<15|Q>>>17,Q=Q*_&T0|Q*U&m4,W^=Q,W=W<<13|W>>>19,W=5*W+3864292196);switch(P=0,R){case 3:P^=q[4*z+2]<<16;case 2:P^=q[4*z+1]<<8;case 1:P^=q[4*z],P=P*$&T0|P*J&m4,P=P<<15|P>>>17,P=P*_&T0|P*U&m4,1&z?Y^=P:W^=P}this.h1=Y,this.h2=W}hexdigest(){let Z=this.h1,q=this.h2;return Z^=q>>>1,Z=3981806797*Z&T0|36045*Z&m4,q=4283543511*q&T0|(2950163797*(q<<16|Z>>>16)&T0)>>>16,Z^=q>>>1,Z=444984403*Z&T0|60499*Z&m4,q=3301882366*q&T0|(3120437893*(q<<16|Z>>>16)&T0)>>>16,Z^=q>>>1,(Z>>>0).toString(16).padStart(8,"0")+(q>>>0).toString(16).padStart(8,"0")}}class bf{#Z=new Set;constructor({ownerDocument:Z=globalThis.document,styleElement:q=null}){this._document=Z,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(Z){this.nativeFontFaces.add(Z),this._document.fonts.add(Z)}removeNativeFontFace(Z){this.nativeFontFaces.delete(Z),this._document.fonts.delete(Z)}insertRule(Z){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));let q=this.styleElement.sheet;q.insertRule(Z,q.cssRules.length)}clear(){for(let Z of this.nativeFontFaces)this._document.fonts.delete(Z);this.nativeFontFaces.clear(),this.#Z.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:Z,disableFontFace:q,_inspectFont:X}){if(Z&&!this.#Z.has(Z.loadedName)){if(o1(!q,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:z,src:R,style:G}=Z,P=new FontFace(z,R,G);this.addNativeFontFace(P);try{await P.load(),this.#Z.add(z),X?.(Z)}catch{p1(`Cannot load system font: ${Z.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(P)}return}z8("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(Z){if(Z.attached||Z.missingFile&&!Z.systemFontInfo)return;if(Z.attached=!0,Z.systemFontInfo)return void await this.loadSystemFont(Z);if(this.isFontLoadingAPISupported){let X=Z.createNativeFontFace();if(X){this.addNativeFontFace(X);try{await X.loaded}catch(z){throw p1(`Failed to load font '${X.family}': '${z}'.`),Z.disableFontFace=!0,z}}return}let q=Z.createFontFaceRule();if(q){if(this.insertRule(q),this.isSyncFontLoadingSupported)return;await new Promise((X)=>{let z=this._queueLoadingCallback(X);this._prepareFontLoadEvent(Z,z)})}}get isFontLoadingAPISupported(){return D1(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){return D1(this,"isSyncFontLoadingSupported",R0||T8.platform.isFirefox)}_queueLoadingCallback(Z){let{loadingRequests:q}=this,X={done:!1,complete:function(){for(o1(!X.done,"completeRequest() cannot be called twice."),X.done=!0;q.length>0&&q[0].done;){let z=q.shift();setTimeout(z.callback,0)}},callback:Z};return q.push(X),X}get _loadTestFont(){return D1(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(Z,q){function X(I,B){return I.charCodeAt(B)<<24|I.charCodeAt(B+1)<<16|I.charCodeAt(B+2)<<8|255&I.charCodeAt(B+3)}function z(I,B,j,V){return I.substring(0,B)+V+I.substring(B+j)}let R,G,P=this._document.createElement("canvas");P.width=1,P.height=1;let Q=P.getContext("2d"),Y=0,W=`lt${Date.now()}${this.loadTestFontId++}`,$=this._loadTestFont;$=z($,976,W.length,W);let _=1482184792,J=X($,16);for(R=0,G=W.length-3;R<G;R+=4)J=J-_+X(W,R)|0;var U;R<W.length&&(J=J-_+X(W+"XXX",R)|0),$=z($,16,4,(U=J,String.fromCharCode(U>>24&255,U>>16&255,U>>8&255,255&U)));let f=`@font-face {font-family:"${W}";src:${`url(data:font/opentype;base64,${btoa($)});`}}`;this.insertRule(f);let K=this._document.createElement("div");K.style.visibility="hidden",K.style.width=K.style.height="10px",K.style.position="absolute",K.style.top=K.style.left="0px";for(let I of[Z.loadedName,W]){let B=this._document.createElement("span");B.textContent="Hi",B.style.fontFamily=I,K.append(B)}this._document.body.append(K),function I(B,j){if(++Y>30)return p1("Load test font never loaded."),void j();Q.font="30px "+B,Q.fillText(".",0,20),Q.getImageData(0,0,1,1).data[3]>0?j():setTimeout(I.bind(null,B,j))}(W,()=>{K.remove(),q.complete()})}}class Sf{#Z;constructor(Z,q=null,X,z){this.compiledGlyphs=Object.create(null),this.#Z=Z,this._inspectFont=q,X&&Object.assign(this,X),z&&(this.charProcOperatorList=z)}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let Z;if(this.cssFontInfo){let q={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(q.style=`oblique ${this.cssFontInfo.italicAngle}deg`),Z=new FontFace(this.cssFontInfo.fontFamily,this.data,q)}else Z=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),Z}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;let Z=`url(data:${this.mimetype};base64,${Vf(this.data)});`,q;if(this.cssFontInfo){let X=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(X+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),q=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${X}src:${Z}}`}else q=`@font-face {font-family:"${this.loadedName}";src:${Z}}`;return this._inspectFont?.(this,Z),q}getPathGenerator(Z,q){if(this.compiledGlyphs[q]!==void 0)return this.compiledGlyphs[q];let X=this.loadedName+"_path_"+q,z;try{z=Z.get(X)}catch(G){p1(`getPathGenerator - ignoring character: "${G}".`)}let R=new Path2D(z||"");return this.fontExtraProperties||Z.delete(X),this.compiledGlyphs[q]=R}get black(){return this.#Z.black}get bold(){return this.#Z.bold}get disableFontFace(){return this.#Z.disableFontFace??!1}get fontExtraProperties(){return this.#Z.fontExtraProperties??!1}get isInvalidPDFjsFont(){return this.#Z.isInvalidPDFjsFont}get isType3Font(){return this.#Z.isType3Font}get italic(){return this.#Z.italic}get missingFile(){return this.#Z.missingFile}get remeasure(){return this.#Z.remeasure}get vertical(){return this.#Z.vertical}get ascent(){return this.#Z.ascent}get defaultWidth(){return this.#Z.defaultWidth}get descent(){return this.#Z.descent}get bbox(){return this.#Z.bbox}get fontMatrix(){return this.#Z.fontMatrix}get fallbackName(){return this.#Z.fallbackName}get loadedName(){return this.#Z.loadedName}get mimetype(){return this.#Z.mimetype}get name(){return this.#Z.name}get data(){return this.#Z.data}clearData(){this.#Z.clearData()}get cssFontInfo(){return this.#Z.cssFontInfo}get systemFontInfo(){return this.#Z.systemFontInfo}get defaultVMetrics(){return this.#Z.defaultVMetrics}}function m2(Z){if(typeof Z!="string")return null;if(Z.endsWith("/"))return Z;throw Error(`Invalid factory url: "${Z}" must include trailing slash.`)}class Of{#Z=new Map;#q=Promise.resolve();postMessage(Z,q){let X={data:structuredClone(Z,q?{transfer:q}:null)};this.#q.then(()=>{for(let[z]of this.#Z)z.call(this,X)})}addEventListener(Z,q,X=null){let z=null;if(X?.signal instanceof AbortSignal){let{signal:R}=X;if(R.aborted)return void p1("LoopbackPort - cannot use an `aborted` signal.");let G=()=>this.removeEventListener(Z,q);z=()=>R.removeEventListener("abort",G),R.addEventListener("abort",G)}this.#Z.set(q,z)}removeEventListener(Z,q){this.#Z.get(q)?.(),this.#Z.delete(q)}terminate(){for(let[,Z]of this.#Z)Z?.();this.#Z.clear()}}function pG(){}function G0(Z){if(Z instanceof P4||Z instanceof s7||Z instanceof yq||Z instanceof N6||Z instanceof Z3)return Z;switch(Z instanceof Error||typeof Z=="object"&&Z!==null||z8('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),Z.name){case"AbortException":return new P4(Z.message);case"InvalidPDFException":return new s7(Z.message);case"PasswordException":return new yq(Z.message,Z.code);case"ResponseException":return new N6(Z.message,Z.status,Z.missing);case"UnknownErrorException":return new Z3(Z.message,Z.details)}return new Z3(Z.message,Z.toString())}class P6{#Z=new AbortController;constructor(Z,q,X){this.sourceName=Z,this.targetName=q,this.comObj=X,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),X.addEventListener("message",this.#q.bind(this),{signal:this.#Z.signal})}#q({data:Z}){if(Z.targetName!==this.sourceName)return;if(Z.stream)return void this.#X(Z);if(Z.callback){let X=Z.callbackId,z=this.callbackCapabilities[X];if(!z)throw Error(`Cannot resolve callback ${X}`);if(delete this.callbackCapabilities[X],Z.callback===FG)z.resolve(Z.data);else{if(Z.callback!==vG)throw Error("Unexpected callback case");z.reject(G0(Z.reason))}return}let q=this.actionHandler[Z.action];if(!q)throw Error(`Unknown action from worker: ${Z.action}`);if(Z.callbackId){let X=this.sourceName,z=Z.sourceName,R=this.comObj;return void Promise.try(q,Z.data).then(function(G){R.postMessage({sourceName:X,targetName:z,callback:FG,callbackId:Z.callbackId,data:G})},function(G){R.postMessage({sourceName:X,targetName:z,callback:vG,callbackId:Z.callbackId,reason:G0(G)})})}Z.streamId?this.#z(Z):q(Z.data)}on(Z,q){let X=this.actionHandler;if(X[Z])throw Error(`There is already an actionName called "${Z}"`);X[Z]=q}send(Z,q,X){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Z,data:q},X)}sendWithPromise(Z,q,X){let z=this.callbackId++,R=Promise.withResolvers();this.callbackCapabilities[z]=R;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Z,callbackId:z,data:q},X)}catch(G){R.reject(G)}return R.promise}sendWithStream(Z,q,X,z){let R=this.streamId++,G=this.sourceName,P=this.targetName,Q=this.comObj;return new ReadableStream({start:(Y)=>{let W=Promise.withResolvers();return this.streamControllers[R]={controller:Y,startCall:W,pullCall:null,cancelCall:null,isClosed:!1},Q.postMessage({sourceName:G,targetName:P,action:Z,streamId:R,data:q,desiredSize:Y.desiredSize},z),W.promise},pull:(Y)=>{let W=Promise.withResolvers();return this.streamControllers[R].pullCall=W,Q.postMessage({sourceName:G,targetName:P,stream:yG,streamId:R,desiredSize:Y.desiredSize}),W.promise},cancel:(Y)=>{o1(Y instanceof Error,"cancel must have a valid reason");let W=Promise.withResolvers();return this.streamControllers[R].cancelCall=W,this.streamControllers[R].isClosed=!0,Q.postMessage({sourceName:G,targetName:P,stream:bG,streamId:R,reason:G0(Y)}),W.promise}},X)}#z(Z){let q=Z.streamId,X=this.sourceName,z=Z.sourceName,R=this.comObj,G=this,P=this.actionHandler[Z.action],Q={enqueue(Y,W=1,$){if(this.isCancelled)return;let _=this.desiredSize;this.desiredSize-=W,_>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),R.postMessage({sourceName:X,targetName:z,stream:mG,streamId:q,chunk:Y},$)},close(){this.isCancelled||(this.isCancelled=!0,R.postMessage({sourceName:X,targetName:z,stream:SG,streamId:q}),delete G.streamSinks[q])},error(Y){o1(Y instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,R.postMessage({sourceName:X,targetName:z,stream:OG,streamId:q,reason:G0(Y)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:Z.desiredSize,ready:null};Q.sinkCapability.resolve(),Q.ready=Q.sinkCapability.promise,this.streamSinks[q]=Q,Promise.try(P,Z.data,Q).then(function(){R.postMessage({sourceName:X,targetName:z,stream:HZ,streamId:q,success:!0})},function(Y){R.postMessage({sourceName:X,targetName:z,stream:HZ,streamId:q,reason:G0(Y)})})}#X(Z){let q=Z.streamId,X=this.sourceName,z=Z.sourceName,R=this.comObj,G=this.streamControllers[q],P=this.streamSinks[q];switch(Z.stream){case HZ:Z.success?G.startCall.resolve():G.startCall.reject(G0(Z.reason));break;case O2:Z.success?G.pullCall.resolve():G.pullCall.reject(G0(Z.reason));break;case yG:if(!P){R.postMessage({sourceName:X,targetName:z,stream:O2,streamId:q,success:!0});break}P.desiredSize<=0&&Z.desiredSize>0&&P.sinkCapability.resolve(),P.desiredSize=Z.desiredSize,Promise.try(P.onPull||pG).then(function(){R.postMessage({sourceName:X,targetName:z,stream:O2,streamId:q,success:!0})},function(Y){R.postMessage({sourceName:X,targetName:z,stream:O2,streamId:q,reason:G0(Y)})});break;case mG:if(o1(G,"enqueue should have stream controller"),G.isClosed)break;G.controller.enqueue(Z.chunk);break;case SG:if(o1(G,"close should have stream controller"),G.isClosed)break;G.isClosed=!0,G.controller.close(),this.#R(G,q);break;case OG:o1(G,"error should have stream controller"),G.controller.error(G0(Z.reason)),this.#R(G,q);break;case VZ:Z.success?G.cancelCall.resolve():G.cancelCall.reject(G0(Z.reason)),this.#R(G,q);break;case bG:if(!P)break;let Q=G0(Z.reason);Promise.try(P.onCancel||pG,Q).then(function(){R.postMessage({sourceName:X,targetName:z,stream:VZ,streamId:q,success:!0})},function(Y){R.postMessage({sourceName:X,targetName:z,stream:VZ,streamId:q,reason:G0(Y)})}),P.sinkCapability.reject(Q),P.isCancelled=!0,delete this.streamSinks[q];break;default:throw Error("Unexpected stream case")}}async#R(Z,q){await Promise.allSettled([Z.startCall?.promise,Z.pullCall?.promise,Z.cancelCall?.promise]),delete this.streamControllers[q]}destroy(){this.#Z?.abort(),this.#Z=null}}class Kz{#Z=!1;constructor({enableHWA:Z=!1}){this.#Z=Z}create(Z,q){if(Z<=0||q<=0)throw Error("Invalid canvas size");let X=this._createCanvas(Z,q);return{canvas:X,context:X.getContext("2d",{willReadFrequently:!this.#Z})}}reset(Z,q,X){if(!Z.canvas)throw Error("Canvas is not specified");if(q<=0||X<=0)throw Error("Invalid canvas size");Z.canvas.width=q,Z.canvas.height=X}destroy(Z){if(!Z.canvas)throw Error("Canvas is not specified");Z.canvas.width=0,Z.canvas.height=0,Z.canvas=null,Z.context=null}_createCanvas(Z,q){z8("Abstract method `_createCanvas` called.")}}class Bz{constructor({baseUrl:Z=null,isCompressed:q=!0}){this.baseUrl=Z,this.isCompressed=q}async fetch({name:Z}){if(!this.baseUrl)throw Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!Z)throw Error("CMap name must be specified.");let q=this.baseUrl+Z+(this.isCompressed?".bcmap":"");return this._fetch(q).then((X)=>({cMapData:X,isCompressed:this.isCompressed})).catch((X)=>{throw Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${q}`)})}async _fetch(Z){z8("Abstract method `_fetch` called.")}}class Iz{addFilter(Z){return"none"}addHCMFilter(Z,q){return"none"}addAlphaFilter(Z){return"none"}addLuminosityFilter(Z){return"none"}addHighlightHCMFilter(Z,q,X,z,R){return"none"}destroy(Z=!1){}}class jz{constructor({baseUrl:Z=null}){this.baseUrl=Z}async fetch({filename:Z}){if(!this.baseUrl)throw Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!Z)throw Error("Font filename must be specified.");let q=`${this.baseUrl}${Z}`;return this._fetch(q).catch((X)=>{throw Error(`Unable to load font data at: ${q}`)})}async _fetch(Z){z8("Abstract method `_fetch` called.")}}class Vz{constructor({baseUrl:Z=null}){this.baseUrl=Z}async fetch({filename:Z}){if(!this.baseUrl)throw Error("Ensure that the `wasmUrl` API parameter is provided.");if(!Z)throw Error("Wasm filename must be specified.");let q=`${this.baseUrl}${Z}`;return this._fetch(q).catch((X)=>{throw Error(`Unable to load wasm data at: ${q}`)})}async _fetch(Z){z8("Abstract method `_fetch` called.")}}async function Hz(Z){let q=process.getBuiltinModule("fs"),X=await q.promises.readFile(Z);return new Uint8Array(X)}function y2(Z,q,X,z,R,G){Z[4*q+0]=Math.min(Z[4*q+0],X),Z[4*q+1]=Math.min(Z[4*q+1],z),Z[4*q+2]=Math.max(Z[4*q+2],R),Z[4*q+3]=Math.max(Z[4*q+3],G)}class df{#Z;#q;constructor(Z,q){this.#Z=Z,this.#q=q}get length(){return this.#Z.length}isEmpty(Z){return this.#Z[Z]===cq}minX(Z){return this.#q[4*Z+0]/256}minY(Z){return this.#q[4*Z+1]/256}maxX(Z){return(this.#q[4*Z+2]+1)/256}maxY(Z){return(this.#q[4*Z+3]+1)/256}}class cf{#Z={__proto__:null};#q={__proto__:null,transform:[],moveText:[],sameLineText:[],[l5]:[]};#z=new Map;#X=[];#R=[];#G=[[1,0,0,1,0,0]];#Q=[-1/0,-1/0,1/0,1/0];#P=new Float64Array([1/0,1/0,-1/0,-1/0]);#Y=-1;#W=new Set;#J=new Map;#_=new Map;#U;#B;#K;#$;#f;constructor(Z,q,X=!1){this.#U=Z.width,this.#B=Z.height,this.#I(q),X&&(this.#f=new Map)}growOperationsCount(Z){Z>=this.#$.length&&this.#I(Z,this.#$)}#I(Z,q){let X=new ArrayBuffer(4*Z);this.#K=new Uint8ClampedArray(X),this.#$=new Uint32Array(X),q&&q.length>0?(this.#$.set(q),this.#$.fill(cq,q.length)):this.#$.fill(cq)}save(Z){return this.#Z={__proto__:this.#Z},this.#q={__proto__:this.#q,transform:{__proto__:this.#q.transform},moveText:{__proto__:this.#q.moveText},sameLineText:{__proto__:this.#q.sameLineText},[l5]:{__proto__:this.#q[l5]}},this.#Q={__proto__:this.#Q},this.#X.push(Z),this}restore(Z){let q=Object.getPrototypeOf(this.#Z);if(q===null)return this;this.#Z=q,this.#q=Object.getPrototypeOf(this.#q),this.#Q=Object.getPrototypeOf(this.#Q);let X=this.#X.pop();return X!==void 0&&(p2(this.#f,Z)?.dependencies.add(X),this.#$[Z]=this.#$[X]),this}recordOpenMarker(Z){return this.#X.push(Z),this}getOpenMarker(){return this.#X.length===0?null:this.#X.at(-1)}recordCloseMarker(Z){let q=this.#X.pop();return q!==void 0&&(p2(this.#f,Z)?.dependencies.add(q),this.#$[Z]=this.#$[q]),this}beginMarkedContent(Z){return this.#R.push(Z),this}endMarkedContent(Z){let q=this.#R.pop();return q!==void 0&&(p2(this.#f,Z)?.dependencies.add(q),this.#$[Z]=this.#$[q]),this}pushBaseTransform(Z){return this.#G.push(j1.multiplyByDOMMatrix(this.#G.at(-1),Z.getTransform())),this}popBaseTransform(){return this.#G.length>1&&this.#G.pop(),this}recordSimpleData(Z,q){return this.#Z[Z]=q,this}recordIncrementalData(Z,q){return this.#q[Z].push(q),this}resetIncrementalData(Z,q){return this.#q[Z].length=0,this}recordNamedData(Z,q){return this.#z.set(Z,q),this}recordSimpleDataFromNamed(Z,q,X){this.#Z[Z]=this.#z.get(q)??X}recordFutureForcedDependency(Z,q){return this.recordIncrementalData(l5,q),this}inheritSimpleDataAsFutureForcedDependencies(Z){for(let q of Z)q in this.#Z&&this.recordFutureForcedDependency(q,this.#Z[q]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(let Z of this.#W)this.recordFutureForcedDependency(l5,Z);return this}resetBBox(Z){return this.#Y!==Z&&(this.#Y=Z,this.#P[0]=1/0,this.#P[1]=1/0,this.#P[2]=-1/0,this.#P[3]=-1/0),this}recordClipBox(Z,q,X,z,R,G){let P=j1.multiplyByDOMMatrix(this.#G.at(-1),q.getTransform()),Q=[1/0,1/0,-1/0,-1/0];j1.axialAlignedBoundingBox([X,R,z,G],P,Q);let Y=j1.intersect(this.#Q,Q);return Y?(this.#Q[0]=Y[0],this.#Q[1]=Y[1],this.#Q[2]=Y[2],this.#Q[3]=Y[3]):(this.#Q[0]=this.#Q[1]=1/0,this.#Q[2]=this.#Q[3]=-1/0),this}recordBBox(Z,q,X,z,R,G){let P=this.#Q;if(P[0]===1/0)return this;let Q=j1.multiplyByDOMMatrix(this.#G.at(-1),q.getTransform());if(P[0]===-1/0)return j1.axialAlignedBoundingBox([X,R,z,G],Q,this.#P),this;let Y=[1/0,1/0,-1/0,-1/0];return j1.axialAlignedBoundingBox([X,R,z,G],Q,Y),this.#P[0]=Math.min(this.#P[0],Math.max(Y[0],P[0])),this.#P[1]=Math.min(this.#P[1],Math.max(Y[1],P[1])),this.#P[2]=Math.max(this.#P[2],Math.min(Y[2],P[2])),this.#P[3]=Math.max(this.#P[3],Math.min(Y[3],P[3])),this}recordCharacterBBox(Z,q,X,z=1,R=0,G=0,P){let Q=X.bbox,Y,W;if(Q&&(Y=Q[2]!==Q[0]&&Q[3]!==Q[1]&&this.#_.get(X),Y!==!1&&(W=[0,0,0,0],j1.axialAlignedBoundingBox(Q,X.fontMatrix,W),z===1&&R===0&&G===0||j1.scaleMinMax([z,0,0,-z,R,G],W),Y)))return this.recordBBox(Z,q,W[0],W[2],W[1],W[3]);if(!P)return this.recordFullPageBBox(Z);let $=P();return Q&&W&&Y===void 0&&(Y=W[0]<=R-$.actualBoundingBoxLeft&&W[2]>=R+$.actualBoundingBoxRight&&W[1]<=G-$.actualBoundingBoxAscent&&W[3]>=G+$.actualBoundingBoxDescent,this.#_.set(X,Y),Y)?this.recordBBox(Z,q,W[0],W[2],W[1],W[3]):this.recordBBox(Z,q,R-$.actualBoundingBoxLeft,R+$.actualBoundingBoxRight,G-$.actualBoundingBoxAscent,G+$.actualBoundingBoxDescent)}recordFullPageBBox(Z){return this.#P[0]=Math.max(0,this.#Q[0]),this.#P[1]=Math.max(0,this.#Q[1]),this.#P[2]=Math.min(this.#U,this.#Q[2]),this.#P[3]=Math.min(this.#B,this.#Q[3]),this}getSimpleIndex(Z){return this.#Z[Z]}recordDependencies(Z,q){let X=this.#W,z=this.#Z,R=this.#q;for(let G of q)G in this.#Z?X.add(z[G]):(G in R)&&R[G].forEach(X.add,X);return this}recordNamedDependency(Z,q){return this.#z.has(q)&&this.#W.add(this.#z.get(q)),this}recordOperation(Z,q=!1){if(this.recordDependencies(Z,[l5]),this.#f){let X=p2(this.#f,Z),{dependencies:z}=X;this.#W.forEach(z.add,z),this.#X.forEach(z.add,z),this.#R.forEach(z.add,z),z.delete(Z),X.isRenderingOperation=!0}if(this.#Y===Z){let X=DG(256*this.#P[0]/this.#U),z=DG(256*this.#P[1]/this.#B),R=wG(256*this.#P[2]/this.#U),G=wG(256*this.#P[3]/this.#B);y2(this.#K,Z,X,z,R,G);for(let P of this.#W)P!==Z&&y2(this.#K,P,X,z,R,G);for(let P of this.#X)P!==Z&&y2(this.#K,P,X,z,R,G);for(let P of this.#R)P!==Z&&y2(this.#K,P,X,z,R,G);q||(this.#W.clear(),this.#Y=-1)}return this}recordShowTextOperation(Z,q=!1){let X=Array.from(this.#W);this.recordOperation(Z,q),this.recordIncrementalData("sameLineText",Z);for(let z of X)this.recordIncrementalData("sameLineText",z);return this}bboxToClipBoxDropOperation(Z,q=!1){return this.#Y===Z&&(this.#Y=-1,this.#Q[0]=Math.max(this.#Q[0],this.#P[0]),this.#Q[1]=Math.max(this.#Q[1],this.#P[1]),this.#Q[2]=Math.min(this.#Q[2],this.#P[2]),this.#Q[3]=Math.min(this.#Q[3],this.#P[3]),q||this.#W.clear()),this}_takePendingDependencies(){let Z=this.#W;return this.#W=new Set,Z}_extractOperation(Z){let q=this.#J.get(Z);return this.#J.delete(Z),q}_pushPendingDependencies(Z){for(let q of Z)this.#W.add(q)}take(){return this.#_.clear(),new df(this.#$,this.#K)}takeDebugMetadata(){return this.#f}}class a3{#Z;#q;#z;#X=0;#R=0;constructor(Z,q,X){if(Z instanceof a3&&Z.#z===!!X)return Z;this.#Z=Z,this.#q=q,this.#z=!!X}growOperationsCount(){throw Error("Unreachable")}save(Z){return this.#R++,this.#Z.save(this.#q),this}restore(Z){return this.#R>0&&(this.#Z.restore(this.#q),this.#R--),this}recordOpenMarker(Z){return this.#X++,this}getOpenMarker(){return this.#X>0?this.#q:this.#Z.getOpenMarker()}recordCloseMarker(Z){return this.#X--,this}beginMarkedContent(Z){return this}endMarkedContent(Z){return this}pushBaseTransform(Z){return this.#Z.pushBaseTransform(Z),this}popBaseTransform(){return this.#Z.popBaseTransform(),this}recordSimpleData(Z,q){return this.#Z.recordSimpleData(Z,this.#q),this}recordIncrementalData(Z,q){return this.#Z.recordIncrementalData(Z,this.#q),this}resetIncrementalData(Z,q){return this.#Z.resetIncrementalData(Z,this.#q),this}recordNamedData(Z,q){return this}recordSimpleDataFromNamed(Z,q,X){return this.#Z.recordSimpleDataFromNamed(Z,q,this.#q),this}recordFutureForcedDependency(Z,q){return this.#Z.recordFutureForcedDependency(Z,this.#q),this}inheritSimpleDataAsFutureForcedDependencies(Z){return this.#Z.inheritSimpleDataAsFutureForcedDependencies(Z),this}inheritPendingDependenciesAsFutureForcedDependencies(){return this.#Z.inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(Z){return this.#z||this.#Z.resetBBox(this.#q),this}recordClipBox(Z,q,X,z,R,G){return this.#z||this.#Z.recordClipBox(this.#q,q,X,z,R,G),this}recordBBox(Z,q,X,z,R,G){return this.#z||this.#Z.recordBBox(this.#q,q,X,z,R,G),this}recordCharacterBBox(Z,q,X,z,R,G,P){return this.#z||this.#Z.recordCharacterBBox(this.#q,q,X,z,R,G,P),this}recordFullPageBBox(Z){return this.#z||this.#Z.recordFullPageBBox(this.#q),this}getSimpleIndex(Z){return this.#Z.getSimpleIndex(Z)}recordDependencies(Z,q){return this.#Z.recordDependencies(this.#q,q),this}recordNamedDependency(Z,q){return this.#Z.recordNamedDependency(this.#q,q),this}recordOperation(Z){return this.#Z.recordOperation(this.#q,!0),this}recordShowTextOperation(Z){return this.#Z.recordShowTextOperation(this.#q,!0),this}bboxToClipBoxDropOperation(Z){return this.#z||this.#Z.bboxToClipBoxDropOperation(this.#q,!0),this}take(){throw Error("Unreachable")}takeDebugMetadata(){throw Error("Unreachable")}}function hq(Z,q){if(!q)return;let X=q[2]-q[0],z=q[3]-q[1],R=new Path2D;R.rect(q[0],q[1],X,z),Z.clip(R)}class m9{isModifyingCurrentTransform(){return!1}getPattern(){z8("Abstract method `getPattern` called.")}}function AZ(Z,q,X,z,R,G,P,Q){let{coords:Y,colors:W}=q,$=Z.data,_=4*Z.width,J;Y[X+1]>Y[z+1]&&(J=X,X=z,z=J,J=G,G=P,P=J),Y[z+1]>Y[R+1]&&(J=z,z=R,R=J,J=P,P=Q,Q=J),Y[X+1]>Y[z+1]&&(J=X,X=z,z=J,J=G,G=P,P=J);let U=(Y[X]+q.offsetX)*q.scaleX,f=(Y[X+1]+q.offsetY)*q.scaleY,K=(Y[z]+q.offsetX)*q.scaleX,I=(Y[z+1]+q.offsetY)*q.scaleY,B=(Y[R]+q.offsetX)*q.scaleX,j=(Y[R+1]+q.offsetY)*q.scaleY;if(f>=j)return;let V=W[G],x=W[G+1],M=W[G+2],H=W[P],A=W[P+1],T=W[P+2],k=W[Q],y=W[Q+1],O=W[Q+2],D=Math.round(f),n=Math.round(j),b,l,N,L,m,d,e,E;for(let p=D;p<=n;p++){if(p<I){let o=p<f?0:(f-p)/(f-I);b=U-(U-K)*o,l=V-(V-H)*o,N=x-(x-A)*o,L=M-(M-T)*o}else{let o;o=p>j?1:I===j?0:(I-p)/(I-j),b=K-(K-B)*o,l=H-(H-k)*o,N=A-(A-y)*o,L=T-(T-O)*o}let F;F=p<f?0:p>j?1:(f-p)/(f-j),m=U-(U-B)*F,d=V-(V-k)*F,e=x-(x-y)*F,E=M-(M-O)*F;let s=Math.round(Math.min(b,m)),w=Math.round(Math.max(b,m)),c=_*p+4*s;for(let o=s;o<=w;o++)F=(b-o)/(b-m),F<0?F=0:F>1&&(F=1),$[c++]=l-(l-d)*F|0,$[c++]=N-(N-e)*F|0,$[c++]=L-(L-E)*F|0,$[c++]=255}}function AH(Z,q,X){let{coords:z,colors:R}=q,G,P;switch(q.type){case"lattice":let Q=q.verticesPerRow,Y=Math.floor(z.length/Q)-1,W=Q-1;for(G=0;G<Y;G++){let $=G*Q;for(let _=0;_<W;_++,$++)AZ(Z,X,z[$],z[$+1],z[$+Q],R[$],R[$+1],R[$+Q]),AZ(Z,X,z[$+Q+1],z[$+1],z[$+Q],R[$+Q+1],R[$+1],R[$+Q])}break;case"triangles":for(G=0,P=z.length;G<P;G+=3)AZ(Z,X,z[G],z[G+1],z[G+2],R[G],R[G+1],R[G+2]);break;default:throw Error("illegal figure")}}class xz{static MAX_PATTERN_SIZE=3000;constructor(Z,q,X,z){this.color=Z[1],this.operatorList=Z[2],this.matrix=Z[3],this.bbox=Z[4],this.xstep=Z[5],this.ystep=Z[6],this.paintType=Z[7],this.tilingType=Z[8],this.ctx=q,this.canvasGraphicsFactory=X,this.baseTransform=z}createPatternCanvas(Z,q){let{bbox:X,operatorList:z,paintType:R,tilingType:G,color:P,canvasGraphicsFactory:Q}=this,{xstep:Y,ystep:W}=this;Y=Math.abs(Y),W=Math.abs(W),F9("TilingType: "+G);let $=X[0],_=X[1],J=X[2],U=X[3],f=J-$,K=U-_,I=new Float32Array(2);j1.singularValueDecompose2dScale(this.matrix,I);let[B,j]=I;j1.singularValueDecompose2dScale(this.baseTransform,I);let V=B*I[0],x=j*I[1],M=f,H=K,A=!1,T=!1,k=Math.ceil(Y*V),y=Math.ceil(W*x);k>=Math.ceil(f*V)?M=Y:A=!0,y>=Math.ceil(K*x)?H=W:T=!0;let O=this.getSizeAndScale(M,this.ctx.canvas.width,V),D=this.getSizeAndScale(H,this.ctx.canvas.height,x),n=Z.cachedCanvases.getCanvas("pattern",O.size,D.size),b=n.context,l=Q.createCanvasGraphics(b,q);if(l.groupLevel=Z.groupLevel,this.setFillAndStrokeStyleToContext(l,R,P),b.translate(-O.scale*$,-D.scale*_),l.transform(0,O.scale,0,0,D.scale,0,0),b.save(),l.dependencyTracker?.save(),this.clipBbox(l,$,_,J,U),l.baseTransform=_8(l.ctx),l.executeOperatorList(z),l.endDrawing(),l.dependencyTracker?.restore(),b.restore(),A||T){let N=n.canvas;A&&(M=Y),T&&(H=W);let L=this.getSizeAndScale(M,this.ctx.canvas.width,V),m=this.getSizeAndScale(H,this.ctx.canvas.height,x),d=L.size,e=m.size,E=Z.cachedCanvases.getCanvas("pattern-workaround",d,e),p=E.context,F=A?Math.floor(f/Y):0,s=T?Math.floor(K/W):0;for(let w=0;w<=F;w++)for(let c=0;c<=s;c++)p.drawImage(N,d*w,e*c,d,e,0,0,d,e);return{canvas:E.canvas,scaleX:L.scale,scaleY:m.scale,offsetX:$,offsetY:_}}return{canvas:n.canvas,scaleX:O.scale,scaleY:D.scale,offsetX:$,offsetY:_}}getSizeAndScale(Z,q,X){let z=Math.max(xz.MAX_PATTERN_SIZE,q),R=Math.ceil(Z*X);return R>=z?R=z:X=R/Z,{scale:X,size:R}}clipBbox(Z,q,X,z,R){let G=z-q,P=R-X;Z.ctx.rect(q,X,G,P),j1.axialAlignedBoundingBox([q,X,z,R],_8(Z.ctx),Z.current.minMax),Z.clip(),Z.endPath()}setFillAndStrokeStyleToContext(Z,q,X){let{ctx:z,current:R}=Z;switch(q){case LH:let{fillStyle:G,strokeStyle:P}=this.ctx;z.fillStyle=R.fillColor=G,z.strokeStyle=R.strokeColor=P;break;case kH:z.fillStyle=z.strokeStyle=X,R.fillColor=R.strokeColor=X;break;default:throw new Bf(`Unsupported paint type: ${q}`)}}isModifyingCurrentTransform(){return!1}getPattern(Z,q,X,z,R){let G=X;z!==A7&&(G=j1.transform(G,q.baseTransform),this.matrix&&(G=j1.transform(G,this.matrix)));let P=this.createPatternCanvas(q,R),Q=new DOMMatrix(G);Q=Q.translate(P.offsetX,P.offsetY),Q=Q.scale(1/P.scaleX,1/P.scaleY);let Y=Z.createPattern(P.canvas,"repeat");return Y.setTransform(Q),Y}}function TH({src:Z,srcPos:q=0,dest:X,width:z,height:R,nonBlackColor:G=4294967295,inverseDecode:P=!1}){let Q=T8.isLittleEndian?4278190080:255,[Y,W]=P?[G,Q]:[Q,G],$=z>>3,_=7&z,J=Z.length;X=new Uint32Array(X.buffer);let U=0;for(let f=0;f<R;f++){for(let I=q+$;q<I;q++){let B=q<J?Z[q]:255;X[U++]=128&B?W:Y,X[U++]=64&B?W:Y,X[U++]=32&B?W:Y,X[U++]=16&B?W:Y,X[U++]=8&B?W:Y,X[U++]=4&B?W:Y,X[U++]=2&B?W:Y,X[U++]=1&B?W:Y}if(_===0)continue;let K=q<J?Z[q++]:255;for(let I=0;I<_;I++)X[U++]=K&1<<7-I?W:Y}return{srcPos:q,destPos:U}}class lf{constructor(Z){this.canvasFactory=Z,this.cache=Object.create(null)}getCanvas(Z,q,X){let z;return this.cache[Z]!==void 0?(z=this.cache[Z],this.canvasFactory.reset(z,q,X)):(z=this.canvasFactory.create(q,X),this.cache[Z]=z),z}delete(Z){delete this.cache[Z]}clear(){for(let Z in this.cache){let q=this.cache[Z];this.canvasFactory.destroy(q),delete this.cache[Z]}}}function D2(Z,q,X,z,R,G,P,Q,Y,W){let[$,_,J,U,f,K]=_8(Z);if(_===0&&J===0){let I=P*$+f,B=Math.round(I),j=Q*U+K,V=Math.round(j),x=(P+Y)*$+f,M=Math.abs(Math.round(x)-B)||1,H=(Q+W)*U+K,A=Math.abs(Math.round(H)-V)||1;return Z.setTransform(Math.sign($),0,0,Math.sign(U),B,V),Z.drawImage(q,X,z,R,G,0,0,M,A),Z.setTransform($,_,J,U,f,K),[M,A]}if($===0&&U===0){let I=Q*J+f,B=Math.round(I),j=P*_+K,V=Math.round(j),x=(Q+W)*J+f,M=Math.abs(Math.round(x)-B)||1,H=(P+Y)*_+K,A=Math.abs(Math.round(H)-V)||1;return Z.setTransform(0,Math.sign(_),Math.sign(J),0,B,V),Z.drawImage(q,X,z,R,G,0,0,A,M),Z.setTransform($,_,J,U,f,K),[A,M]}return Z.drawImage(q,X,z,R,G,P,Q,Y,W),[Math.hypot($,_)*Y,Math.hypot(J,U)*W]}class sq{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=Oq;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=e2;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(Z,q,X){X?.(this),this.clipBox=new Float32Array([0,0,Z,q]),this.minMax=Q6.slice()}clone(){let Z=Object.create(this);return Z.clipBox=this.clipBox.slice(),Z.minMax=this.minMax.slice(),Z}getPathBoundingBox(Z=V5,q=null){let X=this.minMax.slice();if(Z===M7){q||z8("Stroke bounding box must include transform."),j1.singularValueDecompose2dScale(q,V0);let z=V0[0]*this.lineWidth/2,R=V0[1]*this.lineWidth/2;X[0]-=z,X[1]-=R,X[2]+=z,X[3]+=R}return X}updateClipFromPath(){let Z=j1.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(Z||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(Z){this.clipBox.set(Z,0),this.minMax.set(Q6,0)}getClippedPathBoundingBox(Z=V5,q=null){return j1.intersect(this.clipBox,this.getPathBoundingBox(Z,q))}}function uG(Z,q){if(q instanceof ImageData)return void Z.putImageData(q,0,0);let{height:X,width:z}=q,R=X%P0,G=(X-R)/P0,P=R===0?G:G+1,Q=Z.createImageData(z,P0),Y,W=0,$=q.data,_=Q.data,J,U,f,K;if(q.kind===H7.GRAYSCALE_1BPP){let I=$.byteLength,B=new Uint32Array(_.buffer,0,_.byteLength>>2),j=B.length,V=z+7>>3,M=T8.isLittleEndian?4278190080:255;for(J=0;J<P;J++){for(f=J<G?P0:R,Y=0,U=0;U<f;U++){let H=I-W,A=0,T=H>V?z:8*H-7,k=-8&T,y=0,O=0;for(;A<k;A+=8)O=$[W++],B[Y++]=128&O?4294967295:M,B[Y++]=64&O?4294967295:M,B[Y++]=32&O?4294967295:M,B[Y++]=16&O?4294967295:M,B[Y++]=8&O?4294967295:M,B[Y++]=4&O?4294967295:M,B[Y++]=2&O?4294967295:M,B[Y++]=1&O?4294967295:M;for(;A<T;A++)y===0&&(O=$[W++],y=128),B[Y++]=O&y?4294967295:M,y>>=1}for(;Y<j;)B[Y++]=0;Z.putImageData(Q,0,J*P0)}}else if(q.kind===H7.RGBA_32BPP){for(U=0,K=z*P0*4,J=0;J<G;J++)_.set($.subarray(W,W+K)),W+=K,Z.putImageData(Q,0,U),U+=P0;J<P&&(K=z*R*4,_.set($.subarray(W,W+K)),Z.putImageData(Q,0,U))}else{if(q.kind!==H7.RGB_24BPP)throw Error(`bad image kind: ${q.kind}`);for(f=P0,K=z*f,J=0;J<P;J++){for(J>=G&&(f=R,K=z*f),Y=0,U=K;U--;)_[Y++]=$[W++],_[Y++]=$[W++],_[Y++]=$[W++],_[Y++]=255;Z.putImageData(Q,0,J*P0)}}}function gG(Z,q){if(q.bitmap)return void Z.drawImage(q.bitmap,0,0);let{height:X,width:z}=q,R=X%P0,G=(X-R)/P0,P=R===0?G:G+1,Q=Z.createImageData(z,P0),Y=0,W=q.data,$=Q.data;for(let _=0;_<P;_++){let J=_<G?P0:R;({srcPos:Y}=TH({src:W,srcPos:Y,dest:$,width:z,height:J,nonBlackColor:0})),Z.putImageData(Q,0,_*P0)}}function i6(Z,q){let X=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(let z of X)Z[z]!==void 0&&(q[z]=Z[z]);Z.setLineDash!==void 0&&(q.setLineDash(Z.getLineDash()),q.lineDashOffset=Z.lineDashOffset)}function w2(Z){Z.strokeStyle=Z.fillStyle="#000000",Z.fillRule="nonzero",Z.globalAlpha=1,Z.lineWidth=1,Z.lineCap="butt",Z.lineJoin="miter",Z.miterLimit=10,Z.globalCompositeOperation="source-over",Z.font="10px sans-serif",Z.setLineDash!==void 0&&(Z.setLineDash([]),Z.lineDashOffset=0);let{filter:q}=Z;q!=="none"&&q!==""&&(Z.filter="none")}function dG(Z,q){if(q)return!0;j1.singularValueDecompose2dScale(Z,V0);let X=Math.fround(u0.pixelRatio*n4.PDF_TO_CSS_UNITS);return V0[0]<=X&&V0[1]<=X}class U6{constructor(Z,q,X,z,R,{optionalContentConfig:G,markedContentStack:P=null},Q,Y,W){this.ctx=Z,this.current=new sq(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=q,this.objs=X,this.canvasFactory=z,this.filterFactory=R,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=P||[],this.optionalContentConfig=G,this.cachedCanvases=new lf(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=Q,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=Y,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=W??null}getObject(Z,q,X=null){return typeof q=="string"?(this.dependencyTracker?.recordNamedDependency(Z,q),q.startsWith("g_")?this.commonObjs.get(q):this.objs.get(q)):X}beginDrawing({transform:Z,viewport:q,transparency:X=!1,background:z=null}){let R=this.ctx.canvas.width,G=this.ctx.canvas.height,P=this.ctx.fillStyle;if(this.ctx.fillStyle=z||"#ffffff",this.ctx.fillRect(0,0,R,G),this.ctx.fillStyle=P,X){let Q=this.cachedCanvases.getCanvas("transparent",R,G);this.compositeCtx=this.ctx,this.transparentCanvas=Q.canvas,this.ctx=Q.context,this.ctx.save(),this.ctx.transform(..._8(this.compositeCtx))}this.ctx.save(),w2(this.ctx),Z&&(this.ctx.transform(...Z),this.outputScaleX=Z[0],this.outputScaleY=Z[0]),this.ctx.transform(...q.transform),this.viewportScale=q.scale,this.baseTransform=_8(this.ctx)}executeOperatorList(Z,q,X,z,R){let{argsArray:G,fnArray:P}=Z,Q=q||0,Y=G.length;if(Y===Q)return Q;let W=Y-Q>10&&typeof X=="function",$=W?Date.now()+15:0,_=0,J=this.commonObjs,U=this.objs,f,K;for(;;){if(z!==void 0&&Q===z.nextBreakPoint)return z.breakIt(Q,X),Q;if(!R||R(Q))if(f=P[Q],K=G[Q]??null,f!==T6.dependency)K===null?this[f](Q):this[f](Q,...K);else for(let I of K){this.dependencyTracker?.recordNamedData(I,Q);let B=I.startsWith("g_")?J:U;if(!B.has(I))return B.get(I,X),Q}if(Q++,Q===Y)return Q;if(W&&++_>10){if(Date.now()>$)return X(),Q;_=0}}}#Z(){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)}endDrawing(){this.#Z(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(let Z of this._cachedBitmapsMap.values()){for(let q of Z.values())typeof HTMLCanvasElement<"u"&&q instanceof HTMLCanvasElement&&(q.width=q.height=0);Z.clear()}this._cachedBitmapsMap.clear(),this.#q()}#q(){if(this.pageColors){let Z=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(Z!=="none"){let q=this.ctx.filter;this.ctx.filter=Z,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=q}}}_scaleImage(Z,q){let X=Z.width??Z.displayWidth,z=Z.height??Z.displayHeight,R,G,P=Math.max(Math.hypot(q[0],q[1]),1),Q=Math.max(Math.hypot(q[2],q[3]),1),Y=X,W=z,$="prescale1";for(;P>2&&Y>1||Q>2&&W>1;){let _=Y,J=W;P>2&&Y>1&&(_=Y>=16384?Math.floor(Y/2)-1||1:Math.ceil(Y/2),P/=Y/_),Q>2&&W>1&&(J=W>=16384?Math.floor(W/2)-1||1:Math.ceil(W)/2,Q/=W/J),R=this.cachedCanvases.getCanvas($,_,J),G=R.context,G.clearRect(0,0,_,J),G.drawImage(Z,0,0,Y,W,0,0,_,J),Z=R.canvas,Y=_,W=J,$=$==="prescale1"?"prescale2":"prescale1"}return{img:Z,paintWidth:Y,paintHeight:W}}_createMaskCanvas(Z,q){let X=this.ctx,{width:z,height:R}=q,G=this.current.fillColor,P=this.current.patternFill,Q=_8(X),Y,W,$,_;if((q.bitmap||q.data)&&q.count>1){let k=q.bitmap||q.data.buffer;W=JSON.stringify(P?Q:[Q.slice(0,4),G]),Y=this._cachedBitmapsMap.get(k),Y||(Y=new Map,this._cachedBitmapsMap.set(k,Y));let y=Y.get(W);if(y&&!P){let O=Math.round(Math.min(Q[0],Q[2])+Q[4]),D=Math.round(Math.min(Q[1],Q[3])+Q[5]);return this.dependencyTracker?.recordDependencies(Z,MZ),{canvas:y,offsetX:O,offsetY:D}}$=y}$||(_=this.cachedCanvases.getCanvas("maskCanvas",z,R),gG(_.context,q));let J=j1.transform(Q,[1/z,0,0,-1/R,0,0]);J=j1.transform(J,[1,0,0,1,0,-R]);let U=Q6.slice();j1.axialAlignedBoundingBox([0,0,z,R],J,U);let[f,K,I,B]=U,j=Math.round(I-f)||1,V=Math.round(B-K)||1,x=this.cachedCanvases.getCanvas("fillCanvas",j,V),M=x.context,H=f,A=K;M.translate(-H,-A),M.transform(...J),$||($=this._scaleImage(_.canvas,h0(M)),$=$.img,Y&&P&&Y.set(W,$)),M.imageSmoothingEnabled=dG(_8(M),q.interpolate),D2(M,$,0,0,$.width,$.height,0,0,z,R),M.globalCompositeOperation="source-in";let T=j1.transform(h0(M),[1,0,0,1,-H,-A]);return M.fillStyle=P?G.getPattern(X,this,T,V5,Z):G,M.fillRect(0,0,z,R),Y&&!P&&(this.cachedCanvases.delete("fillCanvas"),Y.set(W,x.canvas)),this.dependencyTracker?.recordDependencies(Z,MZ),{canvas:x.canvas,offsetX:Math.round(H),offsetY:Math.round(A)}}setLineWidth(Z,q){this.dependencyTracker?.recordSimpleData("lineWidth",Z),q!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=q,this.ctx.lineWidth=q}setLineCap(Z,q){this.dependencyTracker?.recordSimpleData("lineCap",Z),this.ctx.lineCap=NH[q]}setLineJoin(Z,q){this.dependencyTracker?.recordSimpleData("lineJoin",Z),this.ctx.lineJoin=CH[q]}setMiterLimit(Z,q){this.dependencyTracker?.recordSimpleData("miterLimit",Z),this.ctx.miterLimit=q}setDash(Z,q,X){this.dependencyTracker?.recordSimpleData("dash",Z);let z=this.ctx;z.setLineDash!==void 0&&(z.setLineDash(q),z.lineDashOffset=X)}setRenderingIntent(Z,q){}setFlatness(Z,q){}setGState(Z,q){for(let[X,z]of q)switch(X){case"LW":this.setLineWidth(Z,z);break;case"LC":this.setLineCap(Z,z);break;case"LJ":this.setLineJoin(Z,z);break;case"ML":this.setMiterLimit(Z,z);break;case"D":this.setDash(Z,z[0],z[1]);break;case"RI":this.setRenderingIntent(Z,z);break;case"FL":this.setFlatness(Z,z);break;case"Font":this.setFont(Z,z[0],z[1]);break;case"CA":this.dependencyTracker?.recordSimpleData("strokeAlpha",Z),this.current.strokeAlpha=z;break;case"ca":this.dependencyTracker?.recordSimpleData("fillAlpha",Z),this.ctx.globalAlpha=this.current.fillAlpha=z;break;case"BM":this.dependencyTracker?.recordSimpleData("globalCompositeOperation",Z),this.ctx.globalCompositeOperation=z;break;case"SMask":this.dependencyTracker?.recordSimpleData("SMask",Z),this.current.activeSMask=z?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.dependencyTracker?.recordSimpleData("filter",Z),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(z)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let Z=this.inSMaskMode;this.current.activeSMask&&!Z?this.beginSMaskMode():!this.current.activeSMask&&Z&&this.endSMaskMode()}beginSMaskMode(Z){if(this.inSMaskMode)throw Error("beginSMaskMode called while already in smask mode");let q=this.ctx.canvas.width,X=this.ctx.canvas.height,z="smaskGroupAt"+this.groupLevel,R=this.cachedCanvases.getCanvas(z,q,X);this.suspendedCtx=this.ctx;let G=this.ctx=R.context;G.setTransform(this.suspendedCtx.getTransform()),i6(this.suspendedCtx,G),function(P,Q){if(P._removeMirroring)throw Error("Context is already forwarding operations.");P.__originalSave=P.save,P.__originalRestore=P.restore,P.__originalRotate=P.rotate,P.__originalScale=P.scale,P.__originalTranslate=P.translate,P.__originalTransform=P.transform,P.__originalSetTransform=P.setTransform,P.__originalResetTransform=P.resetTransform,P.__originalClip=P.clip,P.__originalMoveTo=P.moveTo,P.__originalLineTo=P.lineTo,P.__originalBezierCurveTo=P.bezierCurveTo,P.__originalRect=P.rect,P.__originalClosePath=P.closePath,P.__originalBeginPath=P.beginPath,P._removeMirroring=()=>{P.save=P.__originalSave,P.restore=P.__originalRestore,P.rotate=P.__originalRotate,P.scale=P.__originalScale,P.translate=P.__originalTranslate,P.transform=P.__originalTransform,P.setTransform=P.__originalSetTransform,P.resetTransform=P.__originalResetTransform,P.clip=P.__originalClip,P.moveTo=P.__originalMoveTo,P.lineTo=P.__originalLineTo,P.bezierCurveTo=P.__originalBezierCurveTo,P.rect=P.__originalRect,P.closePath=P.__originalClosePath,P.beginPath=P.__originalBeginPath,delete P._removeMirroring},P.save=function(){Q.save(),this.__originalSave()},P.restore=function(){Q.restore(),this.__originalRestore()},P.translate=function(Y,W){Q.translate(Y,W),this.__originalTranslate(Y,W)},P.scale=function(Y,W){Q.scale(Y,W),this.__originalScale(Y,W)},P.transform=function(Y,W,$,_,J,U){Q.transform(Y,W,$,_,J,U),this.__originalTransform(Y,W,$,_,J,U)},P.setTransform=function(Y,W,$,_,J,U){Q.setTransform(Y,W,$,_,J,U),this.__originalSetTransform(Y,W,$,_,J,U)},P.resetTransform=function(){Q.resetTransform(),this.__originalResetTransform()},P.rotate=function(Y){Q.rotate(Y),this.__originalRotate(Y)},P.clip=function(Y){Q.clip(Y),this.__originalClip(Y)},P.moveTo=function(Y,W){Q.moveTo(Y,W),this.__originalMoveTo(Y,W)},P.lineTo=function(Y,W){Q.lineTo(Y,W),this.__originalLineTo(Y,W)},P.bezierCurveTo=function(Y,W,$,_,J,U){Q.bezierCurveTo(Y,W,$,_,J,U),this.__originalBezierCurveTo(Y,W,$,_,J,U)},P.rect=function(Y,W,$,_){Q.rect(Y,W,$,_),this.__originalRect(Y,W,$,_)},P.closePath=function(){Q.closePath(),this.__originalClosePath()},P.beginPath=function(){Q.beginPath(),this.__originalBeginPath()}}(G,this.suspendedCtx),this.setGState(Z,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),i6(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(Z){if(!this.current.activeSMask)return;Z?(Z[0]=Math.floor(Z[0]),Z[1]=Math.floor(Z[1]),Z[2]=Math.ceil(Z[2]),Z[3]=Math.ceil(Z[3])):Z=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let q=this.current.activeSMask,X=this.suspendedCtx;this.composeSMask(X,q,this.ctx,Z),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()}composeSMask(Z,q,X,z){let R=z[0],G=z[1],P=z[2]-R,Q=z[3]-G;P!==0&&Q!==0&&(this.genericComposeSMask(q.context,X,P,Q,q.subtype,q.backdrop,q.transferMap,R,G,q.offsetX,q.offsetY),Z.save(),Z.globalAlpha=1,Z.globalCompositeOperation="source-over",Z.setTransform(1,0,0,1,0,0),Z.drawImage(X.canvas,0,0),Z.restore())}genericComposeSMask(Z,q,X,z,R,G,P,Q,Y,W,$){let _=Z.canvas,J=Q-W,U=Y-$;if(G)if(J<0||U<0||J+X>_.width||U+z>_.height){let K=this.cachedCanvases.getCanvas("maskExtension",X,z),I=K.context;I.drawImage(_,-J,-U),I.globalCompositeOperation="destination-atop",I.fillStyle=G,I.fillRect(0,0,X,z),I.globalCompositeOperation="source-over",_=K.canvas,J=U=0}else{Z.save(),Z.globalAlpha=1,Z.setTransform(1,0,0,1,0,0);let K=new Path2D;K.rect(J,U,X,z),Z.clip(K),Z.globalCompositeOperation="destination-atop",Z.fillStyle=G,Z.fillRect(J,U,X,z),Z.restore()}q.save(),q.globalAlpha=1,q.setTransform(1,0,0,1,0,0),R==="Alpha"&&P?q.filter=this.filterFactory.addAlphaFilter(P):R==="Luminosity"&&(q.filter=this.filterFactory.addLuminosityFilter(P));let f=new Path2D;f.rect(Q,Y,X,z),q.clip(f),q.globalCompositeOperation="destination-in",q.drawImage(_,J,U,X,z,Q,Y,X,z),q.restore()}save(Z){this.inSMaskMode&&i6(this.ctx,this.suspendedCtx),this.ctx.save();let q=this.current;this.stateStack.push(q),this.current=q.clone(),this.dependencyTracker?.save(Z)}restore(Z){this.dependencyTracker?.restore(Z),this.stateStack.length!==0?(this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&i6(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null):this.inSMaskMode&&this.endSMaskMode()}transform(Z,q,X,z,R,G,P){this.dependencyTracker?.recordIncrementalData("transform",Z),this.ctx.transform(q,X,z,R,G,P),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(Z,q,X,z){let[R]=X;if(!z)return R||=X[0]=new Path2D,void this[q](Z,R);if(this.dependencyTracker!==null){let G=q===T6.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(Z).recordBBox(Z,this.ctx,z[0]-G,z[2]+G,z[1]-G,z[3]+G).recordDependencies(Z,["transform"])}if(!(R instanceof Path2D)){let G=X[0]=new Path2D;for(let P=0,Q=R.length;P<Q;)switch(R[P++]){case UH:G.moveTo(R[P++],R[P++]);break;case fH:G.lineTo(R[P++],R[P++]);break;case KH:G.bezierCurveTo(R[P++],R[P++],R[P++],R[P++],R[P++],R[P++]);break;case BH:G.closePath();break;default:p1(`Unrecognized drawing path operator: ${R[P-1]}`)}R=G}j1.axialAlignedBoundingBox(z,_8(this.ctx),this.current.minMax),this[q](Z,R),this._pathStartIdx=Z}closePath(Z){this.ctx.closePath()}stroke(Z,q,X=!0){let z=this.ctx,R=this.current.strokeColor;if(z.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof R=="object"&&R?.getPattern){let G=R.isModifyingCurrentTransform()?z.getTransform():null;if(z.save(),z.strokeStyle=R.getPattern(z,this,h0(z),M7,Z),G){let P=new Path2D;P.addPath(q,z.getTransform().invertSelf().multiplySelf(G)),q=P}this.rescaleAndStroke(q,!1),z.restore()}else this.rescaleAndStroke(q,!0);this.dependencyTracker?.recordDependencies(Z,EG),X&&this.consumePath(Z,q,this.current.getClippedPathBoundingBox(M7,_8(this.ctx))),z.globalAlpha=this.current.fillAlpha}closeStroke(Z,q){this.stroke(Z,q)}fill(Z,q,X=!0){let z=this.ctx,R=this.current.fillColor,G=!1;if(this.current.patternFill){let Q=R.isModifyingCurrentTransform()?z.getTransform():null;if(this.dependencyTracker?.save(Z),z.save(),z.fillStyle=R.getPattern(z,this,h0(z),V5,Z),Q){let Y=new Path2D;Y.addPath(q,z.getTransform().invertSelf().multiplySelf(Q)),q=Y}G=!0}let P=this.current.getClippedPathBoundingBox();this.contentVisible&&P!==null&&(this.pendingEOFill?(z.fill(q,"evenodd"),this.pendingEOFill=!1):z.fill(q)),this.dependencyTracker?.recordDependencies(Z,xZ),G&&(z.restore(),this.dependencyTracker?.restore(Z)),X&&this.consumePath(Z,q,P)}eoFill(Z,q){this.pendingEOFill=!0,this.fill(Z,q)}fillStroke(Z,q){this.fill(Z,q,!1),this.stroke(Z,q,!1),this.consumePath(Z,q)}eoFillStroke(Z,q){this.pendingEOFill=!0,this.fillStroke(Z,q)}closeFillStroke(Z,q){this.fillStroke(Z,q)}closeEOFillStroke(Z,q){this.pendingEOFill=!0,this.fillStroke(Z,q)}endPath(Z,q){this.consumePath(Z,q)}rawFillPath(Z,q){this.ctx.fill(q),this.dependencyTracker?.recordDependencies(Z,HH).recordOperation(Z)}clip(Z){this.dependencyTracker?.recordFutureForcedDependency("clipMode",Z),this.pendingClip=FH}eoClip(Z){this.dependencyTracker?.recordFutureForcedDependency("clipMode",Z),this.pendingClip=cG}beginText(Z){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.dependencyTracker?.recordOpenMarker(Z).resetIncrementalData("sameLineText").resetIncrementalData("moveText",Z)}endText(Z){let q=this.pendingTextPaths,X=this.ctx;if(this.dependencyTracker){let{dependencyTracker:z}=this;q!==void 0&&z.recordFutureForcedDependency("textClip",z.getOpenMarker()).recordFutureForcedDependency("textClip",Z),z.recordCloseMarker(Z)}if(q!==void 0){let z=new Path2D,R=X.getTransform().invertSelf();for(let{transform:G,x:P,y:Q,fontSize:Y,path:W}of q)W&&z.addPath(W,new DOMMatrix(G).preMultiplySelf(R).translate(P,Q).scale(Y,-Y));X.clip(z)}delete this.pendingTextPaths}setCharSpacing(Z,q){this.dependencyTracker?.recordSimpleData("charSpacing",Z),this.current.charSpacing=q}setWordSpacing(Z,q){this.dependencyTracker?.recordSimpleData("wordSpacing",Z),this.current.wordSpacing=q}setHScale(Z,q){this.dependencyTracker?.recordSimpleData("hScale",Z),this.current.textHScale=q/100}setLeading(Z,q){this.dependencyTracker?.recordSimpleData("leading",Z),this.current.leading=-q}setFont(Z,q,X){this.dependencyTracker?.recordSimpleData("font",Z).recordSimpleDataFromNamed("fontObj",q,Z);let z=this.commonObjs.get(q),R=this.current;if(!z)throw Error(`Can't find font for ${q}`);if(R.fontMatrix=z.fontMatrix||Oq,R.fontMatrix[0]!==0&&R.fontMatrix[3]!==0||p1("Invalid font matrix for font "+q),X<0?(X=-X,R.fontDirection=-1):R.fontDirection=1,this.current.font=z,this.current.fontSize=X,z.isType3Font)return;let G=z.loadedName||"sans-serif",P=z.systemFontInfo?.css||`"${G}", ${z.fallbackName}`,Q="normal";z.black?Q="900":z.bold&&(Q="bold");let Y=z.italic?"italic":"normal",W=X;X<16?W=16:X>100&&(W=100),this.current.fontSizeScale=X/W,this.ctx.font=`${Y} ${Q} ${W}px ${P}`}setTextRenderingMode(Z,q){this.dependencyTracker?.recordSimpleData("textRenderingMode",Z),this.current.textRenderingMode=q}setTextRise(Z,q){this.dependencyTracker?.recordSimpleData("textRise",Z),this.current.textRise=q}moveText(Z,q,X){this.dependencyTracker?.resetIncrementalData("sameLineText").recordIncrementalData("moveText",Z),this.current.x=this.current.lineX+=q,this.current.y=this.current.lineY+=X}setLeadingMoveText(Z,q,X){this.setLeading(Z,-X),this.moveText(Z,q,X)}setTextMatrix(Z,q){this.dependencyTracker?.recordSimpleData("textMatrix",Z);let{current:X}=this;X.textMatrix=q,X.textMatrixScale=Math.hypot(q[0],q[1]),X.x=X.lineX=0,X.y=X.lineY=0}nextLine(Z){this.moveText(Z,0,this.current.leading),this.dependencyTracker?.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??Z)}#z(Z,q,X){let z=new Path2D;return z.addPath(Z,new DOMMatrix(X).invertSelf().multiplySelf(q)),z}paintChar(Z,q,X,z,R,G){let P=this.ctx,Q=this.current,Y=Q.font,W=Q.textRenderingMode,$=Q.fontSize/Q.fontSizeScale,_=W&xG,J=!!(W&MG),U=Q.patternFill&&!Y.missingFile,f=Q.patternStroke&&!Y.missingFile,K;if((Y.disableFontFace||J||U||f)&&!Y.missingFile&&(K=Y.getPathGenerator(this.commonObjs,q)),K&&(Y.disableFontFace||U||f)){let I;if(P.save(),P.translate(X,z),P.scale($,-$),this.dependencyTracker?.recordCharacterBBox(Z,P,Y),_===e2||_===n6)if(R){I=P.getTransform(),P.setTransform(...R);let B=this.#z(K,I,R);P.fill(B)}else P.fill(K);if(_===BZ||_===n6)if(G){I||=P.getTransform(),P.setTransform(...G);let{a:B,b:j,c:V,d:x}=I,M=j1.inverseTransform(G),H=j1.transform([B,j,V,x,0,0],M);j1.singularValueDecompose2dScale(H,V0),P.lineWidth*=Math.max(V0[0],V0[1])/$,P.stroke(this.#z(K,I,G))}else P.lineWidth/=$,P.stroke(K);P.restore()}else _!==e2&&_!==n6||(P.fillText(q,X,z),this.dependencyTracker?.recordCharacterBBox(Z,P,Y,$,X,z,()=>P.measureText(q))),_!==BZ&&_!==n6||(this.dependencyTracker&&this.dependencyTracker?.recordCharacterBBox(Z,P,Y,$,X,z,()=>P.measureText(q)).recordDependencies(Z,EG),P.strokeText(q,X,z));if(J)(this.pendingTextPaths||=[]).push({transform:_8(P),x:X,y:z,fontSize:$,path:K}),this.dependencyTracker?.recordCharacterBBox(Z,P,Y,$,X,z)}get isFontSubpixelAAEnabled(){let{context:Z}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);Z.scale(1.5,1),Z.fillText("I",0,10);let q=Z.getImageData(0,0,10,10).data,X=!1;for(let z=3;z<q.length;z+=4)if(q[z]>0&&q[z]<255){X=!0;break}return D1(this,"isFontSubpixelAAEnabled",X)}showText(Z,q){this.dependencyTracker&&(this.dependencyTracker.recordDependencies(Z,xH).resetBBox(Z),this.current.textRenderingMode&MG&&this.dependencyTracker.recordFutureForcedDependency("textClip",Z).inheritPendingDependenciesAsFutureForcedDependencies());let X=this.current,z=X.font;if(z.isType3Font)return this.showType3Text(Z,q),void this.dependencyTracker?.recordShowTextOperation(Z);let R=X.fontSize;if(R===0)return void this.dependencyTracker?.recordOperation(Z);let G=this.ctx,P=X.fontSizeScale,Q=X.charSpacing,Y=X.wordSpacing,W=X.fontDirection,$=X.textHScale*W,_=q.length,J=z.vertical,U=J?1:-1,f=z.defaultVMetrics,K=R*X.fontMatrix[0],I=X.textRenderingMode===e2&&!z.disableFontFace&&!X.patternFill,B,j;if(G.save(),X.textMatrix&&G.transform(...X.textMatrix),G.translate(X.x,X.y+X.textRise),W>0?G.scale($,-1):G.scale($,1),X.patternFill){G.save();let A=X.fillColor.getPattern(G,this,h0(G),V5,Z);B=_8(G),G.restore(),G.fillStyle=A}if(X.patternStroke){G.save();let A=X.strokeColor.getPattern(G,this,h0(G),M7,Z);j=_8(G),G.restore(),G.strokeStyle=A}let{lineWidth:V,textMatrixScale:x}=X;if(x===0||V===0){let A=X.textRenderingMode&xG;A!==BZ&&A!==n6||(V=this.getSinglePixelWidth())}else V/=x;if(P!==1&&(G.scale(P,P),V/=P),G.lineWidth=V,z.isInvalidPDFjsFont){let A=[],T=0;for(let y of q)A.push(y.unicode),T+=y.width;let k=A.join("");if(G.fillText(k,0,0),this.dependencyTracker!==null){let y=G.measureText(k);this.dependencyTracker.recordBBox(Z,this.ctx,-y.actualBoundingBoxLeft,y.actualBoundingBoxRight,-y.actualBoundingBoxAscent,y.actualBoundingBoxDescent).recordShowTextOperation(Z)}return X.x+=T*K*$,G.restore(),void this.compose()}let M,H=0;for(M=0;M<_;++M){let A=q[M];if(typeof A=="number"){H+=U*A*R/1000;continue}let T=!1,k=(A.isSpace?Y:0)+Q,y=A.fontChar,O=A.accent,D,n,b,l=A.width;if(J){let N=A.vmetric||f,L=-(A.vmetric?N[1]:0.5*l)*K,m=N[2]*K;l=N?-N[0]:l,D=L/P,n=(H+m)/P}else D=H/P,n=0;if(z.remeasure&&l>0){b=G.measureText(y);let N=1000*b.width/R*P;if(l<N&&this.isFontSubpixelAAEnabled){let L=l/N;T=!0,G.save(),G.scale(L,1),D/=L}else l!==N&&(D+=(l-N)/2000*R/P)}if(this.contentVisible&&(A.isInFont||z.missingFile)){if(I&&!O)G.fillText(y,D,n),this.dependencyTracker?.recordCharacterBBox(Z,G,b?{bbox:null}:z,R/P,D,n,()=>b??G.measureText(y));else if(this.paintChar(Z,y,D,n,B,j),O){let N=D+R*O.offset.x/P,L=n-R*O.offset.y/P;this.paintChar(Z,O.fontChar,N,L,B,j)}}H+=J?l*K-k*W:l*K+k*W,T&&G.restore()}J?X.y-=H:X.x+=H*$,G.restore(),this.compose(),this.dependencyTracker?.recordShowTextOperation(Z)}showType3Text(Z,q){let X=this.ctx,z=this.current,R=z.font,G=z.fontSize,P=z.fontDirection,Q=R.vertical?1:-1,Y=z.charSpacing,W=z.wordSpacing,$=z.textHScale*P,_=z.fontMatrix||Oq,J=q.length,U,f,K,I;if(z.textRenderingMode===YH||G===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,X.save(),z.textMatrix&&X.transform(...z.textMatrix),X.translate(z.x,z.y+z.textRise),X.scale($,P);let B=this.dependencyTracker;for(this.dependencyTracker=B?new a3(B,Z):null,U=0;U<J;++U){if(f=q[U],typeof f=="number"){I=Q*f*G/1000,this.ctx.translate(I,0),z.x+=I*$;continue}let j=(f.isSpace?W:0)+Y,V=R.charProcOperatorList[f.operatorListId];V?this.contentVisible&&(this.save(),X.scale(G,G),X.transform(..._),this.executeOperatorList(V),this.restore()):p1(`Type3 character "${f.operatorListId}" is not available.`);let x=[f.width,0];j1.applyTransform(x,_),K=x[0]*G+j,X.translate(K,0),z.x+=K*$}X.restore(),B&&(this.dependencyTracker=B)}setCharWidth(Z,q,X){}setCharWidthAndBounds(Z,q,X,z,R,G,P){let Q=new Path2D;Q.rect(z,R,G-z,P-R),this.ctx.clip(Q),this.dependencyTracker?.recordBBox(Z,this.ctx,z,G,R,P).recordClipBox(Z,this.ctx,z,G,R,P),this.endPath(Z)}getColorN_Pattern(Z,q){let X;if(q[0]==="TilingPattern"){let z=this.baseTransform||_8(this.ctx),R={createCanvasGraphics:(G,P)=>new U6(G,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new a3(this.dependencyTracker,P,!0):null)};X=new xz(q,this.ctx,R,z)}else X=this._getPattern(Z,q[1],q[2]);return X}setStrokeColorN(Z,...q){this.dependencyTracker?.recordSimpleData("strokeColor",Z),this.current.strokeColor=this.getColorN_Pattern(Z,q),this.current.patternStroke=!0}setFillColorN(Z,...q){this.dependencyTracker?.recordSimpleData("fillColor",Z),this.current.fillColor=this.getColorN_Pattern(Z,q),this.current.patternFill=!0}setStrokeRGBColor(Z,q){this.dependencyTracker?.recordSimpleData("strokeColor",Z),this.ctx.strokeStyle=this.current.strokeColor=q,this.current.patternStroke=!1}setStrokeTransparent(Z){this.dependencyTracker?.recordSimpleData("strokeColor",Z),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(Z,q){this.dependencyTracker?.recordSimpleData("fillColor",Z),this.ctx.fillStyle=this.current.fillColor=q,this.current.patternFill=!1}setFillTransparent(Z){this.dependencyTracker?.recordSimpleData("fillColor",Z),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(Z,q,X=null){let z;return this.cachedPatterns.has(q)?z=this.cachedPatterns.get(q):(z=function(R){switch(R[0]){case"RadialAxial":return new hf(R);case"Mesh":return new sf(R);case"Dummy":return new rf}throw Error(`Unknown IR type: ${R[0]}`)}(this.getObject(Z,q)),this.cachedPatterns.set(q,z)),X&&(z.matrix=X),z}shadingFill(Z,q){if(!this.contentVisible)return;let X=this.ctx;this.save(Z);let z=this._getPattern(Z,q);X.fillStyle=z.getPattern(X,this,h0(X),A7,Z);let R=h0(X);if(R){let{width:G,height:P}=X.canvas,Q=Q6.slice();j1.axialAlignedBoundingBox([0,0,G,P],R,Q);let[Y,W,$,_]=Q;this.ctx.fillRect(Y,W,$-Y,_-W)}else this.ctx.fillRect(-10000000000,-10000000000,20000000000,20000000000);this.dependencyTracker?.resetBBox(Z).recordFullPageBBox(Z).recordDependencies(Z,MH).recordDependencies(Z,xZ).recordOperation(Z),this.compose(this.current.getClippedPathBoundingBox()),this.restore(Z)}beginInlineImage(){z8("Should not call beginInlineImage")}beginImageData(){z8("Should not call beginImageData")}paintFormXObjectBegin(Z,q,X){if(this.contentVisible&&(this.save(Z),this.baseTransformStack.push(this.baseTransform),q&&this.transform(Z,...q),this.baseTransform=_8(this.ctx),X)){j1.axialAlignedBoundingBox(X,this.baseTransform,this.current.minMax);let[z,R,G,P]=X,Q=new Path2D;Q.rect(z,R,G-z,P-R),this.ctx.clip(Q),this.dependencyTracker?.recordClipBox(Z,this.ctx,z,G,R,P),this.endPath(Z)}}paintFormXObjectEnd(Z){this.contentVisible&&(this.restore(Z),this.baseTransform=this.baseTransformStack.pop())}beginGroup(Z,q){if(!this.contentVisible)return;this.save(Z),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let X=this.ctx;q.isolated||F9("TODO: Support non-isolated groups."),q.knockout&&p1("Knockout groups not supported.");let z=_8(X);if(q.matrix&&X.transform(...q.matrix),!q.bbox)throw Error("Bounding box is required.");let R=Q6.slice();j1.axialAlignedBoundingBox(q.bbox,_8(X),R);let G=[0,0,X.canvas.width,X.canvas.height];R=j1.intersect(R,G)||[0,0,0,0];let P=Math.floor(R[0]),Q=Math.floor(R[1]),Y=Math.max(Math.ceil(R[2])-P,1),W=Math.max(Math.ceil(R[3])-Q,1);this.current.startNewPathAndClipBox([0,0,Y,W]);let $="groupAt"+this.groupLevel;q.smask&&($+="_smask_"+this.smaskCounter++%2);let _=this.cachedCanvases.getCanvas($,Y,W),J=_.context;J.translate(-P,-Q),J.transform(...z);let U=new Path2D,[f,K,I,B]=q.bbox;if(U.rect(f,K,I-f,B-K),q.matrix){let j=new Path2D;j.addPath(U,new DOMMatrix(q.matrix)),U=j}J.clip(U),q.smask&&this.smaskStack.push({canvas:_.canvas,context:J,offsetX:P,offsetY:Q,subtype:q.smask.subtype,backdrop:q.smask.backdrop,transferMap:q.smask.transferMap||null,startTransformInverse:null}),q.smask&&!this.dependencyTracker||(X.setTransform(1,0,0,1,0,0),X.translate(P,Q),X.save()),i6(X,J),this.ctx=J,this.dependencyTracker?.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(X),this.setGState(Z,[["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(X),this.groupLevel++}endGroup(Z,q){if(!this.contentVisible)return;this.groupLevel--;let X=this.ctx,z=this.groupStack.pop();if(this.ctx=z,this.ctx.imageSmoothingEnabled=!1,this.dependencyTracker?.popBaseTransform(),q.smask)this.tempSMask=this.smaskStack.pop(),this.restore(Z),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();let R=_8(this.ctx);this.restore(Z),this.ctx.save(),this.ctx.setTransform(...R);let G=Q6.slice();j1.axialAlignedBoundingBox([0,0,X.canvas.width,X.canvas.height],R,G),this.ctx.drawImage(X.canvas,0,0),this.ctx.restore(),this.compose(G)}}beginAnnotation(Z,q,X,z,R,G){if(this.#Z(),w2(this.ctx),this.ctx.save(),this.save(Z),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),X){let P=X[2]-X[0],Q=X[3]-X[1];if(G&&this.annotationCanvasMap){(z=z.slice())[4]-=X[0],z[5]-=X[1],(X=X.slice())[0]=X[1]=0,X[2]=P,X[3]=Q,j1.singularValueDecompose2dScale(_8(this.ctx),V0);let{viewportScale:Y}=this,W=Math.ceil(P*this.outputScaleX*Y),$=Math.ceil(Q*this.outputScaleY*Y);this.annotationCanvas=this.canvasFactory.create(W,$);let{canvas:_,context:J}=this.annotationCanvas;this.annotationCanvasMap.set(q,_),this.annotationCanvas.savedCtx=this.ctx,this.ctx=J,this.ctx.save(),this.ctx.setTransform(V0[0],0,0,-V0[1],0,Q*V0[1]),w2(this.ctx)}else{w2(this.ctx),this.endPath(Z);let Y=new Path2D;Y.rect(X[0],X[1],P,Q),this.ctx.clip(Y)}}this.current=new sq(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(Z,...z),this.transform(Z,...R)}endAnnotation(Z){this.annotationCanvas&&(this.ctx.restore(),this.#q(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(Z,q){if(!this.contentVisible)return;let X=q.count;(q=this.getObject(Z,q.data,q)).count=X;let z=this.ctx,R=this._createMaskCanvas(Z,q),G=R.canvas;z.save(),z.setTransform(1,0,0,1,0,0),z.drawImage(G,R.offsetX,R.offsetY),this.dependencyTracker?.resetBBox(Z).recordBBox(Z,this.ctx,R.offsetX,R.offsetX+G.width,R.offsetY,R.offsetY+G.height).recordOperation(Z),z.restore(),this.compose()}paintImageMaskXObjectRepeat(Z,q,X,z=0,R=0,G,P){if(!this.contentVisible)return;q=this.getObject(Z,q.data,q);let Q=this.ctx;Q.save();let Y=_8(Q);Q.transform(X,z,R,G,0,0);let W=this._createMaskCanvas(Z,q);Q.setTransform(1,0,0,1,W.offsetX-Y[4],W.offsetY-Y[5]),this.dependencyTracker?.resetBBox(Z);for(let $=0,_=P.length;$<_;$+=2){let J=j1.transform(Y,[X,z,R,G,P[$],P[$+1]]);Q.drawImage(W.canvas,J[4],J[5]),this.dependencyTracker?.recordBBox(Z,this.ctx,J[4],J[4]+W.canvas.width,J[5],J[5]+W.canvas.height)}Q.restore(),this.compose(),this.dependencyTracker?.recordOperation(Z)}paintImageMaskXObjectGroup(Z,q){if(!this.contentVisible)return;let X=this.ctx,z=this.current.fillColor,R=this.current.patternFill;this.dependencyTracker?.resetBBox(Z).recordDependencies(Z,MZ);for(let G of q){let{data:P,width:Q,height:Y,transform:W}=G,$=this.cachedCanvases.getCanvas("maskCanvas",Q,Y),_=$.context;_.save(),gG(_,this.getObject(Z,P,G)),_.globalCompositeOperation="source-in",_.fillStyle=R?z.getPattern(_,this,h0(X),V5,Z):z,_.fillRect(0,0,Q,Y),_.restore(),X.save(),X.transform(...W),X.scale(1,-1),D2(X,$.canvas,0,0,Q,Y,0,-1,1,1),this.dependencyTracker?.recordBBox(Z,X,0,Q,0,Y),X.restore()}this.compose(),this.dependencyTracker?.recordOperation(Z)}paintImageXObject(Z,q){if(!this.contentVisible)return;let X=this.getObject(Z,q);X?this.paintInlineImageXObject(Z,X):p1("Dependent image isn't ready yet")}paintImageXObjectRepeat(Z,q,X,z,R){if(!this.contentVisible)return;let G=this.getObject(Z,q);if(!G)return void p1("Dependent image isn't ready yet");let{width:P,height:Q}=G,Y=[];for(let W=0,$=R.length;W<$;W+=2)Y.push({transform:[X,0,0,z,R[W],R[W+1]],x:0,y:0,w:P,h:Q});this.paintInlineImageXObjectGroup(Z,G,Y)}applyTransferMapsToCanvas(Z){return this.current.transferMaps!=="none"&&(Z.filter=this.current.transferMaps,Z.drawImage(Z.canvas,0,0),Z.filter="none"),Z.canvas}applyTransferMapsToBitmap(Z){if(this.current.transferMaps==="none")return Z.bitmap;let{bitmap:q,width:X,height:z}=Z,R=this.cachedCanvases.getCanvas("inlineImage",X,z),G=R.context;return G.filter=this.current.transferMaps,G.drawImage(q,0,0),G.filter="none",R.canvas}paintInlineImageXObject(Z,q){if(!this.contentVisible)return;let{width:X,height:z}=q,R=this.ctx;this.save(Z);let{filter:G}=R,P;if(G!=="none"&&G!==""&&(R.filter="none"),R.scale(1/X,-1/z),q.bitmap)P=this.applyTransferMapsToBitmap(q);else if(typeof HTMLElement=="function"&&q instanceof HTMLElement||!q.data)P=q;else{let Y=this.cachedCanvases.getCanvas("inlineImage",X,z).context;uG(Y,q),P=this.applyTransferMapsToCanvas(Y)}let Q=this._scaleImage(P,h0(R));R.imageSmoothingEnabled=dG(_8(R),q.interpolate),this.dependencyTracker?.resetBBox(Z).recordBBox(Z,R,0,X,-z,0).recordDependencies(Z,VH).recordOperation(Z),D2(R,Q.img,0,0,Q.paintWidth,Q.paintHeight,0,-z,X,z),this.compose(),this.restore(Z)}paintInlineImageXObjectGroup(Z,q,X){if(!this.contentVisible)return;let z=this.ctx,R;if(q.bitmap)R=q.bitmap;else{let{width:G,height:P}=q,Q=this.cachedCanvases.getCanvas("inlineImage",G,P).context;uG(Q,q),R=this.applyTransferMapsToCanvas(Q)}this.dependencyTracker?.resetBBox(Z);for(let G of X)z.save(),z.transform(...G.transform),z.scale(1,-1),D2(z,R,G.x,G.y,G.w,G.h,0,-1,1,1),this.dependencyTracker?.recordBBox(Z,z,0,1,-1,0),z.restore();this.dependencyTracker?.recordOperation(Z),this.compose()}paintSolidColorImageMask(Z){this.contentVisible&&(this.dependencyTracker?.resetBBox(Z).recordBBox(Z,this.ctx,0,1,0,1).recordDependencies(Z,xZ).recordOperation(Z),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(Z,q){}markPointProps(Z,q,X){}beginMarkedContent(Z,q){this.dependencyTracker?.beginMarkedContent(Z),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(Z,q,X){this.dependencyTracker?.beginMarkedContent(Z),q==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(X)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(Z){this.dependencyTracker?.endMarkedContent(Z),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(Z){}endCompat(Z){}consumePath(Z,q,X){let z=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(X);let R=this.ctx;this.pendingClip?(z||(this.pendingClip===cG?R.clip(q,"evenodd"):R.clip(q)),this.pendingClip=null,this.dependencyTracker?.bboxToClipBoxDropOperation(Z).recordFutureForcedDependency("clipPath",Z)):this.dependencyTracker?.recordOperation(Z),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){let Z=_8(this.ctx);if(Z[1]===0&&Z[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(Z[0]),Math.abs(Z[3]));else{let q=Math.abs(Z[0]*Z[3]-Z[2]*Z[1]),X=Math.hypot(Z[0],Z[2]),z=Math.hypot(Z[1],Z[3]);this._cachedGetSinglePixelWidth=Math.max(X,z)/q}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){let{lineWidth:Z}=this.current,{a:q,b:X,c:z,d:R}=this.ctx.getTransform(),G,P;if(X===0&&z===0){let Q=Math.abs(q),Y=Math.abs(R);if(Q===Y)if(Z===0)G=P=1/Q;else{let W=Q*Z;G=P=W<1?1/W:1}else if(Z===0)G=1/Q,P=1/Y;else{let W=Q*Z,$=Y*Z;G=W<1?1/W:1,P=$<1?1/$:1}}else{let Q=Math.abs(q*R-X*z),Y=Math.hypot(q,X),W=Math.hypot(z,R);if(Z===0)G=W/Q,P=Y/Q;else{let $=Z*Q;G=W>$?W/$:1,P=Y>$?Y/$:1}}this._cachedScaleForStroking[0]=G,this._cachedScaleForStroking[1]=P}return this._cachedScaleForStroking}rescaleAndStroke(Z,q){let{ctx:X,current:{lineWidth:z}}=this,[R,G]=this.getScaleForStroking();if(R===G)return X.lineWidth=(z||1)*R,void X.stroke(Z);let P=X.getLineDash();q&&X.save(),X.scale(R,G),LZ.a=1/R,LZ.d=1/G;let Q=new Path2D;if(Q.addPath(Z,LZ),P.length>0){let Y=Math.max(R,G);X.setLineDash(P.map((W)=>W/Y)),X.lineDashOffset/=Y}X.lineWidth=z||1,X.stroke(Q),q&&X.restore()}isContentVisible(){for(let Z=this.markedContentStack.length-1;Z>=0;Z--)if(!this.markedContentStack[Z].visible)return!1;return!0}}class b5{static#Z=null;static#q="";static get workerPort(){return this.#Z}static set workerPort(Z){if(!(typeof Worker<"u"&&Z instanceof Worker)&&Z!==null)throw Error("Invalid `workerPort` type.");this.#Z=Z}static get workerSrc(){return this.#q}static set workerSrc(Z){if(typeof Z!="string")throw Error("Invalid `workerSrc` type.");this.#q=Z}}class af{#Z=!1;#q=!1;#z=!1;#X=!0;constructor(Z,{name:q,intent:X,usage:z,rbGroups:R}){this.#Z=!!(Z&Rz),this.#q=!!(Z&l3),this.name=q,this.intent=X,this.usage=z,this.rbGroups=R}get visible(){if(this.#z)return this.#X;if(!this.#X)return!1;let{print:Z,view:q}=this.usage;return this.#Z?q?.viewState!=="OFF":!this.#q||Z?.printState!=="OFF"}_setVisible(Z,q,X=!1){Z!==t5&&z8("Internal method `_setVisible` called."),this.#z=X,this.#X=q}}class tf{constructor(Z,{disableRange:q=!1,disableStream:X=!1}){o1(Z,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');let{length:z,initialData:R,progressiveDone:G,contentDispositionFilename:P}=Z;if(this._queuedChunks=[],this._progressiveDone=G,this._contentDispositionFilename=P,R?.length>0){let Q=R instanceof Uint8Array&&R.byteLength===R.buffer.byteLength?R.buffer:new Uint8Array(R).buffer;this._queuedChunks.push(Q)}this._pdfDataRangeTransport=Z,this._isStreamingSupported=!X,this._isRangeSupported=!q,this._contentLength=z,this._fullRequestReader=null,this._rangeReaders=[],Z.addRangeListener((Q,Y)=>{this._onReceiveData({begin:Q,chunk:Y})}),Z.addProgressListener((Q,Y)=>{this._onProgress({loaded:Q,total:Y})}),Z.addProgressiveReadListener((Q)=>{this._onReceiveData({chunk:Q})}),Z.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),Z.transportReady()}_onReceiveData({begin:Z,chunk:q}){let X=q instanceof Uint8Array&&q.byteLength===q.buffer.byteLength?q.buffer:new Uint8Array(q).buffer;if(Z===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(X):this._queuedChunks.push(X);else o1(this._rangeReaders.some(function(z){return z._begin===Z&&(z._enqueue(X),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(Z){Z.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:Z.loaded}):this._fullRequestReader?.onProgress?.({loaded:Z.loaded,total:Z.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(Z){let q=this._rangeReaders.indexOf(Z);q>=0&&this._rangeReaders.splice(q,1)}getFullReader(){o1(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let Z=this._queuedChunks;return this._queuedChunks=null,new ef(this,Z,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(Z,q){if(q<=this._progressiveDataLength)return null;let X=new ZK(this,Z,q);return this._pdfDataRangeTransport.requestDataRange(Z,q),this._rangeReaders.push(X),X}cancelAllRequests(Z){this._fullRequestReader?.cancel(Z);for(let q of this._rangeReaders.slice(0))q.cancel(Z);this._pdfDataRangeTransport.abort()}}class ef{constructor(Z,q,X=!1,z=null){this._stream=Z,this._done=X||!1,this._filename=b9(z)?z:null,this._queuedChunks=q||[],this._loaded=0;for(let R of this._queuedChunks)this._loaded+=R.byteLength;this._requests=[],this._headersReady=Promise.resolve(),Z._fullRequestReader=this,this.onProgress=null}_enqueue(Z){if(!this._done){if(this._requests.length>0)this._requests.shift().resolve({value:Z,done:!1});else this._queuedChunks.push(Z);this._loaded+=Z.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let Z=Promise.withResolvers();return this._requests.push(Z),Z.promise}cancel(Z){this._done=!0;for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class ZK{constructor(Z,q,X){this._stream=Z,this._begin=q,this._end=X,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(Z){if(!this._done){if(this._requests.length===0)this._queuedChunk=Z;else{this._requests.shift().resolve({value:Z,done:!1});for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){let q=this._queuedChunk;return this._queuedChunk=null,{value:q,done:!1}}if(this._done)return{value:void 0,done:!0};let Z=Promise.withResolvers();return this._requests.push(Z),Z.promise}cancel(Z){this._done=!0;for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function qK(Z,q){let X=new Headers;if(!Z||!q||typeof q!="object")return X;for(let z in q){let R=q[z];R!==void 0&&X.append(z,R)}return X}function O9(Z){return URL.parse(Z)?.origin??null}function XK({responseHeaders:Z,isHttp:q,rangeChunkSize:X,disableRange:z}){let R={allowRangeRequests:!1,suggestedLength:void 0},G=parseInt(Z.get("Content-Length"),10);if(!Number.isInteger(G))return R;if(R.suggestedLength=G,G<=2*X)return R;if(z||!q)return R;if(Z.get("Accept-Ranges")!=="bytes")return R;return(Z.get("Content-Encoding")||"identity")!=="identity"||(R.allowRangeRequests=!0),R}function zK(Z){let q=Z.get("Content-Disposition");if(q){let X=function(z){let R=!0,G=P("filename\\*","i").exec(z);if(G){G=G[1];let J=W(G);return J=unescape(J),J=$(J),J=_(J),Y(J)}if(G=function(J){let U=[],f,K=P("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(f=K.exec(J))!==null;){let[,B,j,V]=f;if(B=parseInt(B,10),B in U){if(B===0)break}else U[B]=[j,V]}let I=[];for(let B=0;B<U.length&&B in U;++B){let[j,V]=U[B];V=W(V),j&&(V=unescape(V),B===0&&(V=$(V))),I.push(V)}return I.join("")}(z),G)return Y(_(G));if(G=P("filename","i").exec(z),G){G=G[1];let J=W(G);return J=_(J),Y(J)}function P(J,U){return new RegExp("(?:^|;)\\s*"+J+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',U)}function Q(J,U){if(J){if(!/^[\x00-\xFF]+$/.test(U))return U;try{let f=new TextDecoder(J,{fatal:!0}),K=P2(U);U=f.decode(K),R=!1}catch{}}return U}function Y(J){return R&&/[\x80-\xff]/.test(J)&&(J=Q("utf-8",J),R&&(J=Q("iso-8859-1",J))),J}function W(J){if(J.startsWith('"')){let U=J.slice(1).split("\\\"");for(let f=0;f<U.length;++f){let K=U[f].indexOf('"');K!==-1&&(U[f]=U[f].slice(0,K),U.length=f+1),U[f]=U[f].replaceAll(/\\(.)/g,"$1")}J=U.join('"')}return J}function $(J){let U=J.indexOf("'");return U===-1?J:Q(J.slice(0,U),J.slice(U+1).replace(/^[^']*'/,""))}function _(J){return!J.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(J)?J:J.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(U,f,K,I){if(K==="q"||K==="Q")return Q(f,I=(I=I.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(B,j){return String.fromCharCode(parseInt(j,16))}));try{I=atob(I)}catch{}return Q(f,I)})}return""}(q);if(X.includes("%"))try{X=decodeURIComponent(X)}catch{}if(b9(X))return X}return null}function _2(Z,q){return new N6(`Unexpected server response (${Z}) while retrieving PDF "${q}".`,Z,Z===404||Z===0&&q.startsWith("file:"))}function RK(Z){return Z===200||Z===206}function GK(Z,q,X){return{method:"GET",headers:Z,signal:X.signal,mode:"cors",credentials:q?"include":"same-origin",redirect:"follow"}}function PK(Z){return Z instanceof Uint8Array?Z.buffer:Z instanceof ArrayBuffer?Z:(p1(`getArrayBuffer - unexpected data format: ${Z}`),new Uint8Array(Z).buffer)}class QK{_responseOrigin=null;constructor(Z){this.source=Z,this.isHttp=/^https?:/i.test(Z.url),this.headers=qK(this.isHttp,Z.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return o1(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new YK(this),this._fullRequestReader}getRangeReader(Z,q){if(q<=this._progressiveDataLength)return null;let X=new WK(this,Z,q);return this._rangeRequestReaders.push(X),X}cancelAllRequests(Z){this._fullRequestReader?.cancel(Z);for(let q of this._rangeRequestReaders.slice(0))q.cancel(Z)}}class YK{constructor(Z){this._stream=Z,this._reader=null,this._loaded=0,this._filename=null;let q=Z.source;this._withCredentials=q.withCredentials||!1,this._contentLength=q.length,this._headersCapability=Promise.withResolvers(),this._disableRange=q.disableRange||!1,this._rangeChunkSize=q.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!q.disableStream,this._isRangeSupported=!q.disableRange;let X=new Headers(Z.headers),z=q.url;fetch(z,GK(X,this._withCredentials,this._abortController)).then((R)=>{if(Z._responseOrigin=O9(R.url),!RK(R.status))throw _2(R.status,z);this._reader=R.body.getReader(),this._headersCapability.resolve();let G=R.headers,{allowRangeRequests:P,suggestedLength:Q}=XK({responseHeaders:G,isHttp:Z.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=P,this._contentLength=Q||this._contentLength,this._filename=zK(G),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new P4("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;let{value:Z,done:q}=await this._reader.read();return q?{value:Z,done:q}:(this._loaded+=Z.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:PK(Z),done:!1})}cancel(Z){this._reader?.cancel(Z),this._abortController.abort()}}class WK{constructor(Z,q,X){this._stream=Z,this._reader=null,this._loaded=0;let z=Z.source;this._withCredentials=z.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!z.disableStream,this._abortController=new AbortController;let R=new Headers(Z.headers);R.append("Range",`bytes=${q}-${X-1}`);let G=z.url;fetch(G,GK(R,this._withCredentials,this._abortController)).then((P)=>{let Q=O9(P.url);if(Q!==Z._responseOrigin)throw Error(`Expected range response-origin "${Q}" to match "${Z._responseOrigin}".`);if(!RK(P.status))throw _2(P.status,G);this._readCapability.resolve(),this._reader=P.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;let{value:Z,done:q}=await this._reader.read();return q?{value:Z,done:q}:(this._loaded+=Z.byteLength,this.onProgress?.({loaded:this._loaded}),{value:PK(Z),done:!1})}cancel(Z){this._reader?.cancel(Z),this._abortController.abort()}}class $K{_responseOrigin=null;constructor({url:Z,httpHeaders:q,withCredentials:X}){this.url=Z,this.isHttp=/^https?:/i.test(Z),this.headers=qK(this.isHttp,q),this.withCredentials=X||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(Z){let q=new XMLHttpRequest,X=this.currXhrId++,z=this.pendingRequests[X]={xhr:q};q.open("GET",this.url),q.withCredentials=this.withCredentials;for(let[R,G]of this.headers)q.setRequestHeader(R,G);return this.isHttp&&"begin"in Z&&"end"in Z?(q.setRequestHeader("Range",`bytes=${Z.begin}-${Z.end-1}`),z.expectedStatus=206):z.expectedStatus=200,q.responseType="arraybuffer",o1(Z.onError,"Expected `onError` callback to be provided."),q.onerror=()=>{Z.onError(q.status)},q.onreadystatechange=this.onStateChange.bind(this,X),q.onprogress=this.onProgress.bind(this,X),z.onHeadersReceived=Z.onHeadersReceived,z.onDone=Z.onDone,z.onError=Z.onError,z.onProgress=Z.onProgress,q.send(null),X}onProgress(Z,q){let X=this.pendingRequests[Z];X&&X.onProgress?.(q)}onStateChange(Z,q){let X=this.pendingRequests[Z];if(!X)return;let z=X.xhr;if(z.readyState>=2&&X.onHeadersReceived&&(X.onHeadersReceived(),delete X.onHeadersReceived),z.readyState!==4)return;if(!(Z in this.pendingRequests))return;if(delete this.pendingRequests[Z],z.status===0&&this.isHttp)return void X.onError(z.status);let R=z.status||200;if(!(R===200&&X.expectedStatus===206)&&R!==X.expectedStatus)return void X.onError(z.status);let G=function(P){let Q=P.response;return typeof Q!="string"?Q:P2(Q).buffer}(z);if(R===206){let P=z.getResponseHeader("Content-Range"),Q=/bytes (\d+)-(\d+)\/(\d+)/.exec(P);Q?X.onDone({begin:parseInt(Q[1],10),chunk:G}):(p1('Missing or invalid "Content-Range" header.'),X.onError(0))}else G?X.onDone({begin:0,chunk:G}):X.onError(z.status)}getRequestXhr(Z){return this.pendingRequests[Z].xhr}isPendingRequest(Z){return Z in this.pendingRequests}abortRequest(Z){let q=this.pendingRequests[Z].xhr;delete this.pendingRequests[Z],q.abort()}}class _K{constructor(Z){this._source=Z,this._manager=new $K(Z),this._rangeChunkSize=Z.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(Z){let q=this._rangeRequestReaders.indexOf(Z);q>=0&&this._rangeRequestReaders.splice(q,1)}getFullReader(){return o1(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new JK(this._manager,this._source),this._fullRequestReader}getRangeReader(Z,q){let X=new UK(this._manager,Z,q);return X.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(X),X}cancelAllRequests(Z){this._fullRequestReader?.cancel(Z);for(let q of this._rangeRequestReaders.slice(0))q.cancel(Z)}}class JK{constructor(Z,q){this._manager=Z,this._url=q.url,this._fullRequestId=Z.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=q.disableRange||!1,this._contentLength=q.length,this._rangeChunkSize=q.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}_onHeadersReceived(){let Z=this._fullRequestId,q=this._manager.getRequestXhr(Z);this._manager._responseOrigin=O9(q.responseURL);let X=q.getAllResponseHeaders(),z=new Headers(X?X.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map((P)=>{let[Q,...Y]=P.split(": ");return[Q,Y.join(": ")]}):[]),{allowRangeRequests:R,suggestedLength:G}=XK({responseHeaders:z,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});R&&(this._isRangeSupported=!0),this._contentLength=G||this._contentLength,this._filename=zK(z),this._isRangeSupported&&this._manager.abortRequest(Z),this._headersCapability.resolve()}_onDone(Z){if(Z)if(this._requests.length>0)this._requests.shift().resolve({value:Z.chunk,done:!1});else this._cachedChunks.push(Z.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(Z){this._storedError=_2(Z,this._url),this._headersCapability.reject(this._storedError);for(let q of this._requests)q.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(Z){this.onProgress?.({loaded:Z.loaded,total:Z.lengthComputable?Z.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};let Z=Promise.withResolvers();return this._requests.push(Z),Z.promise}cancel(Z){this._done=!0,this._headersCapability.reject(Z);for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class UK{constructor(Z,q,X){this._manager=Z,this._url=Z.url,this._requestId=Z.request({begin:q,end:X,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){let Z=O9(this._manager.getRequestXhr(this._requestId)?.responseURL);Z!==this._manager._responseOrigin&&(this._storedError=Error(`Expected range response-origin "${Z}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(Z){let q=Z.chunk;if(this._requests.length>0)this._requests.shift().resolve({value:q,done:!1});else this._queuedChunk=q;this._done=!0;for(let X of this._requests)X.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(Z){this._storedError??=_2(Z,this._url);for(let q of this._requests)q.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(Z){this.isStreamingSupported||this.onProgress?.({loaded:Z.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){let q=this._queuedChunk;return this._queuedChunk=null,{value:q,done:!1}}if(this._done)return{value:void 0,done:!0};let Z=Promise.withResolvers();return this._requests.push(Z),Z.promise}cancel(Z){this._done=!0;for(let q of this._requests)q.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}class fK{constructor(Z){this.source=Z,this.url=function(q){if(vH.test(q))return new URL(q);let X=process.getBuiltinModule("url");return new URL(X.pathToFileURL(q))}(Z.url),o1(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return o1(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new KK(this),this._fullRequestReader}getRangeReader(Z,q){if(q<=this._progressiveDataLength)return null;let X=new BK(this,Z,q);return this._rangeRequestReaders.push(X),X}cancelAllRequests(Z){this._fullRequestReader?.cancel(Z);for(let q of this._rangeRequestReaders.slice(0))q.cancel(Z)}}class KK{constructor(Z){this._url=Z.url,this._done=!1,this._storedError=null,this.onProgress=null;let q=Z.source;this._contentLength=q.length,this._loaded=0,this._filename=null,this._disableRange=q.disableRange||!1,this._rangeChunkSize=q.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!q.disableStream,this._isRangeSupported=!q.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();let X=process.getBuiltinModule("fs");X.promises.lstat(this._url).then((z)=>{this._contentLength=z.size,this._setReadableStream(X.createReadStream(this._url)),this._headersCapability.resolve()},(z)=>{z.code==="ENOENT"&&(z=_2(0,this._url.href)),this._storedError=z,this._headersCapability.reject(z)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let Z=this._readableStream.read();if(Z===null)return this._readCapability=Promise.withResolvers(),this.read();return this._loaded+=Z.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(Z).buffer,done:!1}}cancel(Z){this._readableStream?this._readableStream.destroy(Z):this._error(Z)}_error(Z){this._storedError=Z,this._readCapability.resolve()}_setReadableStream(Z){this._readableStream=Z,Z.on("readable",()=>{this._readCapability.resolve()}),Z.on("end",()=>{Z.destroy(),this._done=!0,this._readCapability.resolve()}),Z.on("error",(q)=>{this._error(q)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new P4("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class BK{constructor(Z,q,X){this._url=Z.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let z=Z.source;this._isStreamingSupported=!z.disableStream;let R=process.getBuiltinModule("fs");this._setReadableStream(R.createReadStream(this._url,{start:q,end:X-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;let Z=this._readableStream.read();if(Z===null)return this._readCapability=Promise.withResolvers(),this.read();return this._loaded+=Z.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(Z).buffer,done:!1}}cancel(Z){this._readableStream?this._readableStream.destroy(Z):this._error(Z)}_error(Z){this._storedError=Z,this._readCapability.resolve()}_setReadableStream(Z){this._readableStream=Z,Z.on("readable",()=>{this._readCapability.resolve()}),Z.on("end",()=>{Z.destroy(),this._done=!0,this._readCapability.resolve()}),Z.on("error",(q)=>{this._error(q)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function IK(Z={}){typeof Z=="string"||Z instanceof URL?Z={url:Z}:(Z instanceof ArrayBuffer||ArrayBuffer.isView(Z))&&(Z={data:Z});let q=new Az,{docId:X}=q,z=Z.url?function(r){if(r instanceof URL)return r.href;if(typeof r=="string"){if(R0)return r;let q1=URL.parse(r,window.location);if(q1)return q1.href}throw Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(Z.url):null,R=Z.data?function(r){if(R0&&typeof Buffer<"u"&&r instanceof Buffer)throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength)return r;if(typeof r=="string")return P2(r);if(r instanceof ArrayBuffer||ArrayBuffer.isView(r)||typeof r=="object"&&!isNaN(r?.length))return new Uint8Array(r);throw Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(Z.data):null,G=Z.httpHeaders||null,P=Z.withCredentials===!0,Q=Z.password??null,Y=Z.range instanceof y9?Z.range:null,W=Number.isInteger(Z.rangeChunkSize)&&Z.rangeChunkSize>0?Z.rangeChunkSize:65536,$=Z.worker instanceof v8?Z.worker:null,_=Z.verbosity,J=typeof Z.docBaseUrl!="string"||W2(Z.docBaseUrl)?null:Z.docBaseUrl,U=m2(Z.cMapUrl),f=Z.cMapPacked!==!1,K=Z.CMapReaderFactory||(R0?Ef:uq),I=m2(Z.iccUrl),B=m2(Z.standardFontDataUrl),j=Z.StandardFontDataFactory||(R0?uf:gq),V=m2(Z.wasmUrl),x=Z.WasmFactory||(R0?gf:dq),M=Z.stopAtErrors!==!0,H=Number.isInteger(Z.maxImageSize)&&Z.maxImageSize>-1?Z.maxImageSize:-1,A=Z.isEvalSupported!==!1,T=typeof Z.isOffscreenCanvasSupported=="boolean"?Z.isOffscreenCanvasSupported:!R0,k=typeof Z.isImageDecoderSupported=="boolean"?Z.isImageDecoderSupported:!R0&&(T8.platform.isFirefox||!globalThis.chrome),y=Number.isInteger(Z.canvasMaxAreaInBytes)?Z.canvasMaxAreaInBytes:-1,O=typeof Z.disableFontFace=="boolean"?Z.disableFontFace:R0,D=Z.fontExtraProperties===!0,n=Z.enableXfa===!0,b=Z.ownerDocument||globalThis.document,l=Z.disableRange===!0,N=Z.disableStream===!0,L=Z.disableAutoFetch===!0,m=Z.pdfBug===!0,d=Z.CanvasFactory||(R0?wf:yf),e=Z.FilterFactory||(R0?Df:pf),E=Z.enableHWA===!0,p=Z.useWasm!==!1,F=Y?Y.length:Z.length??NaN,s=typeof Z.useSystemFonts=="boolean"?Z.useSystemFonts:!R0&&!O,w=typeof Z.useWorkerFetch=="boolean"?Z.useWorkerFetch:!!(K===uq&&j===gq&&x===dq&&U&&B&&V&&Q7(U,document.baseURI)&&Q7(B,document.baseURI)&&Q7(V,document.baseURI));IH(_);let c={canvasFactory:new d({ownerDocument:b,enableHWA:E}),filterFactory:new e({docId:X,ownerDocument:b}),cMapReaderFactory:w?null:new K({baseUrl:U,isCompressed:f}),standardFontDataFactory:w?null:new j({baseUrl:B}),wasmFactory:w?null:new x({baseUrl:V})};$||($=v8.create({verbosity:_,port:b5.workerPort}),q._worker=$);let o={docId:X,apiVersion:"5.4.296",data:R,password:Q,disableAutoFetch:L,rangeChunkSize:W,length:F,docBaseUrl:J,enableXfa:n,evaluatorOptions:{maxImageSize:H,disableFontFace:O,ignoreErrors:M,isEvalSupported:A,isOffscreenCanvasSupported:T,isImageDecoderSupported:k,canvasMaxAreaInBytes:y,fontExtraProperties:D,useSystemFonts:s,useWasm:p,useWorkerFetch:w,cMapUrl:U,iccUrl:I,standardFontDataUrl:B,wasmUrl:V}},Q1={ownerDocument:b,pdfBug:m,styleElement:null,loadingParams:{disableAutoFetch:L,enableXfa:n}};return $.promise.then(function(){if(q.destroyed)throw Error("Loading aborted");if($.destroyed)throw Error("Worker was destroyed");let r=$.messageHandler.sendWithPromise("GetDocRequest",o,R?[R.buffer]:null),q1;if(Y)q1=new tf(Y,{disableRange:l,disableStream:N});else if(!R){if(!z)throw Error("getDocument - no `url` parameter provided.");q1=new((Q7(z))?QK:R0?fK:_K)({url:z,length:F,httpHeaders:G,withCredentials:P,rangeChunkSize:W,disableRange:l,disableStream:N})}return r.then((R1)=>{if(q.destroyed)throw Error("Loading aborted");if($.destroyed)throw Error("Worker was destroyed");let V1=new P6(X,R1,$.port),f1=new HK(V1,q,q1,Q1,c,E);q._transport=f1,V1.send("Ready",null)})}).catch(q._capability.reject),q}class Az{static#Z=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId="d"+Az.#Z++;destroyed=!1;onPassword=null;onProgress=null;get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(Z){throw this._worker?.port&&delete this._worker._pendingDestroy,Z}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class y9{#Z=Promise.withResolvers();#q=[];#z=[];#X=[];#R=[];constructor(Z,q,X=!1,z=null){this.length=Z,this.initialData=q,this.progressiveDone=X,this.contentDispositionFilename=z}addRangeListener(Z){this.#R.push(Z)}addProgressListener(Z){this.#X.push(Z)}addProgressiveReadListener(Z){this.#z.push(Z)}addProgressiveDoneListener(Z){this.#q.push(Z)}onDataRange(Z,q){for(let X of this.#R)X(Z,q)}onDataProgress(Z,q){this.#Z.promise.then(()=>{for(let X of this.#X)X(Z,q)})}onDataProgressiveRead(Z){this.#Z.promise.then(()=>{for(let q of this.#z)q(Z)})}onDataProgressiveDone(){this.#Z.promise.then(()=>{for(let Z of this.#q)Z()})}transportReady(){this.#Z.resolve()}requestDataRange(Z,q){z8("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class jK{constructor(Z,q){this._pdfInfo=Z,this._transport=q}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return D1(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(Z){return this._transport.getPage(Z)}getPageIndex(Z){return this._transport.getPageIndex(Z)}getDestinations(){return this._transport.getDestinations()}getDestination(Z){return this._transport.getDestination(Z)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(Z,q){return this._transport.getAnnotationsByType(Z,q)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:Z="display"}={}){let{renderingIntent:q}=this._transport.getRenderingIntent(Z);return this._transport.getOptionalContentConfig(q)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(Z=!1){return this._transport.startCleanup(Z||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(Z){return this._transport.cachedPageNumber(Z)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class VK{#Z=!1;constructor(Z,q,X,z=!1){this._pageIndex=Z,this._pageInfo=q,this._transport=X,this._stats=z?new pq:null,this._pdfBug=z,this.commonObjs=X.commonObjs,this.objs=new Mz,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:Z,rotation:q=this.rotate,offsetX:X=0,offsetY:z=0,dontFlip:R=!1}={}){return new Q2({viewBox:this.view,userUnit:this.userUnit,scale:Z,rotation:q,offsetX:X,offsetY:z,dontFlip:R})}getAnnotations({intent:Z="display"}={}){let{renderingIntent:q}=this._transport.getRenderingIntent(Z);return this._transport.getAnnotations(this._pageIndex,q)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return D1(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:Z,canvas:q=Z.canvas,viewport:X,intent:z="display",annotationMode:R=j4.ENABLE,transform:G=null,background:P=null,optionalContentConfigPromise:Q=null,annotationCanvasMap:Y=null,pageColors:W=null,printAnnotationStorage:$=null,isEditing:_=!1,recordOperations:J=!1,operationsFilter:U=null}){this._stats?.time("Overall");let f=this._transport.getRenderingIntent(z,R,$,_),{renderingIntent:K,cacheKey:I}=f;this.#Z=!1,Q||=this._transport.getOptionalContentConfig(K);let B=this._intentStates.get(I);B||(B=Object.create(null),this._intentStates.set(I,B)),B.streamReaderCancelTimeout&&(clearTimeout(B.streamReaderCancelTimeout),B.streamReaderCancelTimeout=null);let j=!!(K&l3);B.displayReadyCapability||(B.displayReadyCapability=Promise.withResolvers(),B.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(f));let V=Boolean(this._pdfBug&&globalThis.StepperManager?.enabled),x=!this.recordedBBoxes&&(J||V),M=(T)=>{if(B.renderTasks.delete(H),x){let k=H.gfx?.dependencyTracker.take();k&&(H.stepper&&H.stepper.setOperatorBBoxes(k,H.gfx.dependencyTracker.takeDebugMetadata()),J&&(this.recordedBBoxes=k))}j&&(this.#Z=!0),this.#q(),T?(H.capability.reject(T),this._abortOperatorList({intentState:B,reason:T instanceof Error?T:Error(T)})):H.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},H=new Y6({callback:M,params:{canvas:q,canvasContext:Z,dependencyTracker:x?new cf(q,B.operatorList.length,V):null,viewport:X,transform:G,background:P},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:Y,operatorList:B.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!j,pdfBug:this._pdfBug,pageColors:W,enableHWA:this._transport.enableHWA,operationsFilter:U});(B.renderTasks||=new Set).add(H);let A=H.task;return Promise.all([B.displayReadyCapability.promise,Q]).then(([T,k])=>{if(this.destroyed)M();else{if(this._stats?.time("Rendering"),!(k.renderingIntent&K))throw Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");H.initializeGraphics({transparency:T,optionalContentConfig:k}),H.operatorListChanged()}}).catch(M),A}getOperatorList({intent:Z="display",annotationMode:q=j4.ENABLE,printAnnotationStorage:X=null,isEditing:z=!1}={}){let R=this._transport.getRenderingIntent(Z,q,X,z,!0),G,P=this._intentStates.get(R.cacheKey);return P||(P=Object.create(null),this._intentStates.set(R.cacheKey,P)),P.opListReadCapability||(G=Object.create(null),G.operatorListChanged=function(){P.operatorList.lastChunk&&(P.opListReadCapability.resolve(P.operatorList),P.renderTasks.delete(G))},P.opListReadCapability=Promise.withResolvers(),(P.renderTasks||=new Set).add(G),P.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(R)),P.opListReadCapability.promise}streamTextContent({includeMarkedContent:Z=!1,disableNormalization:q=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:Z===!0,disableNormalization:q===!0},{highWaterMark:100,size:(X)=>X.items.length})}getTextContent(Z={}){if(this._transport._htmlForXfa)return this.getXfa().then((X)=>r7.textContent(X));let q=this.streamTextContent(Z);return new Promise(function(X,z){let R=q.getReader(),G={items:[],styles:Object.create(null),lang:null};(function P(){R.read().then(function({value:Q,done:Y}){Y?X(G):(G.lang??=Q.lang,Object.assign(G.styles,Q.styles),G.items.push(...Q.items),P())},z)})()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let Z=[];for(let q of this._intentStates.values())if(this._abortOperatorList({intentState:q,reason:Error("Page was destroyed."),force:!0}),!q.opListReadCapability)for(let X of q.renderTasks)Z.push(X.completed),X.cancel();return this.objs.clear(),this.#Z=!1,Promise.all(Z)}cleanup(Z=!1){this.#Z=!0;let q=this.#q();return Z&&q&&(this._stats&&=new pq),q}#q(){if(!this.#Z||this.destroyed)return!1;for(let{renderTasks:Z,operatorList:q}of this._intentStates.values())if(Z.size>0||!q.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#Z=!1,!0}_startRenderPage(Z,q){let X=this._intentStates.get(q);X&&(this._stats?.timeEnd("Page Request"),X.displayReadyCapability?.resolve(Z))}_renderPageChunk(Z,q){for(let X=0,z=Z.length;X<z;X++)q.operatorList.fnArray.push(Z.fnArray[X]),q.operatorList.argsArray.push(Z.argsArray[X]);q.operatorList.lastChunk=Z.lastChunk,q.operatorList.separateAnnots=Z.separateAnnots;for(let X of q.renderTasks)X.operatorListChanged();Z.lastChunk&&this.#q()}_pumpOperatorList({renderingIntent:Z,cacheKey:q,annotationStorageSerializable:X,modifiedIds:z}){let{map:R,transfer:G}=X,P=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:Z,cacheKey:q,annotationStorage:R,modifiedIds:z},G).getReader(),Q=this._intentStates.get(q);Q.streamReader=P;let Y=()=>{P.read().then(({value:W,done:$})=>{$?Q.streamReader=null:this._transport.destroyed||(this._renderPageChunk(W,Q),Y())},(W)=>{if(Q.streamReader=null,!this._transport.destroyed){if(Q.operatorList){Q.operatorList.lastChunk=!0;for(let $ of Q.renderTasks)$.operatorListChanged();this.#q()}if(Q.displayReadyCapability)Q.displayReadyCapability.reject(W);else{if(!Q.opListReadCapability)throw W;Q.opListReadCapability.reject(W)}}})};Y()}_abortOperatorList({intentState:Z,reason:q,force:X=!1}){if(Z.streamReader){if(Z.streamReaderCancelTimeout&&(clearTimeout(Z.streamReaderCancelTimeout),Z.streamReaderCancelTimeout=null),!X){if(Z.renderTasks.size>0)return;if(q instanceof Y2){let z=100;return q.extraDelay>0&&q.extraDelay<1000&&(z+=q.extraDelay),void(Z.streamReaderCancelTimeout=setTimeout(()=>{Z.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:Z,reason:q,force:!0})},z))}}if(Z.streamReader.cancel(new P4(q.message)).catch(()=>{}),Z.streamReader=null,!this._transport.destroyed){for(let[z,R]of this._intentStates)if(R===Z){this._intentStates.delete(z);break}this.cleanup()}}}get stats(){return this._stats}}class HK{#Z=new Map;#q=new Map;#z=new Map;#X=new Map;#R=null;constructor(Z,q,X,z,R,G){this.messageHandler=Z,this.loadingTask=q,this.commonObjs=new Mz,this.fontLoader=new bf({ownerDocument:z.ownerDocument,styleElement:z.styleElement}),this.loadingParams=z.loadingParams,this._params=z,this.canvasFactory=R.canvasFactory,this.filterFactory=R.filterFactory,this.cMapReaderFactory=R.cMapReaderFactory,this.standardFontDataFactory=R.standardFontDataFactory,this.wasmFactory=R.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=X,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=G,this.setupMessageHandler()}#G(Z,q=null){let X=this.#Z.get(Z);if(X)return X;let z=this.messageHandler.sendWithPromise(Z,q);return this.#Z.set(Z,z),z}get annotationStorage(){return D1(this,"annotationStorage",new S9)}getRenderingIntent(Z,q=j4.ENABLE,X=null,z=!1,R=!1){let G=Rz,P=wq;switch(Z){case"any":G=XH;break;case"display":break;case"print":G=l3;break;default:p1(`getRenderingIntent - invalid intent: ${Z}`)}let Q=G&l3&&X instanceof fz?X:this.annotationStorage;switch(q){case j4.DISABLE:G+=GH;break;case j4.ENABLE:break;case j4.ENABLE_FORMS:G+=zH;break;case j4.ENABLE_STORAGE:G+=RH,P=Q.serializable;break;default:p1(`getRenderingIntent - invalid annotationMode: ${q}`)}z&&(G+=PH),R&&(G+=QH);let{ids:Y,hash:W}=Q.modifiedIds;return{renderingIntent:G,cacheKey:[G,P.hash,W].join("_"),annotationStorageSerializable:P,modifiedIds:Y}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#R?.reject(Error("Worker was destroyed during onPassword callback"));let Z=[];for(let X of this.#q.values())Z.push(X._destroy());this.#q.clear(),this.#z.clear(),this.#X.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();let q=this.messageHandler.sendWithPromise("Terminate",null);return Z.push(q),Promise.all(Z).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#Z.clear(),this.filterFactory.destroy(),h8.cleanup(),this._networkStream?.cancelAllRequests(new P4("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:Z,loadingTask:q}=this;Z.on("GetReader",(X,z)=>{o1(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=(R)=>{this._lastProgress={loaded:R.loaded,total:R.total}},z.onPull=()=>{this._fullReader.read().then(function({value:R,done:G}){G?z.close():(o1(R instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),z.enqueue(new Uint8Array(R),1,[R]))}).catch((R)=>{z.error(R)})},z.onCancel=(R)=>{this._fullReader.cancel(R),z.ready.catch((G)=>{if(!this.destroyed)throw G})}}),Z.on("ReaderHeadersReady",async(X)=>{await this._fullReader.headersReady;let{isStreamingSupported:z,isRangeSupported:R,contentLength:G}=this._fullReader;return z&&R||(this._lastProgress&&q.onProgress?.(this._lastProgress),this._fullReader.onProgress=(P)=>{q.onProgress?.({loaded:P.loaded,total:P.total})}),{isStreamingSupported:z,isRangeSupported:R,contentLength:G}}),Z.on("GetRangeReader",(X,z)=>{o1(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let R=this._networkStream.getRangeReader(X.begin,X.end);R?(z.onPull=()=>{R.read().then(function({value:G,done:P}){P?z.close():(o1(G instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),z.enqueue(new Uint8Array(G),1,[G]))}).catch((G)=>{z.error(G)})},z.onCancel=(G)=>{R.cancel(G),z.ready.catch((P)=>{if(!this.destroyed)throw P})}):z.close()}),Z.on("GetDoc",({pdfInfo:X})=>{this._numPages=X.numPages,this._htmlForXfa=X.htmlForXfa,delete X.htmlForXfa,q._capability.resolve(new jK(X,this))}),Z.on("DocException",(X)=>{q._capability.reject(G0(X))}),Z.on("PasswordRequest",(X)=>{this.#R=Promise.withResolvers();try{if(!q.onPassword)throw G0(X);let z=(R)=>{R instanceof Error?this.#R.reject(R):this.#R.resolve({password:R})};q.onPassword(z,X.code)}catch(z){this.#R.reject(z)}return this.#R.promise}),Z.on("DataLoaded",(X)=>{q.onProgress?.({loaded:X.length,total:X.length}),this.downloadInfoCapability.resolve(X)}),Z.on("StartRenderPage",(X)=>{if(this.destroyed)return;this.#q.get(X.pageIndex)._startRenderPage(X.transparency,X.cacheKey)}),Z.on("commonobj",([X,z,R])=>{if(this.destroyed)return null;if(this.commonObjs.has(X))return null;switch(z){case"Font":if("error"in R){let W=R.error;p1(`Error during font loading: ${W}`),this.commonObjs.resolve(X,W);break}let G=new q8(R),P=this._params.pdfBug&&globalThis.FontInspector?.enabled?(W,$)=>globalThis.FontInspector.fontAdded(W,$):null,Q=new Sf(G,P,R.extra,R.charProcOperatorList);this.fontLoader.bind(Q).catch(()=>Z.sendWithPromise("FontFallback",{id:X})).finally(()=>{!Q.fontExtraProperties&&Q.data&&Q.clearData(),this.commonObjs.resolve(X,Q)});break;case"CopyLocalImage":let{imageRef:Y}=R;o1(Y,"The imageRef must be defined.");for(let W of this.#q.values())for(let[,$]of W.objs)if($?.ref===Y)return $.dataLen?(this.commonObjs.resolve(X,structuredClone($)),$.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(X,R);break;default:throw Error(`Got unknown common object type ${z}`)}return null}),Z.on("obj",([X,z,R,G])=>{if(this.destroyed)return;let P=this.#q.get(z);if(!P.objs.has(X))if(P._intentStates.size!==0)switch(R){case"Image":case"Pattern":P.objs.resolve(X,G);break;default:throw Error(`Got unknown object type ${R}`)}else G?.bitmap?.close()}),Z.on("DocProgress",(X)=>{this.destroyed||q.onProgress?.({loaded:X.loaded,total:X.total})}),Z.on("FetchBinaryData",async(X)=>{if(this.destroyed)throw Error("Worker was destroyed.");let z=this[X.type];if(!z)throw Error(`${X.type} not initialized, see the \`useWorkerFetch\` parameter.`);return z.fetch(X)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&p1("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:Z,transfer:q}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:Z,filename:this._fullReader?.filename??null},q).finally(()=>{this.annotationStorage.resetModified()})}getPage(Z){if(!Number.isInteger(Z)||Z<=0||Z>this._numPages)return Promise.reject(Error("Invalid page request."));let q=Z-1,X=this.#z.get(q);if(X)return X;let z=this.messageHandler.sendWithPromise("GetPage",{pageIndex:q}).then((R)=>{if(this.destroyed)throw Error("Transport destroyed");R.refStr&&this.#X.set(R.refStr,Z);let G=new VK(q,R,this,this._params.pdfBug);return this.#q.set(q,G),G});return this.#z.set(q,z),z}getPageIndex(Z){return Eq(Z)?this.messageHandler.sendWithPromise("GetPageIndex",{num:Z.num,gen:Z.gen}):Promise.reject(Error("Invalid pageIndex request."))}getAnnotations(Z,q){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:Z,intent:q})}getFieldObjects(){return this.#G("GetFieldObjects")}hasJSActions(){return this.#G("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(Z){return typeof Z!="string"?Promise.reject(Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:Z})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(Z,q){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:Z,pageIndexesToSkip:q})}getDocJSActions(){return this.#G("GetDocJSActions")}getPageJSActions(Z){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:Z})}getStructTree(Z){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:Z})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(Z){return this.#G("GetOptionalContentConfig").then((q)=>new nf(q,Z))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){let q=this.#Z.get("GetMetadata");if(q)return q;let X=this.messageHandler.sendWithPromise("GetMetadata",null).then((z)=>({info:z[0],metadata:z[1]?new of(z[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#Z.set("GetMetadata",X),X}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(Z=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(let q of this.#q.values())if(!q.cleanup())throw Error(`startCleanup: Page ${q.pageNumber} is currently rendering.`);this.commonObjs.clear(),Z||this.fontLoader.clear(),this.#Z.clear(),this.filterFactory.destroy(!0),h8.cleanup()}}cachedPageNumber(Z){if(!Eq(Z))return null;let q=Z.gen===0?`${Z.num}R`:`${Z.num}R${Z.gen}`;return this.#X.get(q)??null}}class xK{#Z=null;onContinue=null;onError=null;constructor(Z){this.#Z=Z}get promise(){return this.#Z.capability.promise}cancel(Z=0){this.#Z.cancel(null,Z)}get separateAnnots(){let{separateAnnots:Z}=this.#Z.operatorList;if(!Z)return!1;let{annotationCanvasMap:q}=this.#Z;return Z.form||Z.canvas&&q?.size>0}}class B0{#Z=null;#q=null;#z;#X=null;#R=!1;#G=!1;#Q=null;#P;#Y=null;#W=null;static#J=null;static get _keyboardManager(){return D1(this,"_keyboardManager",new p6([[["Escape","mac+Escape"],B0.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],B0.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],B0.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],B0.prototype._moveToPrevious],[["Home","mac+Home"],B0.prototype._moveToBeginning],[["End","mac+End"],B0.prototype._moveToEnd]]))}constructor({editor:Z=null,uiManager:q=null}){Z?(this.#G=!1,this.#Q=Z):this.#G=!0,this.#W=Z?._uiManager||q,this.#P=this.#W._eventBus,this.#z=Z?.color?.toUpperCase()||this.#W?.highlightColors.values().next().value||"#FFFF98",B0.#J||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){let Z=this.#Z=document.createElement("button");Z.className="colorPicker",Z.tabIndex="0",Z.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),Z.ariaHasPopup="true",this.#Q&&(Z.ariaControls=`${this.#Q.id}_colorpicker_dropdown`);let q=this.#W._signal;Z.addEventListener("click",this.#K.bind(this),{signal:q}),Z.addEventListener("keydown",this.#B.bind(this),{signal:q});let X=this.#q=document.createElement("span");return X.className="swatch",X.ariaHidden="true",X.style.backgroundColor=this.#z,Z.append(X),Z}renderMainDropdown(){let Z=this.#X=this.#_();return Z.ariaOrientation="horizontal",Z.ariaLabelledBy="highlightColorPickerLabel",Z}#_(){let Z=document.createElement("div"),q=this.#W._signal;Z.addEventListener("contextmenu",A0,{signal:q}),Z.className="dropdown",Z.role="listbox",Z.ariaMultiSelectable="false",Z.ariaOrientation="vertical",Z.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#Q&&(Z.id=`${this.#Q.id}_colorpicker_dropdown`);for(let[X,z]of this.#W.highlightColors){let R=document.createElement("button");R.tabIndex="0",R.role="option",R.setAttribute("data-color",z),R.title=X,R.setAttribute("data-l10n-id",B0.#J[X]);let G=document.createElement("span");R.append(G),G.className="swatch",G.style.backgroundColor=z,R.ariaSelected=z===this.#z,R.addEventListener("click",this.#U.bind(this,z),{signal:q}),Z.append(R)}return Z.addEventListener("keydown",this.#B.bind(this),{signal:q}),Z}#U(Z,q){q.stopPropagation(),this.#P.dispatch("switchannotationeditorparams",{source:this,type:s1.HIGHLIGHT_COLOR,value:Z}),this.updateColor(Z)}_colorSelectFromKeyboard(Z){if(Z.target===this.#Z)return void this.#K(Z);let q=Z.target.getAttribute("data-color");q&&this.#U(q,Z)}_moveToNext(Z){this.#f?Z.target!==this.#Z?Z.target.nextSibling?.focus():this.#X.firstChild?.focus():this.#K(Z)}_moveToPrevious(Z){Z.target!==this.#X?.firstChild&&Z.target!==this.#Z?(this.#f||this.#K(Z),Z.target.previousSibling?.focus()):this.#f&&this._hideDropdownFromKeyboard()}_moveToBeginning(Z){this.#f?this.#X.firstChild?.focus():this.#K(Z)}_moveToEnd(Z){this.#f?this.#X.lastChild?.focus():this.#K(Z)}#B(Z){B0._keyboardManager.exec(this,Z)}#K(Z){if(this.#f)return void this.hideDropdown();if(this.#R=Z.detail===0,this.#Y||(this.#Y=new AbortController,window.addEventListener("pointerdown",this.#$.bind(this),{signal:this.#W.combinedSignal(this.#Y)})),this.#Z.ariaExpanded="true",this.#X)return void this.#X.classList.remove("hidden");let q=this.#X=this.#_();this.#Z.append(q)}#$(Z){this.#X?.contains(Z.target)||this.hideDropdown()}hideDropdown(){this.#X?.classList.add("hidden"),this.#Z.ariaExpanded="false",this.#Y?.abort(),this.#Y=null}get#f(){return this.#X&&!this.#X.classList.contains("hidden")}_hideDropdownFromKeyboard(){this.#G||(this.#f?(this.hideDropdown(),this.#Z.focus({preventScroll:!0,focusVisible:this.#R})):this.#Q?.unselect())}updateColor(Z){if(this.#q&&(this.#q.style.backgroundColor=Z),!this.#X)return;let q=this.#W.highlightColors.values();for(let X of this.#X.children)X.ariaSelected=q.next().value===Z.toUpperCase()}destroy(){this.#Z?.remove(),this.#Z=null,this.#q=null,this.#X?.remove(),this.#X=null}}class o7{#Z=null;#q=null;#z=null;static#X=null;constructor(Z){this.#q=Z,this.#z=Z._uiManager,o7.#X||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#Z)return this.#Z;let{editorType:Z,colorType:q,colorValue:X}=this.#q,z=this.#Z=document.createElement("input");return z.type="color",z.value=X||"#000000",z.className="basicColorPicker",z.tabIndex=0,z.setAttribute("data-l10n-id",o7.#X[Z]),z.addEventListener("input",()=>{this.#z.updateParams(q,z.value)},{signal:this.#z._signal}),z}update(Z){this.#Z&&(this.#Z.value=Z)}destroy(){this.#Z?.remove(),this.#Z=null}hideDropdown(){}}function hG(Z){return Math.floor(255*Math.max(0,Math.min(1,Z))).toString(16).padStart(2,"0")}function e6(Z){return Math.max(0,Math.min(255,255*Z))}class rq{static CMYK_G([Z,q,X,z]){return["G",1-Math.min(1,0.3*Z+0.59*X+0.11*q+z)]}static G_CMYK([Z]){return["CMYK",0,0,0,1-Z]}static G_RGB([Z]){return["RGB",Z,Z,Z]}static G_rgb([Z]){return[Z=e6(Z),Z,Z]}static G_HTML([Z]){let q=hG(Z);return`#${q}${q}${q}`}static RGB_G([Z,q,X]){return["G",0.3*Z+0.59*q+0.11*X]}static RGB_rgb(Z){return Z.map(e6)}static RGB_HTML(Z){return`#${Z.map(hG).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([Z,q,X,z]){return["RGB",1-Math.min(1,Z+z),1-Math.min(1,X+z),1-Math.min(1,q+z)]}static CMYK_rgb([Z,q,X,z]){return[e6(1-Math.min(1,Z+z)),e6(1-Math.min(1,X+z)),e6(1-Math.min(1,q+z))]}static CMYK_HTML(Z){let q=this.CMYK_RGB(Z).slice(1);return this.RGB_HTML(q)}static RGB_CMYK([Z,q,X]){let z=1-Z,R=1-q,G=1-X;return["CMYK",z,R,G,Math.min(z,R,G)]}}class LK{create(Z,q,X=!1){if(Z<=0||q<=0)throw Error("Invalid SVG dimensions");let z=this._createSVG("svg:svg");return z.setAttribute("version","1.1"),X||(z.setAttribute("width",`${Z}px`),z.setAttribute("height",`${q}px`)),z.setAttribute("preserveAspectRatio","none"),z.setAttribute("viewBox",`0 0 ${Z} ${q}`),z}createElement(Z){if(typeof Z!="string")throw Error("Invalid SVG element type");return this._createSVG(Z)}_createSVG(Z){z8("Abstract method `_createSVG` called.")}}class lq{static create(Z){switch(Z.data.annotationType){case V8.LINK:return new p9(Z);case V8.TEXT:return new TK(Z);case V8.WIDGET:switch(Z.data.fieldType){case"Tx":return new NK(Z);case"Btn":return Z.data.radioButton?new Lz(Z):Z.data.checkBox?new FK(Z):new vK(Z);case"Ch":return new bK(Z);case"Sig":return new CK(Z)}return new Z5(Z);case V8.POPUP:return new n3(Z);case V8.FREETEXT:return new kz(Z);case V8.LINE:return new mK(Z);case V8.SQUARE:return new OK(Z);case V8.CIRCLE:return new yK(Z);case V8.POLYLINE:return new Tz(Z);case V8.CARET:return new DK(Z);case V8.INK:return new D9(Z);case V8.POLYGON:return new pK(Z);case V8.HIGHLIGHT:return new Nz(Z);case V8.UNDERLINE:return new wK(Z);case V8.SQUIGGLY:return new EK(Z);case V8.STRIKEOUT:return new uK(Z);case V8.STAMP:return new Cz(Z);case V8.FILEATTACHMENT:return new gK(Z);default:return new f8(Z)}}}class f8{#Z=null;#q=!1;#z=null;constructor(Z,{isRenderable:q=!1,ignoreBorder:X=!1,createQuadrilaterals:z=!1}={}){this.isRenderable=q,this.data=Z.data,this.layer=Z.layer,this.linkService=Z.linkService,this.downloadManager=Z.downloadManager,this.imageResourcesPath=Z.imageResourcesPath,this.renderForms=Z.renderForms,this.svgFactory=Z.svgFactory,this.annotationStorage=Z.annotationStorage,this.enableComment=Z.enableComment,this.enableScripting=Z.enableScripting,this.hasJSActions=Z.hasJSActions,this._fieldObjects=Z.fieldObjects,this.parent=Z.parent,q&&(this.container=this._createContainer(X)),z&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:Z,richText:q}){return!(!Z?.str&&!q?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return f8._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){let{data:Z}=this,q=this.annotationStorage?.getEditor(Z.id);return q?q.getData():Z}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){let Z=this.annotationStorage?.getEditor(this.data.id);if(Z)return Z.commentButtonPositionInPage;let{quadPoints:q,inkLists:X,rect:z}=this.data,R=-1/0,G=-1/0;if(q?.length>=8){for(let P=0;P<q.length;P+=8)q[P+1]>G?(G=q[P+1],R=q[P+2]):q[P+1]===G&&(R=Math.max(R,q[P+2]));return[R,G]}if(X?.length>=1){for(let P of X)for(let Q=0,Y=P.length;Q<Y;Q+=2)P[Q+1]>G?(G=P[Q+1],R=P[Q]):P[Q+1]===G&&(R=Math.max(R,P[Q]));if(R!==1/0)return[R,G]}return z?[z[2],z[3]]:null}_normalizePoint(Z){let{page:{view:q},viewport:{rawDims:{pageWidth:X,pageHeight:z,pageX:R,pageY:G}}}=this.parent;return Z[1]=q[3]-Z[1]+q[1],Z[0]=100*(Z[0]-R)/X,Z[1]=100*(Z[1]-G)/z,Z}get commentText(){let{data:Z}=this;return this.annotationStorage.getRawValue(`${h7}${Z.id}`)?.popup?.contents||Z.contentsObj?.str||""}set commentText(Z){let{data:q}=this,X={deleted:!Z,contents:Z||""};this.annotationStorage.updateEditor(q.id,{popup:X})||this.annotationStorage.setValue(`${h7}${q.id}`,{id:q.id,annotationType:q.annotationType,pageIndex:this.parent.page._pageIndex,popup:X,popupRef:q.popupRef,modificationDate:new Date}),Z||this.removePopup()}removePopup(){(this.#z?.popup||this.popup)?.remove(),this.#z=this.popup=null}updateEdited(Z){if(!this.container)return;Z.rect&&(this.#Z||={rect:this.data.rect.slice(0)});let{rect:q,popup:X}=Z;q&&this.#X(q);let z=this.#z?.popup||this.popup;!z&&X?.text&&(this._createPopup(X),z=this.#z.popup),z&&(z.updateEdited(Z),X?.deleted&&(z.remove(),this.#z=null,this.popup=null))}resetEdited(){this.#Z&&(this.#X(this.#Z.rect),this.#z?.popup.resetEdited(),this.#Z=null)}#X(Z){let{container:{style:q},data:{rect:X,rotation:z},parent:{viewport:{rawDims:{pageWidth:R,pageHeight:G,pageX:P,pageY:Q}}}}=this;X?.splice(0,4,...Z),q.left=100*(Z[0]-P)/R+"%",q.top=100*(G-Z[3]+Q)/G+"%",z===0?(q.width=100*(Z[2]-Z[0])/R+"%",q.height=100*(Z[3]-Z[1])/G+"%"):this.setRotation(z)}_createContainer(Z){let{data:q,parent:{page:X,viewport:z}}=this,R=document.createElement("section");R.setAttribute("data-annotation-id",q.id),this instanceof Z5||this instanceof p9||(R.tabIndex=0);let{style:G}=R;if(G.zIndex=this.parent.zIndex,this.parent.zIndex+=2,q.alternativeText&&(R.title=q.alternativeText),q.noRotate&&R.classList.add("norotate"),!q.rect||this instanceof n3){let{rotation:f}=q;return q.hasOwnCanvas||f===0||this.setRotation(f,R),R}let{width:P,height:Q}=this;if(!Z&&q.borderStyle.width>0){G.borderWidth=`${q.borderStyle.width}px`;let f=q.borderStyle.horizontalCornerRadius,K=q.borderStyle.verticalCornerRadius;if(f>0||K>0){let B=`calc(${f}px * var(--total-scale-factor)) / calc(${K}px * var(--total-scale-factor))`;G.borderRadius=B}else if(this instanceof Lz){let B=`calc(${P}px * var(--total-scale-factor)) / calc(${Q}px * var(--total-scale-factor))`;G.borderRadius=B}switch(q.borderStyle.style){case ff:G.borderStyle="solid";break;case WH:G.borderStyle="dashed";break;case $H:p1("Unimplemented border style: beveled");break;case _H:p1("Unimplemented border style: inset");break;case JH:G.borderBottomStyle="solid"}let I=q.borderColor||null;I?(this.#q=!0,G.borderColor=j1.makeHexColor(0|I[0],0|I[1],0|I[2])):G.borderWidth=0}let Y=j1.normalizeRect([q.rect[0],X.view[3]-q.rect[1]+X.view[1],q.rect[2],X.view[3]-q.rect[3]+X.view[1]]),{pageWidth:W,pageHeight:$,pageX:_,pageY:J}=z.rawDims;G.left=100*(Y[0]-_)/W+"%",G.top=100*(Y[1]-J)/$+"%";let{rotation:U}=q;return q.hasOwnCanvas||U===0?(G.width=100*P/W+"%",G.height=100*Q/$+"%"):this.setRotation(U,R),R}setRotation(Z,q=this.container){if(!this.data.rect)return;let{pageWidth:X,pageHeight:z}=this.parent.viewport.rawDims,{width:R,height:G}=this;Z%180!=0&&([R,G]=[G,R]),q.style.width=100*R/X+"%",q.style.height=100*G/z+"%",q.setAttribute("data-main-rotation",(360-Z)%360)}get _commonActions(){let Z=(q,X,z)=>{let R=z.detail[q],G=R[0],P=R.slice(1);z.target.style[X]=rq[`${G}_HTML`](P),this.annotationStorage.setValue(this.data.id,{[X]:rq[`${G}_rgb`](P)})};return D1(this,"_commonActions",{display:(q)=>{let{display:X}=q.detail,z=X%2==1;this.container.style.visibility=z?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:z,noPrint:X===1||X===2})},print:(q)=>{this.annotationStorage.setValue(this.data.id,{noPrint:!q.detail.print})},hidden:(q)=>{let{hidden:X}=q.detail;this.container.style.visibility=X?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:X,noView:X})},focus:(q)=>{setTimeout(()=>q.target.focus({preventScroll:!1}),0)},userName:(q)=>{q.target.title=q.detail.userName},readonly:(q)=>{q.target.disabled=q.detail.readonly},required:(q)=>{this._setRequired(q.target,q.detail.required)},bgColor:(q)=>{Z("bgColor","backgroundColor",q)},fillColor:(q)=>{Z("fillColor","backgroundColor",q)},fgColor:(q)=>{Z("fgColor","color",q)},textColor:(q)=>{Z("textColor","color",q)},borderColor:(q)=>{Z("borderColor","borderColor",q)},strokeColor:(q)=>{Z("strokeColor","borderColor",q)},rotation:(q)=>{let X=q.detail.rotation;this.setRotation(X),this.annotationStorage.setValue(this.data.id,{rotation:X})}})}_dispatchEventFromSandbox(Z,q){let X=this._commonActions;for(let z of Object.keys(q.detail))(Z[z]||X[z])?.(q)}_setDefaultPropertiesFromJS(Z){if(!this.enableScripting)return;let q=this.annotationStorage.getRawValue(this.data.id);if(!q)return;let X=this._commonActions;for(let[z,R]of Object.entries(q)){let G=X[z];if(G)G({detail:{[z]:R},target:Z}),delete q[z]}}_createQuadrilaterals(){if(!this.container)return;let{quadPoints:Z}=this.data;if(!Z)return;let[q,X,z,R]=this.data.rect.map((f)=>Math.fround(f));if(Z.length===8){let[f,K,I,B]=Z.subarray(2,6);if(z===f&&R===K&&q===I&&X===B)return}let{style:G}=this.container,P;if(this.#q){let{borderColor:f,borderWidth:K}=G;G.borderWidth=0,P=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${f}" stroke-width="${K}">`],this.container.classList.add("hasBorder")}let Q=z-q,Y=R-X,{svgFactory:W}=this,$=W.createElement("svg");$.classList.add("quadrilateralsContainer"),$.setAttribute("width",0),$.setAttribute("height",0),$.role="none";let _=W.createElement("defs");$.append(_);let J=W.createElement("clipPath"),U=`clippath_${this.data.id}`;J.setAttribute("id",U),J.setAttribute("clipPathUnits","objectBoundingBox"),_.append(J);for(let f=2,K=Z.length;f<K;f+=8){let I=Z[f],B=Z[f+1],j=Z[f+2],V=Z[f+3],x=W.createElement("rect"),M=(j-q)/Q,H=(R-B)/Y,A=(I-j)/Q,T=(B-V)/Y;x.setAttribute("x",M),x.setAttribute("y",H),x.setAttribute("width",A),x.setAttribute("height",T),J.append(x),P?.push(`<rect vector-effect="non-scaling-stroke" x="${M}" y="${H}" width="${A}" height="${T}"/>`)}this.#q&&(P.push("</g></svg>')"),G.backgroundImage=P.join("")),this.container.append($),this.container.style.clipPath=`url(#${U})`}_createPopup(Z=null){let{data:q}=this,X,z;Z?(X={str:Z.text},z=Z.date):(X=q.contentsObj,z=q.modificationDate);let R=this.#z=new n3({data:{color:q.color,titleObj:q.titleObj,modificationDate:z,contentsObj:X,richText:q.richText,parentRect:q.rect,borderStyle:0,id:`popup_${q.id}`,rotation:q.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent._commentManager||this.parent.div.append(R.render())}get hasPopupElement(){return!!(this.#z||this.popup||this.data.popupRef)}get extraPopupElement(){return this.#z}render(){z8("Abstract method `AnnotationElement.render` called")}_getElementsByName(Z,q=null){let X=[];if(this._fieldObjects){let z=this._fieldObjects[Z];if(z)for(let{page:R,id:G,exportValues:P}of z){if(R===-1)continue;if(G===q)continue;let Q=typeof P=="string"?P:null,Y=document.querySelector(`[data-element-id="${G}"]`);!Y||D5.has(Y)?X.push({id:G,exportValue:Q,domElement:Y}):p1(`_getElementsByName - element not allowed: ${G}`)}return X}for(let z of document.getElementsByName(Z)){let{exportValue:R}=z,G=z.getAttribute("data-element-id");G!==q&&(D5.has(z)&&X.push({id:G,exportValue:R,domElement:z}))}return X}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){let Z=this.getElementsToTriggerPopup();if(Array.isArray(Z))for(let q of Z)q.classList.add("highlightArea");else Z.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:Z,data:{id:q}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:Z,editId:q,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class SK{#Z=null;#q=this.#h.bind(this);#z=this.#E.bind(this);#X=this.#m.bind(this);#R=this.#x.bind(this);#G=null;#Q=null;#P=null;#Y=null;#W=null;#J=null;#_=null;#U=!1;#B=null;#K=null;#$=null;#f=null;#I=null;#V=null;#j=null;#k=null;#A=null;#H=null;#N=!1;#M=null;#L=null;constructor({container:Z,color:q,elements:X,titleObj:z,modificationDate:R,contentsObj:G,richText:P,parent:Q,rect:Y,parentRect:W,open:$,commentManager:_=null}){this.#Q=Z,this.#A=z,this.#P=G,this.#k=P,this.#J=Q,this.#G=q,this.#j=Y,this.#_=W,this.#W=X,this.#Z=_,this.#M=X[0],this.#Y=l7.toDateObject(R),this.trigger=X.flatMap((J)=>J.getElementsToTriggerPopup()),_?this.renderCommentButton():(this.#v(),this.#Q.hidden=!0,$&&this.#x())}#v(){if(this.#K)return;this.#K=new AbortController;let{signal:Z}=this.#K;for(let q of this.trigger)q.addEventListener("click",this.#R,{signal:Z}),q.addEventListener("pointerenter",this.#X,{signal:Z}),q.addEventListener("pointerleave",this.#z,{signal:Z}),q.classList.add("popupTriggerArea");for(let q of this.#W)q.container?.addEventListener("keydown",this.#q,{signal:Z})}#C(){let Z=this.#W.find((q)=>q.hasCommentButton);Z&&(this.#I=Z._normalizePoint(Z.commentButtonPosition))}renderCommentButton(){if(this.#f)return;if(this.#I||this.#C(),!this.#I)return;let{signal:Z}=this.#K=new AbortController,q=!!this.#M.extraPopupElement,X=()=>{this.#Z.toggleCommentPopup(this,!0,void 0,!q)},z=()=>{this.#Z.toggleCommentPopup(this,!1,!0,!q)},R=()=>{this.#Z.toggleCommentPopup(this,!1,!1)};if(q){this.#f=this.#M.container;for(let G of this.trigger)G.ariaHasPopup="dialog",G.ariaControls="commentPopup",G.addEventListener("keydown",this.#q,{signal:Z}),G.addEventListener("click",X,{signal:Z}),G.addEventListener("pointerenter",z,{signal:Z}),G.addEventListener("pointerleave",R,{signal:Z}),G.classList.add("popupTriggerArea")}else{let G=this.#f=document.createElement("button");G.className="annotationCommentButton";let P=this.#M.container;G.style.zIndex=P.style.zIndex+1,G.tabIndex=0,G.ariaHasPopup="dialog",G.ariaControls="commentPopup",G.setAttribute("data-l10n-id","pdfjs-show-comment-button"),this.#D(),this.#F(),G.addEventListener("keydown",this.#q,{signal:Z}),G.addEventListener("click",X,{signal:Z}),G.addEventListener("pointerenter",z,{signal:Z}),G.addEventListener("pointerleave",R,{signal:Z}),P.after(G)}}#F(){if(this.#M.extraPopupElement&&!this.#M.editor)return;this.renderCommentButton();let[Z,q]=this.#I,{style:X}=this.#f;X.left=`calc(${Z}%)`,X.top=`calc(${q}% - var(--comment-button-dim))`}#D(){this.#M.extraPopupElement||(this.renderCommentButton(),this.#f.style.backgroundColor=this.commentButtonColor||"")}get commentButtonColor(){let{color:Z,opacity:q}=this.#M.commentData;return Z?this.#J._commentManager.makeCommentColor(Z,q):null}focusCommentButton(){setTimeout(()=>{this.#f?.focus()},0)}getData(){let{richText:Z,color:q,opacity:X,creationDate:z,modificationDate:R}=this.#M.commentData;return{contentsObj:{str:this.comment},richText:Z,color:q,opacity:X,creationDate:z,modificationDate:R}}get elementBeforePopup(){return this.#f}get comment(){return this.#L||=this.#M.commentText,this.#L}set comment(Z){Z!==this.comment&&(this.#M.commentText=this.#L=Z)}get parentBoundingClientRect(){return this.#M.layer.getBoundingClientRect()}setCommentButtonStates({selected:Z,hasPopup:q}){this.#f&&(this.#f.classList.toggle("selected",Z),this.#f.ariaExpanded=q)}setSelectedCommentButton(Z){this.#f.classList.toggle("selected",Z)}get commentPopupPosition(){if(this.#V)return this.#V;let{x:Z,y:q,height:X}=this.#f.getBoundingClientRect(),{x:z,y:R,width:G,height:P}=this.#M.layer.getBoundingClientRect();return[(Z-z)/G,(q+X-R)/P]}set commentPopupPosition(Z){this.#V=Z}hasDefaultPopupPosition(){return this.#V===null}get commentButtonPosition(){return this.#I}get commentButtonWidth(){return this.#f.getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(Z){let[q,X]=this.#V||this.commentButtonPosition.map((Y)=>Y/100),z=this.parentBoundingClientRect,{x:R,y:G,width:P,height:Q}=z;this.#Z.showDialog(null,this,R+q*P,G+X*Q,{...Z,parentDimensions:z})}render(){if(this.#B)return;let Z=this.#B=document.createElement("div");if(Z.className="popup",this.#G){let X=Z.style.outlineColor=j1.makeHexColor(...this.#G);Z.style.backgroundColor=`color-mix(in srgb, ${X} 30%, white)`}let q=document.createElement("span");if(q.className="header",this.#A?.str){let X=document.createElement("span");X.className="title",q.append(X),{dir:X.dir,str:X.textContent}=this.#A}if(Z.append(q),this.#Y){let X=document.createElement("time");X.className="popupDate",X.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),X.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#Y.valueOf()})),X.dateTime=this.#Y.toISOString(),q.append(X)}$z({html:this.#S||this.#P.str,dir:this.#P?.dir,className:"popupContent"},Z),this.#Q.append(Z)}get#S(){let Z=this.#k,q=this.#P;return!Z?.str||q?.str&&q.str!==Z.str?null:this.#k.html||null}get#O(){return this.#S?.attributes?.style?.fontSize||0}get#w(){return this.#S?.attributes?.style?.color||null}#y(Z){let q=[],X={str:Z,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:q}]}},z={style:{color:this.#w,fontSize:this.#O?`calc(${this.#O}px * var(--total-scale-factor))`:""}};for(let R of Z.split(`
|
|
31
|
-
`))q.push({name:"span",value:R,attributes:z});return X}#h(Z){Z.altKey||Z.shiftKey||Z.ctrlKey||Z.metaKey||(Z.key==="Enter"||Z.key==="Escape"&&this.#U)&&this.#x()}updateEdited({rect:Z,popup:q,deleted:X}){if(this.#Z)return X?(this.remove(),this.#L=null):q&&(q.deleted?this.remove():(this.#D(),this.#L=q.text)),void(Z&&(this.#I=null,this.#C(),this.#F()));X||q?.deleted?this.remove():(this.#v(),this.#H||={contentsObj:this.#P,richText:this.#k},Z&&(this.#$=null),q&&q.text&&(this.#k=this.#y(q.text),this.#Y=l7.toDateObject(q.date),this.#P=null),this.#B?.remove(),this.#B=null)}resetEdited(){this.#H&&({contentsObj:this.#P,richText:this.#k}=this.#H,this.#H=null,this.#B?.remove(),this.#B=null,this.#$=null)}remove(){if(this.#K?.abort(),this.#K=null,this.#B?.remove(),this.#B=null,this.#N=!1,this.#U=!1,this.#f?.remove(),this.#f=null,this.trigger)for(let Z of this.trigger)Z.classList.remove("popupTriggerArea")}#T(){if(this.#$!==null)return;let{page:{view:Z},viewport:{rawDims:{pageWidth:q,pageHeight:X,pageX:z,pageY:R}}}=this.#J,G=!!this.#_,P=G?this.#_:this.#j;for(let J of this.#W)if(!P||j1.intersect(J.data.rect,P)!==null){P=J.data.rect,G=!0;break}let Q=j1.normalizeRect([P[0],Z[3]-P[1]+Z[1],P[2],Z[3]-P[3]+Z[1]]),Y=G?P[2]-P[0]+5:0,W=Q[0]+Y,$=Q[1];this.#$=[100*(W-z)/q,100*($-R)/X];let{style:_}=this.#Q;_.left=`${this.#$[0]}%`,_.top=`${this.#$[1]}%`}#x(){this.#Z?this.#Z.toggleCommentPopup(this,!1):(this.#U=!this.#U,this.#U?(this.#m(),this.#Q.addEventListener("click",this.#R),this.#Q.addEventListener("keydown",this.#q)):(this.#E(),this.#Q.removeEventListener("click",this.#R),this.#Q.removeEventListener("keydown",this.#q)))}#m(){this.#B||this.render(),this.isVisible?this.#U&&this.#Q.classList.add("focused"):(this.#T(),this.#Q.hidden=!1,this.#Q.style.zIndex=parseInt(this.#Q.style.zIndex)+1000)}#E(){this.#Q.classList.remove("focused"),!this.#U&&this.isVisible&&(this.#Q.hidden=!0,this.#Q.style.zIndex=parseInt(this.#Q.style.zIndex)-1000)}forceHide(){this.#N=this.isVisible,this.#N&&(this.#Q.hidden=!0)}maybeShow(){this.#Z||(this.#v(),this.#N&&(this.#B||this.#m(),this.#N=!1,this.#Q.hidden=!1))}get isVisible(){return!this.#Z&&this.#Q.hidden===!1}}class w9{#Z=null;#q=null;#z=null;#X=new Map;#R=null;#G=null;constructor({div:Z,accessibilityManager:q,annotationCanvasMap:X,annotationEditorUIManager:z,page:R,viewport:G,structTreeLayer:P,commentManager:Q,linkService:Y,annotationStorage:W}){this.div=Z,this.#Z=q,this.#q=X,this.#R=P||null,this.#G=Y||null,this.#z=W||new S9,this.page=R,this.viewport=G,this.zIndex=0,this._annotationEditorUIManager=z,this._commentManager=Q||null}hasEditableAnnotations(){return this.#X.size>0}async#Q(Z,q,X){let z=Z.firstChild||Z,R=z.id=`${Yz}${q}`,G=await this.#R?.getAriaAttributes(R);if(G)for(let[P,Q]of G)z.setAttribute(P,Q);X?X.at(-1).container.after(Z):(this.div.append(Z),this.#Z?.moveElementInDOM(this.div,Z,z,!1))}async render(Z){let{annotations:q}=Z,X=this.div;i4(X,this.viewport);let z=new Map,R={data:null,layer:X,linkService:this.#G,downloadManager:Z.downloadManager,imageResourcesPath:Z.imageResourcesPath||"",renderForms:Z.renderForms!==!1,svgFactory:new F6,annotationStorage:this.#z,enableComment:Z.enableComment===!0,enableScripting:Z.enableScripting===!0,hasJSActions:Z.hasJSActions,fieldObjects:Z.fieldObjects,parent:this,elements:null};for(let G of q){if(G.noHTML)continue;let P=G.annotationType===V8.POPUP;if(P){let W=z.get(G.id);if(!W)continue;R.elements=W}else if(G.rect[2]===G.rect[0]||G.rect[3]===G.rect[1])continue;R.data=G;let Q=lq.create(R);if(!Q.isRenderable)continue;if(!P&&G.popupRef){let W=z.get(G.popupRef);W?W.push(Q):z.set(G.popupRef,[Q])}let Y=Q.render();G.hidden&&(Y.style.visibility="hidden"),await this.#Q(Y,G.id,R.elements),Q.extraPopupElement?.popup?.renderCommentButton(),Q._isEditable&&(this.#X.set(Q.data.id,Q),this._annotationEditorUIManager?.renderAnnotationElement(Q))}this.#P()}async addLinkAnnotations(Z){let q={data:null,layer:this.div,linkService:this.#G,svgFactory:new F6,parent:this};for(let X of Z){X.borderStyle||=w9._defaultBorderStyle,q.data=X;let z=lq.create(q);if(!z.isRenderable)continue;let R=z.render();await this.#Q(R,X.id,null)}}update({viewport:Z}){let q=this.div;this.viewport=Z,i4(q,{rotation:Z.rotation}),this.#P(),q.hidden=!1}#P(){if(!this.#q)return;let Z=this.div;for(let[q,X]of this.#q){let z=Z.querySelector(`[data-annotation-id="${q}"]`);if(!z)continue;X.className="annotationContent";let{firstChild:R}=z;R?R.nodeName==="CANVAS"?R.replaceWith(X):R.classList.contains("annotationContent")?R.after(X):R.before(X):z.append(X);let G=this.#X.get(q);G&&(G._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(q,z.id,X),G._hasNoCanvas=!1):G.canvas=X)}this.#q.clear()}getEditableAnnotations(){return Array.from(this.#X.values())}getEditableAnnotation(Z){return this.#X.get(Z)}addFakeAnnotation(Z){let{div:q}=this,{id:X,rotation:z}=Z,R=new kK({data:{id:X,rect:Z.getPDFRect(),rotation:z},editor:Z,layer:q,parent:this,enableComment:!!this._commentManager,linkService:this.#G,annotationStorage:this.#z}),G=R.render();return q.append(G),this.#Z?.moveElementInDOM(q,G,G,!1),R.createOrUpdatePopup(),R}static get _defaultBorderStyle(){return D1(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:ff,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}class I1{static PRECISION=0.0001;toSVGPath(){z8("Abstract method `toSVGPath` must be implemented.")}get box(){z8("Abstract getter `box` must be implemented.")}serialize(Z,q){z8("Abstract method `serialize` must be implemented.")}static _rescale(Z,q,X,z,R,G){G||=new Float32Array(Z.length);for(let P=0,Q=Z.length;P<Q;P+=2)G[P]=q+Z[P]*z,G[P+1]=X+Z[P+1]*R;return G}static _rescaleAndSwap(Z,q,X,z,R,G){G||=new Float32Array(Z.length);for(let P=0,Q=Z.length;P<Q;P+=2)G[P]=q+Z[P+1]*z,G[P+1]=X+Z[P]*R;return G}static _translate(Z,q,X,z){z||=new Float32Array(Z.length);for(let R=0,G=Z.length;R<G;R+=2)z[R]=q+Z[R],z[R+1]=X+Z[R+1];return z}static svgRound(Z){return Math.round(1e4*Z)}static _normalizePoint(Z,q,X,z,R){switch(R){case 90:return[1-q/X,Z/z];case 180:return[1-Z/X,1-q/z];case 270:return[q/X,1-Z/z];default:return[Z/X,q/z]}}static _normalizePagePoint(Z,q,X){switch(X){case 90:return[1-q,Z];case 180:return[1-Z,1-q];case 270:return[q,1-Z];default:return[Z,q]}}static createBezierPoints(Z,q,X,z,R,G){return[(Z+5*X)/6,(q+5*z)/6,(5*X+R)/6,(5*z+G)/6,(X+R)/2,(z+G)/2]}}class i3{#Z;#q;#z;#X=[];#R=[];constructor(Z,q=0,X=0,z=!0){let R=[1/0,1/0,-1/0,-1/0];for(let{x:f,y:K,width:I,height:B}of Z){let j=Math.floor((f-q)/0.0001)*0.0001,V=Math.ceil((f+I+q)/0.0001)*0.0001,x=Math.floor((K-q)/0.0001)*0.0001,M=Math.ceil((K+B+q)/0.0001)*0.0001,H=[j,x,M,!0],A=[V,x,M,!1];this.#X.push(H,A),j1.rectBoundingBox(j,x,V,M,R)}let P=R[2]-R[0]+2*X,Q=R[3]-R[1]+2*X,Y=R[0]-X,W=R[1]-X,$=z?-1/0:1/0,_=1/0,J=this.#X.at(z?-1:-2),U=[J[0],J[2]];for(let f of this.#X){let[K,I,B,j]=f;!j&&z?I<_?(_=I,$=K):I===_&&($=Math.max($,K)):j&&!z&&(I<_?(_=I,$=K):I===_&&($=Math.min($,K))),f[0]=(K-Y)/P,f[1]=(I-W)/Q,f[2]=(B-W)/Q}this.#Z=new Float32Array([Y,W,P,Q]),this.#q=[$,_],this.#z=U}getOutlines(){this.#X.sort((q,X)=>q[0]-X[0]||q[1]-X[1]||q[2]-X[2]);let Z=[];for(let q of this.#X)q[3]?(Z.push(...this.#W(q)),this.#P(q)):(this.#Y(q),Z.push(...this.#W(q)));return this.#G(Z)}#G(Z){let q=[],X=new Set;for(let G of Z){let[P,Q,Y]=G;q.push([P,Q,G],[P,Y,G])}q.sort((G,P)=>G[1]-P[1]||G[0]-P[0]);for(let G=0,P=q.length;G<P;G+=2){let Q=q[G][2],Y=q[G+1][2];Q.push(Y),Y.push(Q),X.add(Q),X.add(Y)}let z=[],R;for(;X.size>0;){let G=X.values().next().value,[P,Q,Y,W,$]=G;X.delete(G);let _=P,J=Q;for(R=[P,Y],z.push(R);;){let U;if(X.has(W))U=W;else{if(!X.has($))break;U=$}X.delete(U),[P,Q,Y,W,$]=U,_!==P&&(R.push(_,J,P,J===Q?Q:Y),_=P),J=J===Q?Y:Q}R.push(_,J)}return new dK(z,this.#Z,this.#q,this.#z)}#Q(Z){let q=this.#R,X=0,z=q.length-1;for(;X<=z;){let R=X+z>>1,G=q[R][0];if(G===Z)return R;G<Z?X=R+1:z=R-1}return z+1}#P([,Z,q]){let X=this.#Q(Z);this.#R.splice(X,0,[Z,q])}#Y([,Z,q]){let X=this.#Q(Z);for(let z=X;z<this.#R.length;z++){let[R,G]=this.#R[z];if(R!==Z)break;if(R===Z&&G===q)return void this.#R.splice(z,1)}for(let z=X-1;z>=0;z--){let[R,G]=this.#R[z];if(R!==Z)break;if(R===Z&&G===q)return void this.#R.splice(z,1)}}#W(Z){let[q,X,z]=Z,R=[[q,X,z]],G=this.#Q(z);for(let P=0;P<G;P++){let[Q,Y]=this.#R[P];for(let W=0,$=R.length;W<$;W++){let[,_,J]=R[W];if(!(Y<=_||J<=Q))if(_>=Q)if(J>Y)R[W][1]=Y;else{if($===1)return[];R.splice(W,1),W--,$--}else R[W][2]=Q,J>Y&&R.push([q,Y,J])}}return R}}class vz{#Z=Object.create(null);updateProperty(Z,q){this[Z]=q,this.updateSVGProperty(Z,q)}updateProperties(Z){if(Z)for(let[q,X]of Object.entries(Z))q.startsWith("_")||this.updateProperty(q,X)}updateSVGProperty(Z,q){this.#Z[Z]=q}toSVGProperties(){let Z=this.#Z;return this.#Z=Object.create(null),{root:Z}}reset(){this.#Z=Object.create(null)}updateAll(Z=this){this.updateProperties(Z)}clone(){z8("Not implemented")}}class hK{#Z=new Float64Array(6);#q;#z;#X;#R;#G;#Q="";#P=0;#Y=new D6;#W;#J;constructor(Z,q,X,z,R,G){this.#W=X,this.#J=z,this.#X=R,this.#R=G,[Z,q]=this.#_(Z,q);let P=this.#q=[NaN,NaN,NaN,NaN,Z,q];this.#G=[Z,q],this.#z=[{line:P,points:this.#G}],this.#Z.set(P,0)}updateProperty(Z,q){Z==="stroke-width"&&(this.#R=q)}#_(Z,q){return I1._normalizePoint(Z,q,this.#W,this.#J,this.#X)}isEmpty(){return!this.#z||this.#z.length===0}isCancellable(){return this.#G.length<=10}add(Z,q){[Z,q]=this.#_(Z,q);let[X,z,R,G]=this.#Z.subarray(2,6),P=Z-R,Q=q-G;return Math.hypot(this.#W*P,this.#J*Q)<=2?null:(this.#G.push(Z,q),isNaN(X)?(this.#Z.set([R,G,Z,q],2),this.#q.push(NaN,NaN,NaN,NaN,Z,q),{path:{d:this.toSVGPath()}}):(isNaN(this.#Z[0])&&this.#q.splice(6,6),this.#Z.set([X,z,R,G,Z,q],0),this.#q.push(...I1.createBezierPoints(X,z,R,G,Z,q)),{path:{d:this.toSVGPath()}}))}end(Z,q){return this.add(Z,q)||(this.#G.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(Z,q,X,z,R){this.#W=X,this.#J=z,this.#X=R,[Z,q]=this.#_(Z,q);let G=this.#q=[NaN,NaN,NaN,NaN,Z,q];this.#G=[Z,q];let P=this.#z.at(-1);return P&&(P.line=new Float32Array(P.line),P.points=new Float32Array(P.points)),this.#z.push({line:G,points:this.#G}),this.#Z.set(G,0),this.#P=0,this.toSVGPath(),null}getLastElement(){return this.#z.at(-1)}setLastElement(Z){return this.#z?(this.#z.push(Z),this.#q=Z.line,this.#G=Z.points,this.#P=0,{path:{d:this.toSVGPath()}}):this.#Y.setLastElement(Z)}removeLastElement(){if(!this.#z)return this.#Y.removeLastElement();this.#z.pop(),this.#Q="";for(let Z=0,q=this.#z.length;Z<q;Z++){let{line:X,points:z}=this.#z[Z];this.#q=X,this.#G=z,this.#P=0,this.toSVGPath()}return{path:{d:this.#Q}}}toSVGPath(){let Z=I1.svgRound(this.#q[4]),q=I1.svgRound(this.#q[5]);if(this.#G.length===2)return this.#Q=`${this.#Q} M ${Z} ${q} Z`,this.#Q;if(this.#G.length<=6){let z=this.#Q.lastIndexOf("M");this.#Q=`${this.#Q.slice(0,z)} M ${Z} ${q}`,this.#P=6}if(this.#G.length===4){let z=I1.svgRound(this.#q[10]),R=I1.svgRound(this.#q[11]);return this.#Q=`${this.#Q} L ${z} ${R}`,this.#P=12,this.#Q}let X=[];this.#P===0&&(X.push(`M ${Z} ${q}`),this.#P=6);for(let z=this.#P,R=this.#q.length;z<R;z+=6){let[G,P,Q,Y,W,$]=this.#q.slice(z,z+6).map(I1.svgRound);X.push(`C${G} ${P} ${Q} ${Y} ${W} ${$}`)}return this.#Q+=X.join(" "),this.#P=this.#q.length,this.#Q}getOutlines(Z,q,X,z){let R=this.#z.at(-1);return R.line=new Float32Array(R.line),R.points=new Float32Array(R.points),this.#Y.build(this.#z,Z,q,X,this.#X,this.#R,z),this.#Z=null,this.#q=null,this.#z=null,this.#Q=null,this.#Y}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class F8{#Z=null;#q=new Map;#z=new Map;static#X=0;constructor({pageIndex:Z}){this.pageIndex=Z}setParent(Z){if(this.#Z){if(this.#Z!==Z){if(this.#q.size>0)for(let q of this.#q.values())q.remove(),Z.append(q);this.#Z=Z}}else this.#Z=Z}static get _svgFactory(){return D1(this,"_svgFactory",new F6)}static#R(Z,[q,X,z,R]){let{style:G}=Z;G.top=100*X+"%",G.left=100*q+"%",G.width=100*z+"%",G.height=100*R+"%"}#G(){let Z=F8._svgFactory.create(1,1,!0);return this.#Z.append(Z),Z.setAttribute("aria-hidden",!0),Z}#Q(Z,q){let X=F8._svgFactory.createElement("clipPath");Z.append(X);let z=`clip_${q}`;X.setAttribute("id",z),X.setAttribute("clipPathUnits","objectBoundingBox");let R=F8._svgFactory.createElement("use");return X.append(R),R.setAttribute("href",`#${q}`),R.classList.add("clip"),z}#P(Z,q){for(let[X,z]of Object.entries(q))z===null?Z.removeAttribute(X):Z.setAttribute(X,z)}draw(Z,q=!1,X=!1){let z=F8.#X++,R=this.#G(),G=F8._svgFactory.createElement("defs");R.append(G);let P=F8._svgFactory.createElement("path");G.append(P);let Q=`path_p${this.pageIndex}_${z}`;P.setAttribute("id",Q),P.setAttribute("vector-effect","non-scaling-stroke"),q&&this.#z.set(z,P);let Y=X?this.#Q(G,Q):null,W=F8._svgFactory.createElement("use");return R.append(W),W.setAttribute("href",`#${Q}`),this.updateProperties(R,Z),this.#q.set(z,R),{id:z,clipPathId:`url(#${Y})`}}drawOutline(Z,q){let X=F8.#X++,z=this.#G(),R=F8._svgFactory.createElement("defs");z.append(R);let G=F8._svgFactory.createElement("path");R.append(G);let P=`path_p${this.pageIndex}_${X}`,Q;if(G.setAttribute("id",P),G.setAttribute("vector-effect","non-scaling-stroke"),q){let $=F8._svgFactory.createElement("mask");R.append($),Q=`mask_p${this.pageIndex}_${X}`,$.setAttribute("id",Q),$.setAttribute("maskUnits","objectBoundingBox");let _=F8._svgFactory.createElement("rect");$.append(_),_.setAttribute("width","1"),_.setAttribute("height","1"),_.setAttribute("fill","white");let J=F8._svgFactory.createElement("use");$.append(J),J.setAttribute("href",`#${P}`),J.setAttribute("stroke","none"),J.setAttribute("fill","black"),J.setAttribute("fill-rule","nonzero"),J.classList.add("mask")}let Y=F8._svgFactory.createElement("use");z.append(Y),Y.setAttribute("href",`#${P}`),Q&&Y.setAttribute("mask",`url(#${Q})`);let W=Y.cloneNode();return z.append(W),Y.classList.add("mainOutline"),W.classList.add("secondaryOutline"),this.updateProperties(z,Z),this.#q.set(X,z),X}finalizeDraw(Z,q){this.#z.delete(Z),this.updateProperties(Z,q)}updateProperties(Z,q){if(!q)return;let{root:X,bbox:z,rootClass:R,path:G}=q,P=typeof Z=="number"?this.#q.get(Z):Z;if(P){if(X&&this.#P(P,X),z&&F8.#R(P,z),R){let{classList:Q}=P;for(let[Y,W]of Object.entries(R))Q.toggle(Y,W)}if(G){let Q=P.firstChild.firstChild;this.#P(Q,G)}}}updateParent(Z,q){if(q===this)return;let X=this.#q.get(Z);X&&(q.#Z.append(X),this.#q.delete(Z),q.#q.set(Z,X))}remove(Z){this.#z.delete(Z),this.#Z!==null&&(this.#q.get(Z).remove(),this.#q.delete(Z))}destroy(){this.#Z=null;for(let Z of this.#q.values())Z.remove();this.#q.clear(),this.#z.clear()}}var XB,x5,M5=1.35,Ez=0.35,uz=0.25925925925925924,gz=1,q3=2,dz=4,cz=8,sG=16,zB=64,RB=128,GB=256,rG="pdfjs_internal_editor_",hz=3,sz=9,rz=13,lz=15,oz=101,az,PB=0,QB=4,X3=1,W7=2,U4=3,N8,lG="Group",YB="R",f2=1,$7=2,K2=4,WB=16,z3=32,$B=128,_B=512,JB=1,UB=2,fB=4096,KB=8192,BB=32768,IB=65536,jB=131072,VB=1048576,HB=2097152,xB=8388608,MB=16777216,nz=1,AB=2,LB=3,kB=4,TB=5,oG,NB,CB,aG=1,kZ=5,FB=1,nG=2,vB=3,bB=4,SB=5,iG=6,tG=7,mB=8,I5=9,y0=10,Y0=11,_4=12,R3=13,TZ=14,NZ=15,CZ=16,FZ=17,vZ=18,bZ=19,oq=20,G3=21,SZ=22,eG=23,aq=24,nq=25,P3=26,Q3=27,mZ=28,OB=29,yB=30,Y3=31,W3=32,OZ=33,yZ=34,ZP=35,qP=36,s4=37,XP=38,zP=39,RP=40,GP=41,S5=42,u2=43,B4=44,$3=45,_3=46,J3=47,PP=48,pZ=49,iq=50,Z9=51,tq=52,U3=53,q9=54,f3=55,eq=56,a7=57,y4=58,n0=59,ZX=60,n7=61,K3=62,pB=63,DB=64,QP=65,DZ=66,YP=67,WP=68,$P=69,i0=70,B6=71,_P=72,JP=73,UP=74,wB=75,EB=76,uB=77,fP=80,KP=81,I6=83,gB=84,wZ=85,B3=86,BP=87,dB=88,cB=89,hB=90,A5=91,sB=92,rB=93,lB=94,Z7=0,Y5=1,g2=2,B2=3,oB=1,aB=2,I3,q0,L7,g9,k7,iz,h,p8,W6,h1=class{static makeHexColor(Z,q,X){return`#${W6[Z]}${W6[q]}${W6[X]}`}static domMatrixToTransform(Z){return[Z.a,Z.b,Z.c,Z.d,Z.e,Z.f]}static scaleMinMax(Z,q){let X;Z[0]?(Z[0]<0&&(X=q[0],q[0]=q[2],q[2]=X),q[0]*=Z[0],q[2]*=Z[0],Z[3]<0&&(X=q[1],q[1]=q[3],q[3]=X),q[1]*=Z[3],q[3]*=Z[3]):(X=q[0],q[0]=q[1],q[1]=X,X=q[2],q[2]=q[3],q[3]=X,Z[1]<0&&(X=q[1],q[1]=q[3],q[3]=X),q[1]*=Z[1],q[3]*=Z[1],Z[2]<0&&(X=q[0],q[0]=q[2],q[2]=X),q[0]*=Z[2],q[2]*=Z[2]),q[0]+=Z[4],q[1]+=Z[5],q[2]+=Z[4],q[3]+=Z[5]}static transform(Z,q){return[Z[0]*q[0]+Z[2]*q[1],Z[1]*q[0]+Z[3]*q[1],Z[0]*q[2]+Z[2]*q[3],Z[1]*q[2]+Z[3]*q[3],Z[0]*q[4]+Z[2]*q[5]+Z[4],Z[1]*q[4]+Z[3]*q[5]+Z[5]]}static multiplyByDOMMatrix(Z,q){return[Z[0]*q.a+Z[2]*q.b,Z[1]*q.a+Z[3]*q.b,Z[0]*q.c+Z[2]*q.d,Z[1]*q.c+Z[3]*q.d,Z[0]*q.e+Z[2]*q.f+Z[4],Z[1]*q.e+Z[3]*q.f+Z[5]]}static applyTransform(Z,q,X=0){let z=Z[X],R=Z[X+1];Z[X]=z*q[0]+R*q[2]+q[4],Z[X+1]=z*q[1]+R*q[3]+q[5]}static applyTransformToBezier(Z,q,X=0){let z=q[0],R=q[1],G=q[2],P=q[3],Q=q[4],Y=q[5];for(let W=0;W<6;W+=2){let $=Z[X+W],_=Z[X+W+1];Z[X+W]=$*z+_*G+Q,Z[X+W+1]=$*R+_*P+Y}}static applyInverseTransform(Z,q){let X=Z[0],z=Z[1],R=q[0]*q[3]-q[1]*q[2];Z[0]=(X*q[3]-z*q[2]+q[2]*q[5]-q[4]*q[3])/R,Z[1]=(-X*q[1]+z*q[0]+q[4]*q[1]-q[5]*q[0])/R}static axialAlignedBoundingBox(Z,q,X){let z=q[0],R=q[1],G=q[2],P=q[3],Q=q[4],Y=q[5],W=Z[0],$=Z[1],_=Z[2],J=Z[3],U=z*W+Q,f=U,K=z*_+Q,I=K,B=P*$+Y,j=B,V=P*J+Y,x=V;if(R!==0||G!==0){let M=R*W,H=R*_,A=G*$,T=G*J;U+=A,I+=A,K+=T,f+=T,B+=M,x+=M,V+=H,j+=H}X[0]=Math.min(X[0],U,K,f,I),X[1]=Math.min(X[1],B,V,j,x),X[2]=Math.max(X[2],U,K,f,I),X[3]=Math.max(X[3],B,V,j,x)}static inverseTransform(Z){let q=Z[0]*Z[3]-Z[1]*Z[2];return[Z[3]/q,-Z[1]/q,-Z[2]/q,Z[0]/q,(Z[2]*Z[5]-Z[4]*Z[3])/q,(Z[4]*Z[1]-Z[5]*Z[0])/q]}static singularValueDecompose2dScale(Z,q){let X=Z[0],z=Z[1],R=Z[2],G=Z[3],P=X**2+z**2,Q=X*R+z*G,Y=R**2+G**2,W=(P+Y)/2,$=Math.sqrt(W**2-(P*Y-Q**2));q[0]=Math.sqrt(W+$||1),q[1]=Math.sqrt(W-$||1)}static normalizeRect(Z){let q=Z.slice(0);return Z[0]>Z[2]&&(q[0]=Z[2],q[2]=Z[0]),Z[1]>Z[3]&&(q[1]=Z[3],q[3]=Z[1]),q}static intersect(Z,q){let X=Math.max(Math.min(Z[0],Z[2]),Math.min(q[0],q[2])),z=Math.min(Math.max(Z[0],Z[2]),Math.max(q[0],q[2]));if(X>z)return null;let R=Math.max(Math.min(Z[1],Z[3]),Math.min(q[1],q[3])),G=Math.min(Math.max(Z[1],Z[3]),Math.max(q[1],q[3]));return R>G?null:[X,R,z,G]}static pointBoundingBox(Z,q,X){X[0]=Math.min(X[0],Z),X[1]=Math.min(X[1],q),X[2]=Math.max(X[2],Z),X[3]=Math.max(X[3],q)}static rectBoundingBox(Z,q,X,z,R){R[0]=Math.min(R[0],Z,X),R[1]=Math.min(R[1],q,z),R[2]=Math.max(R[2],Z,X),R[3]=Math.max(R[3],q,z)}static#Z(Z,q,X,z,R,G,P,Q,Y,W){if(Y<=0||Y>=1)return;let $=1-Y,_=Y*Y,J=_*Y,U=$*($*($*Z+3*Y*q)+3*_*X)+J*z,f=$*($*($*R+3*Y*G)+3*_*P)+J*Q;W[0]=Math.min(W[0],U),W[1]=Math.min(W[1],f),W[2]=Math.max(W[2],U),W[3]=Math.max(W[3],f)}static#q(Z,q,X,z,R,G,P,Q,Y,W,$,_){if(Math.abs(Y)<0.000000000001)return void(Math.abs(W)>=0.000000000001&&this.#Z(Z,q,X,z,R,G,P,Q,-$/W,_));let J=W**2-4*$*Y;if(J<0)return;let U=Math.sqrt(J),f=2*Y;this.#Z(Z,q,X,z,R,G,P,Q,(-W+U)/f,_),this.#Z(Z,q,X,z,R,G,P,Q,(-W-U)/f,_)}static bezierBoundingBox(Z,q,X,z,R,G,P,Q,Y){Y[0]=Math.min(Y[0],Z,P),Y[1]=Math.min(Y[1],q,Q),Y[2]=Math.max(Y[2],Z,P),Y[3]=Math.max(Y[3],q,Q),this.#q(Z,X,R,P,q,z,G,Q,3*(3*(X-R)-Z+P),6*(Z-2*X+R),3*(X-Z),Y),this.#q(Z,X,R,P,q,z,G,Q,3*(3*(z-G)-q+Q),6*(q-2*z+G),3*(z-q),Y)}},nB,d9=null,tz=null,iB,b8,IP,jP,d2,VP=function(){return VP},S,U8,t8,xP,uZ=2147483647,w0,gZ,dZ,X8,H3,V4,L5,c9,eB,i8,NP,q7=null,sZ=0,s9,zI,m8,FP,rZ,vP,bP,SP,mP,zX,OP,c8,yP,M4,C7,W8,o8,A3,DP,Q0,PI,a8,uP,I0,L3,RX,_7,I2=4017,j2=799,V2=3406,H2=2276,x2=1567,M2=3784,d5=5793,A2=2896,v6,X7,U5,gP,O8,c5=16,hP,sP,Q4=-1,RR,GR,PR,QR,YR,WR,rP,$R,UI,fI,KI,BI,nZ,II,R8,_R,jI,JR,VI,h2=17,fR,eP,ZQ,tZ,eZ,qQ,h5,kI,l9=16777215,k5,PQ,mI,QX,A4,F7,YX,WX,l0,OI,yI,o9,DI,qq,b7=!0,Xq=1,QQ=2,T3=4,KR=32,BR,wI,EI,uI,gI,s2,a9=391,s5,dI,cI,S7,hI,m7,n9,O7,sI,Rq,UX,Gq,IR,rI,lI,fQ,KQ,nI,iI,eI,Zj,qj,Xj,zj,Rj,t9,HR,xR,Gj,Pj,Y4,W5=1000,Qj,Yj,_q=2,l2=3,AQ=4,LQ=5,kQ=6,TQ=7,CQ,vQ,p4,bQ,Jj,Uj,fj,Kj,Bj,Ij,jj,Vj,Hj,xj,Mj,Aj,Lj,kj,Tj,Nj,u6,g6,d6,c6,h6,s6,r6,l6,Cj,Fj,vj,bj,Sj,mj,Oj,yj,pj,Dj,wj,Ej,uj,gj,dj,cj,hj,r8,Jq,VX,yQ,Uq,pQ,DQ,wQ,uQ,r4,Q9,gQ,Kq,Bq,aj,nj,v4,c1,pR,DR,ej,$5,f5,K5,B5,U7,ZV,uR=3285377520,k0=4294901760,b4=65535,qV=class{constructor(Z){this.h1=Z?4294967295&Z:uR,this.h2=Z?4294967295&Z:uR}update(Z){let q,X;if(typeof Z=="string"){q=new Uint8Array(2*Z.length),X=0;for(let f=0,K=Z.length;f<K;f++){let I=Z.charCodeAt(f);I<=255?q[X++]=I:(q[X++]=I>>>8,q[X++]=255&I)}}else{if(!ArrayBuffer.isView(Z))throw Error("Invalid data format, must be a string or TypedArray.");q=Z.slice(),X=q.byteLength}let z=X>>2,R=X-4*z,G=new Uint32Array(q.buffer,0,z),P=0,Q=0,Y=this.h1,W=this.h2,$=3432918353,_=461845907,J=11601,U=13715;for(let f=0;f<z;f++)1&f?(P=G[f],P=P*$&k0|P*J&b4,P=P<<15|P>>>17,P=P*_&k0|P*U&b4,Y^=P,Y=Y<<13|Y>>>19,Y=5*Y+3864292196):(Q=G[f],Q=Q*$&k0|Q*J&b4,Q=Q<<15|Q>>>17,Q=Q*_&k0|Q*U&b4,W^=Q,W=W<<13|W>>>19,W=5*W+3864292196);switch(P=0,R){case 3:P^=q[4*z+2]<<16;case 2:P^=q[4*z+1]<<8;case 1:P^=q[4*z],P=P*$&k0|P*J&b4,P=P<<15|P>>>17,P=P*_&k0|P*U&b4,1&z?Y^=P:W^=P}this.h1=Y,this.h2=W}hexdigest(){let Z=this.h1,q=this.h2;return Z^=q>>>1,Z=3981806797*Z&k0|36045*Z&b4,q=4283543511*q&k0|(2950163797*(q<<16|Z>>>16)&k0)>>>16,Z^=q>>>1,Z=444984403*Z&k0|60499*Z&b4,q=3301882366*q&k0|(3120437893*(q<<16|Z>>>16)&k0)>>>16,Z^=q>>>1,(Z>>>0).toString(16).padStart(8,"0")+(q>>>0).toString(16).padStart(8,"0")}},XV,zV=1,RV=2,dR,rQ,lQ,GV,PV,_5,w7,K7=0,QV=-2,YV=-3,hR=-4,WV=-5,sR=-6,rR=-9,Z2,aQ=1,nQ=2,Vq=3,iQ=4,Hq=5,v3,Y9,T5,Y8,a4,b0,z6,a2,D0,e0,a,v0,A6,u,Z8,q2,xq,eQ,N5,W9,E7,B7,NX,u8,I7,S8,L6,K4,I8,L1,K8,e1,u7,n5,Mq,n2,CX,E5,R6,E4,j7,L4,N4,g7,d7,JV,B8,d1,j5,X4,Aq,k4,G4,W0,b6,h4,ZY,G7,x4,Lq,qY,_0,p0,A8,XY,H1,V7,u1,a1,g0,j8,UV,fV,aR,KV,S3=0,m3=1,vX=2,BV=3,IV=4,PY,nR,C2,Q5,r5,F1,PZ,S4,QZ,iR,YZ,tR,WZ,P7,F2,N0,o6,a6,$Z,Tq=0,YY,g,C,J9,z4,P8,r1,b1,S0,M8,bX,eR,z1,F5="http://www.w3.org/2000/svg",HV,xV,MV,xY,DX,MY,AY,LY,kY,O3,TY,NY,wX,CY,EX,uX,FY,vY,bY,SY,mY,gX,dX,OY,yY,pY,V9,cX,DY,wY,EY,uY,gY,dY,cY,hY,hX,m6,sY,rY,lY,oY,aY,nY,iY,AV,tY,eY,sX,ZW,qW,H9,XW,zW,RW,GW,PW,QW,YW,WW,$W,_W,JW,y3,UW,fW,KW,BW,IW,jW,VW,HW,xW,MW,AW,LW,kW,TW,rX,p5,c7,NW,CW,FW,vW,bW,SW,mW,OW,lX,yW,pW,p3,DW,wW,EW,uW,gW,dW,oX,x9,cW,hW,sW,M9,aX,nX,rW,lW,oW,aW,nW,A9,iW,L9,tW,D3,RG,Z1,q$,X$,z$,R$,G$,P$,Q$,Y$,W$,$$,_$,J$,U$,f$,K$,B$,I$,j$,V$,H$,x$,M$,A$,L$,k$,T$,N$,C$,F$,v$,b$,S$,m$,O$,y$,p$,D$,w$,E$,u$,g$,d$,c$,h$,s$,r$,l$,o$,a$,n$,i$,t$,e$,Z_,q_,X_,z_,R_,G_,P_,Q_,Y_,W_,$_,__,J_,U_,f_,K_,B_,I_,j_,V_,H_,x_,M_,A_,L_,k_,T_,N_,C_,F_,v_,b_,S_,m_,O_,y_,p_,D_,w_,E_,u_,g_,d_,c_,h_,s_,r_,LV,l_,o_,a_,n_,i_,t_,e_,ZJ,qJ,XJ,zJ,RJ,GJ,PJ,QJ,YJ,WJ,$J,_J,JJ,UJ,fJ,KJ,BJ,IJ,jJ,VJ,HJ,xJ,MJ,AJ,LJ,kJ,TJ,NJ,CJ,FJ,vJ,w3,m0,bJ,SJ,mJ,OJ,yJ,pJ,DJ,wJ,EJ,uJ,gJ,dJ,E3,Nq,cJ,hJ,u3,$8,sJ,rJ,lJ,oJ,aJ,nJ,iJ,tJ,eJ,ZU,qU,XU,zU,RU,GU,PU,QU,YU,WU,$U,_U,JU,UU,fU,g3,kV,KU,d3,TV,BU,c3,NV,IU,h3,CV,b2,FV,vV,bV,SV,mV,yV,J0,jU,VU,HU,xU,MU,AU,LU,kU,TU,NU,CU,FU,vU,k6,GG,Cq,bU,SU,s3,z0,E0,yU,pU,DU,iX,wU,EU,k9,i2,uU,gU,dU,tX,eX,cU,i5,t2,hU,sU,rU,J5,lU,pV,oU,DV,sV,eU,Zz,r3,qf,Xf,tV,QG,YG,eV,mq,Rf,WG=1,$G=2,_G=1,JZ=2,JG=3,UG=4,fG=5,KG=6,S2=7,UZ=8,IG=class{#Z=new AbortController;constructor(Z,q,X){this.sourceName=Z,this.targetName=q,this.comObj=X,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),X.addEventListener("message",this.#q.bind(this),{signal:this.#Z.signal})}#q({data:Z}){if(Z.targetName!==this.sourceName)return;if(Z.stream)return void this.#X(Z);if(Z.callback){let X=Z.callbackId,z=this.callbackCapabilities[X];if(!z)throw Error(`Cannot resolve callback ${X}`);if(delete this.callbackCapabilities[X],Z.callback===WG)z.resolve(Z.data);else{if(Z.callback!==$G)throw Error("Unexpected callback case");z.reject(K0(Z.reason))}return}let q=this.actionHandler[Z.action];if(!q)throw Error(`Unknown action from worker: ${Z.action}`);if(Z.callbackId){let X=this.sourceName,z=Z.sourceName,R=this.comObj;return void Promise.try(q,Z.data).then(function(G){R.postMessage({sourceName:X,targetName:z,callback:WG,callbackId:Z.callbackId,data:G})},function(G){R.postMessage({sourceName:X,targetName:z,callback:$G,callbackId:Z.callbackId,reason:K0(G)})})}Z.streamId?this.#z(Z):q(Z.data)}on(Z,q){let X=this.actionHandler;if(X[Z])throw Error(`There is already an actionName called "${Z}"`);X[Z]=q}send(Z,q,X){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Z,data:q},X)}sendWithPromise(Z,q,X){let z=this.callbackId++,R=Promise.withResolvers();this.callbackCapabilities[z]=R;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Z,callbackId:z,data:q},X)}catch(G){R.reject(G)}return R.promise}sendWithStream(Z,q,X,z){let R=this.streamId++,G=this.sourceName,P=this.targetName,Q=this.comObj;return new ReadableStream({start:(Y)=>{let W=Promise.withResolvers();return this.streamControllers[R]={controller:Y,startCall:W,pullCall:null,cancelCall:null,isClosed:!1},Q.postMessage({sourceName:G,targetName:P,action:Z,streamId:R,data:q,desiredSize:Y.desiredSize},z),W.promise},pull:(Y)=>{let W=Promise.withResolvers();return this.streamControllers[R].pullCall=W,Q.postMessage({sourceName:G,targetName:P,stream:KG,streamId:R,desiredSize:Y.desiredSize}),W.promise},cancel:(Y)=>{t1(Y instanceof Error,"cancel must have a valid reason");let W=Promise.withResolvers();return this.streamControllers[R].cancelCall=W,this.streamControllers[R].isClosed=!0,Q.postMessage({sourceName:G,targetName:P,stream:_G,streamId:R,reason:K0(Y)}),W.promise}},X)}#z(Z){let q=Z.streamId,X=this.sourceName,z=Z.sourceName,R=this.comObj,G=this,P=this.actionHandler[Z.action],Q={enqueue(Y,W=1,$){if(this.isCancelled)return;let _=this.desiredSize;this.desiredSize-=W,_>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),R.postMessage({sourceName:X,targetName:z,stream:UG,streamId:q,chunk:Y},$)},close(){this.isCancelled||(this.isCancelled=!0,R.postMessage({sourceName:X,targetName:z,stream:JG,streamId:q}),delete G.streamSinks[q])},error(Y){t1(Y instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,R.postMessage({sourceName:X,targetName:z,stream:fG,streamId:q,reason:K0(Y)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:Z.desiredSize,ready:null};Q.sinkCapability.resolve(),Q.ready=Q.sinkCapability.promise,this.streamSinks[q]=Q,Promise.try(P,Z.data,Q).then(function(){R.postMessage({sourceName:X,targetName:z,stream:UZ,streamId:q,success:!0})},function(Y){R.postMessage({sourceName:X,targetName:z,stream:UZ,streamId:q,reason:K0(Y)})})}#X(Z){let q=Z.streamId,X=this.sourceName,z=Z.sourceName,R=this.comObj,G=this.streamControllers[q],P=this.streamSinks[q];switch(Z.stream){case UZ:Z.success?G.startCall.resolve():G.startCall.reject(K0(Z.reason));break;case S2:Z.success?G.pullCall.resolve():G.pullCall.reject(K0(Z.reason));break;case KG:if(!P){R.postMessage({sourceName:X,targetName:z,stream:S2,streamId:q,success:!0});break}P.desiredSize<=0&&Z.desiredSize>0&&P.sinkCapability.resolve(),P.desiredSize=Z.desiredSize,Promise.try(P.onPull||BG).then(function(){R.postMessage({sourceName:X,targetName:z,stream:S2,streamId:q,success:!0})},function(Y){R.postMessage({sourceName:X,targetName:z,stream:S2,streamId:q,reason:K0(Y)})});break;case UG:if(t1(G,"enqueue should have stream controller"),G.isClosed)break;G.controller.enqueue(Z.chunk);break;case JG:if(t1(G,"close should have stream controller"),G.isClosed)break;G.isClosed=!0,G.controller.close(),this.#R(G,q);break;case fG:t1(G,"error should have stream controller"),G.controller.error(K0(Z.reason)),this.#R(G,q);break;case JZ:Z.success?G.cancelCall.resolve():G.cancelCall.reject(K0(Z.reason)),this.#R(G,q);break;case _G:if(!P)break;let Q=K0(Z.reason);Promise.try(P.onCancel||BG,Q).then(function(){R.postMessage({sourceName:X,targetName:z,stream:JZ,streamId:q,success:!0})},function(Y){R.postMessage({sourceName:X,targetName:z,stream:JZ,streamId:q,reason:K0(Y)})}),P.sinkCapability.reject(Q),P.isCancelled=!0,delete this.streamSinks[q];break;default:throw Error("Unexpected stream case")}}async#R(Z,q){await Promise.allSettled([Z.startCall?.promise,Z.pullCall?.promise,Z.cancelCall?.promise]),delete this.streamControllers[q]}destroy(){this.#Z?.abort(),this.#Z=null}},Jf,R0,Oq,KZ=1.35,XH=1,Rz=2,l3=4,zH=16,RH=32,GH=64,PH=128,QH=256,j4,h7="pdfjs_internal_editor_",m1,s1,Uf,e2=0,BZ=1,n6=2,YH=3,xG=3,MG=4,H7,V8,ff=1,WH=2,$H=3,_H=4,JH=5,G2,T6,UH=0,fH=1,KH=2,BH=3,Kf,C9,u5,yq,Z3,s7,N6,Bf,P4,IZ,jZ=null,AG=null,Yz="pdfjs_internal_id_",$4="http://www.w3.org/2000/svg",n4,Y2,o3,NG,Jz,k1,vf,CG=3285377520,T0=4294901760,m4=65535,wq,S9,fz,Eq=(Z)=>typeof Z=="object"&&Number.isInteger(Z?.num)&&Z.num>=0&&Number.isInteger(Z?.gen)&&Z.gen>=0,mf,FG=1,vG=2,bG=1,VZ=2,SG=3,mG=4,OG=5,yG=6,O2=7,HZ=8,yf,uq,pf,gq,dq,Df,wf,Ef,uf,gf,l5="__forcedDependency",DG,wG,cq,p2=(Z,q)=>{if(!Z)return;let X=Z.get(q);return X||(X={dependencies:new Set,isRenderingOperation:!1},Z.set(q,X)),X},EG,xZ,VH,HH,xH,MH,MZ,V5="Fill",M7="Stroke",A7="Shading",hf,sf,rf,LH=1,kH=2,P0=16,LZ,V0,Q6,NH,CH,FH,cG,f6,K6,q8,of,t5,nf,vH,t6,Mz,h8,v8,Y6,MK="5.4.296",AK="f56dc8601",F6,D5,bH,kK,p9,TK,Z5,NK,CK,FK,Lz,vK,bK,n3,kz,mK,OK,yK,Tz,pK,DK,D9,Nz,wK,EK,uK,Cz,gK,E2,C8,H5,Fz,dK,t3,cK,H8,N1,D6,E9,bz,e3,u4,Sz,mz,r0,sK,a0;var lK=qB(()=>{globalThis.DOMMatrix===void 0&&(globalThis.DOMMatrix=class{}),globalThis.FinalizationRegistry===void 0&&(globalThis.FinalizationRegistry=class{register(){}unregister(){}}),globalThis.navigator??={},globalThis.navigator.platform??="",globalThis.navigator.userAgent??="",Promise.withResolvers===void 0&&(Promise.withResolvers=function(){let Z,q;return{promise:new Promise((X,z)=>{Z=X,q=z}),resolve:Z,reject:q}});XB=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser"),x5=[0.001,0,0,0.001,0,0],az={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},N8={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},oG={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"},NB={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},CB={O:"PageOpen",C:"PageClose"},I3=aG;q0=function(){function Z(q,X){this.message=q,this.name=X}return Z.prototype=Error(),Z.constructor=Z,Z}(),L7=class extends q0{constructor(Z,q){super(Z,"PasswordException"),this.code=q}},g9=class extends q0{constructor(Z,q){super(Z,"UnknownErrorException"),this.details=q}},k7=class extends q0{constructor(Z){super(Z,"InvalidPDFException")}},iz=class extends q0{constructor(Z,q,X){super(Z,"ResponseException"),this.status=q,this.missing=X}},h=class extends q0{constructor(Z){super(Z,"FormatError")}},p8=class extends q0{constructor(Z){super(Z,"AbortException")}};W6=Array.from(Array(256).keys(),(Z)=>Z.toString(16).padStart(2,"0")),nB=[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];typeof Promise.try!="function"&&(Promise.try=function(Z,...q){return new Promise((X)=>{X(Z(...q))})}),typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(Z){return Z.reduce((q,X)=>q+X,0)});iB=Symbol("CIRCULAR_REF"),b8=Symbol("EOF"),IP=Object.create(null),jP=Object.create(null),d2=Object.create(null);S=class S{constructor(Z=null){this._map=new Map,this.xref=Z,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=VP}assignXref(Z){this.xref=Z}get size(){return this._map.size}get(Z,q,X){let z=this._map.get(Z);return z===void 0&&q!==void 0&&(z=this._map.get(q),z===void 0&&X!==void 0&&(z=this._map.get(X))),z instanceof P1&&this.xref?this.xref.fetch(z,this.suppressEncryption):z}async getAsync(Z,q,X){let z=this._map.get(Z);return z===void 0&&q!==void 0&&(z=this._map.get(q),z===void 0&&X!==void 0&&(z=this._map.get(X))),z instanceof P1&&this.xref?this.xref.fetchAsync(z,this.suppressEncryption):z}getArray(Z,q,X){let z=this._map.get(Z);if(z===void 0&&q!==void 0&&(z=this._map.get(q),z===void 0&&X!==void 0&&(z=this._map.get(X))),z instanceof P1&&this.xref&&(z=this.xref.fetch(z,this.suppressEncryption)),Array.isArray(z)){z=z.slice();for(let R=0,G=z.length;R<G;R++)z[R]instanceof P1&&this.xref&&(z[R]=this.xref.fetch(z[R],this.suppressEncryption))}return z}getRaw(Z){return this._map.get(Z)}getKeys(){return[...this._map.keys()]}getRawValues(){return[...this._map.values()]}set(Z,q){this._map.set(Z,q)}setIfNotExists(Z,q){this.has(Z)||this.set(Z,q)}setIfNumber(Z,q){typeof q=="number"&&this.set(Z,q)}setIfArray(Z,q){(Array.isArray(q)||ArrayBuffer.isView(q))&&this.set(Z,q)}setIfDefined(Z,q){q!=null&&this.set(Z,q)}setIfName(Z,q){typeof q=="string"?this.set(Z,t.get(q)):q instanceof t&&this.set(Z,q)}has(Z){return this._map.has(Z)}*[Symbol.iterator](){for(let[Z,q]of this._map)yield[Z,q instanceof P1&&this.xref?this.xref.fetch(q,this.suppressEncryption):q]}static get empty(){let Z=new S(null);return Z.set=(q,X)=>{y1("Should not call `set` on the empty dictionary.")},X1(this,"empty",Z)}static merge({xref:Z,dictArray:q,mergeSubDicts:X=!1}){let z=new S(Z),R=new Map;for(let G of q)if(G instanceof S)for(let[P,Q]of G._map){let Y=R.get(P);if(Y===void 0)Y=[],R.set(P,Y);else if(!(X&&Q instanceof S))continue;Y.push(Q)}for(let[G,P]of R){if(P.length===1||!(P[0]instanceof S)){z._map.set(G,P[0]);continue}let Q=new S(Z);for(let Y of P)for(let[W,$]of Y._map)Q._map.has(W)||Q._map.set(W,$);Q.size>0&&z._map.set(G,Q)}return R.clear(),z.size>0?z:S.empty}clone(){let Z=new S(this.xref);for(let q of this.getKeys())Z.set(q,this.getRaw(q));return Z}delete(Z){this._map.delete(Z)}};U8=class U8{constructor(Z=null){this._set=new Set(Z?._set)}has(Z){return this._set.has(Z.toString())}put(Z){this._set.add(Z.toString())}remove(Z){this._set.delete(Z.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}};t8=class t8{constructor(){this._map=new Map}get size(){return this._map.size}get(Z){return this._map.get(Z.toString())}has(Z){return this._map.has(Z.toString())}put(Z,q){this._map.set(Z.toString(),q)}putAlias(Z,q){this._map.set(Z.toString(),this.get(q))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*values(){yield*this._map.values()}*items(){for(let[Z,q]of this._map)yield[P1.fromString(Z),q]}};xP=/^[1-9]\.\d$/,w0=[1,0,0,1,0,0],gZ=["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"],dZ=["ExtGState","Font","Properties","XObject"];X8=class X8 extends q0{constructor(Z,q){super(`Missing data [${Z}, ${q})`,"MissingDataException"),this.begin=Z,this.end=q}};H3=class H3 extends q0{constructor(Z){super(Z,"ParserEOFException")}};V4=class V4 extends q0{constructor(Z){super(Z,"XRefEntryException")}};L5=class L5 extends q0{constructor(Z){super(Z,"XRefParseException")}};c9=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];eB={60:"<",62:">",38:"&",34:""",39:"'"};NP=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&NP.decode();s9=Object.freeze({RGB8:0,0:"RGB8",RGBA8:1,1:"RGBA8",BGRA8:2,2:"BGRA8",Gray8:3,3:"Gray8",GrayA8:4,4:"GrayA8",CMYK:5,5:"CMYK"}),zI=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});m8=class m8{static#Z=new Uint8ClampedArray(3);constructor(Z,q){this.name=Z,this.numComps=q}getRgb(Z,q,X=new Uint8ClampedArray(3)){return this.getRgbItem(Z,q,X,0),X}getRgbHex(Z,q){let X=this.getRgb(Z,q,m8.#Z);return h1.makeHexColor(X[0],X[1],X[2])}getRgbItem(Z,q,X,z){y1("Should not call ColorSpace.getRgbItem")}getRgbBuffer(Z,q,X,z,R,G,P){y1("Should not call ColorSpace.getRgbBuffer")}getOutputLength(Z,q){y1("Should not call ColorSpace.getOutputLength")}isPassthrough(Z){return!1}isDefaultDecode(Z,q){return m8.isDefaultDecode(Z,this.numComps)}fillRgb(Z,q,X,z,R,G,P,Q,Y){let W=q*X,$=null,_=1<<P,J=X!==R||q!==z;if(this.isPassthrough(P))$=Q;else if(this.numComps===1&&W>_&&this.name!=="DeviceGray"&&this.name!=="DeviceRGB"){let U=P<=8?new Uint8Array(_):new Uint16Array(_);for(let K=0;K<_;K++)U[K]=K;let f=new Uint8ClampedArray(3*_);if(this.getRgbBuffer(U,0,_,f,0,P,0),J){$=new Uint8Array(3*W);let K=0;for(let I=0;I<W;++I){let B=3*Q[I];$[K++]=f[B],$[K++]=f[B+1],$[K++]=f[B+2]}}else{let K=0;for(let I=0;I<W;++I){let B=3*Q[I];Z[K++]=f[B],Z[K++]=f[B+1],Z[K++]=f[B+2],K+=Y}}}else J?($=new Uint8ClampedArray(3*W),this.getRgbBuffer(Q,0,W,$,0,P,0)):this.getRgbBuffer(Q,0,z*G,Z,0,P,Y);if($)if(J)(function(U,f,K,I,B,j,V){V=V!==1?0:V;let x=K/B,M=I/j,H,A=0,T=new Uint16Array(B),k=3*K;for(let y=0;y<B;y++)T[y]=3*Math.floor(y*x);for(let y=0;y<j;y++){let O=Math.floor(y*M)*k;for(let D=0;D<B;D++)H=O+T[D],f[A++]=U[H++],f[A++]=U[H++],f[A++]=U[H++],A+=V}})($,Z,q,X,z,R,Y);else{let U=0,f=0;for(let K=0,I=z*G;K<I;K++)Z[U++]=$[f++],Z[U++]=$[f++],Z[U++]=$[f++],U+=Y}}get usesZeroToOneRange(){return X1(this,"usesZeroToOneRange",!0)}static isDefaultDecode(Z,q){if(!Array.isArray(Z))return!0;if(2*q!==Z.length)return v("The decode map is not the correct length"),!0;for(let X=0,z=Z.length;X<z;X+=2)if(Z[X]!==0||Z[X+1]!==1)return!1;return!0}};FP=class FP extends m8{constructor(Z,q,X){super("Alternate",Z),this.base=q,this.tintFn=X,this.tmpBuf=new Float32Array(q.numComps)}getRgbItem(Z,q,X,z){let R=this.tmpBuf;this.tintFn(Z,q,R,0),this.base.getRgbItem(R,0,X,z)}getRgbBuffer(Z,q,X,z,R,G,P){let Q=this.tintFn,Y=this.base,W=1/((1<<G)-1),$=Y.numComps,_=Y.usesZeroToOneRange,J=(Y.isPassthrough(8)||!_)&&P===0,U=J?R:0,f=J?z:new Uint8ClampedArray($*X),K=this.numComps,I=new Float32Array(K),B=new Float32Array($),j,V;for(j=0;j<X;j++){for(V=0;V<K;V++)I[V]=Z[q++]*W;if(Q(I,0,B,0),_)for(V=0;V<$;V++)f[U++]=255*B[V];else Y.getRgbItem(B,0,f,U),U+=$}J||Y.getRgbBuffer(f,0,X,z,R,8,P)}getOutputLength(Z,q){return this.base.getOutputLength(Z*this.base.numComps/this.numComps,q)}};rZ=class rZ extends m8{constructor(Z){super("Pattern",null),this.base=Z}isDefaultDecode(Z,q){y1("Should not call PatternCS.isDefaultDecode")}};vP=class vP extends m8{constructor(Z,q,X){super("Indexed",1),this.base=Z,this.highVal=q;let z=Z.numComps*(q+1);if(this.lookup=new Uint8Array(z),X instanceof C1){let R=X.getBytes(z);this.lookup.set(R)}else{if(typeof X!="string")throw new h(`IndexedCS - unrecognized lookup table: ${X}`);for(let R=0;R<z;++R)this.lookup[R]=255&X.charCodeAt(R)}}getRgbItem(Z,q,X,z){let{base:R,highVal:G,lookup:P}=this,Q=E8(Math.round(Z[q]),0,G)*R.numComps;R.getRgbBuffer(P,Q,1,X,z,8,0)}getRgbBuffer(Z,q,X,z,R,G,P){let{base:Q,highVal:Y,lookup:W}=this,{numComps:$}=Q,_=Q.getOutputLength($,P);for(let J=0;J<X;++J){let U=E8(Math.round(Z[q++]),0,Y)*$;Q.getRgbBuffer(W,U,1,z,R,8,P),R+=_}}getOutputLength(Z,q){return this.base.getOutputLength(Z*this.base.numComps,q)}isDefaultDecode(Z,q){return!Array.isArray(Z)||(Z.length!==2?(v("Decode map length is not correct"),!0):!Number.isInteger(q)||q<1?(v("Bits per component is not correct"),!0):Z[0]===0&&Z[1]===(1<<q)-1)}};bP=class bP extends m8{constructor(){super("DeviceGray",1)}getRgbItem(Z,q,X,z){let R=255*Z[q];X[z]=X[z+1]=X[z+2]=R}getRgbBuffer(Z,q,X,z,R,G,P){let Q=255/((1<<G)-1),Y=q,W=R;for(let $=0;$<X;++$){let _=Q*Z[Y++];z[W++]=_,z[W++]=_,z[W++]=_,W+=P}}getOutputLength(Z,q){return Z*(3+q)}};SP=class SP extends m8{constructor(){super("DeviceRGB",3)}getRgbItem(Z,q,X,z){X[z]=255*Z[q],X[z+1]=255*Z[q+1],X[z+2]=255*Z[q+2]}getRgbBuffer(Z,q,X,z,R,G,P){if(G===8&&P===0)return void z.set(Z.subarray(q,q+3*X),R);let Q=255/((1<<G)-1),Y=q,W=R;for(let $=0;$<X;++$)z[W++]=Q*Z[Y++],z[W++]=Q*Z[Y++],z[W++]=Q*Z[Y++],W+=P}getOutputLength(Z,q){return Z*(3+q)/3|0}isPassthrough(Z){return Z===8}};mP=class mP extends m8{constructor(){super("DeviceRGBA",4)}getOutputLength(Z,q){return 4*Z}isPassthrough(Z){return Z===8}fillRgb(Z,q,X,z,R,G,P,Q,Y){X!==R||q!==z?function(W,$,_,J,U,f,K){let I=_/U,B=J/f,j=0,V=new Uint16Array(U);if(K===1){for(let A=0;A<U;A++)V[A]=Math.floor(A*I);let x=new Uint32Array(W.buffer),M=new Uint32Array($.buffer),H=Z0.isLittleEndian?16777215:4294967040;for(let A=0;A<f;A++){let T=x.subarray(Math.floor(A*B)*_);for(let k=0;k<U;k++)M[j++]|=T[V[k]]&H}}else{let M=_*4;for(let H=0;H<U;H++)V[H]=Math.floor(H*I)*4;for(let H=0;H<f;H++){let A=W.subarray(Math.floor(H*B)*M);for(let T=0;T<U;T++){let k=V[T];$[j++]=A[k],$[j++]=A[k+1],$[j++]=A[k+2]}}}}(Q,Z,q,X,z,R,Y):function(W,$,_){if(_===1){let J=new Uint32Array(W.buffer),U=new Uint32Array($.buffer),f=Z0.isLittleEndian?16777215:4294967040;for(let K=0,I=J.length;K<I;K++)U[K]|=J[K]&f}else{let J=0;for(let U=0,f=W.length;U<f;U+=4)$[J++]=W[U],$[J++]=W[U+1],$[J++]=W[U+2]}}(Q,Z,Y)}};zX=class zX extends m8{constructor(){super("DeviceCMYK",4)}#Z(Z,q,X,z,R){let G=Z[q]*X,P=Z[q+1]*X,Q=Z[q+2]*X,Y=Z[q+3]*X;z[R]=255+G*(-4.387332384609988*G+54.48615194189176*P+18.82290502165302*Q+212.25662451639585*Y-285.2331026137004)+P*(1.7149763477362134*P-5.6096736904047315*Q+-17.873870861415444*Y-5.497006427196366)+Q*(-2.5217340131683033*Q-21.248923337353073*Y+17.5119270841813)+Y*(-21.86122147463605*Y-189.48180835922747),z[R+1]=255+G*(8.841041422036149*G+60.118027045597366*P+6.871425592049007*Q+31.159100130055922*Y-79.2970844816548)+P*(-15.310361306967817*P+17.575251261109482*Q+131.35250912493976*Y-190.9453302588951)+Q*(4.444339102852739*Q+9.8632861493405*Y-24.86741582555878)+Y*(-20.737325471181034*Y-187.80453709719578),z[R+2]=255+G*(0.8842522430003296*G+8.078677503112928*P+30.89978309703729*Q-0.23883238689178934*Y-14.183576799673286)+P*(10.49593273432072*P+63.02378494754052*Q+50.606957656360734*Y-112.23884253719248)+Q*(0.03296041114873217*Q+115.60384449646641*Y-193.58209356861505)+Y*(-22.33816807309886*Y-180.12613974708367)}getRgbItem(Z,q,X,z){this.#Z(Z,q,1,X,z)}getRgbBuffer(Z,q,X,z,R,G,P){let Q=1/((1<<G)-1);for(let Y=0;Y<X;Y++)this.#Z(Z,q,Q,z,R),q+=4,R+=3+P}getOutputLength(Z,q){return Z/4*(3+q)|0}};OP=class OP extends m8{constructor(Z,q,X){if(super("CalGray",1),!Z)throw new h("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=Z,[this.XB,this.YB,this.ZB]=q||[0,0,0],this.G=X||1,this.XW<0||this.ZW<0||this.YW!==1)throw new h(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&(v1(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),this.XB===0&&this.YB===0&&this.ZB===0||v(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),this.G<1&&(v1(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}#Z(Z,q,X,z,R){let G=(Z[q]*R)**this.G,P=this.YW*G,Q=Math.max(295.8*P**0.3333333333333333-40.8,0);X[z]=Q,X[z+1]=Q,X[z+2]=Q}getRgbItem(Z,q,X,z){this.#Z(Z,q,X,z,1)}getRgbBuffer(Z,q,X,z,R,G,P){let Q=1/((1<<G)-1);for(let Y=0;Y<X;++Y)this.#Z(Z,q,z,R,Q),q+=1,R+=3+P}getOutputLength(Z,q){return Z*(3+q)}};c8=class c8 extends m8{static#Z=new Float32Array([0.8951,0.2664,-0.1614,-0.7502,1.7135,0.0367,0.0389,-0.0685,1.0296]);static#q=new Float32Array([0.9869929,-0.1470543,0.1599627,0.4323053,0.5183603,0.0492912,-0.0085287,0.0400428,0.9684867]);static#z=new Float32Array([3.2404542,-1.5371385,-0.4985314,-0.969266,1.8760108,0.041556,0.0556434,-0.2040259,1.0572252]);static#X=new Float32Array([1,1,1]);static#R=new Float32Array(3);static#G=new Float32Array(3);static#Q=new Float32Array(3);static#P=0.0011070564598794539;constructor(Z,q,X,z){if(super("CalRGB",3),!Z)throw new h("WhitePoint missing - required for color space CalRGB");let[R,G,P]=this.whitePoint=Z,[Q,Y,W]=this.blackPoint=q||new Float32Array(3);if([this.GR,this.GG,this.GB]=X||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=z||new Float32Array([1,0,0,0,1,0,0,0,1]),R<0||P<0||G!==1)throw new h(`Invalid WhitePoint components for ${this.name}, no fallback available`);(Q<0||Y<0||W<0)&&(v1(`Invalid BlackPoint for ${this.name} [${Q}, ${Y}, ${W}], falling back to default.`),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(v1(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`),this.GR=this.GG=this.GB=1)}#Y(Z,q,X){X[0]=Z[0]*q[0]+Z[1]*q[1]+Z[2]*q[2],X[1]=Z[3]*q[0]+Z[4]*q[1]+Z[5]*q[2],X[2]=Z[6]*q[0]+Z[7]*q[1]+Z[8]*q[2]}#W(Z,q,X){X[0]=1*q[0]/Z[0],X[1]=1*q[1]/Z[1],X[2]=1*q[2]/Z[2]}#J(Z,q,X){X[0]=0.95047*q[0]/Z[0],X[1]=1*q[1]/Z[1],X[2]=1.08883*q[2]/Z[2]}#_(Z){return Z<=0.0031308?E8(12.92*Z,0,1):Z>=0.99554525?1:E8(1.055*Z**0.4166666666666667-0.055,0,1)}#U(Z){return Z<0?-this.#U(-Z):Z>8?((Z+16)/116)**3:Z*c8.#P}#B(Z,q,X){if(Z[0]===0&&Z[1]===0&&Z[2]===0)return X[0]=q[0],X[1]=q[1],void(X[2]=q[2]);let z=this.#U(0),R=(1-z)/(1-this.#U(Z[0])),G=1-R,P=(1-z)/(1-this.#U(Z[1])),Q=1-P,Y=(1-z)/(1-this.#U(Z[2])),W=1-Y;X[0]=q[0]*R+G,X[1]=q[1]*P+Q,X[2]=q[2]*Y+W}#K(Z,q,X){if(Z[0]===1&&Z[2]===1)return X[0]=q[0],X[1]=q[1],void(X[2]=q[2]);let z=X;this.#Y(c8.#Z,q,z);let R=c8.#R;this.#W(Z,z,R),this.#Y(c8.#q,R,X)}#$(Z,q,X){let z=X;this.#Y(c8.#Z,q,z);let R=c8.#R;this.#J(Z,z,R),this.#Y(c8.#q,R,X)}#f(Z,q,X,z,R){let G=E8(Z[q]*R,0,1),P=E8(Z[q+1]*R,0,1),Q=E8(Z[q+2]*R,0,1),Y=G===1?1:G**this.GR,W=P===1?1:P**this.GG,$=Q===1?1:Q**this.GB,_=this.MXA*Y+this.MXB*W+this.MXC*$,J=this.MYA*Y+this.MYB*W+this.MYC*$,U=this.MZA*Y+this.MZB*W+this.MZC*$,f=c8.#G;f[0]=_,f[1]=J,f[2]=U;let K=c8.#Q;this.#K(this.whitePoint,f,K);let I=c8.#G;this.#B(this.blackPoint,K,I);let B=c8.#Q;this.#$(c8.#X,I,B);let j=c8.#G;this.#Y(c8.#z,B,j),X[z]=255*this.#_(j[0]),X[z+1]=255*this.#_(j[1]),X[z+2]=255*this.#_(j[2])}getRgbItem(Z,q,X,z){this.#f(Z,q,X,z,1)}getRgbBuffer(Z,q,X,z,R,G,P){let Q=1/((1<<G)-1);for(let Y=0;Y<X;++Y)this.#f(Z,q,z,R,Q),q+=3,R+=3+P}getOutputLength(Z,q){return Z*(3+q)/3|0}};yP=class yP extends m8{constructor(Z,q,X){if(super("Lab",3),!Z)throw new h("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=Z,[this.amin,this.amax,this.bmin,this.bmax]=X||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=q||[0,0,0],this.XW<0||this.ZW<0||this.YW!==1)throw new h("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&(v1("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(v1("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}#Z(Z){return Z>=0.20689655172413793?Z**3:0.12841854934601665*(Z-0.13793103448275862)}#q(Z,q,X,z){return X+Z*(z-X)/q}#z(Z,q,X,z,R){let G=Z[q],P=Z[q+1],Q=Z[q+2];X!==!1&&(G=this.#q(G,X,0,100),P=this.#q(P,X,this.amin,this.amax),Q=this.#q(Q,X,this.bmin,this.bmax)),P>this.amax?P=this.amax:P<this.amin&&(P=this.amin),Q>this.bmax?Q=this.bmax:Q<this.bmin&&(Q=this.bmin);let Y=(G+16)/116,W=Y+P/500,$=Y-Q/200,_=this.XW*this.#Z(W),J=this.YW*this.#Z(Y),U=this.ZW*this.#Z($),f,K,I;this.ZW<1?(f=3.1339*_+-1.617*J+-0.4906*U,K=-0.9785*_+1.916*J+0.0333*U,I=0.072*_+-0.229*J+1.4057*U):(f=3.2406*_+-1.5372*J+-0.4986*U,K=-0.9689*_+1.8758*J+0.0415*U,I=0.0557*_+-0.204*J+1.057*U),z[R]=255*Math.sqrt(f),z[R+1]=255*Math.sqrt(K),z[R+2]=255*Math.sqrt(I)}getRgbItem(Z,q,X,z){this.#z(Z,q,!1,X,z)}getRgbBuffer(Z,q,X,z,R,G,P){let Q=(1<<G)-1;for(let Y=0;Y<X;Y++)this.#z(Z,q,Q,z,R),q+=3,R+=3+P}getOutputLength(Z,q){return Z*(3+q)/3|0}isDefaultDecode(Z,q){return!0}get usesZeroToOneRange(){return X1(this,"usesZeroToOneRange",!1)}};M4=class M4 extends m8{#Z;#q;static#z=!0;static#X=null;static#R=null;constructor(Z,q,X){if(!M4.isUsable)throw Error("No ICC color space support");let z;switch(super(q,X),X){case 1:z=s9.Gray8,this.#q=(R,G,P)=>function(Q,Y,W){i8.qcms_convert_one(Q,Y,W)}(this.#Z,255*R[G],P);break;case 3:z=s9.RGB8,this.#q=(R,G,P)=>function(Q,Y,W,$,_){i8.qcms_convert_three(Q,Y,W,$,_)}(this.#Z,255*R[G],255*R[G+1],255*R[G+2],P);break;case 4:z=s9.CMYK,this.#q=(R,G,P)=>function(Q,Y,W,$,_,J){i8.qcms_convert_four(Q,Y,W,$,_,J)}(this.#Z,255*R[G],255*R[G+1],255*R[G+2],255*R[G+3],P);break;default:throw Error(`Unsupported number of components: ${X}`)}if(this.#Z=function(R,G,P){let Q=XR(R,i8.__wbindgen_malloc),Y=sZ;return i8.qcms_transformer_from_memory(Q,Y,G,P)>>>0}(Z,z,zI.Perceptual),!this.#Z)throw Error("Failed to create ICC color space");M4.#R||=new FinalizationRegistry((R)=>{(function(G){i8.qcms_drop_transformer(G)})(R)}),M4.#R.register(this,this.#Z)}getRgbHex(Z,q){return this.#q(Z,q,!0),L8._cssColor}getRgbItem(Z,q,X,z){L8._destBuffer=X,L8._destOffset=z,L8._destLength=3,this.#q(Z,q,!1),L8._destBuffer=null}getRgbBuffer(Z,q,X,z,R,G,P){if(Z=Z.subarray(q,q+X*this.numComps),G!==8){let Q=255/((1<<G)-1);for(let Y=0,W=Z.length;Y<W;Y++)Z[Y]*=Q}L8._mustAddAlpha=P&&z.buffer===Z.buffer,L8._destBuffer=z,L8._destOffset=R,L8._destLength=X*(3+P),function(Q,Y){let W=XR(Y,i8.__wbindgen_malloc),$=sZ;i8.qcms_convert_array(Q,W,$)}(this.#Z,Z),L8._mustAddAlpha=!1,L8._destBuffer=null}getOutputLength(Z,q){return Z/this.numComps*(3+q)|0}static setOptions({useWasm:Z,useWorkerFetch:q,wasmUrl:X}){q?(this.#z=Z,this.#X=X):this.#z=!1}static get isUsable(){let Z=!1;if(this.#z)if(this.#X)try{this._module=GI({module:pP(`${this.#X}qcms_bg.wasm`)}),Z=!!this._module,L8._memory=this._module.memory,L8._makeHexColor=h1.makeHexColor}catch(q){v(`ICCBased color space: "${q}".`)}else v("No ICC color space support due to missing `wasmUrl` API option");return X1(this,"isUsable",Z)}};C7=class C7 extends M4{static#Z;constructor(){super(new Uint8Array(pP(`${C7.#Z}CGATS001Compat-v2-micro.icc`)),"DeviceCMYK",4)}static setOptions({iccUrl:Z}){this.#Z=Z}static get isUsable(){let Z=!1;return M4.isUsable&&(this.#Z?Z=!0:v("No CMYK ICC profile support due to missing `iccUrl` API option")),X1(this,"isUsable",Z)}};W8=class W8 extends C1{constructor(Z,q,X,z){super(),this.bytes=Z instanceof Uint8Array?Z:new Uint8Array(Z),this.start=q||0,this.pos=this.start,this.end=q+X||this.bytes.length,this.dict=z}get length(){return this.end-this.start}get isEmpty(){return this.length===0}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(Z){let q=this.bytes,X=this.pos,z=this.end;if(!Z)return q.subarray(X,z);let R=X+Z;return R>z&&(R=z),this.pos=R,q.subarray(X,R)}getByteRange(Z,q){return Z<0&&(Z=0),q>this.end&&(q=this.end),this.bytes.subarray(Z,q)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(Z,q,X=null){return new W8(this.bytes.buffer,Z,q,X)}};o8=class o8 extends W8{constructor(Z){super(w8(Z))}};A3=class A3 extends W8{constructor(){super(new Uint8Array(0))}};DP=class DP extends W8{constructor(Z,q,X){super(new Uint8Array(Z),0,Z,null),this.chunkSize=q,this._loadedChunks=new Set,this.numChunks=Math.ceil(Z/q),this.manager=X,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){let Z=[];for(let q=0,X=this.numChunks;q<X;++q)this._loadedChunks.has(q)||Z.push(q);return Z}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(Z,q){let X=this.chunkSize;if(Z%X!==0)throw Error(`Bad begin offset: ${Z}`);let z=Z+q.byteLength;if(z%X!==0&&z!==this.bytes.length)throw Error(`Bad end offset: ${z}`);this.bytes.set(new Uint8Array(q),Z);let R=Math.floor(Z/X),G=Math.floor((z-1)/X)+1;for(let P=R;P<G;++P)this._loadedChunks.add(P)}onReceiveProgressiveData(Z){let q=this.progressiveDataLength,X=Math.floor(q/this.chunkSize);this.bytes.set(new Uint8Array(Z),q),q+=Z.byteLength,this.progressiveDataLength=q;let z=q>=this.end?this.numChunks:Math.floor(q/this.chunkSize);for(let R=X;R<z;++R)this._loadedChunks.add(R)}ensureByte(Z){if(Z<this.progressiveDataLength)return;let q=Math.floor(Z/this.chunkSize);if(!(q>this.numChunks)&&q!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(q))throw new X8(Z,Z+1);this.lastSuccessfulEnsureByteChunk=q}}ensureRange(Z,q){if(Z>=q)return;if(q<=this.progressiveDataLength)return;let X=Math.floor(Z/this.chunkSize);if(X>this.numChunks)return;let z=Math.min(Math.floor((q-1)/this.chunkSize)+1,this.numChunks);for(let R=X;R<z;++R)if(!this._loadedChunks.has(R))throw new X8(Z,q)}nextEmptyChunk(Z){let q=this.numChunks;for(let X=0;X<q;++X){let z=(Z+X)%q;if(!this._loadedChunks.has(z))return z}return null}hasChunk(Z){return this._loadedChunks.has(Z)}getByte(){let Z=this.pos;return Z>=this.end?-1:(Z>=this.progressiveDataLength&&this.ensureByte(Z),this.bytes[this.pos++])}getBytes(Z){let q=this.bytes,X=this.pos,z=this.end;if(!Z)return z>this.progressiveDataLength&&this.ensureRange(X,z),q.subarray(X,z);let R=X+Z;return R>z&&(R=z),R>this.progressiveDataLength&&this.ensureRange(X,R),this.pos=R,q.subarray(X,R)}getByteRange(Z,q){return Z<0&&(Z=0),q>this.end&&(q=this.end),q>this.progressiveDataLength&&this.ensureRange(Z,q),this.bytes.subarray(Z,q)}makeSubStream(Z,q,X=null){function z(){}q?Z+q>this.progressiveDataLength&&this.ensureRange(Z,Z+q):Z>=this.progressiveDataLength&&this.ensureByte(Z),z.prototype=Object.create(this),z.prototype.getMissingChunks=function(){let G=this.chunkSize,P=Math.floor(this.start/G),Q=Math.floor((this.end-1)/G)+1,Y=[];for(let W=P;W<Q;++W)this._loadedChunks.has(W)||Y.push(W);return Y},Object.defineProperty(z.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||this.getMissingChunks().length===0},configurable:!0});let R=new z;return R.pos=R.start=Z,R.end=Z+q||this.end,R.dict=X,R}getBaseStreams(){return[this]}};Q0=class Q0{static#Z=2048;static#q=Z0.isImageDecoderSupported;constructor(Z,q){this._imgData=Z,this._isMask=q}static get canUseImageDecoder(){return X1(this,"canUseImageDecoder",this.#q?ImageDecoder.isTypeSupported("image/bmp"):Promise.resolve(!1))}static needsToBeResized(Z,q){if(Z<=this.#Z&&q<=this.#Z)return!1;let{MAX_DIM:X}=this;if(Z>X||q>X)return!0;let z=Z*q;if(this._hasMaxArea)return z>this.MAX_AREA;if(z<this.#Z**2)return!1;if(this._areGoodDims(Z,q))return this.#Z=Math.max(this.#Z,Math.floor(Math.sqrt(Z*q))),!1;return this.#Z=this._guessMax(this.#Z,X,128,0),z>(this.MAX_AREA=this.#Z**2)}static getReducePowerForJPX(Z,q,X){let z=Z*q,R=1073741824/(4*X);if(!this.needsToBeResized(Z,q))return z>R?Math.ceil(Math.log2(z/R)):0;let{MAX_DIM:G,MAX_AREA:P}=this,Q=Math.max(Z/G,q/G,Math.sqrt(z/Math.min(R,P)));return Math.ceil(Math.log2(Q))}static get MAX_DIM(){return X1(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,X1(this,"MAX_AREA",this._guessMax(this.#Z,this.MAX_DIM,128,0)**2)}static set MAX_AREA(Z){Z>=0&&(this._hasMaxArea=!0,X1(this,"MAX_AREA",Z))}static setOptions({canvasMaxAreaInBytes:Z=-1,isImageDecoderSupported:q=!1}){this._hasMaxArea||(this.MAX_AREA=Z>>2),this.#q=q}static _areGoodDims(Z,q){try{let X=new OffscreenCanvas(Z,q),z=X.getContext("2d");z.fillRect(0,0,1,1);let R=z.getImageData(0,0,1,1).data[3];return X.width=X.height=1,R!==0}catch{return!1}}static _guessMax(Z,q,X,z){for(;Z+X+1<q;){let R=Math.floor((Z+q)/2),G=z||R;this._areGoodDims(R,G)?Z=R:q=R}return Z}static async createImage(Z,q=!1){return new Q0(Z,q)._createImage()}async _createImage(){let{_imgData:Z}=this,{width:q,height:X}=Z;if(q*X*4>uZ){let B=this.#z();if(B)return B}let z=this._encodeBMP(),R,G;await Q0.canUseImageDecoder?(R=new ImageDecoder({data:z,type:"image/bmp",preferAnimation:!1,transfer:[z.buffer]}),G=R.decode().catch((B)=>(v(`BMP image decoding failed: ${B}`),createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"})))).finally(()=>{R.close()})):G=createImageBitmap(new Blob([z.buffer],{type:"image/bmp"}));let{MAX_AREA:P,MAX_DIM:Q}=Q0,Y=Math.max(q/Q,X/Q,Math.sqrt(q*X/P)),W=Math.max(Y,2),$=Math.round(10*(Y+1.25))/10/W,_=Math.floor(Math.log2($)),J=Array(_+2).fill(2);J[0]=W,J.splice(-1,1,$/(1<<_));let U=q,f=X,K=await G,I=K.image||K;for(let B of J){let j=U,V=f;U=Math.floor(U/B)-1,f=Math.floor(f/B)-1;let x=new OffscreenCanvas(U,f);x.getContext("2d").drawImage(I,0,0,j,V,0,0,U,f),I.close(),I=x.transferToImageBitmap()}return Z.data=null,Z.bitmap=I,Z.width=U,Z.height=f,Z}#z(){let{_imgData:Z}=this,{data:q,width:X,height:z,kind:R}=Z,G=X*z*4,P=Math.ceil(Math.log2(G/uZ)),Q=X>>P,Y=z>>P,W,$=z;try{W=new Uint8Array(G)}catch{let j=Math.floor(Math.log2(G+1));for(;;)try{W=new Uint8Array(2**j-1);break}catch{j-=1}$=Math.floor((2**j-1)/(4*X));let V=X*$*4;V<W.length&&(W=new Uint8Array(V))}let _=new Uint32Array(W.buffer),J=new Uint32Array(Q*Y),U=0,f=0,K=Math.ceil(z/$),I=z%$===0?z:z%$;for(let j=0;j<K;j++){let V=j<K-1?$:I;({srcPos:U}=EP({kind:R,src:q,dest:_,width:X,height:V,inverseDecode:this._isMask,srcPos:U}));for(let x=0,M=V>>P;x<M;x++){let H=_.subarray((x<<P)*X);for(let A=0;A<Q;A++)J[f++]=H[A<<P]}}if(Q0.needsToBeResized(Q,Y))return Z.data=J,Z.width=Q,Z.height=Y,Z.kind=U4,null;let B=new OffscreenCanvas(Q,Y);return B.getContext("2d",{willReadFrequently:!0}).putImageData(new ImageData(new Uint8ClampedArray(J.buffer),Q,Y),0,0),Z.data=null,Z.bitmap=B.transferToImageBitmap(),Z.width=Q,Z.height=Y,Z}_encodeBMP(){let{width:Z,height:q,kind:X}=this._imgData,z,R=this._imgData.data,G=new Uint8Array(0),P=G,Q=0;switch(X){case X3:{z=1,G=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);let f=Z+7>>3,K=f+3&-4;if(f!==K){let I=new Uint8Array(K*q),B=0;for(let j=0,V=q*f;j<V;j+=f,B+=K)I.set(R.subarray(j,j+f),B);R=I}break}case W7:if(z=24,3&Z){let f=3*Z,K=f+3&-4,I=K-f,B=new Uint8Array(K*q),j=0;for(let V=0,x=q*f;V<x;V+=f){let M=R.subarray(V,V+f);for(let H=0;H<f;H+=3)B[j++]=M[H+2],B[j++]=M[H+1],B[j++]=M[H];j+=I}R=B}else for(let f=0,K=R.length;f<K;f+=3){let I=R[f];R[f]=R[f+2],R[f+2]=I}break;case U4:z=32,Q=3,P=new Uint8Array(68);let U=new DataView(P.buffer);Z0.isLittleEndian?(U.setUint32(0,255,!0),U.setUint32(4,65280,!0),U.setUint32(8,16711680,!0),U.setUint32(12,4278190080,!0)):(U.setUint32(0,4278190080,!0),U.setUint32(4,16711680,!0),U.setUint32(8,65280,!0),U.setUint32(12,255,!0));break;default:throw Error("invalid format")}let Y=0,W=40+P.length,$=14+W+G.length+R.length,_=new Uint8Array($),J=new DataView(_.buffer);return J.setUint16(Y,19778,!0),Y+=2,J.setUint32(Y,$,!0),Y+=4,J.setUint32(Y,0,!0),Y+=4,J.setUint32(Y,14+W+G.length,!0),Y+=4,J.setUint32(Y,W,!0),Y+=4,J.setInt32(Y,Z,!0),Y+=4,J.setInt32(Y,-q,!0),Y+=4,J.setUint16(Y,1,!0),Y+=2,J.setUint16(Y,z,!0),Y+=2,J.setUint32(Y,Q,!0),Y+=4,J.setUint32(Y,0,!0),Y+=4,J.setInt32(Y,0,!0),Y+=4,J.setInt32(Y,0,!0),Y+=4,J.setUint32(Y,G.length/4,!0),Y+=4,J.setUint32(Y,0,!0),Y+=4,_.set(P,Y),Y+=P.length,_.set(G,Y),Y+=G.length,_.set(R,Y),_}};PI=new Uint8Array(0);a8=class a8 extends C1{constructor(Z){if(super(),this._rawMinBufferLength=Z||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=PI,this.minBufferLength=512,Z)for(;this.minBufferLength<Z;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&this.bufferLength===0;)this.readBlock();return this.bufferLength===0}ensureBuffer(Z){let q=this.buffer;if(Z<=q.byteLength)return q;let X=this.minBufferLength;for(;X<Z;)X*=2;let z=new Uint8Array(X);return z.set(q),this.buffer=z}getByte(){let Z=this.pos;for(;this.bufferLength<=Z;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(Z,q=null){let X=this.pos,z;if(Z){for(this.ensureBuffer(X+Z),z=X+Z;!this.eof&&this.bufferLength<z;)this.readBlock(q);let R=this.bufferLength;z>R&&(z=R)}else{for(;!this.eof;)this.readBlock(q);z=this.bufferLength}return this.pos=z,this.buffer.subarray(X,z)}async getImageData(Z,q){if(!this.canAsyncDecodeImageFromBuffer)return this.isAsyncDecoder?this.decodeImage(null,q):this.getBytes(Z,q);let X=await this.stream.asyncGetBytes();return this.decodeImage(X,q)}reset(){this.pos=0}makeSubStream(Z,q,X=null){if(q===void 0)for(;!this.eof;)this.readBlock();else{let z=Z+q;for(;this.bufferLength<=z&&!this.eof;)this.readBlock()}return new W8(this.buffer,Z,q,X)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}};uP=class uP extends a8{constructor(Z,q=null){Z=Z.filter((z)=>z instanceof C1);let X=0;for(let z of Z)X+=z instanceof a8?z._rawMinBufferLength:z.length;super(X),this.streams=Z,this._onError=q}readBlock(){let Z=this.streams;if(Z.length===0)return void(this.eof=!0);let q=Z.shift(),X;try{X=q.getBytes()}catch(G){if(this._onError)return void this._onError(G,q.dict?.objId);throw G}let z=this.bufferLength,R=z+X.length;this.ensureBuffer(R).set(X,z),this.bufferLength=R}getBaseStreams(){let Z=[];for(let q of this.streams){let X=q.getBaseStreams();X&&Z.push(...X)}return Z.length>0?Z:null}};I0=class I0 extends q0{constructor(Z){super(Z,"JpegError")}};L3=class L3 extends q0{constructor(Z,q){super(Z,"DNLMarkerError"),this.scanLines=q}};RX=class RX extends q0{constructor(Z){super(Z,"EOIMarkerError")}};_7=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);v6=class v6 extends a8{static#Z=Z0.isImageDecoderSupported;constructor(Z,q,X){super(q),this.stream=Z,this.dict=Z.dict,this.maybeLength=q,this.params=X}static get canUseImageDecoder(){return X1(this,"canUseImageDecoder",this.#Z?ImageDecoder.isTypeSupported("image/jpeg"):Promise.resolve(!1))}static setOptions({isImageDecoderSupported:Z=!1}){this.#Z=Z}get bytes(){return X1(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(Z){}readBlock(){this.decodeImage()}get jpegOptions(){let Z={decodeTransform:void 0,colorTransform:void 0},q=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(q)){let X=this.dict.get("BPC","BitsPerComponent")||8,z=q.length,R=new Int32Array(z),G=!1,P=(1<<X)-1;for(let Q=0;Q<z;Q+=2)R[Q]=256*(q[Q+1]-q[Q])|0,R[Q+1]=q[Q]*P|0,R[Q]===256&&R[Q+1]===0||(G=!0);G&&(Z.decodeTransform=R)}if(this.params instanceof S){let X=this.params.get("ColorTransform");Number.isInteger(X)&&(Z.colorTransform=X)}return X1(this,"jpegOptions",Z)}#q(Z){for(let q=0,X=Z.length-1;q<X;q++)if(Z[q]===255&&Z[q+1]===216){q>0&&(Z=Z.subarray(q));break}return Z}decodeImage(Z){if(this.eof)return this.buffer;Z=this.#q(Z||this.bytes);let q=new aZ(this.jpegOptions);q.parse(Z);let X=q.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});return this.buffer=X,this.bufferLength=X.length,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}async getTransferableImage(){if(!await v6.canUseImageDecoder)return null;let Z=this.jpegOptions;if(Z.decodeTransform)return null;let q;try{let X=this.canAsyncDecodeImageFromBuffer&&await this.stream.asyncGetBytes()||this.bytes;if(!X)return null;let z=this.#q(X),R=aZ.canUseImageDecoder(z,Z.colorTransform);return R?(R.exifStart&&(z=z.slice(),z.fill(0,R.exifStart,R.exifEnd)),q=new ImageDecoder({data:z,type:"image/jpeg",preferAnimation:!1}),(await q.decode()).image):null}catch(X){return v(`getTransferableImage - failed: "${X}".`),null}finally{q?.close()}}};X7=class X7 extends q0{constructor(Z){super(Z,"JpxError")}};U5=[];w6(U5,[y0,_4,B3,Y0],null,function(Z,q){let X=Z.fnArray,z=(q-(Z.iCurr-3))%4;switch(z){case 0:return X[q]===y0;case 1:return X[q]===_4;case 2:return X[q]===B3;case 3:return X[q]===Y0}throw Error(`iterateInlineImageGroup - invalid pos: ${z}`)},function(Z,q){let{fnArray:X,argsArray:z,iCurr:R}=Z,G=R-3,P=R-2,Q=R-1,Y=Math.min(Math.floor((q-G)/4),200);if(Y<10)return q-(q-G)%4;let W=0,$=[],_=0,J=1,U=1;for(let V=0;V<Y;V++){let x=z[P+(V<<2)],M=z[Q+(V<<2)][0];J+M.width>1000&&(W=Math.max(W,J),U+=_+2,J=0,_=0),$.push({transform:x,x:J,y:U,w:M.width,h:M.height}),J+=M.width+2,_=Math.max(_,M.height)}let f=Math.max(W,J)+1,K=U+_+1,I=new Uint8Array(f*K*4),B=f<<2;for(let V=0;V<Y;V++){let x=z[Q+(V<<2)][0].data,M=$[V].w<<2,H=0,A=$[V].x+$[V].y*f<<2;I.set(x.subarray(0,M),A-B);for(let T=0,k=$[V].h;T<k;T++)I.set(x.subarray(H,H+M),A),H+=M,A+=B;for(I.set(x.subarray(H-M,H),A);A>=0;)x[A-4]=x[A],x[A-3]=x[A+1],x[A-2]=x[A+2],x[A-1]=x[A+3],x[A+M]=x[A+M-4],x[A+M+1]=x[A+M-3],x[A+M+2]=x[A+M-2],x[A+M+3]=x[A+M-1],A-=B}let j={width:f,height:K};if(Z.isOffscreenCanvasSupported){let V=new OffscreenCanvas(f,K);V.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(I.buffer),f,K),0,0),j.bitmap=V.transferToImageBitmap(),j.data=null}else j.kind=U4,j.data=I;return X.splice(G,4*Y,BP),z.splice(G,4*Y,[j,$]),G+1}),w6(U5,[y0,_4,I6,Y0],null,function(Z,q){let X=Z.fnArray,z=(q-(Z.iCurr-3))%4;switch(z){case 0:return X[q]===y0;case 1:return X[q]===_4;case 2:return X[q]===I6;case 3:return X[q]===Y0}throw Error(`iterateImageMaskGroup - invalid pos: ${z}`)},function(Z,q){let{fnArray:X,argsArray:z,iCurr:R}=Z,G=R-3,P=R-2,Q=R-1,Y=Math.floor((q-G)/4);if(Y<10)return q-(q-G)%4;let W,$,_=!1,J=z[Q][0],U=z[P][0],f=z[P][1],K=z[P][2],I=z[P][3];if(f===K){_=!0,W=P+4;let B=Q+4;for(let j=1;j<Y;j++,W+=4,B+=4)if($=z[W],z[B][0]!==J||$[0]!==U||$[1]!==f||$[2]!==K||$[3]!==I){j<10?_=!1:Y=j;break}}if(_){Y=Math.min(Y,1000);let B=new Float32Array(2*Y);W=P;for(let j=0;j<Y;j++,W+=4)$=z[W],B[j<<1]=$[4],B[1+(j<<1)]=$[5];X.splice(G,4*Y,cB),z.splice(G,4*Y,[J,U,f,K,I,B])}else{Y=Math.min(Y,100);let B=[];for(let j=0;j<Y;j++){$=z[P+(j<<2)];let V=z[Q+(j<<2)][0];B.push({data:V.data,width:V.width,height:V.height,interpolate:V.interpolate,count:V.count,transform:$})}X.splice(G,4*Y,gB),z.splice(G,4*Y,[B])}return G+1}),w6(U5,[y0,_4,wZ,Y0],function(Z){let q=Z.argsArray,X=Z.iCurr-2;return q[X][1]===0&&q[X][2]===0},function(Z,q){let{fnArray:X,argsArray:z}=Z,R=(q-(Z.iCurr-3))%4;switch(R){case 0:return X[q]===y0;case 1:if(X[q]!==_4)return!1;let G=Z.iCurr-2,P=z[G][0],Q=z[G][3];return z[q][0]===P&&z[q][1]===0&&z[q][2]===0&&z[q][3]===Q;case 2:if(X[q]!==wZ)return!1;let Y=z[Z.iCurr-1][0];return z[q][0]===Y;case 3:return X[q]===Y0}throw Error(`iterateImageGroup - invalid pos: ${R}`)},function(Z,q){let{fnArray:X,argsArray:z,iCurr:R}=Z,G=R-3,P=R-2,Q=z[R-1][0],Y=z[P][0],W=z[P][3],$=Math.min(Math.floor((q-G)/4),1000);if($<3)return q-(q-G)%4;let _=new Float32Array(2*$),J=P;for(let f=0;f<$;f++,J+=4){let K=z[J];_[f<<1]=K[4],_[1+(f<<1)]=K[5]}let U=[Q,Y,W,_];return X.splice(G,4*$,dB),z.splice(G,4*$,U),G+1}),w6(U5,[Y3,s4,S5,B4,W3],null,function(Z,q){let{fnArray:X,argsArray:z}=Z,R=(q-(Z.iCurr-4))%5;switch(R){case 0:return X[q]===Y3;case 1:return X[q]===s4;case 2:return X[q]===S5;case 3:if(X[q]!==B4)return!1;let G=Z.iCurr-3,P=z[G][0],Q=z[G][1];return z[q][0]===P&&z[q][1]===Q;case 4:return X[q]===W3}throw Error(`iterateShowTextGroup - invalid pos: ${R}`)},function(Z,q){let{fnArray:X,argsArray:z,iCurr:R}=Z,G=R-4,P=R-3,Q=R-2,Y=R-1,W=R,$=z[P][0],_=z[P][1],J=Math.min(Math.floor((q-G)/5),1000);if(J<3)return q-(q-G)%5;let U=G;G>=4&&X[G-4]===X[P]&&X[G-3]===X[Q]&&X[G-2]===X[Y]&&X[G-1]===X[W]&&z[G-4][0]===$&&z[G-4][1]===_&&(J++,U-=5);let f=U+4;for(let K=1;K<J;K++)X.splice(f,3),z.splice(f,3),f+=2;return f+1}),w6(U5,[y0,_4,A5,Y0],(Z)=>{let q=Z.argsArray,X=q[Z.iCurr-1][0];if(X!==oq&&X!==G3&&X!==aq&&X!==nq&&X!==P3&&X!==Q3)return!0;let z=q[Z.iCurr-2];return z[0]===1&&z[1]===0&&z[2]===0&&z[3]===1},()=>!1,(Z,q)=>{let{fnArray:X,argsArray:z}=Z,R=Z.iCurr,G=R-3,P=R-2,Q=z[R-1],Y=z[P],[,[W],$]=Q;if($){h1.scaleMinMax(Y,$);for(let _=0,J=W.length;_<J;)switch(W[_++]){case Z7:case Y5:h1.applyTransform(W,Y,_),_+=2;break;case g2:h1.applyTransformToBezier(W,Y,_),_+=6}}return X.splice(G,4,A5),z.splice(G,4,Q),G+1});gP=class gP extends GX{constructor(Z){super(Z),this.state=null,this.context={iCurr:0,fnArray:Z.fnArray,argsArray:Z.argsArray,isOffscreenCanvasSupported:O8.isOffscreenCanvasSupported},this.match=null,this.lastProcessed=0}_optimize(){let Z=this.queue.fnArray,q=this.lastProcessed,X=Z.length,z=this.state,R=this.match;if(!z&&!R&&q+1===X&&!U5[Z[q]])return void(this.lastProcessed=X);let G=this.context;for(;q<X;){if(R){if((0,R.iterateFn)(G,q)){q++;continue}if(q=(0,R.processFn)(G,q+1),X=Z.length,R=null,z=null,q>=X)break}z=(z||U5)[Z[q]],z&&!Array.isArray(z)?(G.iCurr=q,q++,!z.checkFn||(0,z.checkFn)(G)?(R=z,z=null):z=null):q++}this.state=z,this.match=R,this.lastProcessed=q}flush(){for(;this.match;){let Z=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,Z),this.match=null,this.state=null,this._optimize()}}reset(){this.state=null,this.match=null,this.lastProcessed=0}};O8=class O8{static CHUNK_SIZE=1000;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;static isOffscreenCanvasSupported=!1;constructor(Z=0,q){this._streamSink=q,this.fnArray=[],this.argsArray=[],this.optimizer=!q||Z&GB?new GX(this):new gP(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=q?null:Promise.resolve()}static setOptions({isOffscreenCanvasSupported:Z}){this.isOffscreenCanvasSupported=Z}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(Z,q){this.optimizer.push(Z,q),this.weight++,this._streamSink&&(this.weight>=O8.CHUNK_SIZE||this.weight>=O8.CHUNK_SIZE_ABOUT&&(Z===Y0||Z===W3))&&this.flush()}addImageOps(Z,q,X,z=!1){z&&(this.addOp(y0),this.addOp(I5,[[["SMask",!1]]])),X!==void 0&&this.addOp(i0,["OC",X]),this.addOp(Z,q),X!==void 0&&this.addOp(B6,[]),z&&this.addOp(Y0)}addDependency(Z){this.dependencies.has(Z)||(this.dependencies.add(Z),this.addOp(FB,[Z]))}addDependencies(Z){for(let q of Z)this.addDependency(q)}addOpList(Z){if(Z instanceof O8){for(let q of Z.dependencies)this.dependencies.add(q);for(let q=0,X=Z.length;q<X;q++)this.addOp(Z.fnArray[q],Z.argsArray[q])}else v('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){let Z=[],{fnArray:q,argsArray:X,length:z}=this;for(let R=0;R<z;R++)switch(q[R]){case B3:case BP:case I6:{let{bitmap:Q,data:Y}=X[R][0];(Q||Y?.buffer)&&Z.push(Q||Y.buffer);break}case A5:{let[,[Q],Y]=X[R];Q&&Z.push(Q.buffer,Y.buffer);break}case UP:let[G,P]=X[R];G&&Z.push(G.buffer),P&&Z.push(P.buffer);break;case S5:Z.push(X[R][0].buffer)}return Z}flush(Z=!1,q=null){this.optimizer.flush();let X=this.length;this._totalLength+=X,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:Z,separateAnnots:q,length:X},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}};hP=class hP extends a8{constructor(Z,q){q&&(q*=0.8),super(q),this.str=Z,this.dict=Z.dict,this.input=new Uint8Array(5)}readBlock(){let Z=this.str,q=Z.getByte();for(;M0(q);)q=Z.getByte();if(q===-1||q===126)return void(this.eof=!0);let X=this.bufferLength,z,R;if(q===122){for(z=this.ensureBuffer(X+4),R=0;R<4;++R)z[X+R]=0;this.bufferLength+=4}else{let G=this.input;for(G[0]=q,R=1;R<5;++R){for(q=Z.getByte();M0(q);)q=Z.getByte();if(G[R]=q,q===-1||q===126)break}if(z=this.ensureBuffer(X+R-1),this.bufferLength+=R-1,R<5){for(;R<5;++R)G[R]=117;this.eof=!0}let P=0;for(R=0;R<5;++R)P=85*P+(G[R]-33);for(R=3;R>=0;--R)z[X+R]=255&P,P>>=8}}};sP=class sP extends a8{constructor(Z,q){q&&(q*=0.5),super(q),this.str=Z,this.dict=Z.dict,this.firstDigit=-1}readBlock(){let Z=this.str.getBytes(8000);if(!Z.length)return void(this.eof=!0);let q=Z.length+1>>1,X=this.ensureBuffer(this.bufferLength+q),z=this.bufferLength,R=this.firstDigit;for(let G of Z){let P;if(G>=48&&G<=57)P=15&G;else{if(!(G>=65&&G<=70||G>=97&&G<=102)){if(G===62){this.eof=!0;break}continue}P=9+(15&G)}R<0?R=P:(X[z++]=R<<4|P,R=-1)}R>=0&&this.eof&&(X[z++]=R<<4,R=-1),this.firstDigit=R,this.bufferLength=z}};RR=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],GR=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],PR=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],QR=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],YR=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],WR=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];rP=class rP extends a8{constructor(Z,q,X){super(q),this.str=Z,this.dict=Z.dict,X instanceof S||(X=S.empty);let z={next:()=>Z.getByte()};this.ccittFaxDecoder=new PX(z,{K:X.get("K"),EndOfLine:X.get("EndOfLine"),EncodedByteAlign:X.get("EncodedByteAlign"),Columns:X.get("Columns"),Rows:X.get("Rows"),EndOfBlock:X.get("EndOfBlock"),BlackIs1:X.get("BlackIs1")})}readBlock(){for(;!this.eof;){let Z=this.ccittFaxDecoder.readNextChar();if(Z===-1)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=Z}}};$R=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),UI=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),fI=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),KI=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,590000,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],BI=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];nZ=class nZ extends a8{constructor(Z,q){super(q),this.str=Z,this.dict=Z.dict;let X=Z.getByte(),z=Z.getByte();if(X===-1||z===-1)throw new h(`Invalid header in flate stream: ${X}, ${z}`);if((15&X)!=8)throw new h(`Unknown compression method in flate stream: ${X}, ${z}`);if(((X<<8)+z)%31!=0)throw new h(`Bad FCHECK in flate stream: ${X}, ${z}`);if(32&z)throw new h(`FDICT bit set in flate stream: ${X}, ${z}`);this.codeSize=0,this.codeBuf=0}async getImageData(Z,q){let X=await this.asyncGetBytes();return X?X.length<=Z?X:X.subarray(0,Z):this.getBytes(Z)}async asyncGetBytes(){this.str.reset();let Z=this.str.getBytes();try{let{readable:q,writable:X}=new DecompressionStream("deflate"),z=X.getWriter();await z.ready,z.write(Z).then(async()=>{await z.ready,await z.close()}).catch(()=>{});let R=[],G=0;for await(let Y of q)R.push(Y),G+=Y.byteLength;let P=new Uint8Array(G),Q=0;for(let Y of R)P.set(Y,Q),Q+=Y.byteLength;return P}catch{return this.str=new W8(Z,2,Z.length,this.str.dict),this.reset(),null}}get isAsync(){return!0}getBits(Z){let q=this.str,X,z=this.codeSize,R=this.codeBuf;for(;z<Z;){if((X=q.getByte())===-1)throw new h("Bad encoding in flate stream");R|=X<<z,z+=8}return X=R&(1<<Z)-1,this.codeBuf=R>>Z,this.codeSize=z-=Z,X}getCode(Z){let q=this.str,X=Z[0],z=Z[1],R,G=this.codeSize,P=this.codeBuf;for(;G<z&&(R=q.getByte())!==-1;)P|=R<<G,G+=8;let Q=X[P&(1<<z)-1],Y=Q>>16,W=65535&Q;if(Y<1||G<Y)throw new h("Bad encoding in flate stream");return this.codeBuf=P>>Y,this.codeSize=G-Y,W}generateHuffmanTable(Z){let q=Z.length,X,z=0;for(X=0;X<q;++X)Z[X]>z&&(z=Z[X]);let R=1<<z,G=new Int32Array(R);for(let P=1,Q=0,Y=2;P<=z;++P,Q<<=1,Y<<=1)for(let W=0;W<q;++W)if(Z[W]===P){let $=0,_=Q;for(X=0;X<P;++X)$=$<<1|1&_,_>>=1;for(X=$;X<R;X+=Y)G[X]=P<<16|W;++Q}return[G,z]}#Z(Z){v1(Z),this.eof=!0}readBlock(){let Z,q,X,z=this.str;try{q=this.getBits(3)}catch(Y){return void this.#Z(Y.message)}if(1&q&&(this.eof=!0),q>>=1,q===0){let Y;if((Y=z.getByte())===-1)return void this.#Z("Bad block header in flate stream");let W=Y;if((Y=z.getByte())===-1)return void this.#Z("Bad block header in flate stream");if(W|=Y<<8,(Y=z.getByte())===-1)return void this.#Z("Bad block header in flate stream");let $=Y;if((Y=z.getByte())===-1)return void this.#Z("Bad block header in flate stream");if($|=Y<<8,$!==(65535&~W)&&(W!==0||$!==0))throw new h("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;let _=this.bufferLength,J=_+W;if(Z=this.ensureBuffer(J),this.bufferLength=J,W===0)z.peekByte()===-1&&(this.eof=!0);else{let U=z.getBytes(W);Z.set(U,_),U.length<W&&(this.eof=!0)}return}let R,G;if(q===1)R=KI,G=BI;else{if(q!==2)throw new h("Unknown block type in flate stream");{let Y=this.getBits(5)+257,W=this.getBits(5)+1,$=this.getBits(4)+4,_=new Uint8Array($R.length),J;for(J=0;J<$;++J)_[$R[J]]=this.getBits(3);let U=this.generateHuffmanTable(_);X=0,J=0;let f=Y+W,K=new Uint8Array(f),I,B,j;for(;J<f;){let V=this.getCode(U);if(V===16)I=2,B=3,j=X;else if(V===17)I=3,B=3,j=X=0;else{if(V!==18){K[J++]=X=V;continue}I=7,B=11,j=X=0}let x=this.getBits(I)+B;for(;x-- >0;)K[J++]=j}R=this.generateHuffmanTable(K.subarray(0,Y)),G=this.generateHuffmanTable(K.subarray(Y,f))}}Z=this.buffer;let P=Z?Z.length:0,Q=this.bufferLength;for(;;){let Y=this.getCode(R);if(Y<256){Q+1>=P&&(Z=this.ensureBuffer(Q+1),P=Z.length),Z[Q++]=Y;continue}if(Y===256)return void(this.bufferLength=Q);Y-=257,Y=UI[Y];let W=Y>>16;W>0&&(W=this.getBits(W)),X=(65535&Y)+W,Y=this.getCode(G),Y=fI[Y],W=Y>>16,W>0&&(W=this.getBits(W));let $=(65535&Y)+W;Q+X>=P&&(Z=this.ensureBuffer(Q+X),P=Z.length);for(let _=0;_<X;++_,++Q)Z[Q]=Z[Q-$]}}};II=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];R8=class R8 extends q0{constructor(Z){super(Z,"Jbig2Error")}};_R=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],jI=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],JR=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],VI=[39717,1941,229,405];fR={};eP=class eP extends a8{constructor(Z,q,X){super(q),this.stream=Z,this.dict=Z.dict,this.maybeLength=q,this.params=X}get bytes(){return X1(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(Z){}readBlock(){this.decodeImage()}decodeImage(Z){if(this.eof)return this.buffer;Z||=this.bytes;let q=new tP,X=[];if(this.params instanceof S){let G=this.params.get("JBIG2Globals");if(G instanceof C1){let P=G.getBytes();X.push({data:P,start:0,end:P.length})}}X.push({data:Z,start:0,end:Z.length});let z=q.parseChunks(X),R=z.length;for(let G=0;G<R;G++)z[G]^=255;return this.buffer=z,this.bufferLength=R,this.eof=!0,this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}};ZQ=class ZQ extends a8{constructor(Z,q,X){super(q),this.stream=Z,this.dict=Z.dict,this.maybeLength=q,this.params=X}get bytes(){return X1(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(Z){}readBlock(Z){y1("JpxStream.readBlock")}get isAsyncDecoder(){return!0}async decodeImage(Z,q){return this.eof||(Z||=this.bytes,this.buffer=await i7.decode(Z,q),this.bufferLength=this.buffer.length,this.eof=!0),this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}};tZ=class tZ extends a8{constructor(Z,q,X){super(q),this.str=Z,this.dict=Z.dict,this.cachedData=0,this.bitsCached=0;let z=4096,R={earlyChange:X,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(z),dictionaryLengths:new Uint16Array(z),dictionaryPrevCodes:new Uint16Array(z),currentSequence:new Uint8Array(z),currentSequenceLength:0};for(let G=0;G<256;++G)R.dictionaryValues[G]=G,R.dictionaryLengths[G]=1;this.lzwState=R}readBits(Z){let q=this.bitsCached,X=this.cachedData;for(;q<Z;){let z=this.str.getByte();if(z===-1)return this.eof=!0,null;X=X<<8|z,q+=8}return this.bitsCached=q-=Z,this.cachedData=X,this.lastCode=null,X>>>q&(1<<Z)-1}readBlock(){let Z,q,X,z=1024,R=this.lzwState;if(!R)return;let{earlyChange:G,nextCode:P,dictionaryValues:Q,dictionaryLengths:Y,dictionaryPrevCodes:W,codeLength:$,prevCode:_,currentSequence:J,currentSequenceLength:U}=R,f=0,K=this.bufferLength,I=this.ensureBuffer(this.bufferLength+z);for(Z=0;Z<512;Z++){let B=this.readBits($),j=U>0;if(B<256)J[0]=B,U=1;else{if(!(B>=258)){if(B===256){$=9,P=258,U=0;continue}this.eof=!0,delete this.lzwState;break}if(B<P)for(U=Y[B],q=U-1,X=B;q>=0;q--)J[q]=Q[X],X=W[X];else J[U++]=J[0]}if(j&&(W[P]=_,Y[P]=Y[_]+1,Q[P]=J[0],P++,$=P+G&P+G-1?$:0|Math.min(Math.log(P+G)/0.6931471805599453+1,12)),_=B,f+=U,z<f){do z+=512;while(z<f);I=this.ensureBuffer(this.bufferLength+z)}for(q=0;q<U;q++)I[K++]=J[q]}R.nextCode=P,R.codeLength=$,R.prevCode=_,R.currentSequenceLength=U,this.bufferLength=K}};eZ=class eZ extends a8{constructor(Z,q,X){if(super(q),!(X instanceof S))return Z;let z=this.predictor=X.get("Predictor")||1;if(z<=1)return Z;if(z!==2&&(z<10||z>15))throw new h(`Unsupported predictor: ${z}`);this.readBlock=z===2?this.readBlockTiff:this.readBlockPng,this.str=Z,this.dict=Z.dict;let R=this.colors=X.get("Colors")||1,G=this.bits=X.get("BPC","BitsPerComponent")||8,P=this.columns=X.get("Columns")||1;return this.pixBytes=R*G+7>>3,this.rowBytes=P*R*G+7>>3,this}readBlockTiff(){let Z=this.rowBytes,q=this.bufferLength,X=this.ensureBuffer(q+Z),z=this.bits,R=this.colors,G=this.str.getBytes(Z);if(this.eof=!G.length,this.eof)return;let P,Q=0,Y=0,W=0,$=0,_=q;if(z===1&&R===1)for(P=0;P<Z;++P){let J=G[P]^Q;J^=J>>1,J^=J>>2,J^=J>>4,Q=(1&J)<<7,X[_++]=J}else if(z===8){for(P=0;P<R;++P)X[_++]=G[P];for(;P<Z;++P)X[_]=X[_-R]+G[P],_++}else if(z===16){let J=2*R;for(P=0;P<J;++P)X[_++]=G[P];for(;P<Z;P+=2){let U=((255&G[P])<<8)+(255&G[P+1])+((255&X[_-J])<<8)+(255&X[_-J+1]);X[_++]=U>>8&255,X[_++]=255&U}}else{let J=new Uint8Array(R+1),U=(1<<z)-1,f=0,K=q,I=this.columns;for(P=0;P<I;++P)for(let B=0;B<R;++B)W<z&&(Q=Q<<8|255&G[f++],W+=8),J[B]=J[B]+(Q>>W-z)&U,W-=z,Y=Y<<z|J[B],$+=z,$>=8&&(X[K++]=Y>>$-8&255,$-=8);$>0&&(X[K++]=(Y<<8-$)+(Q&(1<<8-$)-1))}this.bufferLength+=Z}readBlockPng(){let Z=this.rowBytes,q=this.pixBytes,X=this.str.getByte(),z=this.str.getBytes(Z);if(this.eof=!z.length,this.eof)return;let R=this.bufferLength,G=this.ensureBuffer(R+Z),P=G.subarray(R-Z,R);P.length===0&&(P=new Uint8Array(Z));let Q,Y,W,$=R;switch(X){case 0:for(Q=0;Q<Z;++Q)G[$++]=z[Q];break;case 1:for(Q=0;Q<q;++Q)G[$++]=z[Q];for(;Q<Z;++Q)G[$]=G[$-q]+z[Q]&255,$++;break;case 2:for(Q=0;Q<Z;++Q)G[$++]=P[Q]+z[Q]&255;break;case 3:for(Q=0;Q<q;++Q)G[$++]=(P[Q]>>1)+z[Q];for(;Q<Z;++Q)G[$]=(P[Q]+G[$-q]>>1)+z[Q]&255,$++;break;case 4:for(Q=0;Q<q;++Q)Y=P[Q],W=z[Q],G[$++]=Y+W;for(;Q<Z;++Q){Y=P[Q];let _=P[Q-q],J=G[$-q],U=J+Y-_,f=U-J;f<0&&(f=-f);let K=U-Y;K<0&&(K=-K);let I=U-_;I<0&&(I=-I),W=z[Q],G[$++]=f<=K&&f<=I?J+W:K<=I?Y+W:_+W}break;default:throw new h(`Unsupported predictor: ${X}`)}this.bufferLength+=Z}};qQ=class qQ extends a8{constructor(Z,q){super(q),this.str=Z,this.dict=Z.dict}readBlock(){let Z=this.str.getBytes(2);if(!Z||Z.length<2||Z[0]===128)return void(this.eof=!0);let q,X=this.bufferLength,z=Z[0];if(z<128){if(q=this.ensureBuffer(X+z+1),q[X++]=Z[1],z>0){let R=this.str.getBytes(z);q.set(R,X),X+=z}}else z=257-z,q=this.ensureBuffer(X+z+1),q.fill(Z[1],X,X+z),X+=z;this.bufferLength=X}};h5=[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];kI=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"];k5=class k5 extends R9{constructor(Z,q){super(),this.vertical=Z,this.addCodespaceRange(q,0,65535)}mapCidRange(Z,q,X){y1("should not call mapCidRange")}mapBfRange(Z,q,X){y1("should not call mapBfRange")}mapBfRangeToArray(Z,q,X){y1("should not call mapBfRangeToArray")}mapOne(Z,q){y1("should not call mapCidOne")}lookup(Z){return Number.isInteger(Z)&&Z<=65535?Z:void 0}contains(Z){return Number.isInteger(Z)&&Z<=65535}forEach(Z){for(let q=0;q<=65535;q++)Z(q,q)}charCodeOf(Z){return Number.isInteger(Z)&&Z<=65535?Z:-1}getMap(){let Z=Array(65536);for(let q=0;q<=65535;q++)Z[q]=q;return Z}get length(){return 65536}get isIdentityCMap(){y1("should not access .isIdentityCMap")}};PQ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],mI=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],QX=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","space","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"],A4=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],F7=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],YX=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],WX=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];l0=G8(function(Z){Z.A=65,Z.AE=198,Z.AEacute=508,Z.AEmacron=482,Z.AEsmall=63462,Z.Aacute=193,Z.Aacutesmall=63457,Z.Abreve=258,Z.Abreveacute=7854,Z.Abrevecyrillic=1232,Z.Abrevedotbelow=7862,Z.Abrevegrave=7856,Z.Abrevehookabove=7858,Z.Abrevetilde=7860,Z.Acaron=461,Z.Acircle=9398,Z.Acircumflex=194,Z.Acircumflexacute=7844,Z.Acircumflexdotbelow=7852,Z.Acircumflexgrave=7846,Z.Acircumflexhookabove=7848,Z.Acircumflexsmall=63458,Z.Acircumflextilde=7850,Z.Acute=63177,Z.Acutesmall=63412,Z.Acyrillic=1040,Z.Adblgrave=512,Z.Adieresis=196,Z.Adieresiscyrillic=1234,Z.Adieresismacron=478,Z.Adieresissmall=63460,Z.Adotbelow=7840,Z.Adotmacron=480,Z.Agrave=192,Z.Agravesmall=63456,Z.Ahookabove=7842,Z.Aiecyrillic=1236,Z.Ainvertedbreve=514,Z.Alpha=913,Z.Alphatonos=902,Z.Amacron=256,Z.Amonospace=65313,Z.Aogonek=260,Z.Aring=197,Z.Aringacute=506,Z.Aringbelow=7680,Z.Aringsmall=63461,Z.Asmall=63329,Z.Atilde=195,Z.Atildesmall=63459,Z.Aybarmenian=1329,Z.B=66,Z.Bcircle=9399,Z.Bdotaccent=7682,Z.Bdotbelow=7684,Z.Becyrillic=1041,Z.Benarmenian=1330,Z.Beta=914,Z.Bhook=385,Z.Blinebelow=7686,Z.Bmonospace=65314,Z.Brevesmall=63220,Z.Bsmall=63330,Z.Btopbar=386,Z.C=67,Z.Caarmenian=1342,Z.Cacute=262,Z.Caron=63178,Z.Caronsmall=63221,Z.Ccaron=268,Z.Ccedilla=199,Z.Ccedillaacute=7688,Z.Ccedillasmall=63463,Z.Ccircle=9400,Z.Ccircumflex=264,Z.Cdot=266,Z.Cdotaccent=266,Z.Cedillasmall=63416,Z.Chaarmenian=1353,Z.Cheabkhasiancyrillic=1212,Z.Checyrillic=1063,Z.Chedescenderabkhasiancyrillic=1214,Z.Chedescendercyrillic=1206,Z.Chedieresiscyrillic=1268,Z.Cheharmenian=1347,Z.Chekhakassiancyrillic=1227,Z.Cheverticalstrokecyrillic=1208,Z.Chi=935,Z.Chook=391,Z.Circumflexsmall=63222,Z.Cmonospace=65315,Z.Coarmenian=1361,Z.Csmall=63331,Z.D=68,Z.DZ=497,Z.DZcaron=452,Z.Daarmenian=1332,Z.Dafrican=393,Z.Dcaron=270,Z.Dcedilla=7696,Z.Dcircle=9401,Z.Dcircumflexbelow=7698,Z.Dcroat=272,Z.Ddotaccent=7690,Z.Ddotbelow=7692,Z.Decyrillic=1044,Z.Deicoptic=1006,Z.Delta=8710,Z.Deltagreek=916,Z.Dhook=394,Z.Dieresis=63179,Z.DieresisAcute=63180,Z.DieresisGrave=63181,Z.Dieresissmall=63400,Z.Digammagreek=988,Z.Djecyrillic=1026,Z.Dlinebelow=7694,Z.Dmonospace=65316,Z.Dotaccentsmall=63223,Z.Dslash=272,Z.Dsmall=63332,Z.Dtopbar=395,Z.Dz=498,Z.Dzcaron=453,Z.Dzeabkhasiancyrillic=1248,Z.Dzecyrillic=1029,Z.Dzhecyrillic=1039,Z.E=69,Z.Eacute=201,Z.Eacutesmall=63465,Z.Ebreve=276,Z.Ecaron=282,Z.Ecedillabreve=7708,Z.Echarmenian=1333,Z.Ecircle=9402,Z.Ecircumflex=202,Z.Ecircumflexacute=7870,Z.Ecircumflexbelow=7704,Z.Ecircumflexdotbelow=7878,Z.Ecircumflexgrave=7872,Z.Ecircumflexhookabove=7874,Z.Ecircumflexsmall=63466,Z.Ecircumflextilde=7876,Z.Ecyrillic=1028,Z.Edblgrave=516,Z.Edieresis=203,Z.Edieresissmall=63467,Z.Edot=278,Z.Edotaccent=278,Z.Edotbelow=7864,Z.Efcyrillic=1060,Z.Egrave=200,Z.Egravesmall=63464,Z.Eharmenian=1335,Z.Ehookabove=7866,Z.Eightroman=8551,Z.Einvertedbreve=518,Z.Eiotifiedcyrillic=1124,Z.Elcyrillic=1051,Z.Elevenroman=8554,Z.Emacron=274,Z.Emacronacute=7702,Z.Emacrongrave=7700,Z.Emcyrillic=1052,Z.Emonospace=65317,Z.Encyrillic=1053,Z.Endescendercyrillic=1186,Z.Eng=330,Z.Enghecyrillic=1188,Z.Enhookcyrillic=1223,Z.Eogonek=280,Z.Eopen=400,Z.Epsilon=917,Z.Epsilontonos=904,Z.Ercyrillic=1056,Z.Ereversed=398,Z.Ereversedcyrillic=1069,Z.Escyrillic=1057,Z.Esdescendercyrillic=1194,Z.Esh=425,Z.Esmall=63333,Z.Eta=919,Z.Etarmenian=1336,Z.Etatonos=905,Z.Eth=208,Z.Ethsmall=63472,Z.Etilde=7868,Z.Etildebelow=7706,Z.Euro=8364,Z.Ezh=439,Z.Ezhcaron=494,Z.Ezhreversed=440,Z.F=70,Z.Fcircle=9403,Z.Fdotaccent=7710,Z.Feharmenian=1366,Z.Feicoptic=996,Z.Fhook=401,Z.Fitacyrillic=1138,Z.Fiveroman=8548,Z.Fmonospace=65318,Z.Fourroman=8547,Z.Fsmall=63334,Z.G=71,Z.GBsquare=13191,Z.Gacute=500,Z.Gamma=915,Z.Gammaafrican=404,Z.Gangiacoptic=1002,Z.Gbreve=286,Z.Gcaron=486,Z.Gcedilla=290,Z.Gcircle=9404,Z.Gcircumflex=284,Z.Gcommaaccent=290,Z.Gdot=288,Z.Gdotaccent=288,Z.Gecyrillic=1043,Z.Ghadarmenian=1346,Z.Ghemiddlehookcyrillic=1172,Z.Ghestrokecyrillic=1170,Z.Gheupturncyrillic=1168,Z.Ghook=403,Z.Gimarmenian=1331,Z.Gjecyrillic=1027,Z.Gmacron=7712,Z.Gmonospace=65319,Z.Grave=63182,Z.Gravesmall=63328,Z.Gsmall=63335,Z.Gsmallhook=667,Z.Gstroke=484,Z.H=72,Z.H18533=9679,Z.H18543=9642,Z.H18551=9643,Z.H22073=9633,Z.HPsquare=13259,Z.Haabkhasiancyrillic=1192,Z.Hadescendercyrillic=1202,Z.Hardsigncyrillic=1066,Z.Hbar=294,Z.Hbrevebelow=7722,Z.Hcedilla=7720,Z.Hcircle=9405,Z.Hcircumflex=292,Z.Hdieresis=7718,Z.Hdotaccent=7714,Z.Hdotbelow=7716,Z.Hmonospace=65320,Z.Hoarmenian=1344,Z.Horicoptic=1000,Z.Hsmall=63336,Z.Hungarumlaut=63183,Z.Hungarumlautsmall=63224,Z.Hzsquare=13200,Z.I=73,Z.IAcyrillic=1071,Z.IJ=306,Z.IUcyrillic=1070,Z.Iacute=205,Z.Iacutesmall=63469,Z.Ibreve=300,Z.Icaron=463,Z.Icircle=9406,Z.Icircumflex=206,Z.Icircumflexsmall=63470,Z.Icyrillic=1030,Z.Idblgrave=520,Z.Idieresis=207,Z.Idieresisacute=7726,Z.Idieresiscyrillic=1252,Z.Idieresissmall=63471,Z.Idot=304,Z.Idotaccent=304,Z.Idotbelow=7882,Z.Iebrevecyrillic=1238,Z.Iecyrillic=1045,Z.Ifraktur=8465,Z.Igrave=204,Z.Igravesmall=63468,Z.Ihookabove=7880,Z.Iicyrillic=1048,Z.Iinvertedbreve=522,Z.Iishortcyrillic=1049,Z.Imacron=298,Z.Imacroncyrillic=1250,Z.Imonospace=65321,Z.Iniarmenian=1339,Z.Iocyrillic=1025,Z.Iogonek=302,Z.Iota=921,Z.Iotaafrican=406,Z.Iotadieresis=938,Z.Iotatonos=906,Z.Ismall=63337,Z.Istroke=407,Z.Itilde=296,Z.Itildebelow=7724,Z.Izhitsacyrillic=1140,Z.Izhitsadblgravecyrillic=1142,Z.J=74,Z.Jaarmenian=1345,Z.Jcircle=9407,Z.Jcircumflex=308,Z.Jecyrillic=1032,Z.Jheharmenian=1355,Z.Jmonospace=65322,Z.Jsmall=63338,Z.K=75,Z.KBsquare=13189,Z.KKsquare=13261,Z.Kabashkircyrillic=1184,Z.Kacute=7728,Z.Kacyrillic=1050,Z.Kadescendercyrillic=1178,Z.Kahookcyrillic=1219,Z.Kappa=922,Z.Kastrokecyrillic=1182,Z.Kaverticalstrokecyrillic=1180,Z.Kcaron=488,Z.Kcedilla=310,Z.Kcircle=9408,Z.Kcommaaccent=310,Z.Kdotbelow=7730,Z.Keharmenian=1364,Z.Kenarmenian=1343,Z.Khacyrillic=1061,Z.Kheicoptic=998,Z.Khook=408,Z.Kjecyrillic=1036,Z.Klinebelow=7732,Z.Kmonospace=65323,Z.Koppacyrillic=1152,Z.Koppagreek=990,Z.Ksicyrillic=1134,Z.Ksmall=63339,Z.L=76,Z.LJ=455,Z.LL=63167,Z.Lacute=313,Z.Lambda=923,Z.Lcaron=317,Z.Lcedilla=315,Z.Lcircle=9409,Z.Lcircumflexbelow=7740,Z.Lcommaaccent=315,Z.Ldot=319,Z.Ldotaccent=319,Z.Ldotbelow=7734,Z.Ldotbelowmacron=7736,Z.Liwnarmenian=1340,Z.Lj=456,Z.Ljecyrillic=1033,Z.Llinebelow=7738,Z.Lmonospace=65324,Z.Lslash=321,Z.Lslashsmall=63225,Z.Lsmall=63340,Z.M=77,Z.MBsquare=13190,Z.Macron=63184,Z.Macronsmall=63407,Z.Macute=7742,Z.Mcircle=9410,Z.Mdotaccent=7744,Z.Mdotbelow=7746,Z.Menarmenian=1348,Z.Mmonospace=65325,Z.Msmall=63341,Z.Mturned=412,Z.Mu=924,Z.N=78,Z.NJ=458,Z.Nacute=323,Z.Ncaron=327,Z.Ncedilla=325,Z.Ncircle=9411,Z.Ncircumflexbelow=7754,Z.Ncommaaccent=325,Z.Ndotaccent=7748,Z.Ndotbelow=7750,Z.Nhookleft=413,Z.Nineroman=8552,Z.Nj=459,Z.Njecyrillic=1034,Z.Nlinebelow=7752,Z.Nmonospace=65326,Z.Nowarmenian=1350,Z.Nsmall=63342,Z.Ntilde=209,Z.Ntildesmall=63473,Z.Nu=925,Z.O=79,Z.OE=338,Z.OEsmall=63226,Z.Oacute=211,Z.Oacutesmall=63475,Z.Obarredcyrillic=1256,Z.Obarreddieresiscyrillic=1258,Z.Obreve=334,Z.Ocaron=465,Z.Ocenteredtilde=415,Z.Ocircle=9412,Z.Ocircumflex=212,Z.Ocircumflexacute=7888,Z.Ocircumflexdotbelow=7896,Z.Ocircumflexgrave=7890,Z.Ocircumflexhookabove=7892,Z.Ocircumflexsmall=63476,Z.Ocircumflextilde=7894,Z.Ocyrillic=1054,Z.Odblacute=336,Z.Odblgrave=524,Z.Odieresis=214,Z.Odieresiscyrillic=1254,Z.Odieresissmall=63478,Z.Odotbelow=7884,Z.Ogoneksmall=63227,Z.Ograve=210,Z.Ogravesmall=63474,Z.Oharmenian=1365,Z.Ohm=8486,Z.Ohookabove=7886,Z.Ohorn=416,Z.Ohornacute=7898,Z.Ohorndotbelow=7906,Z.Ohorngrave=7900,Z.Ohornhookabove=7902,Z.Ohorntilde=7904,Z.Ohungarumlaut=336,Z.Oi=418,Z.Oinvertedbreve=526,Z.Omacron=332,Z.Omacronacute=7762,Z.Omacrongrave=7760,Z.Omega=8486,Z.Omegacyrillic=1120,Z.Omegagreek=937,Z.Omegaroundcyrillic=1146,Z.Omegatitlocyrillic=1148,Z.Omegatonos=911,Z.Omicron=927,Z.Omicrontonos=908,Z.Omonospace=65327,Z.Oneroman=8544,Z.Oogonek=490,Z.Oogonekmacron=492,Z.Oopen=390,Z.Oslash=216,Z.Oslashacute=510,Z.Oslashsmall=63480,Z.Osmall=63343,Z.Ostrokeacute=510,Z.Otcyrillic=1150,Z.Otilde=213,Z.Otildeacute=7756,Z.Otildedieresis=7758,Z.Otildesmall=63477,Z.P=80,Z.Pacute=7764,Z.Pcircle=9413,Z.Pdotaccent=7766,Z.Pecyrillic=1055,Z.Peharmenian=1354,Z.Pemiddlehookcyrillic=1190,Z.Phi=934,Z.Phook=420,Z.Pi=928,Z.Piwrarmenian=1363,Z.Pmonospace=65328,Z.Psi=936,Z.Psicyrillic=1136,Z.Psmall=63344,Z.Q=81,Z.Qcircle=9414,Z.Qmonospace=65329,Z.Qsmall=63345,Z.R=82,Z.Raarmenian=1356,Z.Racute=340,Z.Rcaron=344,Z.Rcedilla=342,Z.Rcircle=9415,Z.Rcommaaccent=342,Z.Rdblgrave=528,Z.Rdotaccent=7768,Z.Rdotbelow=7770,Z.Rdotbelowmacron=7772,Z.Reharmenian=1360,Z.Rfraktur=8476,Z.Rho=929,Z.Ringsmall=63228,Z.Rinvertedbreve=530,Z.Rlinebelow=7774,Z.Rmonospace=65330,Z.Rsmall=63346,Z.Rsmallinverted=641,Z.Rsmallinvertedsuperior=694,Z.S=83,Z.SF010000=9484,Z.SF020000=9492,Z.SF030000=9488,Z.SF040000=9496,Z.SF050000=9532,Z.SF060000=9516,Z.SF070000=9524,Z.SF080000=9500,Z.SF090000=9508,Z.SF100000=9472,Z.SF110000=9474,Z.SF190000=9569,Z.SF200000=9570,Z.SF210000=9558,Z.SF220000=9557,Z.SF230000=9571,Z.SF240000=9553,Z.SF250000=9559,Z.SF260000=9565,Z.SF270000=9564,Z.SF280000=9563,Z.SF360000=9566,Z.SF370000=9567,Z.SF380000=9562,Z.SF390000=9556,Z.SF400000=9577,Z.SF410000=9574,Z.SF420000=9568,Z.SF430000=9552,Z.SF440000=9580,Z.SF450000=9575,Z.SF460000=9576,Z.SF470000=9572,Z.SF480000=9573,Z.SF490000=9561,Z.SF500000=9560,Z.SF510000=9554,Z.SF520000=9555,Z.SF530000=9579,Z.SF540000=9578,Z.Sacute=346,Z.Sacutedotaccent=7780,Z.Sampigreek=992,Z.Scaron=352,Z.Scarondotaccent=7782,Z.Scaronsmall=63229,Z.Scedilla=350,Z.Schwa=399,Z.Schwacyrillic=1240,Z.Schwadieresiscyrillic=1242,Z.Scircle=9416,Z.Scircumflex=348,Z.Scommaaccent=536,Z.Sdotaccent=7776,Z.Sdotbelow=7778,Z.Sdotbelowdotaccent=7784,Z.Seharmenian=1357,Z.Sevenroman=8550,Z.Shaarmenian=1351,Z.Shacyrillic=1064,Z.Shchacyrillic=1065,Z.Sheicoptic=994,Z.Shhacyrillic=1210,Z.Shimacoptic=1004,Z.Sigma=931,Z.Sixroman=8549,Z.Smonospace=65331,Z.Softsigncyrillic=1068,Z.Ssmall=63347,Z.Stigmagreek=986,Z.T=84,Z.Tau=932,Z.Tbar=358,Z.Tcaron=356,Z.Tcedilla=354,Z.Tcircle=9417,Z.Tcircumflexbelow=7792,Z.Tcommaaccent=354,Z.Tdotaccent=7786,Z.Tdotbelow=7788,Z.Tecyrillic=1058,Z.Tedescendercyrillic=1196,Z.Tenroman=8553,Z.Tetsecyrillic=1204,Z.Theta=920,Z.Thook=428,Z.Thorn=222,Z.Thornsmall=63486,Z.Threeroman=8546,Z.Tildesmall=63230,Z.Tiwnarmenian=1359,Z.Tlinebelow=7790,Z.Tmonospace=65332,Z.Toarmenian=1337,Z.Tonefive=444,Z.Tonesix=388,Z.Tonetwo=423,Z.Tretroflexhook=430,Z.Tsecyrillic=1062,Z.Tshecyrillic=1035,Z.Tsmall=63348,Z.Twelveroman=8555,Z.Tworoman=8545,Z.U=85,Z.Uacute=218,Z.Uacutesmall=63482,Z.Ubreve=364,Z.Ucaron=467,Z.Ucircle=9418,Z.Ucircumflex=219,Z.Ucircumflexbelow=7798,Z.Ucircumflexsmall=63483,Z.Ucyrillic=1059,Z.Udblacute=368,Z.Udblgrave=532,Z.Udieresis=220,Z.Udieresisacute=471,Z.Udieresisbelow=7794,Z.Udieresiscaron=473,Z.Udieresiscyrillic=1264,Z.Udieresisgrave=475,Z.Udieresismacron=469,Z.Udieresissmall=63484,Z.Udotbelow=7908,Z.Ugrave=217,Z.Ugravesmall=63481,Z.Uhookabove=7910,Z.Uhorn=431,Z.Uhornacute=7912,Z.Uhorndotbelow=7920,Z.Uhorngrave=7914,Z.Uhornhookabove=7916,Z.Uhorntilde=7918,Z.Uhungarumlaut=368,Z.Uhungarumlautcyrillic=1266,Z.Uinvertedbreve=534,Z.Ukcyrillic=1144,Z.Umacron=362,Z.Umacroncyrillic=1262,Z.Umacrondieresis=7802,Z.Umonospace=65333,Z.Uogonek=370,Z.Upsilon=933,Z.Upsilon1=978,Z.Upsilonacutehooksymbolgreek=979,Z.Upsilonafrican=433,Z.Upsilondieresis=939,Z.Upsilondieresishooksymbolgreek=980,Z.Upsilonhooksymbol=978,Z.Upsilontonos=910,Z.Uring=366,Z.Ushortcyrillic=1038,Z.Usmall=63349,Z.Ustraightcyrillic=1198,Z.Ustraightstrokecyrillic=1200,Z.Utilde=360,Z.Utildeacute=7800,Z.Utildebelow=7796,Z.V=86,Z.Vcircle=9419,Z.Vdotbelow=7806,Z.Vecyrillic=1042,Z.Vewarmenian=1358,Z.Vhook=434,Z.Vmonospace=65334,Z.Voarmenian=1352,Z.Vsmall=63350,Z.Vtilde=7804,Z.W=87,Z.Wacute=7810,Z.Wcircle=9420,Z.Wcircumflex=372,Z.Wdieresis=7812,Z.Wdotaccent=7814,Z.Wdotbelow=7816,Z.Wgrave=7808,Z.Wmonospace=65335,Z.Wsmall=63351,Z.X=88,Z.Xcircle=9421,Z.Xdieresis=7820,Z.Xdotaccent=7818,Z.Xeharmenian=1341,Z.Xi=926,Z.Xmonospace=65336,Z.Xsmall=63352,Z.Y=89,Z.Yacute=221,Z.Yacutesmall=63485,Z.Yatcyrillic=1122,Z.Ycircle=9422,Z.Ycircumflex=374,Z.Ydieresis=376,Z.Ydieresissmall=63487,Z.Ydotaccent=7822,Z.Ydotbelow=7924,Z.Yericyrillic=1067,Z.Yerudieresiscyrillic=1272,Z.Ygrave=7922,Z.Yhook=435,Z.Yhookabove=7926,Z.Yiarmenian=1349,Z.Yicyrillic=1031,Z.Yiwnarmenian=1362,Z.Ymonospace=65337,Z.Ysmall=63353,Z.Ytilde=7928,Z.Yusbigcyrillic=1130,Z.Yusbigiotifiedcyrillic=1132,Z.Yuslittlecyrillic=1126,Z.Yuslittleiotifiedcyrillic=1128,Z.Z=90,Z.Zaarmenian=1334,Z.Zacute=377,Z.Zcaron=381,Z.Zcaronsmall=63231,Z.Zcircle=9423,Z.Zcircumflex=7824,Z.Zdot=379,Z.Zdotaccent=379,Z.Zdotbelow=7826,Z.Zecyrillic=1047,Z.Zedescendercyrillic=1176,Z.Zedieresiscyrillic=1246,Z.Zeta=918,Z.Zhearmenian=1338,Z.Zhebrevecyrillic=1217,Z.Zhecyrillic=1046,Z.Zhedescendercyrillic=1174,Z.Zhedieresiscyrillic=1244,Z.Zlinebelow=7828,Z.Zmonospace=65338,Z.Zsmall=63354,Z.Zstroke=437,Z.a=97,Z.aabengali=2438,Z.aacute=225,Z.aadeva=2310,Z.aagujarati=2694,Z.aagurmukhi=2566,Z.aamatragurmukhi=2622,Z.aarusquare=13059,Z.aavowelsignbengali=2494,Z.aavowelsigndeva=2366,Z.aavowelsigngujarati=2750,Z.abbreviationmarkarmenian=1375,Z.abbreviationsigndeva=2416,Z.abengali=2437,Z.abopomofo=12570,Z.abreve=259,Z.abreveacute=7855,Z.abrevecyrillic=1233,Z.abrevedotbelow=7863,Z.abrevegrave=7857,Z.abrevehookabove=7859,Z.abrevetilde=7861,Z.acaron=462,Z.acircle=9424,Z.acircumflex=226,Z.acircumflexacute=7845,Z.acircumflexdotbelow=7853,Z.acircumflexgrave=7847,Z.acircumflexhookabove=7849,Z.acircumflextilde=7851,Z.acute=180,Z.acutebelowcmb=791,Z.acutecmb=769,Z.acutecomb=769,Z.acutedeva=2388,Z.acutelowmod=719,Z.acutetonecmb=833,Z.acyrillic=1072,Z.adblgrave=513,Z.addakgurmukhi=2673,Z.adeva=2309,Z.adieresis=228,Z.adieresiscyrillic=1235,Z.adieresismacron=479,Z.adotbelow=7841,Z.adotmacron=481,Z.ae=230,Z.aeacute=509,Z.aekorean=12624,Z.aemacron=483,Z.afii00208=8213,Z.afii08941=8356,Z.afii10017=1040,Z.afii10018=1041,Z.afii10019=1042,Z.afii10020=1043,Z.afii10021=1044,Z.afii10022=1045,Z.afii10023=1025,Z.afii10024=1046,Z.afii10025=1047,Z.afii10026=1048,Z.afii10027=1049,Z.afii10028=1050,Z.afii10029=1051,Z.afii10030=1052,Z.afii10031=1053,Z.afii10032=1054,Z.afii10033=1055,Z.afii10034=1056,Z.afii10035=1057,Z.afii10036=1058,Z.afii10037=1059,Z.afii10038=1060,Z.afii10039=1061,Z.afii10040=1062,Z.afii10041=1063,Z.afii10042=1064,Z.afii10043=1065,Z.afii10044=1066,Z.afii10045=1067,Z.afii10046=1068,Z.afii10047=1069,Z.afii10048=1070,Z.afii10049=1071,Z.afii10050=1168,Z.afii10051=1026,Z.afii10052=1027,Z.afii10053=1028,Z.afii10054=1029,Z.afii10055=1030,Z.afii10056=1031,Z.afii10057=1032,Z.afii10058=1033,Z.afii10059=1034,Z.afii10060=1035,Z.afii10061=1036,Z.afii10062=1038,Z.afii10063=63172,Z.afii10064=63173,Z.afii10065=1072,Z.afii10066=1073,Z.afii10067=1074,Z.afii10068=1075,Z.afii10069=1076,Z.afii10070=1077,Z.afii10071=1105,Z.afii10072=1078,Z.afii10073=1079,Z.afii10074=1080,Z.afii10075=1081,Z.afii10076=1082,Z.afii10077=1083,Z.afii10078=1084,Z.afii10079=1085,Z.afii10080=1086,Z.afii10081=1087,Z.afii10082=1088,Z.afii10083=1089,Z.afii10084=1090,Z.afii10085=1091,Z.afii10086=1092,Z.afii10087=1093,Z.afii10088=1094,Z.afii10089=1095,Z.afii10090=1096,Z.afii10091=1097,Z.afii10092=1098,Z.afii10093=1099,Z.afii10094=1100,Z.afii10095=1101,Z.afii10096=1102,Z.afii10097=1103,Z.afii10098=1169,Z.afii10099=1106,Z.afii10100=1107,Z.afii10101=1108,Z.afii10102=1109,Z.afii10103=1110,Z.afii10104=1111,Z.afii10105=1112,Z.afii10106=1113,Z.afii10107=1114,Z.afii10108=1115,Z.afii10109=1116,Z.afii10110=1118,Z.afii10145=1039,Z.afii10146=1122,Z.afii10147=1138,Z.afii10148=1140,Z.afii10192=63174,Z.afii10193=1119,Z.afii10194=1123,Z.afii10195=1139,Z.afii10196=1141,Z.afii10831=63175,Z.afii10832=63176,Z.afii10846=1241,Z.afii299=8206,Z.afii300=8207,Z.afii301=8205,Z.afii57381=1642,Z.afii57388=1548,Z.afii57392=1632,Z.afii57393=1633,Z.afii57394=1634,Z.afii57395=1635,Z.afii57396=1636,Z.afii57397=1637,Z.afii57398=1638,Z.afii57399=1639,Z.afii57400=1640,Z.afii57401=1641,Z.afii57403=1563,Z.afii57407=1567,Z.afii57409=1569,Z.afii57410=1570,Z.afii57411=1571,Z.afii57412=1572,Z.afii57413=1573,Z.afii57414=1574,Z.afii57415=1575,Z.afii57416=1576,Z.afii57417=1577,Z.afii57418=1578,Z.afii57419=1579,Z.afii57420=1580,Z.afii57421=1581,Z.afii57422=1582,Z.afii57423=1583,Z.afii57424=1584,Z.afii57425=1585,Z.afii57426=1586,Z.afii57427=1587,Z.afii57428=1588,Z.afii57429=1589,Z.afii57430=1590,Z.afii57431=1591,Z.afii57432=1592,Z.afii57433=1593,Z.afii57434=1594,Z.afii57440=1600,Z.afii57441=1601,Z.afii57442=1602,Z.afii57443=1603,Z.afii57444=1604,Z.afii57445=1605,Z.afii57446=1606,Z.afii57448=1608,Z.afii57449=1609,Z.afii57450=1610,Z.afii57451=1611,Z.afii57452=1612,Z.afii57453=1613,Z.afii57454=1614,Z.afii57455=1615,Z.afii57456=1616,Z.afii57457=1617,Z.afii57458=1618,Z.afii57470=1607,Z.afii57505=1700,Z.afii57506=1662,Z.afii57507=1670,Z.afii57508=1688,Z.afii57509=1711,Z.afii57511=1657,Z.afii57512=1672,Z.afii57513=1681,Z.afii57514=1722,Z.afii57519=1746,Z.afii57534=1749,Z.afii57636=8362,Z.afii57645=1470,Z.afii57658=1475,Z.afii57664=1488,Z.afii57665=1489,Z.afii57666=1490,Z.afii57667=1491,Z.afii57668=1492,Z.afii57669=1493,Z.afii57670=1494,Z.afii57671=1495,Z.afii57672=1496,Z.afii57673=1497,Z.afii57674=1498,Z.afii57675=1499,Z.afii57676=1500,Z.afii57677=1501,Z.afii57678=1502,Z.afii57679=1503,Z.afii57680=1504,Z.afii57681=1505,Z.afii57682=1506,Z.afii57683=1507,Z.afii57684=1508,Z.afii57685=1509,Z.afii57686=1510,Z.afii57687=1511,Z.afii57688=1512,Z.afii57689=1513,Z.afii57690=1514,Z.afii57694=64298,Z.afii57695=64299,Z.afii57700=64331,Z.afii57705=64287,Z.afii57716=1520,Z.afii57717=1521,Z.afii57718=1522,Z.afii57723=64309,Z.afii57793=1460,Z.afii57794=1461,Z.afii57795=1462,Z.afii57796=1467,Z.afii57797=1464,Z.afii57798=1463,Z.afii57799=1456,Z.afii57800=1458,Z.afii57801=1457,Z.afii57802=1459,Z.afii57803=1474,Z.afii57804=1473,Z.afii57806=1465,Z.afii57807=1468,Z.afii57839=1469,Z.afii57841=1471,Z.afii57842=1472,Z.afii57929=700,Z.afii61248=8453,Z.afii61289=8467,Z.afii61352=8470,Z.afii61573=8236,Z.afii61574=8237,Z.afii61575=8238,Z.afii61664=8204,Z.afii63167=1645,Z.afii64937=701,Z.agrave=224,Z.agujarati=2693,Z.agurmukhi=2565,Z.ahiragana=12354,Z.ahookabove=7843,Z.aibengali=2448,Z.aibopomofo=12574,Z.aideva=2320,Z.aiecyrillic=1237,Z.aigujarati=2704,Z.aigurmukhi=2576,Z.aimatragurmukhi=2632,Z.ainarabic=1593,Z.ainfinalarabic=65226,Z.aininitialarabic=65227,Z.ainmedialarabic=65228,Z.ainvertedbreve=515,Z.aivowelsignbengali=2504,Z.aivowelsigndeva=2376,Z.aivowelsigngujarati=2760,Z.akatakana=12450,Z.akatakanahalfwidth=65393,Z.akorean=12623,Z.alef=1488,Z.alefarabic=1575,Z.alefdageshhebrew=64304,Z.aleffinalarabic=65166,Z.alefhamzaabovearabic=1571,Z.alefhamzaabovefinalarabic=65156,Z.alefhamzabelowarabic=1573,Z.alefhamzabelowfinalarabic=65160,Z.alefhebrew=1488,Z.aleflamedhebrew=64335,Z.alefmaddaabovearabic=1570,Z.alefmaddaabovefinalarabic=65154,Z.alefmaksuraarabic=1609,Z.alefmaksurafinalarabic=65264,Z.alefmaksurainitialarabic=65267,Z.alefmaksuramedialarabic=65268,Z.alefpatahhebrew=64302,Z.alefqamatshebrew=64303,Z.aleph=8501,Z.allequal=8780,Z.alpha=945,Z.alphatonos=940,Z.amacron=257,Z.amonospace=65345,Z.ampersand=38,Z.ampersandmonospace=65286,Z.ampersandsmall=63270,Z.amsquare=13250,Z.anbopomofo=12578,Z.angbopomofo=12580,Z.angbracketleft=12296,Z.angbracketright=12297,Z.angkhankhuthai=3674,Z.angle=8736,Z.anglebracketleft=12296,Z.anglebracketleftvertical=65087,Z.anglebracketright=12297,Z.anglebracketrightvertical=65088,Z.angleleft=9001,Z.angleright=9002,Z.angstrom=8491,Z.anoteleia=903,Z.anudattadeva=2386,Z.anusvarabengali=2434,Z.anusvaradeva=2306,Z.anusvaragujarati=2690,Z.aogonek=261,Z.apaatosquare=13056,Z.aparen=9372,Z.apostrophearmenian=1370,Z.apostrophemod=700,Z.apple=63743,Z.approaches=8784,Z.approxequal=8776,Z.approxequalorimage=8786,Z.approximatelyequal=8773,Z.araeaekorean=12686,Z.araeakorean=12685,Z.arc=8978,Z.arighthalfring=7834,Z.aring=229,Z.aringacute=507,Z.aringbelow=7681,Z.arrowboth=8596,Z.arrowdashdown=8675,Z.arrowdashleft=8672,Z.arrowdashright=8674,Z.arrowdashup=8673,Z.arrowdblboth=8660,Z.arrowdbldown=8659,Z.arrowdblleft=8656,Z.arrowdblright=8658,Z.arrowdblup=8657,Z.arrowdown=8595,Z.arrowdownleft=8601,Z.arrowdownright=8600,Z.arrowdownwhite=8681,Z.arrowheaddownmod=709,Z.arrowheadleftmod=706,Z.arrowheadrightmod=707,Z.arrowheadupmod=708,Z.arrowhorizex=63719,Z.arrowleft=8592,Z.arrowleftdbl=8656,Z.arrowleftdblstroke=8653,Z.arrowleftoverright=8646,Z.arrowleftwhite=8678,Z.arrowright=8594,Z.arrowrightdblstroke=8655,Z.arrowrightheavy=10142,Z.arrowrightoverleft=8644,Z.arrowrightwhite=8680,Z.arrowtableft=8676,Z.arrowtabright=8677,Z.arrowup=8593,Z.arrowupdn=8597,Z.arrowupdnbse=8616,Z.arrowupdownbase=8616,Z.arrowupleft=8598,Z.arrowupleftofdown=8645,Z.arrowupright=8599,Z.arrowupwhite=8679,Z.arrowvertex=63718,Z.asciicircum=94,Z.asciicircummonospace=65342,Z.asciitilde=126,Z.asciitildemonospace=65374,Z.ascript=593,Z.ascriptturned=594,Z.asmallhiragana=12353,Z.asmallkatakana=12449,Z.asmallkatakanahalfwidth=65383,Z.asterisk=42,Z.asteriskaltonearabic=1645,Z.asteriskarabic=1645,Z.asteriskmath=8727,Z.asteriskmonospace=65290,Z.asterisksmall=65121,Z.asterism=8258,Z.asuperior=63209,Z.asymptoticallyequal=8771,Z.at=64,Z.atilde=227,Z.atmonospace=65312,Z.atsmall=65131,Z.aturned=592,Z.aubengali=2452,Z.aubopomofo=12576,Z.audeva=2324,Z.augujarati=2708,Z.augurmukhi=2580,Z.aulengthmarkbengali=2519,Z.aumatragurmukhi=2636,Z.auvowelsignbengali=2508,Z.auvowelsigndeva=2380,Z.auvowelsigngujarati=2764,Z.avagrahadeva=2365,Z.aybarmenian=1377,Z.ayin=1506,Z.ayinaltonehebrew=64288,Z.ayinhebrew=1506,Z.b=98,Z.babengali=2476,Z.backslash=92,Z.backslashmonospace=65340,Z.badeva=2348,Z.bagujarati=2732,Z.bagurmukhi=2604,Z.bahiragana=12400,Z.bahtthai=3647,Z.bakatakana=12496,Z.bar=124,Z.barmonospace=65372,Z.bbopomofo=12549,Z.bcircle=9425,Z.bdotaccent=7683,Z.bdotbelow=7685,Z.beamedsixteenthnotes=9836,Z.because=8757,Z.becyrillic=1073,Z.beharabic=1576,Z.behfinalarabic=65168,Z.behinitialarabic=65169,Z.behiragana=12409,Z.behmedialarabic=65170,Z.behmeeminitialarabic=64671,Z.behmeemisolatedarabic=64520,Z.behnoonfinalarabic=64621,Z.bekatakana=12505,Z.benarmenian=1378,Z.bet=1489,Z.beta=946,Z.betasymbolgreek=976,Z.betdagesh=64305,Z.betdageshhebrew=64305,Z.bethebrew=1489,Z.betrafehebrew=64332,Z.bhabengali=2477,Z.bhadeva=2349,Z.bhagujarati=2733,Z.bhagurmukhi=2605,Z.bhook=595,Z.bihiragana=12403,Z.bikatakana=12499,Z.bilabialclick=664,Z.bindigurmukhi=2562,Z.birusquare=13105,Z.blackcircle=9679,Z.blackdiamond=9670,Z.blackdownpointingtriangle=9660,Z.blackleftpointingpointer=9668,Z.blackleftpointingtriangle=9664,Z.blacklenticularbracketleft=12304,Z.blacklenticularbracketleftvertical=65083,Z.blacklenticularbracketright=12305,Z.blacklenticularbracketrightvertical=65084,Z.blacklowerlefttriangle=9699,Z.blacklowerrighttriangle=9698,Z.blackrectangle=9644,Z.blackrightpointingpointer=9658,Z.blackrightpointingtriangle=9654,Z.blacksmallsquare=9642,Z.blacksmilingface=9787,Z.blacksquare=9632,Z.blackstar=9733,Z.blackupperlefttriangle=9700,Z.blackupperrighttriangle=9701,Z.blackuppointingsmalltriangle=9652,Z.blackuppointingtriangle=9650,Z.blank=9251,Z.blinebelow=7687,Z.block=9608,Z.bmonospace=65346,Z.bobaimaithai=3610,Z.bohiragana=12412,Z.bokatakana=12508,Z.bparen=9373,Z.bqsquare=13251,Z.braceex=63732,Z.braceleft=123,Z.braceleftbt=63731,Z.braceleftmid=63730,Z.braceleftmonospace=65371,Z.braceleftsmall=65115,Z.bracelefttp=63729,Z.braceleftvertical=65079,Z.braceright=125,Z.bracerightbt=63742,Z.bracerightmid=63741,Z.bracerightmonospace=65373,Z.bracerightsmall=65116,Z.bracerighttp=63740,Z.bracerightvertical=65080,Z.bracketleft=91,Z.bracketleftbt=63728,Z.bracketleftex=63727,Z.bracketleftmonospace=65339,Z.bracketlefttp=63726,Z.bracketright=93,Z.bracketrightbt=63739,Z.bracketrightex=63738,Z.bracketrightmonospace=65341,Z.bracketrighttp=63737,Z.breve=728,Z.brevebelowcmb=814,Z.brevecmb=774,Z.breveinvertedbelowcmb=815,Z.breveinvertedcmb=785,Z.breveinverteddoublecmb=865,Z.bridgebelowcmb=810,Z.bridgeinvertedbelowcmb=826,Z.brokenbar=166,Z.bstroke=384,Z.bsuperior=63210,Z.btopbar=387,Z.buhiragana=12406,Z.bukatakana=12502,Z.bullet=8226,Z.bulletinverse=9688,Z.bulletoperator=8729,Z.bullseye=9678,Z.c=99,Z.caarmenian=1390,Z.cabengali=2458,Z.cacute=263,Z.cadeva=2330,Z.cagujarati=2714,Z.cagurmukhi=2586,Z.calsquare=13192,Z.candrabindubengali=2433,Z.candrabinducmb=784,Z.candrabindudeva=2305,Z.candrabindugujarati=2689,Z.capslock=8682,Z.careof=8453,Z.caron=711,Z.caronbelowcmb=812,Z.caroncmb=780,Z.carriagereturn=8629,Z.cbopomofo=12568,Z.ccaron=269,Z.ccedilla=231,Z.ccedillaacute=7689,Z.ccircle=9426,Z.ccircumflex=265,Z.ccurl=597,Z.cdot=267,Z.cdotaccent=267,Z.cdsquare=13253,Z.cedilla=184,Z.cedillacmb=807,Z.cent=162,Z.centigrade=8451,Z.centinferior=63199,Z.centmonospace=65504,Z.centoldstyle=63394,Z.centsuperior=63200,Z.chaarmenian=1401,Z.chabengali=2459,Z.chadeva=2331,Z.chagujarati=2715,Z.chagurmukhi=2587,Z.chbopomofo=12564,Z.cheabkhasiancyrillic=1213,Z.checkmark=10003,Z.checyrillic=1095,Z.chedescenderabkhasiancyrillic=1215,Z.chedescendercyrillic=1207,Z.chedieresiscyrillic=1269,Z.cheharmenian=1395,Z.chekhakassiancyrillic=1228,Z.cheverticalstrokecyrillic=1209,Z.chi=967,Z.chieuchacirclekorean=12919,Z.chieuchaparenkorean=12823,Z.chieuchcirclekorean=12905,Z.chieuchkorean=12618,Z.chieuchparenkorean=12809,Z.chochangthai=3594,Z.chochanthai=3592,Z.chochingthai=3593,Z.chochoethai=3596,Z.chook=392,Z.cieucacirclekorean=12918,Z.cieucaparenkorean=12822,Z.cieuccirclekorean=12904,Z.cieuckorean=12616,Z.cieucparenkorean=12808,Z.cieucuparenkorean=12828,Z.circle=9675,Z.circlecopyrt=169,Z.circlemultiply=8855,Z.circleot=8857,Z.circleplus=8853,Z.circlepostalmark=12342,Z.circlewithlefthalfblack=9680,Z.circlewithrighthalfblack=9681,Z.circumflex=710,Z.circumflexbelowcmb=813,Z.circumflexcmb=770,Z.clear=8999,Z.clickalveolar=450,Z.clickdental=448,Z.clicklateral=449,Z.clickretroflex=451,Z.club=9827,Z.clubsuitblack=9827,Z.clubsuitwhite=9831,Z.cmcubedsquare=13220,Z.cmonospace=65347,Z.cmsquaredsquare=13216,Z.coarmenian=1409,Z.colon=58,Z.colonmonetary=8353,Z.colonmonospace=65306,Z.colonsign=8353,Z.colonsmall=65109,Z.colontriangularhalfmod=721,Z.colontriangularmod=720,Z.comma=44,Z.commaabovecmb=787,Z.commaaboverightcmb=789,Z.commaaccent=63171,Z.commaarabic=1548,Z.commaarmenian=1373,Z.commainferior=63201,Z.commamonospace=65292,Z.commareversedabovecmb=788,Z.commareversedmod=701,Z.commasmall=65104,Z.commasuperior=63202,Z.commaturnedabovecmb=786,Z.commaturnedmod=699,Z.compass=9788,Z.congruent=8773,Z.contourintegral=8750,Z.control=8963,Z.controlACK=6,Z.controlBEL=7,Z.controlBS=8,Z.controlCAN=24,Z.controlCR=13,Z.controlDC1=17,Z.controlDC2=18,Z.controlDC3=19,Z.controlDC4=20,Z.controlDEL=127,Z.controlDLE=16,Z.controlEM=25,Z.controlENQ=5,Z.controlEOT=4,Z.controlESC=27,Z.controlETB=23,Z.controlETX=3,Z.controlFF=12,Z.controlFS=28,Z.controlGS=29,Z.controlHT=9,Z.controlLF=10,Z.controlNAK=21,Z.controlNULL=0,Z.controlRS=30,Z.controlSI=15,Z.controlSO=14,Z.controlSOT=2,Z.controlSTX=1,Z.controlSUB=26,Z.controlSYN=22,Z.controlUS=31,Z.controlVT=11,Z.copyright=169,Z.copyrightsans=63721,Z.copyrightserif=63193,Z.cornerbracketleft=12300,Z.cornerbracketlefthalfwidth=65378,Z.cornerbracketleftvertical=65089,Z.cornerbracketright=12301,Z.cornerbracketrighthalfwidth=65379,Z.cornerbracketrightvertical=65090,Z.corporationsquare=13183,Z.cosquare=13255,Z.coverkgsquare=13254,Z.cparen=9374,Z.cruzeiro=8354,Z.cstretched=663,Z.curlyand=8911,Z.curlyor=8910,Z.currency=164,Z.cyrBreve=63185,Z.cyrFlex=63186,Z.cyrbreve=63188,Z.cyrflex=63189,Z.d=100,Z.daarmenian=1380,Z.dabengali=2470,Z.dadarabic=1590,Z.dadeva=2342,Z.dadfinalarabic=65214,Z.dadinitialarabic=65215,Z.dadmedialarabic=65216,Z.dagesh=1468,Z.dageshhebrew=1468,Z.dagger=8224,Z.daggerdbl=8225,Z.dagujarati=2726,Z.dagurmukhi=2598,Z.dahiragana=12384,Z.dakatakana=12480,Z.dalarabic=1583,Z.dalet=1491,Z.daletdagesh=64307,Z.daletdageshhebrew=64307,Z.dalethebrew=1491,Z.dalfinalarabic=65194,Z.dammaarabic=1615,Z.dammalowarabic=1615,Z.dammatanaltonearabic=1612,Z.dammatanarabic=1612,Z.danda=2404,Z.dargahebrew=1447,Z.dargalefthebrew=1447,Z.dasiapneumatacyrilliccmb=1157,Z.dblGrave=63187,Z.dblanglebracketleft=12298,Z.dblanglebracketleftvertical=65085,Z.dblanglebracketright=12299,Z.dblanglebracketrightvertical=65086,Z.dblarchinvertedbelowcmb=811,Z.dblarrowleft=8660,Z.dblarrowright=8658,Z.dbldanda=2405,Z.dblgrave=63190,Z.dblgravecmb=783,Z.dblintegral=8748,Z.dbllowline=8215,Z.dbllowlinecmb=819,Z.dbloverlinecmb=831,Z.dblprimemod=698,Z.dblverticalbar=8214,Z.dblverticallineabovecmb=782,Z.dbopomofo=12553,Z.dbsquare=13256,Z.dcaron=271,Z.dcedilla=7697,Z.dcircle=9427,Z.dcircumflexbelow=7699,Z.dcroat=273,Z.ddabengali=2465,Z.ddadeva=2337,Z.ddagujarati=2721,Z.ddagurmukhi=2593,Z.ddalarabic=1672,Z.ddalfinalarabic=64393,Z.dddhadeva=2396,Z.ddhabengali=2466,Z.ddhadeva=2338,Z.ddhagujarati=2722,Z.ddhagurmukhi=2594,Z.ddotaccent=7691,Z.ddotbelow=7693,Z.decimalseparatorarabic=1643,Z.decimalseparatorpersian=1643,Z.decyrillic=1076,Z.degree=176,Z.dehihebrew=1453,Z.dehiragana=12391,Z.deicoptic=1007,Z.dekatakana=12487,Z.deleteleft=9003,Z.deleteright=8998,Z.delta=948,Z.deltaturned=397,Z.denominatorminusonenumeratorbengali=2552,Z.dezh=676,Z.dhabengali=2471,Z.dhadeva=2343,Z.dhagujarati=2727,Z.dhagurmukhi=2599,Z.dhook=599,Z.dialytikatonos=901,Z.dialytikatonoscmb=836,Z.diamond=9830,Z.diamondsuitwhite=9826,Z.dieresis=168,Z.dieresisacute=63191,Z.dieresisbelowcmb=804,Z.dieresiscmb=776,Z.dieresisgrave=63192,Z.dieresistonos=901,Z.dihiragana=12386,Z.dikatakana=12482,Z.dittomark=12291,Z.divide=247,Z.divides=8739,Z.divisionslash=8725,Z.djecyrillic=1106,Z.dkshade=9619,Z.dlinebelow=7695,Z.dlsquare=13207,Z.dmacron=273,Z.dmonospace=65348,Z.dnblock=9604,Z.dochadathai=3598,Z.dodekthai=3604,Z.dohiragana=12393,Z.dokatakana=12489,Z.dollar=36,Z.dollarinferior=63203,Z.dollarmonospace=65284,Z.dollaroldstyle=63268,Z.dollarsmall=65129,Z.dollarsuperior=63204,Z.dong=8363,Z.dorusquare=13094,Z.dotaccent=729,Z.dotaccentcmb=775,Z.dotbelowcmb=803,Z.dotbelowcomb=803,Z.dotkatakana=12539,Z.dotlessi=305,Z.dotlessj=63166,Z.dotlessjstrokehook=644,Z.dotmath=8901,Z.dottedcircle=9676,Z.doubleyodpatah=64287,Z.doubleyodpatahhebrew=64287,Z.downtackbelowcmb=798,Z.downtackmod=725,Z.dparen=9375,Z.dsuperior=63211,Z.dtail=598,Z.dtopbar=396,Z.duhiragana=12389,Z.dukatakana=12485,Z.dz=499,Z.dzaltone=675,Z.dzcaron=454,Z.dzcurl=677,Z.dzeabkhasiancyrillic=1249,Z.dzecyrillic=1109,Z.dzhecyrillic=1119,Z.e=101,Z.eacute=233,Z.earth=9793,Z.ebengali=2447,Z.ebopomofo=12572,Z.ebreve=277,Z.ecandradeva=2317,Z.ecandragujarati=2701,Z.ecandravowelsigndeva=2373,Z.ecandravowelsigngujarati=2757,Z.ecaron=283,Z.ecedillabreve=7709,Z.echarmenian=1381,Z.echyiwnarmenian=1415,Z.ecircle=9428,Z.ecircumflex=234,Z.ecircumflexacute=7871,Z.ecircumflexbelow=7705,Z.ecircumflexdotbelow=7879,Z.ecircumflexgrave=7873,Z.ecircumflexhookabove=7875,Z.ecircumflextilde=7877,Z.ecyrillic=1108,Z.edblgrave=517,Z.edeva=2319,Z.edieresis=235,Z.edot=279,Z.edotaccent=279,Z.edotbelow=7865,Z.eegurmukhi=2575,Z.eematragurmukhi=2631,Z.efcyrillic=1092,Z.egrave=232,Z.egujarati=2703,Z.eharmenian=1383,Z.ehbopomofo=12573,Z.ehiragana=12360,Z.ehookabove=7867,Z.eibopomofo=12575,Z.eight=56,Z.eightarabic=1640,Z.eightbengali=2542,Z.eightcircle=9319,Z.eightcircleinversesansserif=10129,Z.eightdeva=2414,Z.eighteencircle=9329,Z.eighteenparen=9349,Z.eighteenperiod=9369,Z.eightgujarati=2798,Z.eightgurmukhi=2670,Z.eighthackarabic=1640,Z.eighthangzhou=12328,Z.eighthnotebeamed=9835,Z.eightideographicparen=12839,Z.eightinferior=8328,Z.eightmonospace=65304,Z.eightoldstyle=63288,Z.eightparen=9339,Z.eightperiod=9359,Z.eightpersian=1784,Z.eightroman=8567,Z.eightsuperior=8312,Z.eightthai=3672,Z.einvertedbreve=519,Z.eiotifiedcyrillic=1125,Z.ekatakana=12456,Z.ekatakanahalfwidth=65396,Z.ekonkargurmukhi=2676,Z.ekorean=12628,Z.elcyrillic=1083,Z.element=8712,Z.elevencircle=9322,Z.elevenparen=9342,Z.elevenperiod=9362,Z.elevenroman=8570,Z.ellipsis=8230,Z.ellipsisvertical=8942,Z.emacron=275,Z.emacronacute=7703,Z.emacrongrave=7701,Z.emcyrillic=1084,Z.emdash=8212,Z.emdashvertical=65073,Z.emonospace=65349,Z.emphasismarkarmenian=1371,Z.emptyset=8709,Z.enbopomofo=12579,Z.encyrillic=1085,Z.endash=8211,Z.endashvertical=65074,Z.endescendercyrillic=1187,Z.eng=331,Z.engbopomofo=12581,Z.enghecyrillic=1189,Z.enhookcyrillic=1224,Z.enspace=8194,Z.eogonek=281,Z.eokorean=12627,Z.eopen=603,Z.eopenclosed=666,Z.eopenreversed=604,Z.eopenreversedclosed=606,Z.eopenreversedhook=605,Z.eparen=9376,Z.epsilon=949,Z.epsilontonos=941,Z.equal=61,Z.equalmonospace=65309,Z.equalsmall=65126,Z.equalsuperior=8316,Z.equivalence=8801,Z.erbopomofo=12582,Z.ercyrillic=1088,Z.ereversed=600,Z.ereversedcyrillic=1101,Z.escyrillic=1089,Z.esdescendercyrillic=1195,Z.esh=643,Z.eshcurl=646,Z.eshortdeva=2318,Z.eshortvowelsigndeva=2374,Z.eshreversedloop=426,Z.eshsquatreversed=645,Z.esmallhiragana=12359,Z.esmallkatakana=12455,Z.esmallkatakanahalfwidth=65386,Z.estimated=8494,Z.esuperior=63212,Z.eta=951,Z.etarmenian=1384,Z.etatonos=942,Z.eth=240,Z.etilde=7869,Z.etildebelow=7707,Z.etnahtafoukhhebrew=1425,Z.etnahtafoukhlefthebrew=1425,Z.etnahtahebrew=1425,Z.etnahtalefthebrew=1425,Z.eturned=477,Z.eukorean=12641,Z.euro=8364,Z.evowelsignbengali=2503,Z.evowelsigndeva=2375,Z.evowelsigngujarati=2759,Z.exclam=33,Z.exclamarmenian=1372,Z.exclamdbl=8252,Z.exclamdown=161,Z.exclamdownsmall=63393,Z.exclammonospace=65281,Z.exclamsmall=63265,Z.existential=8707,Z.ezh=658,Z.ezhcaron=495,Z.ezhcurl=659,Z.ezhreversed=441,Z.ezhtail=442,Z.f=102,Z.fadeva=2398,Z.fagurmukhi=2654,Z.fahrenheit=8457,Z.fathaarabic=1614,Z.fathalowarabic=1614,Z.fathatanarabic=1611,Z.fbopomofo=12552,Z.fcircle=9429,Z.fdotaccent=7711,Z.feharabic=1601,Z.feharmenian=1414,Z.fehfinalarabic=65234,Z.fehinitialarabic=65235,Z.fehmedialarabic=65236,Z.feicoptic=997,Z.female=9792,Z.ff=64256,Z.f_f=64256,Z.ffi=64259,Z.f_f_i=64259,Z.ffl=64260,Z.f_f_l=64260,Z.fi=64257,Z.f_i=64257,Z.fifteencircle=9326,Z.fifteenparen=9346,Z.fifteenperiod=9366,Z.figuredash=8210,Z.filledbox=9632,Z.filledrect=9644,Z.finalkaf=1498,Z.finalkafdagesh=64314,Z.finalkafdageshhebrew=64314,Z.finalkafhebrew=1498,Z.finalmem=1501,Z.finalmemhebrew=1501,Z.finalnun=1503,Z.finalnunhebrew=1503,Z.finalpe=1507,Z.finalpehebrew=1507,Z.finaltsadi=1509,Z.finaltsadihebrew=1509,Z.firsttonechinese=713,Z.fisheye=9673,Z.fitacyrillic=1139,Z.five=53,Z.fivearabic=1637,Z.fivebengali=2539,Z.fivecircle=9316,Z.fivecircleinversesansserif=10126,Z.fivedeva=2411,Z.fiveeighths=8541,Z.fivegujarati=2795,Z.fivegurmukhi=2667,Z.fivehackarabic=1637,Z.fivehangzhou=12325,Z.fiveideographicparen=12836,Z.fiveinferior=8325,Z.fivemonospace=65301,Z.fiveoldstyle=63285,Z.fiveparen=9336,Z.fiveperiod=9356,Z.fivepersian=1781,Z.fiveroman=8564,Z.fivesuperior=8309,Z.fivethai=3669,Z.fl=64258,Z.f_l=64258,Z.florin=402,Z.fmonospace=65350,Z.fmsquare=13209,Z.fofanthai=3615,Z.fofathai=3613,Z.fongmanthai=3663,Z.forall=8704,Z.four=52,Z.fourarabic=1636,Z.fourbengali=2538,Z.fourcircle=9315,Z.fourcircleinversesansserif=10125,Z.fourdeva=2410,Z.fourgujarati=2794,Z.fourgurmukhi=2666,Z.fourhackarabic=1636,Z.fourhangzhou=12324,Z.fourideographicparen=12835,Z.fourinferior=8324,Z.fourmonospace=65300,Z.fournumeratorbengali=2551,Z.fouroldstyle=63284,Z.fourparen=9335,Z.fourperiod=9355,Z.fourpersian=1780,Z.fourroman=8563,Z.foursuperior=8308,Z.fourteencircle=9325,Z.fourteenparen=9345,Z.fourteenperiod=9365,Z.fourthai=3668,Z.fourthtonechinese=715,Z.fparen=9377,Z.fraction=8260,Z.franc=8355,Z.g=103,Z.gabengali=2455,Z.gacute=501,Z.gadeva=2327,Z.gafarabic=1711,Z.gaffinalarabic=64403,Z.gafinitialarabic=64404,Z.gafmedialarabic=64405,Z.gagujarati=2711,Z.gagurmukhi=2583,Z.gahiragana=12364,Z.gakatakana=12460,Z.gamma=947,Z.gammalatinsmall=611,Z.gammasuperior=736,Z.gangiacoptic=1003,Z.gbopomofo=12557,Z.gbreve=287,Z.gcaron=487,Z.gcedilla=291,Z.gcircle=9430,Z.gcircumflex=285,Z.gcommaaccent=291,Z.gdot=289,Z.gdotaccent=289,Z.gecyrillic=1075,Z.gehiragana=12370,Z.gekatakana=12466,Z.geometricallyequal=8785,Z.gereshaccenthebrew=1436,Z.gereshhebrew=1523,Z.gereshmuqdamhebrew=1437,Z.germandbls=223,Z.gershayimaccenthebrew=1438,Z.gershayimhebrew=1524,Z.getamark=12307,Z.ghabengali=2456,Z.ghadarmenian=1394,Z.ghadeva=2328,Z.ghagujarati=2712,Z.ghagurmukhi=2584,Z.ghainarabic=1594,Z.ghainfinalarabic=65230,Z.ghaininitialarabic=65231,Z.ghainmedialarabic=65232,Z.ghemiddlehookcyrillic=1173,Z.ghestrokecyrillic=1171,Z.gheupturncyrillic=1169,Z.ghhadeva=2394,Z.ghhagurmukhi=2650,Z.ghook=608,Z.ghzsquare=13203,Z.gihiragana=12366,Z.gikatakana=12462,Z.gimarmenian=1379,Z.gimel=1490,Z.gimeldagesh=64306,Z.gimeldageshhebrew=64306,Z.gimelhebrew=1490,Z.gjecyrillic=1107,Z.glottalinvertedstroke=446,Z.glottalstop=660,Z.glottalstopinverted=662,Z.glottalstopmod=704,Z.glottalstopreversed=661,Z.glottalstopreversedmod=705,Z.glottalstopreversedsuperior=740,Z.glottalstopstroke=673,Z.glottalstopstrokereversed=674,Z.gmacron=7713,Z.gmonospace=65351,Z.gohiragana=12372,Z.gokatakana=12468,Z.gparen=9378,Z.gpasquare=13228,Z.gradient=8711,Z.grave=96,Z.gravebelowcmb=790,Z.gravecmb=768,Z.gravecomb=768,Z.gravedeva=2387,Z.gravelowmod=718,Z.gravemonospace=65344,Z.gravetonecmb=832,Z.greater=62,Z.greaterequal=8805,Z.greaterequalorless=8923,Z.greatermonospace=65310,Z.greaterorequivalent=8819,Z.greaterorless=8823,Z.greateroverequal=8807,Z.greatersmall=65125,Z.gscript=609,Z.gstroke=485,Z.guhiragana=12368,Z.guillemotleft=171,Z.guillemotright=187,Z.guilsinglleft=8249,Z.guilsinglright=8250,Z.gukatakana=12464,Z.guramusquare=13080,Z.gysquare=13257,Z.h=104,Z.haabkhasiancyrillic=1193,Z.haaltonearabic=1729,Z.habengali=2489,Z.hadescendercyrillic=1203,Z.hadeva=2361,Z.hagujarati=2745,Z.hagurmukhi=2617,Z.haharabic=1581,Z.hahfinalarabic=65186,Z.hahinitialarabic=65187,Z.hahiragana=12399,Z.hahmedialarabic=65188,Z.haitusquare=13098,Z.hakatakana=12495,Z.hakatakanahalfwidth=65418,Z.halantgurmukhi=2637,Z.hamzaarabic=1569,Z.hamzalowarabic=1569,Z.hangulfiller=12644,Z.hardsigncyrillic=1098,Z.harpoonleftbarbup=8636,Z.harpoonrightbarbup=8640,Z.hasquare=13258,Z.hatafpatah=1458,Z.hatafpatah16=1458,Z.hatafpatah23=1458,Z.hatafpatah2f=1458,Z.hatafpatahhebrew=1458,Z.hatafpatahnarrowhebrew=1458,Z.hatafpatahquarterhebrew=1458,Z.hatafpatahwidehebrew=1458,Z.hatafqamats=1459,Z.hatafqamats1b=1459,Z.hatafqamats28=1459,Z.hatafqamats34=1459,Z.hatafqamatshebrew=1459,Z.hatafqamatsnarrowhebrew=1459,Z.hatafqamatsquarterhebrew=1459,Z.hatafqamatswidehebrew=1459,Z.hatafsegol=1457,Z.hatafsegol17=1457,Z.hatafsegol24=1457,Z.hatafsegol30=1457,Z.hatafsegolhebrew=1457,Z.hatafsegolnarrowhebrew=1457,Z.hatafsegolquarterhebrew=1457,Z.hatafsegolwidehebrew=1457,Z.hbar=295,Z.hbopomofo=12559,Z.hbrevebelow=7723,Z.hcedilla=7721,Z.hcircle=9431,Z.hcircumflex=293,Z.hdieresis=7719,Z.hdotaccent=7715,Z.hdotbelow=7717,Z.he=1492,Z.heart=9829,Z.heartsuitblack=9829,Z.heartsuitwhite=9825,Z.hedagesh=64308,Z.hedageshhebrew=64308,Z.hehaltonearabic=1729,Z.heharabic=1607,Z.hehebrew=1492,Z.hehfinalaltonearabic=64423,Z.hehfinalalttwoarabic=65258,Z.hehfinalarabic=65258,Z.hehhamzaabovefinalarabic=64421,Z.hehhamzaaboveisolatedarabic=64420,Z.hehinitialaltonearabic=64424,Z.hehinitialarabic=65259,Z.hehiragana=12408,Z.hehmedialaltonearabic=64425,Z.hehmedialarabic=65260,Z.heiseierasquare=13179,Z.hekatakana=12504,Z.hekatakanahalfwidth=65421,Z.hekutaarusquare=13110,Z.henghook=615,Z.herutusquare=13113,Z.het=1495,Z.hethebrew=1495,Z.hhook=614,Z.hhooksuperior=689,Z.hieuhacirclekorean=12923,Z.hieuhaparenkorean=12827,Z.hieuhcirclekorean=12909,Z.hieuhkorean=12622,Z.hieuhparenkorean=12813,Z.hihiragana=12402,Z.hikatakana=12498,Z.hikatakanahalfwidth=65419,Z.hiriq=1460,Z.hiriq14=1460,Z.hiriq21=1460,Z.hiriq2d=1460,Z.hiriqhebrew=1460,Z.hiriqnarrowhebrew=1460,Z.hiriqquarterhebrew=1460,Z.hiriqwidehebrew=1460,Z.hlinebelow=7830,Z.hmonospace=65352,Z.hoarmenian=1392,Z.hohipthai=3627,Z.hohiragana=12411,Z.hokatakana=12507,Z.hokatakanahalfwidth=65422,Z.holam=1465,Z.holam19=1465,Z.holam26=1465,Z.holam32=1465,Z.holamhebrew=1465,Z.holamnarrowhebrew=1465,Z.holamquarterhebrew=1465,Z.holamwidehebrew=1465,Z.honokhukthai=3630,Z.hookabovecomb=777,Z.hookcmb=777,Z.hookpalatalizedbelowcmb=801,Z.hookretroflexbelowcmb=802,Z.hoonsquare=13122,Z.horicoptic=1001,Z.horizontalbar=8213,Z.horncmb=795,Z.hotsprings=9832,Z.house=8962,Z.hparen=9379,Z.hsuperior=688,Z.hturned=613,Z.huhiragana=12405,Z.huiitosquare=13107,Z.hukatakana=12501,Z.hukatakanahalfwidth=65420,Z.hungarumlaut=733,Z.hungarumlautcmb=779,Z.hv=405,Z.hyphen=45,Z.hypheninferior=63205,Z.hyphenmonospace=65293,Z.hyphensmall=65123,Z.hyphensuperior=63206,Z.hyphentwo=8208,Z.i=105,Z.iacute=237,Z.iacyrillic=1103,Z.ibengali=2439,Z.ibopomofo=12583,Z.ibreve=301,Z.icaron=464,Z.icircle=9432,Z.icircumflex=238,Z.icyrillic=1110,Z.idblgrave=521,Z.ideographearthcircle=12943,Z.ideographfirecircle=12939,Z.ideographicallianceparen=12863,Z.ideographiccallparen=12858,Z.ideographiccentrecircle=12965,Z.ideographicclose=12294,Z.ideographiccomma=12289,Z.ideographiccommaleft=65380,Z.ideographiccongratulationparen=12855,Z.ideographiccorrectcircle=12963,Z.ideographicearthparen=12847,Z.ideographicenterpriseparen=12861,Z.ideographicexcellentcircle=12957,Z.ideographicfestivalparen=12864,Z.ideographicfinancialcircle=12950,Z.ideographicfinancialparen=12854,Z.ideographicfireparen=12843,Z.ideographichaveparen=12850,Z.ideographichighcircle=12964,Z.ideographiciterationmark=12293,Z.ideographiclaborcircle=12952,Z.ideographiclaborparen=12856,Z.ideographicleftcircle=12967,Z.ideographiclowcircle=12966,Z.ideographicmedicinecircle=12969,Z.ideographicmetalparen=12846,Z.ideographicmoonparen=12842,Z.ideographicnameparen=12852,Z.ideographicperiod=12290,Z.ideographicprintcircle=12958,Z.ideographicreachparen=12867,Z.ideographicrepresentparen=12857,Z.ideographicresourceparen=12862,Z.ideographicrightcircle=12968,Z.ideographicsecretcircle=12953,Z.ideographicselfparen=12866,Z.ideographicsocietyparen=12851,Z.ideographicspace=12288,Z.ideographicspecialparen=12853,Z.ideographicstockparen=12849,Z.ideographicstudyparen=12859,Z.ideographicsunparen=12848,Z.ideographicsuperviseparen=12860,Z.ideographicwaterparen=12844,Z.ideographicwoodparen=12845,Z.ideographiczero=12295,Z.ideographmetalcircle=12942,Z.ideographmooncircle=12938,Z.ideographnamecircle=12948,Z.ideographsuncircle=12944,Z.ideographwatercircle=12940,Z.ideographwoodcircle=12941,Z.ideva=2311,Z.idieresis=239,Z.idieresisacute=7727,Z.idieresiscyrillic=1253,Z.idotbelow=7883,Z.iebrevecyrillic=1239,Z.iecyrillic=1077,Z.ieungacirclekorean=12917,Z.ieungaparenkorean=12821,Z.ieungcirclekorean=12903,Z.ieungkorean=12615,Z.ieungparenkorean=12807,Z.igrave=236,Z.igujarati=2695,Z.igurmukhi=2567,Z.ihiragana=12356,Z.ihookabove=7881,Z.iibengali=2440,Z.iicyrillic=1080,Z.iideva=2312,Z.iigujarati=2696,Z.iigurmukhi=2568,Z.iimatragurmukhi=2624,Z.iinvertedbreve=523,Z.iishortcyrillic=1081,Z.iivowelsignbengali=2496,Z.iivowelsigndeva=2368,Z.iivowelsigngujarati=2752,Z.ij=307,Z.ikatakana=12452,Z.ikatakanahalfwidth=65394,Z.ikorean=12643,Z.ilde=732,Z.iluyhebrew=1452,Z.imacron=299,Z.imacroncyrillic=1251,Z.imageorapproximatelyequal=8787,Z.imatragurmukhi=2623,Z.imonospace=65353,Z.increment=8710,Z.infinity=8734,Z.iniarmenian=1387,Z.integral=8747,Z.integralbottom=8993,Z.integralbt=8993,Z.integralex=63733,Z.integraltop=8992,Z.integraltp=8992,Z.intersection=8745,Z.intisquare=13061,Z.invbullet=9688,Z.invcircle=9689,Z.invsmileface=9787,Z.iocyrillic=1105,Z.iogonek=303,Z.iota=953,Z.iotadieresis=970,Z.iotadieresistonos=912,Z.iotalatin=617,Z.iotatonos=943,Z.iparen=9380,Z.irigurmukhi=2674,Z.ismallhiragana=12355,Z.ismallkatakana=12451,Z.ismallkatakanahalfwidth=65384,Z.issharbengali=2554,Z.istroke=616,Z.isuperior=63213,Z.iterationhiragana=12445,Z.iterationkatakana=12541,Z.itilde=297,Z.itildebelow=7725,Z.iubopomofo=12585,Z.iucyrillic=1102,Z.ivowelsignbengali=2495,Z.ivowelsigndeva=2367,Z.ivowelsigngujarati=2751,Z.izhitsacyrillic=1141,Z.izhitsadblgravecyrillic=1143,Z.j=106,Z.jaarmenian=1393,Z.jabengali=2460,Z.jadeva=2332,Z.jagujarati=2716,Z.jagurmukhi=2588,Z.jbopomofo=12560,Z.jcaron=496,Z.jcircle=9433,Z.jcircumflex=309,Z.jcrossedtail=669,Z.jdotlessstroke=607,Z.jecyrillic=1112,Z.jeemarabic=1580,Z.jeemfinalarabic=65182,Z.jeeminitialarabic=65183,Z.jeemmedialarabic=65184,Z.jeharabic=1688,Z.jehfinalarabic=64395,Z.jhabengali=2461,Z.jhadeva=2333,Z.jhagujarati=2717,Z.jhagurmukhi=2589,Z.jheharmenian=1403,Z.jis=12292,Z.jmonospace=65354,Z.jparen=9381,Z.jsuperior=690,Z.k=107,Z.kabashkircyrillic=1185,Z.kabengali=2453,Z.kacute=7729,Z.kacyrillic=1082,Z.kadescendercyrillic=1179,Z.kadeva=2325,Z.kaf=1499,Z.kafarabic=1603,Z.kafdagesh=64315,Z.kafdageshhebrew=64315,Z.kaffinalarabic=65242,Z.kafhebrew=1499,Z.kafinitialarabic=65243,Z.kafmedialarabic=65244,Z.kafrafehebrew=64333,Z.kagujarati=2709,Z.kagurmukhi=2581,Z.kahiragana=12363,Z.kahookcyrillic=1220,Z.kakatakana=12459,Z.kakatakanahalfwidth=65398,Z.kappa=954,Z.kappasymbolgreek=1008,Z.kapyeounmieumkorean=12657,Z.kapyeounphieuphkorean=12676,Z.kapyeounpieupkorean=12664,Z.kapyeounssangpieupkorean=12665,Z.karoriisquare=13069,Z.kashidaautoarabic=1600,Z.kashidaautonosidebearingarabic=1600,Z.kasmallkatakana=12533,Z.kasquare=13188,Z.kasraarabic=1616,Z.kasratanarabic=1613,Z.kastrokecyrillic=1183,Z.katahiraprolongmarkhalfwidth=65392,Z.kaverticalstrokecyrillic=1181,Z.kbopomofo=12558,Z.kcalsquare=13193,Z.kcaron=489,Z.kcedilla=311,Z.kcircle=9434,Z.kcommaaccent=311,Z.kdotbelow=7731,Z.keharmenian=1412,Z.kehiragana=12369,Z.kekatakana=12465,Z.kekatakanahalfwidth=65401,Z.kenarmenian=1391,Z.kesmallkatakana=12534,Z.kgreenlandic=312,Z.khabengali=2454,Z.khacyrillic=1093,Z.khadeva=2326,Z.khagujarati=2710,Z.khagurmukhi=2582,Z.khaharabic=1582,Z.khahfinalarabic=65190,Z.khahinitialarabic=65191,Z.khahmedialarabic=65192,Z.kheicoptic=999,Z.khhadeva=2393,Z.khhagurmukhi=2649,Z.khieukhacirclekorean=12920,Z.khieukhaparenkorean=12824,Z.khieukhcirclekorean=12906,Z.khieukhkorean=12619,Z.khieukhparenkorean=12810,Z.khokhaithai=3586,Z.khokhonthai=3589,Z.khokhuatthai=3587,Z.khokhwaithai=3588,Z.khomutthai=3675,Z.khook=409,Z.khorakhangthai=3590,Z.khzsquare=13201,Z.kihiragana=12365,Z.kikatakana=12461,Z.kikatakanahalfwidth=65399,Z.kiroguramusquare=13077,Z.kiromeetorusquare=13078,Z.kirosquare=13076,Z.kiyeokacirclekorean=12910,Z.kiyeokaparenkorean=12814,Z.kiyeokcirclekorean=12896,Z.kiyeokkorean=12593,Z.kiyeokparenkorean=12800,Z.kiyeoksioskorean=12595,Z.kjecyrillic=1116,Z.klinebelow=7733,Z.klsquare=13208,Z.kmcubedsquare=13222,Z.kmonospace=65355,Z.kmsquaredsquare=13218,Z.kohiragana=12371,Z.kohmsquare=13248,Z.kokaithai=3585,Z.kokatakana=12467,Z.kokatakanahalfwidth=65402,Z.kooposquare=13086,Z.koppacyrillic=1153,Z.koreanstandardsymbol=12927,Z.koroniscmb=835,Z.kparen=9382,Z.kpasquare=13226,Z.ksicyrillic=1135,Z.ktsquare=13263,Z.kturned=670,Z.kuhiragana=12367,Z.kukatakana=12463,Z.kukatakanahalfwidth=65400,Z.kvsquare=13240,Z.kwsquare=13246,Z.l=108,Z.labengali=2482,Z.lacute=314,Z.ladeva=2354,Z.lagujarati=2738,Z.lagurmukhi=2610,Z.lakkhangyaothai=3653,Z.lamaleffinalarabic=65276,Z.lamalefhamzaabovefinalarabic=65272,Z.lamalefhamzaaboveisolatedarabic=65271,Z.lamalefhamzabelowfinalarabic=65274,Z.lamalefhamzabelowisolatedarabic=65273,Z.lamalefisolatedarabic=65275,Z.lamalefmaddaabovefinalarabic=65270,Z.lamalefmaddaaboveisolatedarabic=65269,Z.lamarabic=1604,Z.lambda=955,Z.lambdastroke=411,Z.lamed=1500,Z.lameddagesh=64316,Z.lameddageshhebrew=64316,Z.lamedhebrew=1500,Z.lamfinalarabic=65246,Z.lamhahinitialarabic=64714,Z.laminitialarabic=65247,Z.lamjeeminitialarabic=64713,Z.lamkhahinitialarabic=64715,Z.lamlamhehisolatedarabic=65010,Z.lammedialarabic=65248,Z.lammeemhahinitialarabic=64904,Z.lammeeminitialarabic=64716,Z.largecircle=9711,Z.lbar=410,Z.lbelt=620,Z.lbopomofo=12556,Z.lcaron=318,Z.lcedilla=316,Z.lcircle=9435,Z.lcircumflexbelow=7741,Z.lcommaaccent=316,Z.ldot=320,Z.ldotaccent=320,Z.ldotbelow=7735,Z.ldotbelowmacron=7737,Z.leftangleabovecmb=794,Z.lefttackbelowcmb=792,Z.less=60,Z.lessequal=8804,Z.lessequalorgreater=8922,Z.lessmonospace=65308,Z.lessorequivalent=8818,Z.lessorgreater=8822,Z.lessoverequal=8806,Z.lesssmall=65124,Z.lezh=622,Z.lfblock=9612,Z.lhookretroflex=621,Z.lira=8356,Z.liwnarmenian=1388,Z.lj=457,Z.ljecyrillic=1113,Z.ll=63168,Z.lladeva=2355,Z.llagujarati=2739,Z.llinebelow=7739,Z.llladeva=2356,Z.llvocalicbengali=2529,Z.llvocalicdeva=2401,Z.llvocalicvowelsignbengali=2531,Z.llvocalicvowelsigndeva=2403,Z.lmiddletilde=619,Z.lmonospace=65356,Z.lmsquare=13264,Z.lochulathai=3628,Z.logicaland=8743,Z.logicalnot=172,Z.logicalnotreversed=8976,Z.logicalor=8744,Z.lolingthai=3621,Z.longs=383,Z.lowlinecenterline=65102,Z.lowlinecmb=818,Z.lowlinedashed=65101,Z.lozenge=9674,Z.lparen=9383,Z.lslash=322,Z.lsquare=8467,Z.lsuperior=63214,Z.ltshade=9617,Z.luthai=3622,Z.lvocalicbengali=2444,Z.lvocalicdeva=2316,Z.lvocalicvowelsignbengali=2530,Z.lvocalicvowelsigndeva=2402,Z.lxsquare=13267,Z.m=109,Z.mabengali=2478,Z.macron=175,Z.macronbelowcmb=817,Z.macroncmb=772,Z.macronlowmod=717,Z.macronmonospace=65507,Z.macute=7743,Z.madeva=2350,Z.magujarati=2734,Z.magurmukhi=2606,Z.mahapakhhebrew=1444,Z.mahapakhlefthebrew=1444,Z.mahiragana=12414,Z.maichattawalowleftthai=63637,Z.maichattawalowrightthai=63636,Z.maichattawathai=3659,Z.maichattawaupperleftthai=63635,Z.maieklowleftthai=63628,Z.maieklowrightthai=63627,Z.maiekthai=3656,Z.maiekupperleftthai=63626,Z.maihanakatleftthai=63620,Z.maihanakatthai=3633,Z.maitaikhuleftthai=63625,Z.maitaikhuthai=3655,Z.maitholowleftthai=63631,Z.maitholowrightthai=63630,Z.maithothai=3657,Z.maithoupperleftthai=63629,Z.maitrilowleftthai=63634,Z.maitrilowrightthai=63633,Z.maitrithai=3658,Z.maitriupperleftthai=63632,Z.maiyamokthai=3654,Z.makatakana=12510,Z.makatakanahalfwidth=65423,Z.male=9794,Z.mansyonsquare=13127,Z.maqafhebrew=1470,Z.mars=9794,Z.masoracirclehebrew=1455,Z.masquare=13187,Z.mbopomofo=12551,Z.mbsquare=13268,Z.mcircle=9436,Z.mcubedsquare=13221,Z.mdotaccent=7745,Z.mdotbelow=7747,Z.meemarabic=1605,Z.meemfinalarabic=65250,Z.meeminitialarabic=65251,Z.meemmedialarabic=65252,Z.meemmeeminitialarabic=64721,Z.meemmeemisolatedarabic=64584,Z.meetorusquare=13133,Z.mehiragana=12417,Z.meizierasquare=13182,Z.mekatakana=12513,Z.mekatakanahalfwidth=65426,Z.mem=1502,Z.memdagesh=64318,Z.memdageshhebrew=64318,Z.memhebrew=1502,Z.menarmenian=1396,Z.merkhahebrew=1445,Z.merkhakefulahebrew=1446,Z.merkhakefulalefthebrew=1446,Z.merkhalefthebrew=1445,Z.mhook=625,Z.mhzsquare=13202,Z.middledotkatakanahalfwidth=65381,Z.middot=183,Z.mieumacirclekorean=12914,Z.mieumaparenkorean=12818,Z.mieumcirclekorean=12900,Z.mieumkorean=12609,Z.mieumpansioskorean=12656,Z.mieumparenkorean=12804,Z.mieumpieupkorean=12654,Z.mieumsioskorean=12655,Z.mihiragana=12415,Z.mikatakana=12511,Z.mikatakanahalfwidth=65424,Z.minus=8722,Z.minusbelowcmb=800,Z.minuscircle=8854,Z.minusmod=727,Z.minusplus=8723,Z.minute=8242,Z.miribaarusquare=13130,Z.mirisquare=13129,Z.mlonglegturned=624,Z.mlsquare=13206,Z.mmcubedsquare=13219,Z.mmonospace=65357,Z.mmsquaredsquare=13215,Z.mohiragana=12418,Z.mohmsquare=13249,Z.mokatakana=12514,Z.mokatakanahalfwidth=65427,Z.molsquare=13270,Z.momathai=3617,Z.moverssquare=13223,Z.moverssquaredsquare=13224,Z.mparen=9384,Z.mpasquare=13227,Z.mssquare=13235,Z.msuperior=63215,Z.mturned=623,Z.mu=181,Z.mu1=181,Z.muasquare=13186,Z.muchgreater=8811,Z.muchless=8810,Z.mufsquare=13196,Z.mugreek=956,Z.mugsquare=13197,Z.muhiragana=12416,Z.mukatakana=12512,Z.mukatakanahalfwidth=65425,Z.mulsquare=13205,Z.multiply=215,Z.mumsquare=13211,Z.munahhebrew=1443,Z.munahlefthebrew=1443,Z.musicalnote=9834,Z.musicalnotedbl=9835,Z.musicflatsign=9837,Z.musicsharpsign=9839,Z.mussquare=13234,Z.muvsquare=13238,Z.muwsquare=13244,Z.mvmegasquare=13241,Z.mvsquare=13239,Z.mwmegasquare=13247,Z.mwsquare=13245,Z.n=110,Z.nabengali=2472,Z.nabla=8711,Z.nacute=324,Z.nadeva=2344,Z.nagujarati=2728,Z.nagurmukhi=2600,Z.nahiragana=12394,Z.nakatakana=12490,Z.nakatakanahalfwidth=65413,Z.napostrophe=329,Z.nasquare=13185,Z.nbopomofo=12555,Z.nbspace=160,Z.ncaron=328,Z.ncedilla=326,Z.ncircle=9437,Z.ncircumflexbelow=7755,Z.ncommaaccent=326,Z.ndotaccent=7749,Z.ndotbelow=7751,Z.nehiragana=12397,Z.nekatakana=12493,Z.nekatakanahalfwidth=65416,Z.newsheqelsign=8362,Z.nfsquare=13195,Z.ngabengali=2457,Z.ngadeva=2329,Z.ngagujarati=2713,Z.ngagurmukhi=2585,Z.ngonguthai=3591,Z.nhiragana=12435,Z.nhookleft=626,Z.nhookretroflex=627,Z.nieunacirclekorean=12911,Z.nieunaparenkorean=12815,Z.nieuncieuckorean=12597,Z.nieuncirclekorean=12897,Z.nieunhieuhkorean=12598,Z.nieunkorean=12596,Z.nieunpansioskorean=12648,Z.nieunparenkorean=12801,Z.nieunsioskorean=12647,Z.nieuntikeutkorean=12646,Z.nihiragana=12395,Z.nikatakana=12491,Z.nikatakanahalfwidth=65414,Z.nikhahitleftthai=63641,Z.nikhahitthai=3661,Z.nine=57,Z.ninearabic=1641,Z.ninebengali=2543,Z.ninecircle=9320,Z.ninecircleinversesansserif=10130,Z.ninedeva=2415,Z.ninegujarati=2799,Z.ninegurmukhi=2671,Z.ninehackarabic=1641,Z.ninehangzhou=12329,Z.nineideographicparen=12840,Z.nineinferior=8329,Z.ninemonospace=65305,Z.nineoldstyle=63289,Z.nineparen=9340,Z.nineperiod=9360,Z.ninepersian=1785,Z.nineroman=8568,Z.ninesuperior=8313,Z.nineteencircle=9330,Z.nineteenparen=9350,Z.nineteenperiod=9370,Z.ninethai=3673,Z.nj=460,Z.njecyrillic=1114,Z.nkatakana=12531,Z.nkatakanahalfwidth=65437,Z.nlegrightlong=414,Z.nlinebelow=7753,Z.nmonospace=65358,Z.nmsquare=13210,Z.nnabengali=2467,Z.nnadeva=2339,Z.nnagujarati=2723,Z.nnagurmukhi=2595,Z.nnnadeva=2345,Z.nohiragana=12398,Z.nokatakana=12494,Z.nokatakanahalfwidth=65417,Z.nonbreakingspace=160,Z.nonenthai=3603,Z.nonuthai=3609,Z.noonarabic=1606,Z.noonfinalarabic=65254,Z.noonghunnaarabic=1722,Z.noonghunnafinalarabic=64415,Z.nooninitialarabic=65255,Z.noonjeeminitialarabic=64722,Z.noonjeemisolatedarabic=64587,Z.noonmedialarabic=65256,Z.noonmeeminitialarabic=64725,Z.noonmeemisolatedarabic=64590,Z.noonnoonfinalarabic=64653,Z.notcontains=8716,Z.notelement=8713,Z.notelementof=8713,Z.notequal=8800,Z.notgreater=8815,Z.notgreaternorequal=8817,Z.notgreaternorless=8825,Z.notidentical=8802,Z.notless=8814,Z.notlessnorequal=8816,Z.notparallel=8742,Z.notprecedes=8832,Z.notsubset=8836,Z.notsucceeds=8833,Z.notsuperset=8837,Z.nowarmenian=1398,Z.nparen=9385,Z.nssquare=13233,Z.nsuperior=8319,Z.ntilde=241,Z.nu=957,Z.nuhiragana=12396,Z.nukatakana=12492,Z.nukatakanahalfwidth=65415,Z.nuktabengali=2492,Z.nuktadeva=2364,Z.nuktagujarati=2748,Z.nuktagurmukhi=2620,Z.numbersign=35,Z.numbersignmonospace=65283,Z.numbersignsmall=65119,Z.numeralsigngreek=884,Z.numeralsignlowergreek=885,Z.numero=8470,Z.nun=1504,Z.nundagesh=64320,Z.nundageshhebrew=64320,Z.nunhebrew=1504,Z.nvsquare=13237,Z.nwsquare=13243,Z.nyabengali=2462,Z.nyadeva=2334,Z.nyagujarati=2718,Z.nyagurmukhi=2590,Z.o=111,Z.oacute=243,Z.oangthai=3629,Z.obarred=629,Z.obarredcyrillic=1257,Z.obarreddieresiscyrillic=1259,Z.obengali=2451,Z.obopomofo=12571,Z.obreve=335,Z.ocandradeva=2321,Z.ocandragujarati=2705,Z.ocandravowelsigndeva=2377,Z.ocandravowelsigngujarati=2761,Z.ocaron=466,Z.ocircle=9438,Z.ocircumflex=244,Z.ocircumflexacute=7889,Z.ocircumflexdotbelow=7897,Z.ocircumflexgrave=7891,Z.ocircumflexhookabove=7893,Z.ocircumflextilde=7895,Z.ocyrillic=1086,Z.odblacute=337,Z.odblgrave=525,Z.odeva=2323,Z.odieresis=246,Z.odieresiscyrillic=1255,Z.odotbelow=7885,Z.oe=339,Z.oekorean=12634,Z.ogonek=731,Z.ogonekcmb=808,Z.ograve=242,Z.ogujarati=2707,Z.oharmenian=1413,Z.ohiragana=12362,Z.ohookabove=7887,Z.ohorn=417,Z.ohornacute=7899,Z.ohorndotbelow=7907,Z.ohorngrave=7901,Z.ohornhookabove=7903,Z.ohorntilde=7905,Z.ohungarumlaut=337,Z.oi=419,Z.oinvertedbreve=527,Z.okatakana=12458,Z.okatakanahalfwidth=65397,Z.okorean=12631,Z.olehebrew=1451,Z.omacron=333,Z.omacronacute=7763,Z.omacrongrave=7761,Z.omdeva=2384,Z.omega=969,Z.omega1=982,Z.omegacyrillic=1121,Z.omegalatinclosed=631,Z.omegaroundcyrillic=1147,Z.omegatitlocyrillic=1149,Z.omegatonos=974,Z.omgujarati=2768,Z.omicron=959,Z.omicrontonos=972,Z.omonospace=65359,Z.one=49,Z.onearabic=1633,Z.onebengali=2535,Z.onecircle=9312,Z.onecircleinversesansserif=10122,Z.onedeva=2407,Z.onedotenleader=8228,Z.oneeighth=8539,Z.onefitted=63196,Z.onegujarati=2791,Z.onegurmukhi=2663,Z.onehackarabic=1633,Z.onehalf=189,Z.onehangzhou=12321,Z.oneideographicparen=12832,Z.oneinferior=8321,Z.onemonospace=65297,Z.onenumeratorbengali=2548,Z.oneoldstyle=63281,Z.oneparen=9332,Z.oneperiod=9352,Z.onepersian=1777,Z.onequarter=188,Z.oneroman=8560,Z.onesuperior=185,Z.onethai=3665,Z.onethird=8531,Z.oogonek=491,Z.oogonekmacron=493,Z.oogurmukhi=2579,Z.oomatragurmukhi=2635,Z.oopen=596,Z.oparen=9386,Z.openbullet=9702,Z.option=8997,Z.ordfeminine=170,Z.ordmasculine=186,Z.orthogonal=8735,Z.oshortdeva=2322,Z.oshortvowelsigndeva=2378,Z.oslash=248,Z.oslashacute=511,Z.osmallhiragana=12361,Z.osmallkatakana=12457,Z.osmallkatakanahalfwidth=65387,Z.ostrokeacute=511,Z.osuperior=63216,Z.otcyrillic=1151,Z.otilde=245,Z.otildeacute=7757,Z.otildedieresis=7759,Z.oubopomofo=12577,Z.overline=8254,Z.overlinecenterline=65098,Z.overlinecmb=773,Z.overlinedashed=65097,Z.overlinedblwavy=65100,Z.overlinewavy=65099,Z.overscore=175,Z.ovowelsignbengali=2507,Z.ovowelsigndeva=2379,Z.ovowelsigngujarati=2763,Z.p=112,Z.paampssquare=13184,Z.paasentosquare=13099,Z.pabengali=2474,Z.pacute=7765,Z.padeva=2346,Z.pagedown=8671,Z.pageup=8670,Z.pagujarati=2730,Z.pagurmukhi=2602,Z.pahiragana=12401,Z.paiyannoithai=3631,Z.pakatakana=12497,Z.palatalizationcyrilliccmb=1156,Z.palochkacyrillic=1216,Z.pansioskorean=12671,Z.paragraph=182,Z.parallel=8741,Z.parenleft=40,Z.parenleftaltonearabic=64830,Z.parenleftbt=63725,Z.parenleftex=63724,Z.parenleftinferior=8333,Z.parenleftmonospace=65288,Z.parenleftsmall=65113,Z.parenleftsuperior=8317,Z.parenlefttp=63723,Z.parenleftvertical=65077,Z.parenright=41,Z.parenrightaltonearabic=64831,Z.parenrightbt=63736,Z.parenrightex=63735,Z.parenrightinferior=8334,Z.parenrightmonospace=65289,Z.parenrightsmall=65114,Z.parenrightsuperior=8318,Z.parenrighttp=63734,Z.parenrightvertical=65078,Z.partialdiff=8706,Z.paseqhebrew=1472,Z.pashtahebrew=1433,Z.pasquare=13225,Z.patah=1463,Z.patah11=1463,Z.patah1d=1463,Z.patah2a=1463,Z.patahhebrew=1463,Z.patahnarrowhebrew=1463,Z.patahquarterhebrew=1463,Z.patahwidehebrew=1463,Z.pazerhebrew=1441,Z.pbopomofo=12550,Z.pcircle=9439,Z.pdotaccent=7767,Z.pe=1508,Z.pecyrillic=1087,Z.pedagesh=64324,Z.pedageshhebrew=64324,Z.peezisquare=13115,Z.pefinaldageshhebrew=64323,Z.peharabic=1662,Z.peharmenian=1402,Z.pehebrew=1508,Z.pehfinalarabic=64343,Z.pehinitialarabic=64344,Z.pehiragana=12410,Z.pehmedialarabic=64345,Z.pekatakana=12506,Z.pemiddlehookcyrillic=1191,Z.perafehebrew=64334,Z.percent=37,Z.percentarabic=1642,Z.percentmonospace=65285,Z.percentsmall=65130,Z.period=46,Z.periodarmenian=1417,Z.periodcentered=183,Z.periodhalfwidth=65377,Z.periodinferior=63207,Z.periodmonospace=65294,Z.periodsmall=65106,Z.periodsuperior=63208,Z.perispomenigreekcmb=834,Z.perpendicular=8869,Z.perthousand=8240,Z.peseta=8359,Z.pfsquare=13194,Z.phabengali=2475,Z.phadeva=2347,Z.phagujarati=2731,Z.phagurmukhi=2603,Z.phi=966,Z.phi1=981,Z.phieuphacirclekorean=12922,Z.phieuphaparenkorean=12826,Z.phieuphcirclekorean=12908,Z.phieuphkorean=12621,Z.phieuphparenkorean=12812,Z.philatin=632,Z.phinthuthai=3642,Z.phisymbolgreek=981,Z.phook=421,Z.phophanthai=3614,Z.phophungthai=3612,Z.phosamphaothai=3616,Z.pi=960,Z.pieupacirclekorean=12915,Z.pieupaparenkorean=12819,Z.pieupcieuckorean=12662,Z.pieupcirclekorean=12901,Z.pieupkiyeokkorean=12658,Z.pieupkorean=12610,Z.pieupparenkorean=12805,Z.pieupsioskiyeokkorean=12660,Z.pieupsioskorean=12612,Z.pieupsiostikeutkorean=12661,Z.pieupthieuthkorean=12663,Z.pieuptikeutkorean=12659,Z.pihiragana=12404,Z.pikatakana=12500,Z.pisymbolgreek=982,Z.piwrarmenian=1411,Z.planckover2pi=8463,Z.planckover2pi1=8463,Z.plus=43,Z.plusbelowcmb=799,Z.pluscircle=8853,Z.plusminus=177,Z.plusmod=726,Z.plusmonospace=65291,Z.plussmall=65122,Z.plussuperior=8314,Z.pmonospace=65360,Z.pmsquare=13272,Z.pohiragana=12413,Z.pointingindexdownwhite=9759,Z.pointingindexleftwhite=9756,Z.pointingindexrightwhite=9758,Z.pointingindexupwhite=9757,Z.pokatakana=12509,Z.poplathai=3611,Z.postalmark=12306,Z.postalmarkface=12320,Z.pparen=9387,Z.precedes=8826,Z.prescription=8478,Z.primemod=697,Z.primereversed=8245,Z.product=8719,Z.projective=8965,Z.prolongedkana=12540,Z.propellor=8984,Z.propersubset=8834,Z.propersuperset=8835,Z.proportion=8759,Z.proportional=8733,Z.psi=968,Z.psicyrillic=1137,Z.psilipneumatacyrilliccmb=1158,Z.pssquare=13232,Z.puhiragana=12407,Z.pukatakana=12503,Z.pvsquare=13236,Z.pwsquare=13242,Z.q=113,Z.qadeva=2392,Z.qadmahebrew=1448,Z.qafarabic=1602,Z.qaffinalarabic=65238,Z.qafinitialarabic=65239,Z.qafmedialarabic=65240,Z.qamats=1464,Z.qamats10=1464,Z.qamats1a=1464,Z.qamats1c=1464,Z.qamats27=1464,Z.qamats29=1464,Z.qamats33=1464,Z.qamatsde=1464,Z.qamatshebrew=1464,Z.qamatsnarrowhebrew=1464,Z.qamatsqatanhebrew=1464,Z.qamatsqatannarrowhebrew=1464,Z.qamatsqatanquarterhebrew=1464,Z.qamatsqatanwidehebrew=1464,Z.qamatsquarterhebrew=1464,Z.qamatswidehebrew=1464,Z.qarneyparahebrew=1439,Z.qbopomofo=12561,Z.qcircle=9440,Z.qhook=672,Z.qmonospace=65361,Z.qof=1511,Z.qofdagesh=64327,Z.qofdageshhebrew=64327,Z.qofhebrew=1511,Z.qparen=9388,Z.quarternote=9833,Z.qubuts=1467,Z.qubuts18=1467,Z.qubuts25=1467,Z.qubuts31=1467,Z.qubutshebrew=1467,Z.qubutsnarrowhebrew=1467,Z.qubutsquarterhebrew=1467,Z.qubutswidehebrew=1467,Z.question=63,Z.questionarabic=1567,Z.questionarmenian=1374,Z.questiondown=191,Z.questiondownsmall=63423,Z.questiongreek=894,Z.questionmonospace=65311,Z.questionsmall=63295,Z.quotedbl=34,Z.quotedblbase=8222,Z.quotedblleft=8220,Z.quotedblmonospace=65282,Z.quotedblprime=12318,Z.quotedblprimereversed=12317,Z.quotedblright=8221,Z.quoteleft=8216,Z.quoteleftreversed=8219,Z.quotereversed=8219,Z.quoteright=8217,Z.quoterightn=329,Z.quotesinglbase=8218,Z.quotesingle=39,Z.quotesinglemonospace=65287,Z.r=114,Z.raarmenian=1404,Z.rabengali=2480,Z.racute=341,Z.radeva=2352,Z.radical=8730,Z.radicalex=63717,Z.radoverssquare=13230,Z.radoverssquaredsquare=13231,Z.radsquare=13229,Z.rafe=1471,Z.rafehebrew=1471,Z.ragujarati=2736,Z.ragurmukhi=2608,Z.rahiragana=12425,Z.rakatakana=12521,Z.rakatakanahalfwidth=65431,Z.ralowerdiagonalbengali=2545,Z.ramiddlediagonalbengali=2544,Z.ramshorn=612,Z.ratio=8758,Z.rbopomofo=12566,Z.rcaron=345,Z.rcedilla=343,Z.rcircle=9441,Z.rcommaaccent=343,Z.rdblgrave=529,Z.rdotaccent=7769,Z.rdotbelow=7771,Z.rdotbelowmacron=7773,Z.referencemark=8251,Z.reflexsubset=8838,Z.reflexsuperset=8839,Z.registered=174,Z.registersans=63720,Z.registerserif=63194,Z.reharabic=1585,Z.reharmenian=1408,Z.rehfinalarabic=65198,Z.rehiragana=12428,Z.rekatakana=12524,Z.rekatakanahalfwidth=65434,Z.resh=1512,Z.reshdageshhebrew=64328,Z.reshhebrew=1512,Z.reversedtilde=8765,Z.reviahebrew=1431,Z.reviamugrashhebrew=1431,Z.revlogicalnot=8976,Z.rfishhook=638,Z.rfishhookreversed=639,Z.rhabengali=2525,Z.rhadeva=2397,Z.rho=961,Z.rhook=637,Z.rhookturned=635,Z.rhookturnedsuperior=693,Z.rhosymbolgreek=1009,Z.rhotichookmod=734,Z.rieulacirclekorean=12913,Z.rieulaparenkorean=12817,Z.rieulcirclekorean=12899,Z.rieulhieuhkorean=12608,Z.rieulkiyeokkorean=12602,Z.rieulkiyeoksioskorean=12649,Z.rieulkorean=12601,Z.rieulmieumkorean=12603,Z.rieulpansioskorean=12652,Z.rieulparenkorean=12803,Z.rieulphieuphkorean=12607,Z.rieulpieupkorean=12604,Z.rieulpieupsioskorean=12651,Z.rieulsioskorean=12605,Z.rieulthieuthkorean=12606,Z.rieultikeutkorean=12650,Z.rieulyeorinhieuhkorean=12653,Z.rightangle=8735,Z.righttackbelowcmb=793,Z.righttriangle=8895,Z.rihiragana=12426,Z.rikatakana=12522,Z.rikatakanahalfwidth=65432,Z.ring=730,Z.ringbelowcmb=805,Z.ringcmb=778,Z.ringhalfleft=703,Z.ringhalfleftarmenian=1369,Z.ringhalfleftbelowcmb=796,Z.ringhalfleftcentered=723,Z.ringhalfright=702,Z.ringhalfrightbelowcmb=825,Z.ringhalfrightcentered=722,Z.rinvertedbreve=531,Z.rittorusquare=13137,Z.rlinebelow=7775,Z.rlongleg=636,Z.rlonglegturned=634,Z.rmonospace=65362,Z.rohiragana=12429,Z.rokatakana=12525,Z.rokatakanahalfwidth=65435,Z.roruathai=3619,Z.rparen=9389,Z.rrabengali=2524,Z.rradeva=2353,Z.rragurmukhi=2652,Z.rreharabic=1681,Z.rrehfinalarabic=64397,Z.rrvocalicbengali=2528,Z.rrvocalicdeva=2400,Z.rrvocalicgujarati=2784,Z.rrvocalicvowelsignbengali=2500,Z.rrvocalicvowelsigndeva=2372,Z.rrvocalicvowelsigngujarati=2756,Z.rsuperior=63217,Z.rtblock=9616,Z.rturned=633,Z.rturnedsuperior=692,Z.ruhiragana=12427,Z.rukatakana=12523,Z.rukatakanahalfwidth=65433,Z.rupeemarkbengali=2546,Z.rupeesignbengali=2547,Z.rupiah=63197,Z.ruthai=3620,Z.rvocalicbengali=2443,Z.rvocalicdeva=2315,Z.rvocalicgujarati=2699,Z.rvocalicvowelsignbengali=2499,Z.rvocalicvowelsigndeva=2371,Z.rvocalicvowelsigngujarati=2755,Z.s=115,Z.sabengali=2488,Z.sacute=347,Z.sacutedotaccent=7781,Z.sadarabic=1589,Z.sadeva=2360,Z.sadfinalarabic=65210,Z.sadinitialarabic=65211,Z.sadmedialarabic=65212,Z.sagujarati=2744,Z.sagurmukhi=2616,Z.sahiragana=12373,Z.sakatakana=12469,Z.sakatakanahalfwidth=65403,Z.sallallahoualayhewasallamarabic=65018,Z.samekh=1505,Z.samekhdagesh=64321,Z.samekhdageshhebrew=64321,Z.samekhhebrew=1505,Z.saraaathai=3634,Z.saraaethai=3649,Z.saraaimaimalaithai=3652,Z.saraaimaimuanthai=3651,Z.saraamthai=3635,Z.saraathai=3632,Z.saraethai=3648,Z.saraiileftthai=63622,Z.saraiithai=3637,Z.saraileftthai=63621,Z.saraithai=3636,Z.saraothai=3650,Z.saraueeleftthai=63624,Z.saraueethai=3639,Z.saraueleftthai=63623,Z.sarauethai=3638,Z.sarauthai=3640,Z.sarauuthai=3641,Z.sbopomofo=12569,Z.scaron=353,Z.scarondotaccent=7783,Z.scedilla=351,Z.schwa=601,Z.schwacyrillic=1241,Z.schwadieresiscyrillic=1243,Z.schwahook=602,Z.scircle=9442,Z.scircumflex=349,Z.scommaaccent=537,Z.sdotaccent=7777,Z.sdotbelow=7779,Z.sdotbelowdotaccent=7785,Z.seagullbelowcmb=828,Z.second=8243,Z.secondtonechinese=714,Z.section=167,Z.seenarabic=1587,Z.seenfinalarabic=65202,Z.seeninitialarabic=65203,Z.seenmedialarabic=65204,Z.segol=1462,Z.segol13=1462,Z.segol1f=1462,Z.segol2c=1462,Z.segolhebrew=1462,Z.segolnarrowhebrew=1462,Z.segolquarterhebrew=1462,Z.segoltahebrew=1426,Z.segolwidehebrew=1462,Z.seharmenian=1405,Z.sehiragana=12379,Z.sekatakana=12475,Z.sekatakanahalfwidth=65406,Z.semicolon=59,Z.semicolonarabic=1563,Z.semicolonmonospace=65307,Z.semicolonsmall=65108,Z.semivoicedmarkkana=12444,Z.semivoicedmarkkanahalfwidth=65439,Z.sentisquare=13090,Z.sentosquare=13091,Z.seven=55,Z.sevenarabic=1639,Z.sevenbengali=2541,Z.sevencircle=9318,Z.sevencircleinversesansserif=10128,Z.sevendeva=2413,Z.seveneighths=8542,Z.sevengujarati=2797,Z.sevengurmukhi=2669,Z.sevenhackarabic=1639,Z.sevenhangzhou=12327,Z.sevenideographicparen=12838,Z.seveninferior=8327,Z.sevenmonospace=65303,Z.sevenoldstyle=63287,Z.sevenparen=9338,Z.sevenperiod=9358,Z.sevenpersian=1783,Z.sevenroman=8566,Z.sevensuperior=8311,Z.seventeencircle=9328,Z.seventeenparen=9348,Z.seventeenperiod=9368,Z.seventhai=3671,Z.sfthyphen=173,Z.shaarmenian=1399,Z.shabengali=2486,Z.shacyrillic=1096,Z.shaddaarabic=1617,Z.shaddadammaarabic=64609,Z.shaddadammatanarabic=64606,Z.shaddafathaarabic=64608,Z.shaddakasraarabic=64610,Z.shaddakasratanarabic=64607,Z.shade=9618,Z.shadedark=9619,Z.shadelight=9617,Z.shademedium=9618,Z.shadeva=2358,Z.shagujarati=2742,Z.shagurmukhi=2614,Z.shalshelethebrew=1427,Z.shbopomofo=12565,Z.shchacyrillic=1097,Z.sheenarabic=1588,Z.sheenfinalarabic=65206,Z.sheeninitialarabic=65207,Z.sheenmedialarabic=65208,Z.sheicoptic=995,Z.sheqel=8362,Z.sheqelhebrew=8362,Z.sheva=1456,Z.sheva115=1456,Z.sheva15=1456,Z.sheva22=1456,Z.sheva2e=1456,Z.shevahebrew=1456,Z.shevanarrowhebrew=1456,Z.shevaquarterhebrew=1456,Z.shevawidehebrew=1456,Z.shhacyrillic=1211,Z.shimacoptic=1005,Z.shin=1513,Z.shindagesh=64329,Z.shindageshhebrew=64329,Z.shindageshshindot=64300,Z.shindageshshindothebrew=64300,Z.shindageshsindot=64301,Z.shindageshsindothebrew=64301,Z.shindothebrew=1473,Z.shinhebrew=1513,Z.shinshindot=64298,Z.shinshindothebrew=64298,Z.shinsindot=64299,Z.shinsindothebrew=64299,Z.shook=642,Z.sigma=963,Z.sigma1=962,Z.sigmafinal=962,Z.sigmalunatesymbolgreek=1010,Z.sihiragana=12375,Z.sikatakana=12471,Z.sikatakanahalfwidth=65404,Z.siluqhebrew=1469,Z.siluqlefthebrew=1469,Z.similar=8764,Z.sindothebrew=1474,Z.siosacirclekorean=12916,Z.siosaparenkorean=12820,Z.sioscieuckorean=12670,Z.sioscirclekorean=12902,Z.sioskiyeokkorean=12666,Z.sioskorean=12613,Z.siosnieunkorean=12667,Z.siosparenkorean=12806,Z.siospieupkorean=12669,Z.siostikeutkorean=12668,Z.six=54,Z.sixarabic=1638,Z.sixbengali=2540,Z.sixcircle=9317,Z.sixcircleinversesansserif=10127,Z.sixdeva=2412,Z.sixgujarati=2796,Z.sixgurmukhi=2668,Z.sixhackarabic=1638,Z.sixhangzhou=12326,Z.sixideographicparen=12837,Z.sixinferior=8326,Z.sixmonospace=65302,Z.sixoldstyle=63286,Z.sixparen=9337,Z.sixperiod=9357,Z.sixpersian=1782,Z.sixroman=8565,Z.sixsuperior=8310,Z.sixteencircle=9327,Z.sixteencurrencydenominatorbengali=2553,Z.sixteenparen=9347,Z.sixteenperiod=9367,Z.sixthai=3670,Z.slash=47,Z.slashmonospace=65295,Z.slong=383,Z.slongdotaccent=7835,Z.smileface=9786,Z.smonospace=65363,Z.sofpasuqhebrew=1475,Z.softhyphen=173,Z.softsigncyrillic=1100,Z.sohiragana=12381,Z.sokatakana=12477,Z.sokatakanahalfwidth=65407,Z.soliduslongoverlaycmb=824,Z.solidusshortoverlaycmb=823,Z.sorusithai=3625,Z.sosalathai=3624,Z.sosothai=3595,Z.sosuathai=3626,Z.space=32,Z.spacehackarabic=32,Z.spade=9824,Z.spadesuitblack=9824,Z.spadesuitwhite=9828,Z.sparen=9390,Z.squarebelowcmb=827,Z.squarecc=13252,Z.squarecm=13213,Z.squarediagonalcrosshatchfill=9641,Z.squarehorizontalfill=9636,Z.squarekg=13199,Z.squarekm=13214,Z.squarekmcapital=13262,Z.squareln=13265,Z.squarelog=13266,Z.squaremg=13198,Z.squaremil=13269,Z.squaremm=13212,Z.squaremsquared=13217,Z.squareorthogonalcrosshatchfill=9638,Z.squareupperlefttolowerrightfill=9639,Z.squareupperrighttolowerleftfill=9640,Z.squareverticalfill=9637,Z.squarewhitewithsmallblack=9635,Z.srsquare=13275,Z.ssabengali=2487,Z.ssadeva=2359,Z.ssagujarati=2743,Z.ssangcieuckorean=12617,Z.ssanghieuhkorean=12677,Z.ssangieungkorean=12672,Z.ssangkiyeokkorean=12594,Z.ssangnieunkorean=12645,Z.ssangpieupkorean=12611,Z.ssangsioskorean=12614,Z.ssangtikeutkorean=12600,Z.ssuperior=63218,Z.sterling=163,Z.sterlingmonospace=65505,Z.strokelongoverlaycmb=822,Z.strokeshortoverlaycmb=821,Z.subset=8834,Z.subsetnotequal=8842,Z.subsetorequal=8838,Z.succeeds=8827,Z.suchthat=8715,Z.suhiragana=12377,Z.sukatakana=12473,Z.sukatakanahalfwidth=65405,Z.sukunarabic=1618,Z.summation=8721,Z.sun=9788,Z.superset=8835,Z.supersetnotequal=8843,Z.supersetorequal=8839,Z.svsquare=13276,Z.syouwaerasquare=13180,Z.t=116,Z.tabengali=2468,Z.tackdown=8868,Z.tackleft=8867,Z.tadeva=2340,Z.tagujarati=2724,Z.tagurmukhi=2596,Z.taharabic=1591,Z.tahfinalarabic=65218,Z.tahinitialarabic=65219,Z.tahiragana=12383,Z.tahmedialarabic=65220,Z.taisyouerasquare=13181,Z.takatakana=12479,Z.takatakanahalfwidth=65408,Z.tatweelarabic=1600,Z.tau=964,Z.tav=1514,Z.tavdages=64330,Z.tavdagesh=64330,Z.tavdageshhebrew=64330,Z.tavhebrew=1514,Z.tbar=359,Z.tbopomofo=12554,Z.tcaron=357,Z.tccurl=680,Z.tcedilla=355,Z.tcheharabic=1670,Z.tchehfinalarabic=64379,Z.tchehinitialarabic=64380,Z.tchehmedialarabic=64381,Z.tcircle=9443,Z.tcircumflexbelow=7793,Z.tcommaaccent=355,Z.tdieresis=7831,Z.tdotaccent=7787,Z.tdotbelow=7789,Z.tecyrillic=1090,Z.tedescendercyrillic=1197,Z.teharabic=1578,Z.tehfinalarabic=65174,Z.tehhahinitialarabic=64674,Z.tehhahisolatedarabic=64524,Z.tehinitialarabic=65175,Z.tehiragana=12390,Z.tehjeeminitialarabic=64673,Z.tehjeemisolatedarabic=64523,Z.tehmarbutaarabic=1577,Z.tehmarbutafinalarabic=65172,Z.tehmedialarabic=65176,Z.tehmeeminitialarabic=64676,Z.tehmeemisolatedarabic=64526,Z.tehnoonfinalarabic=64627,Z.tekatakana=12486,Z.tekatakanahalfwidth=65411,Z.telephone=8481,Z.telephoneblack=9742,Z.telishagedolahebrew=1440,Z.telishaqetanahebrew=1449,Z.tencircle=9321,Z.tenideographicparen=12841,Z.tenparen=9341,Z.tenperiod=9361,Z.tenroman=8569,Z.tesh=679,Z.tet=1496,Z.tetdagesh=64312,Z.tetdageshhebrew=64312,Z.tethebrew=1496,Z.tetsecyrillic=1205,Z.tevirhebrew=1435,Z.tevirlefthebrew=1435,Z.thabengali=2469,Z.thadeva=2341,Z.thagujarati=2725,Z.thagurmukhi=2597,Z.thalarabic=1584,Z.thalfinalarabic=65196,Z.thanthakhatlowleftthai=63640,Z.thanthakhatlowrightthai=63639,Z.thanthakhatthai=3660,Z.thanthakhatupperleftthai=63638,Z.theharabic=1579,Z.thehfinalarabic=65178,Z.thehinitialarabic=65179,Z.thehmedialarabic=65180,Z.thereexists=8707,Z.therefore=8756,Z.theta=952,Z.theta1=977,Z.thetasymbolgreek=977,Z.thieuthacirclekorean=12921,Z.thieuthaparenkorean=12825,Z.thieuthcirclekorean=12907,Z.thieuthkorean=12620,Z.thieuthparenkorean=12811,Z.thirteencircle=9324,Z.thirteenparen=9344,Z.thirteenperiod=9364,Z.thonangmonthothai=3601,Z.thook=429,Z.thophuthaothai=3602,Z.thorn=254,Z.thothahanthai=3607,Z.thothanthai=3600,Z.thothongthai=3608,Z.thothungthai=3606,Z.thousandcyrillic=1154,Z.thousandsseparatorarabic=1644,Z.thousandsseparatorpersian=1644,Z.three=51,Z.threearabic=1635,Z.threebengali=2537,Z.threecircle=9314,Z.threecircleinversesansserif=10124,Z.threedeva=2409,Z.threeeighths=8540,Z.threegujarati=2793,Z.threegurmukhi=2665,Z.threehackarabic=1635,Z.threehangzhou=12323,Z.threeideographicparen=12834,Z.threeinferior=8323,Z.threemonospace=65299,Z.threenumeratorbengali=2550,Z.threeoldstyle=63283,Z.threeparen=9334,Z.threeperiod=9354,Z.threepersian=1779,Z.threequarters=190,Z.threequartersemdash=63198,Z.threeroman=8562,Z.threesuperior=179,Z.threethai=3667,Z.thzsquare=13204,Z.tihiragana=12385,Z.tikatakana=12481,Z.tikatakanahalfwidth=65409,Z.tikeutacirclekorean=12912,Z.tikeutaparenkorean=12816,Z.tikeutcirclekorean=12898,Z.tikeutkorean=12599,Z.tikeutparenkorean=12802,Z.tilde=732,Z.tildebelowcmb=816,Z.tildecmb=771,Z.tildecomb=771,Z.tildedoublecmb=864,Z.tildeoperator=8764,Z.tildeoverlaycmb=820,Z.tildeverticalcmb=830,Z.timescircle=8855,Z.tipehahebrew=1430,Z.tipehalefthebrew=1430,Z.tippigurmukhi=2672,Z.titlocyrilliccmb=1155,Z.tiwnarmenian=1407,Z.tlinebelow=7791,Z.tmonospace=65364,Z.toarmenian=1385,Z.tohiragana=12392,Z.tokatakana=12488,Z.tokatakanahalfwidth=65412,Z.tonebarextrahighmod=741,Z.tonebarextralowmod=745,Z.tonebarhighmod=742,Z.tonebarlowmod=744,Z.tonebarmidmod=743,Z.tonefive=445,Z.tonesix=389,Z.tonetwo=424,Z.tonos=900,Z.tonsquare=13095,Z.topatakthai=3599,Z.tortoiseshellbracketleft=12308,Z.tortoiseshellbracketleftsmall=65117,Z.tortoiseshellbracketleftvertical=65081,Z.tortoiseshellbracketright=12309,Z.tortoiseshellbracketrightsmall=65118,Z.tortoiseshellbracketrightvertical=65082,Z.totaothai=3605,Z.tpalatalhook=427,Z.tparen=9391,Z.trademark=8482,Z.trademarksans=63722,Z.trademarkserif=63195,Z.tretroflexhook=648,Z.triagdn=9660,Z.triaglf=9668,Z.triagrt=9658,Z.triagup=9650,Z.ts=678,Z.tsadi=1510,Z.tsadidagesh=64326,Z.tsadidageshhebrew=64326,Z.tsadihebrew=1510,Z.tsecyrillic=1094,Z.tsere=1461,Z.tsere12=1461,Z.tsere1e=1461,Z.tsere2b=1461,Z.tserehebrew=1461,Z.tserenarrowhebrew=1461,Z.tserequarterhebrew=1461,Z.tserewidehebrew=1461,Z.tshecyrillic=1115,Z.tsuperior=63219,Z.ttabengali=2463,Z.ttadeva=2335,Z.ttagujarati=2719,Z.ttagurmukhi=2591,Z.tteharabic=1657,Z.ttehfinalarabic=64359,Z.ttehinitialarabic=64360,Z.ttehmedialarabic=64361,Z.tthabengali=2464,Z.tthadeva=2336,Z.tthagujarati=2720,Z.tthagurmukhi=2592,Z.tturned=647,Z.tuhiragana=12388,Z.tukatakana=12484,Z.tukatakanahalfwidth=65410,Z.tusmallhiragana=12387,Z.tusmallkatakana=12483,Z.tusmallkatakanahalfwidth=65391,Z.twelvecircle=9323,Z.twelveparen=9343,Z.twelveperiod=9363,Z.twelveroman=8571,Z.twentycircle=9331,Z.twentyhangzhou=21316,Z.twentyparen=9351,Z.twentyperiod=9371,Z.two=50,Z.twoarabic=1634,Z.twobengali=2536,Z.twocircle=9313,Z.twocircleinversesansserif=10123,Z.twodeva=2408,Z.twodotenleader=8229,Z.twodotleader=8229,Z.twodotleadervertical=65072,Z.twogujarati=2792,Z.twogurmukhi=2664,Z.twohackarabic=1634,Z.twohangzhou=12322,Z.twoideographicparen=12833,Z.twoinferior=8322,Z.twomonospace=65298,Z.twonumeratorbengali=2549,Z.twooldstyle=63282,Z.twoparen=9333,Z.twoperiod=9353,Z.twopersian=1778,Z.tworoman=8561,Z.twostroke=443,Z.twosuperior=178,Z.twothai=3666,Z.twothirds=8532,Z.u=117,Z.uacute=250,Z.ubar=649,Z.ubengali=2441,Z.ubopomofo=12584,Z.ubreve=365,Z.ucaron=468,Z.ucircle=9444,Z.ucircumflex=251,Z.ucircumflexbelow=7799,Z.ucyrillic=1091,Z.udattadeva=2385,Z.udblacute=369,Z.udblgrave=533,Z.udeva=2313,Z.udieresis=252,Z.udieresisacute=472,Z.udieresisbelow=7795,Z.udieresiscaron=474,Z.udieresiscyrillic=1265,Z.udieresisgrave=476,Z.udieresismacron=470,Z.udotbelow=7909,Z.ugrave=249,Z.ugujarati=2697,Z.ugurmukhi=2569,Z.uhiragana=12358,Z.uhookabove=7911,Z.uhorn=432,Z.uhornacute=7913,Z.uhorndotbelow=7921,Z.uhorngrave=7915,Z.uhornhookabove=7917,Z.uhorntilde=7919,Z.uhungarumlaut=369,Z.uhungarumlautcyrillic=1267,Z.uinvertedbreve=535,Z.ukatakana=12454,Z.ukatakanahalfwidth=65395,Z.ukcyrillic=1145,Z.ukorean=12636,Z.umacron=363,Z.umacroncyrillic=1263,Z.umacrondieresis=7803,Z.umatragurmukhi=2625,Z.umonospace=65365,Z.underscore=95,Z.underscoredbl=8215,Z.underscoremonospace=65343,Z.underscorevertical=65075,Z.underscorewavy=65103,Z.union=8746,Z.universal=8704,Z.uogonek=371,Z.uparen=9392,Z.upblock=9600,Z.upperdothebrew=1476,Z.upsilon=965,Z.upsilondieresis=971,Z.upsilondieresistonos=944,Z.upsilonlatin=650,Z.upsilontonos=973,Z.uptackbelowcmb=797,Z.uptackmod=724,Z.uragurmukhi=2675,Z.uring=367,Z.ushortcyrillic=1118,Z.usmallhiragana=12357,Z.usmallkatakana=12453,Z.usmallkatakanahalfwidth=65385,Z.ustraightcyrillic=1199,Z.ustraightstrokecyrillic=1201,Z.utilde=361,Z.utildeacute=7801,Z.utildebelow=7797,Z.uubengali=2442,Z.uudeva=2314,Z.uugujarati=2698,Z.uugurmukhi=2570,Z.uumatragurmukhi=2626,Z.uuvowelsignbengali=2498,Z.uuvowelsigndeva=2370,Z.uuvowelsigngujarati=2754,Z.uvowelsignbengali=2497,Z.uvowelsigndeva=2369,Z.uvowelsigngujarati=2753,Z.v=118,Z.vadeva=2357,Z.vagujarati=2741,Z.vagurmukhi=2613,Z.vakatakana=12535,Z.vav=1493,Z.vavdagesh=64309,Z.vavdagesh65=64309,Z.vavdageshhebrew=64309,Z.vavhebrew=1493,Z.vavholam=64331,Z.vavholamhebrew=64331,Z.vavvavhebrew=1520,Z.vavyodhebrew=1521,Z.vcircle=9445,Z.vdotbelow=7807,Z.vecyrillic=1074,Z.veharabic=1700,Z.vehfinalarabic=64363,Z.vehinitialarabic=64364,Z.vehmedialarabic=64365,Z.vekatakana=12537,Z.venus=9792,Z.verticalbar=124,Z.verticallineabovecmb=781,Z.verticallinebelowcmb=809,Z.verticallinelowmod=716,Z.verticallinemod=712,Z.vewarmenian=1406,Z.vhook=651,Z.vikatakana=12536,Z.viramabengali=2509,Z.viramadeva=2381,Z.viramagujarati=2765,Z.visargabengali=2435,Z.visargadeva=2307,Z.visargagujarati=2691,Z.vmonospace=65366,Z.voarmenian=1400,Z.voicediterationhiragana=12446,Z.voicediterationkatakana=12542,Z.voicedmarkkana=12443,Z.voicedmarkkanahalfwidth=65438,Z.vokatakana=12538,Z.vparen=9393,Z.vtilde=7805,Z.vturned=652,Z.vuhiragana=12436,Z.vukatakana=12532,Z.w=119,Z.wacute=7811,Z.waekorean=12633,Z.wahiragana=12431,Z.wakatakana=12527,Z.wakatakanahalfwidth=65436,Z.wakorean=12632,Z.wasmallhiragana=12430,Z.wasmallkatakana=12526,Z.wattosquare=13143,Z.wavedash=12316,Z.wavyunderscorevertical=65076,Z.wawarabic=1608,Z.wawfinalarabic=65262,Z.wawhamzaabovearabic=1572,Z.wawhamzaabovefinalarabic=65158,Z.wbsquare=13277,Z.wcircle=9446,Z.wcircumflex=373,Z.wdieresis=7813,Z.wdotaccent=7815,Z.wdotbelow=7817,Z.wehiragana=12433,Z.weierstrass=8472,Z.wekatakana=12529,Z.wekorean=12638,Z.weokorean=12637,Z.wgrave=7809,Z.whitebullet=9702,Z.whitecircle=9675,Z.whitecircleinverse=9689,Z.whitecornerbracketleft=12302,Z.whitecornerbracketleftvertical=65091,Z.whitecornerbracketright=12303,Z.whitecornerbracketrightvertical=65092,Z.whitediamond=9671,Z.whitediamondcontainingblacksmalldiamond=9672,Z.whitedownpointingsmalltriangle=9663,Z.whitedownpointingtriangle=9661,Z.whiteleftpointingsmalltriangle=9667,Z.whiteleftpointingtriangle=9665,Z.whitelenticularbracketleft=12310,Z.whitelenticularbracketright=12311,Z.whiterightpointingsmalltriangle=9657,Z.whiterightpointingtriangle=9655,Z.whitesmallsquare=9643,Z.whitesmilingface=9786,Z.whitesquare=9633,Z.whitestar=9734,Z.whitetelephone=9743,Z.whitetortoiseshellbracketleft=12312,Z.whitetortoiseshellbracketright=12313,Z.whiteuppointingsmalltriangle=9653,Z.whiteuppointingtriangle=9651,Z.wihiragana=12432,Z.wikatakana=12528,Z.wikorean=12639,Z.wmonospace=65367,Z.wohiragana=12434,Z.wokatakana=12530,Z.wokatakanahalfwidth=65382,Z.won=8361,Z.wonmonospace=65510,Z.wowaenthai=3623,Z.wparen=9394,Z.wring=7832,Z.wsuperior=695,Z.wturned=653,Z.wynn=447,Z.x=120,Z.xabovecmb=829,Z.xbopomofo=12562,Z.xcircle=9447,Z.xdieresis=7821,Z.xdotaccent=7819,Z.xeharmenian=1389,Z.xi=958,Z.xmonospace=65368,Z.xparen=9395,Z.xsuperior=739,Z.y=121,Z.yaadosquare=13134,Z.yabengali=2479,Z.yacute=253,Z.yadeva=2351,Z.yaekorean=12626,Z.yagujarati=2735,Z.yagurmukhi=2607,Z.yahiragana=12420,Z.yakatakana=12516,Z.yakatakanahalfwidth=65428,Z.yakorean=12625,Z.yamakkanthai=3662,Z.yasmallhiragana=12419,Z.yasmallkatakana=12515,Z.yasmallkatakanahalfwidth=65388,Z.yatcyrillic=1123,Z.ycircle=9448,Z.ycircumflex=375,Z.ydieresis=255,Z.ydotaccent=7823,Z.ydotbelow=7925,Z.yeharabic=1610,Z.yehbarreearabic=1746,Z.yehbarreefinalarabic=64431,Z.yehfinalarabic=65266,Z.yehhamzaabovearabic=1574,Z.yehhamzaabovefinalarabic=65162,Z.yehhamzaaboveinitialarabic=65163,Z.yehhamzaabovemedialarabic=65164,Z.yehinitialarabic=65267,Z.yehmedialarabic=65268,Z.yehmeeminitialarabic=64733,Z.yehmeemisolatedarabic=64600,Z.yehnoonfinalarabic=64660,Z.yehthreedotsbelowarabic=1745,Z.yekorean=12630,Z.yen=165,Z.yenmonospace=65509,Z.yeokorean=12629,Z.yeorinhieuhkorean=12678,Z.yerahbenyomohebrew=1450,Z.yerahbenyomolefthebrew=1450,Z.yericyrillic=1099,Z.yerudieresiscyrillic=1273,Z.yesieungkorean=12673,Z.yesieungpansioskorean=12675,Z.yesieungsioskorean=12674,Z.yetivhebrew=1434,Z.ygrave=7923,Z.yhook=436,Z.yhookabove=7927,Z.yiarmenian=1397,Z.yicyrillic=1111,Z.yikorean=12642,Z.yinyang=9775,Z.yiwnarmenian=1410,Z.ymonospace=65369,Z.yod=1497,Z.yoddagesh=64313,Z.yoddageshhebrew=64313,Z.yodhebrew=1497,Z.yodyodhebrew=1522,Z.yodyodpatahhebrew=64287,Z.yohiragana=12424,Z.yoikorean=12681,Z.yokatakana=12520,Z.yokatakanahalfwidth=65430,Z.yokorean=12635,Z.yosmallhiragana=12423,Z.yosmallkatakana=12519,Z.yosmallkatakanahalfwidth=65390,Z.yotgreek=1011,Z.yoyaekorean=12680,Z.yoyakorean=12679,Z.yoyakthai=3618,Z.yoyingthai=3597,Z.yparen=9396,Z.ypogegrammeni=890,Z.ypogegrammenigreekcmb=837,Z.yr=422,Z.yring=7833,Z.ysuperior=696,Z.ytilde=7929,Z.yturned=654,Z.yuhiragana=12422,Z.yuikorean=12684,Z.yukatakana=12518,Z.yukatakanahalfwidth=65429,Z.yukorean=12640,Z.yusbigcyrillic=1131,Z.yusbigiotifiedcyrillic=1133,Z.yuslittlecyrillic=1127,Z.yuslittleiotifiedcyrillic=1129,Z.yusmallhiragana=12421,Z.yusmallkatakana=12517,Z.yusmallkatakanahalfwidth=65389,Z.yuyekorean=12683,Z.yuyeokorean=12682,Z.yyabengali=2527,Z.yyadeva=2399,Z.z=122,Z.zaarmenian=1382,Z.zacute=378,Z.zadeva=2395,Z.zagurmukhi=2651,Z.zaharabic=1592,Z.zahfinalarabic=65222,Z.zahinitialarabic=65223,Z.zahiragana=12374,Z.zahmedialarabic=65224,Z.zainarabic=1586,Z.zainfinalarabic=65200,Z.zakatakana=12470,Z.zaqefgadolhebrew=1429,Z.zaqefqatanhebrew=1428,Z.zarqahebrew=1432,Z.zayin=1494,Z.zayindagesh=64310,Z.zayindageshhebrew=64310,Z.zayinhebrew=1494,Z.zbopomofo=12567,Z.zcaron=382,Z.zcircle=9449,Z.zcircumflex=7825,Z.zcurl=657,Z.zdot=380,Z.zdotaccent=380,Z.zdotbelow=7827,Z.zecyrillic=1079,Z.zedescendercyrillic=1177,Z.zedieresiscyrillic=1247,Z.zehiragana=12380,Z.zekatakana=12476,Z.zero=48,Z.zeroarabic=1632,Z.zerobengali=2534,Z.zerodeva=2406,Z.zerogujarati=2790,Z.zerogurmukhi=2662,Z.zerohackarabic=1632,Z.zeroinferior=8320,Z.zeromonospace=65296,Z.zerooldstyle=63280,Z.zeropersian=1776,Z.zerosuperior=8304,Z.zerothai=3664,Z.zerowidthjoiner=65279,Z.zerowidthnonjoiner=8204,Z.zerowidthspace=8203,Z.zeta=950,Z.zhbopomofo=12563,Z.zhearmenian=1386,Z.zhebrevecyrillic=1218,Z.zhecyrillic=1078,Z.zhedescendercyrillic=1175,Z.zhedieresiscyrillic=1245,Z.zihiragana=12376,Z.zikatakana=12472,Z.zinorhebrew=1454,Z.zlinebelow=7829,Z.zmonospace=65370,Z.zohiragana=12382,Z.zokatakana=12478,Z.zparen=9397,Z.zretroflexhook=656,Z.zstroke=438,Z.zuhiragana=12378,Z.zukatakana=12474,Z[".notdef"]=0,Z.angbracketleftbig=9001,Z.angbracketleftBig=9001,Z.angbracketleftbigg=9001,Z.angbracketleftBigg=9001,Z.angbracketrightBig=9002,Z.angbracketrightbig=9002,Z.angbracketrightBigg=9002,Z.angbracketrightbigg=9002,Z.arrowhookleft=8618,Z.arrowhookright=8617,Z.arrowlefttophalf=8636,Z.arrowleftbothalf=8637,Z.arrownortheast=8599,Z.arrownorthwest=8598,Z.arrowrighttophalf=8640,Z.arrowrightbothalf=8641,Z.arrowsoutheast=8600,Z.arrowsouthwest=8601,Z.backslashbig=8726,Z.backslashBig=8726,Z.backslashBigg=8726,Z.backslashbigg=8726,Z.bardbl=8214,Z.bracehtipdownleft=65079,Z.bracehtipdownright=65079,Z.bracehtipupleft=65080,Z.bracehtipupright=65080,Z.braceleftBig=123,Z.braceleftbig=123,Z.braceleftbigg=123,Z.braceleftBigg=123,Z.bracerightBig=125,Z.bracerightbig=125,Z.bracerightbigg=125,Z.bracerightBigg=125,Z.bracketleftbig=91,Z.bracketleftBig=91,Z.bracketleftbigg=91,Z.bracketleftBigg=91,Z.bracketrightBig=93,Z.bracketrightbig=93,Z.bracketrightbigg=93,Z.bracketrightBigg=93,Z.ceilingleftbig=8968,Z.ceilingleftBig=8968,Z.ceilingleftBigg=8968,Z.ceilingleftbigg=8968,Z.ceilingrightbig=8969,Z.ceilingrightBig=8969,Z.ceilingrightbigg=8969,Z.ceilingrightBigg=8969,Z.circledotdisplay=8857,Z.circledottext=8857,Z.circlemultiplydisplay=8855,Z.circlemultiplytext=8855,Z.circleplusdisplay=8853,Z.circleplustext=8853,Z.contintegraldisplay=8750,Z.contintegraltext=8750,Z.coproductdisplay=8720,Z.coproducttext=8720,Z.floorleftBig=8970,Z.floorleftbig=8970,Z.floorleftbigg=8970,Z.floorleftBigg=8970,Z.floorrightbig=8971,Z.floorrightBig=8971,Z.floorrightBigg=8971,Z.floorrightbigg=8971,Z.hatwide=770,Z.hatwider=770,Z.hatwidest=770,Z.intercal=7488,Z.integraldisplay=8747,Z.integraltext=8747,Z.intersectiondisplay=8898,Z.intersectiontext=8898,Z.logicalanddisplay=8743,Z.logicalandtext=8743,Z.logicalordisplay=8744,Z.logicalortext=8744,Z.parenleftBig=40,Z.parenleftbig=40,Z.parenleftBigg=40,Z.parenleftbigg=40,Z.parenrightBig=41,Z.parenrightbig=41,Z.parenrightBigg=41,Z.parenrightbigg=41,Z.prime=8242,Z.productdisplay=8719,Z.producttext=8719,Z.radicalbig=8730,Z.radicalBig=8730,Z.radicalBigg=8730,Z.radicalbigg=8730,Z.radicalbt=8730,Z.radicaltp=8730,Z.radicalvertex=8730,Z.slashbig=47,Z.slashBig=47,Z.slashBigg=47,Z.slashbigg=47,Z.summationdisplay=8721,Z.summationtext=8721,Z.tildewide=732,Z.tildewider=732,Z.tildewidest=732,Z.uniondisplay=8899,Z.unionmultidisplay=8846,Z.unionmultitext=8846,Z.unionsqdisplay=8852,Z.unionsqtext=8852,Z.uniontext=8899,Z.vextenddouble=8741,Z.vextendsingle=8739}),OI=G8(function(Z){Z.space=32,Z.a1=9985,Z.a2=9986,Z.a202=9987,Z.a3=9988,Z.a4=9742,Z.a5=9990,Z.a119=9991,Z.a118=9992,Z.a117=9993,Z.a11=9755,Z.a12=9758,Z.a13=9996,Z.a14=9997,Z.a15=9998,Z.a16=9999,Z.a105=1e4,Z.a17=10001,Z.a18=10002,Z.a19=10003,Z.a20=10004,Z.a21=10005,Z.a22=10006,Z.a23=10007,Z.a24=10008,Z.a25=10009,Z.a26=10010,Z.a27=10011,Z.a28=10012,Z.a6=10013,Z.a7=10014,Z.a8=10015,Z.a9=10016,Z.a10=10017,Z.a29=10018,Z.a30=10019,Z.a31=10020,Z.a32=10021,Z.a33=10022,Z.a34=10023,Z.a35=9733,Z.a36=10025,Z.a37=10026,Z.a38=10027,Z.a39=10028,Z.a40=10029,Z.a41=10030,Z.a42=10031,Z.a43=10032,Z.a44=10033,Z.a45=10034,Z.a46=10035,Z.a47=10036,Z.a48=10037,Z.a49=10038,Z.a50=10039,Z.a51=10040,Z.a52=10041,Z.a53=10042,Z.a54=10043,Z.a55=10044,Z.a56=10045,Z.a57=10046,Z.a58=10047,Z.a59=10048,Z.a60=10049,Z.a61=10050,Z.a62=10051,Z.a63=10052,Z.a64=10053,Z.a65=10054,Z.a66=10055,Z.a67=10056,Z.a68=10057,Z.a69=10058,Z.a70=10059,Z.a71=9679,Z.a72=10061,Z.a73=9632,Z.a74=10063,Z.a203=10064,Z.a75=10065,Z.a204=10066,Z.a76=9650,Z.a77=9660,Z.a78=9670,Z.a79=10070,Z.a81=9687,Z.a82=10072,Z.a83=10073,Z.a84=10074,Z.a97=10075,Z.a98=10076,Z.a99=10077,Z.a100=10078,Z.a101=10081,Z.a102=10082,Z.a103=10083,Z.a104=10084,Z.a106=10085,Z.a107=10086,Z.a108=10087,Z.a112=9827,Z.a111=9830,Z.a110=9829,Z.a109=9824,Z.a120=9312,Z.a121=9313,Z.a122=9314,Z.a123=9315,Z.a124=9316,Z.a125=9317,Z.a126=9318,Z.a127=9319,Z.a128=9320,Z.a129=9321,Z.a130=10102,Z.a131=10103,Z.a132=10104,Z.a133=10105,Z.a134=10106,Z.a135=10107,Z.a136=10108,Z.a137=10109,Z.a138=10110,Z.a139=10111,Z.a140=10112,Z.a141=10113,Z.a142=10114,Z.a143=10115,Z.a144=10116,Z.a145=10117,Z.a146=10118,Z.a147=10119,Z.a148=10120,Z.a149=10121,Z.a150=10122,Z.a151=10123,Z.a152=10124,Z.a153=10125,Z.a154=10126,Z.a155=10127,Z.a156=10128,Z.a157=10129,Z.a158=10130,Z.a159=10131,Z.a160=10132,Z.a161=8594,Z.a163=8596,Z.a164=8597,Z.a196=10136,Z.a165=10137,Z.a192=10138,Z.a166=10139,Z.a167=10140,Z.a168=10141,Z.a169=10142,Z.a170=10143,Z.a171=10144,Z.a172=10145,Z.a173=10146,Z.a162=10147,Z.a174=10148,Z.a175=10149,Z.a176=10150,Z.a177=10151,Z.a178=10152,Z.a179=10153,Z.a193=10154,Z.a180=10155,Z.a199=10156,Z.a181=10157,Z.a200=10158,Z.a182=10159,Z.a201=10161,Z.a183=10162,Z.a184=10163,Z.a197=10164,Z.a185=10165,Z.a194=10166,Z.a198=10167,Z.a186=10168,Z.a195=10169,Z.a187=10170,Z.a188=10171,Z.a189=10172,Z.a190=10173,Z.a191=10174,Z.a89=10088,Z.a90=10089,Z.a93=10090,Z.a94=10091,Z.a91=10092,Z.a92=10093,Z.a205=10094,Z.a85=10095,Z.a206=10096,Z.a86=10097,Z.a87=10098,Z.a88=10099,Z.a95=10100,Z.a96=10101,Z[".notdef"]=0}),yI=G8(function(Z){Z[63721]=169,Z[63193]=169,Z[63720]=174,Z[63194]=174,Z[63722]=8482,Z[63195]=8482,Z[63729]=9127,Z[63730]=9128,Z[63731]=9129,Z[63740]=9131,Z[63741]=9132,Z[63742]=9133,Z[63726]=9121,Z[63727]=9122,Z[63728]=9123,Z[63737]=9124,Z[63738]=9125,Z[63739]=9126,Z[63723]=9115,Z[63724]=9116,Z[63725]=9117,Z[63734]=9118,Z[63735]=9119,Z[63736]=9120});o9=[[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],[66000,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];DI=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),qq=new Map,BR=[".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"];wI=G8((Z)=>{Z[8211]=65074,Z[8212]=65073,Z[8229]=65072,Z[8230]=65049,Z[12289]=65041,Z[12290]=65042,Z[12296]=65087,Z[12297]=65088,Z[12298]=65085,Z[12299]=65086,Z[12300]=65089,Z[12301]=65090,Z[12302]=65091,Z[12303]=65092,Z[12304]=65083,Z[12305]=65084,Z[12308]=65081,Z[12309]=65082,Z[12310]=65047,Z[12311]=65048,Z[65103]=65076,Z[65281]=65045,Z[65288]=65077,Z[65289]=65078,Z[65292]=65040,Z[65306]=65043,Z[65307]=65044,Z[65311]=65046,Z[65339]=65095,Z[65341]=65096,Z[65343]=65075,Z[65371]=65079,Z[65373]=65080}),EI=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],uI=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],gI=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"],s2=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],s5=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],dI=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(Z,q){Z[q-2]=Z[q-2]+Z[q-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(Z,q){Z[q-2]=Z[q-2]-Z[q-1]}},{id:"div",min:2,stackDelta:-1,stackFn(Z,q){Z[q-2]=Z[q-2]/Z[q-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(Z,q){Z[q-1]=-Z[q-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(Z,q){Z[q-2]=Z[q-2]*Z[q-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];cI=[[[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"],[0.001,0,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]];S7=class S7 extends JX{static get tables(){return X1(this,"tables",this.createTables(cI))}constructor(Z){super(S7.tables,Z),this.privateDict=null}};hI=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",0.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",0.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];m7=class m7 extends JX{static get tables(){return X1(this,"tables",this.createTables(hI))}constructor(Z){super(m7.tables,Z),this.subrsIndex=null}};n9={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};O7=G8(function(Z){Z["Times-Roman"]="Times-Roman",Z.Helvetica="Helvetica",Z.Courier="Courier",Z.Symbol="Symbol",Z["Times-Bold"]="Times-Bold",Z["Helvetica-Bold"]="Helvetica-Bold",Z["Courier-Bold"]="Courier-Bold",Z.ZapfDingbats="ZapfDingbats",Z["Times-Italic"]="Times-Italic",Z["Helvetica-Oblique"]="Helvetica-Oblique",Z["Courier-Oblique"]="Courier-Oblique",Z["Times-BoldItalic"]="Times-BoldItalic",Z["Helvetica-BoldOblique"]="Helvetica-BoldOblique",Z["Courier-BoldOblique"]="Courier-BoldOblique",Z.ArialNarrow="Helvetica",Z["ArialNarrow-Bold"]="Helvetica-Bold",Z["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",Z["ArialNarrow-Italic"]="Helvetica-Oblique",Z.ArialBlack="Helvetica",Z["ArialBlack-Bold"]="Helvetica-Bold",Z["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",Z["ArialBlack-Italic"]="Helvetica-Oblique",Z["Arial-Black"]="Helvetica",Z["Arial-Black-Bold"]="Helvetica-Bold",Z["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",Z["Arial-Black-Italic"]="Helvetica-Oblique",Z.Arial="Helvetica",Z["Arial-Bold"]="Helvetica-Bold",Z["Arial-BoldItalic"]="Helvetica-BoldOblique",Z["Arial-Italic"]="Helvetica-Oblique",Z.ArialMT="Helvetica",Z["Arial-BoldItalicMT"]="Helvetica-BoldOblique",Z["Arial-BoldMT"]="Helvetica-Bold",Z["Arial-ItalicMT"]="Helvetica-Oblique",Z["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",Z["Arial-BoldMT-Bold"]="Helvetica-Bold",Z["Arial-ItalicMT-Italic"]="Helvetica-Oblique",Z.ArialUnicodeMS="Helvetica",Z["ArialUnicodeMS-Bold"]="Helvetica-Bold",Z["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",Z["ArialUnicodeMS-Italic"]="Helvetica-Oblique",Z["Courier-BoldItalic"]="Courier-BoldOblique",Z["Courier-Italic"]="Courier-Oblique",Z.CourierNew="Courier",Z["CourierNew-Bold"]="Courier-Bold",Z["CourierNew-BoldItalic"]="Courier-BoldOblique",Z["CourierNew-Italic"]="Courier-Oblique",Z["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",Z["CourierNewPS-BoldMT"]="Courier-Bold",Z["CourierNewPS-ItalicMT"]="Courier-Oblique",Z.CourierNewPSMT="Courier",Z["Helvetica-BoldItalic"]="Helvetica-BoldOblique",Z["Helvetica-Italic"]="Helvetica-Oblique",Z["HelveticaLTStd-Bold"]="Helvetica-Bold",Z["Symbol-Bold"]="Symbol",Z["Symbol-BoldItalic"]="Symbol",Z["Symbol-Italic"]="Symbol",Z.TimesNewRoman="Times-Roman",Z["TimesNewRoman-Bold"]="Times-Bold",Z["TimesNewRoman-BoldItalic"]="Times-BoldItalic",Z["TimesNewRoman-Italic"]="Times-Italic",Z.TimesNewRomanPS="Times-Roman",Z["TimesNewRomanPS-Bold"]="Times-Bold",Z["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",Z["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",Z["TimesNewRomanPS-BoldMT"]="Times-Bold",Z["TimesNewRomanPS-Italic"]="Times-Italic",Z["TimesNewRomanPS-ItalicMT"]="Times-Italic",Z.TimesNewRomanPSMT="Times-Roman",Z["TimesNewRomanPSMT-Bold"]="Times-Bold",Z["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",Z["TimesNewRomanPSMT-Italic"]="Times-Italic"}),sI=G8(function(Z){Z.Courier="FoxitFixed.pfb",Z["Courier-Bold"]="FoxitFixedBold.pfb",Z["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",Z["Courier-Oblique"]="FoxitFixedItalic.pfb",Z.Helvetica="LiberationSans-Regular.ttf",Z["Helvetica-Bold"]="LiberationSans-Bold.ttf",Z["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",Z["Helvetica-Oblique"]="LiberationSans-Italic.ttf",Z["Times-Roman"]="FoxitSerif.pfb",Z["Times-Bold"]="FoxitSerifBold.pfb",Z["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",Z["Times-Italic"]="FoxitSerifItalic.pfb",Z.Symbol="FoxitSymbol.pfb",Z.ZapfDingbats="FoxitDingbats.pfb",Z["LiberationSans-Regular"]="LiberationSans-Regular.ttf",Z["LiberationSans-Bold"]="LiberationSans-Bold.ttf",Z["LiberationSans-Italic"]="LiberationSans-Italic.ttf",Z["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}),Rq=G8(function(Z){Z.Calibri="Helvetica",Z["Calibri-Bold"]="Helvetica-Bold",Z["Calibri-BoldItalic"]="Helvetica-BoldOblique",Z["Calibri-Italic"]="Helvetica-Oblique",Z.CenturyGothic="Helvetica",Z["CenturyGothic-Bold"]="Helvetica-Bold",Z["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",Z["CenturyGothic-Italic"]="Helvetica-Oblique",Z.ComicSansMS="Comic Sans MS",Z["ComicSansMS-Bold"]="Comic Sans MS-Bold",Z["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",Z["ComicSansMS-Italic"]="Comic Sans MS-Italic",Z.GillSansMT="Helvetica",Z["GillSansMT-Bold"]="Helvetica-Bold",Z["GillSansMT-BoldItalic"]="Helvetica-BoldOblique",Z["GillSansMT-Italic"]="Helvetica-Oblique",Z.Impact="Helvetica",Z["ItcSymbol-Bold"]="Helvetica-Bold",Z["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",Z["ItcSymbol-Book"]="Helvetica",Z["ItcSymbol-BookItalic"]="Helvetica-Oblique",Z["ItcSymbol-Medium"]="Helvetica",Z["ItcSymbol-MediumItalic"]="Helvetica-Oblique",Z.LucidaConsole="Courier",Z["LucidaConsole-Bold"]="Courier-Bold",Z["LucidaConsole-BoldItalic"]="Courier-BoldOblique",Z["LucidaConsole-Italic"]="Courier-Oblique",Z["LucidaSans-Demi"]="Helvetica-Bold",Z["MS-Gothic"]="MS Gothic",Z["MS-Gothic-Bold"]="MS Gothic-Bold",Z["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",Z["MS-Gothic-Italic"]="MS Gothic-Italic",Z["MS-Mincho"]="MS Mincho",Z["MS-Mincho-Bold"]="MS Mincho-Bold",Z["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",Z["MS-Mincho-Italic"]="MS Mincho-Italic",Z["MS-PGothic"]="MS PGothic",Z["MS-PGothic-Bold"]="MS PGothic-Bold",Z["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",Z["MS-PGothic-Italic"]="MS PGothic-Italic",Z["MS-PMincho"]="MS PMincho",Z["MS-PMincho-Bold"]="MS PMincho-Bold",Z["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",Z["MS-PMincho-Italic"]="MS PMincho-Italic",Z.NuptialScript="Times-Italic",Z.SegoeUISymbol="Helvetica"}),UX=G8(function(Z){Z["Adobe Jenson"]=!0,Z["Adobe Text"]=!0,Z.Albertus=!0,Z.Aldus=!0,Z.Alexandria=!0,Z.Algerian=!0,Z["American Typewriter"]=!0,Z.Antiqua=!0,Z.Apex=!0,Z.Arno=!0,Z.Aster=!0,Z.Aurora=!0,Z.Baskerville=!0,Z.Bell=!0,Z.Bembo=!0,Z["Bembo Schoolbook"]=!0,Z.Benguiat=!0,Z["Berkeley Old Style"]=!0,Z["Bernhard Modern"]=!0,Z["Berthold City"]=!0,Z.Bodoni=!0,Z["Bauer Bodoni"]=!0,Z["Book Antiqua"]=!0,Z.Bookman=!0,Z["Bordeaux Roman"]=!0,Z["Californian FB"]=!0,Z.Calisto=!0,Z.Calvert=!0,Z.Capitals=!0,Z.Cambria=!0,Z.Cartier=!0,Z.Caslon=!0,Z.Catull=!0,Z.Centaur=!0,Z["Century Old Style"]=!0,Z["Century Schoolbook"]=!0,Z.Chaparral=!0,Z["Charis SIL"]=!0,Z.Cheltenham=!0,Z["Cholla Slab"]=!0,Z.Clarendon=!0,Z.Clearface=!0,Z.Cochin=!0,Z.Colonna=!0,Z["Computer Modern"]=!0,Z["Concrete Roman"]=!0,Z.Constantia=!0,Z["Cooper Black"]=!0,Z.Corona=!0,Z.Ecotype=!0,Z.Egyptienne=!0,Z.Elephant=!0,Z.Excelsior=!0,Z.Fairfield=!0,Z["FF Scala"]=!0,Z.Folkard=!0,Z.Footlight=!0,Z.FreeSerif=!0,Z["Friz Quadrata"]=!0,Z.Garamond=!0,Z.Gentium=!0,Z.Georgia=!0,Z.Gloucester=!0,Z["Goudy Old Style"]=!0,Z["Goudy Schoolbook"]=!0,Z["Goudy Pro Font"]=!0,Z.Granjon=!0,Z["Guardian Egyptian"]=!0,Z.Heather=!0,Z.Hercules=!0,Z["High Tower Text"]=!0,Z.Hiroshige=!0,Z["Hoefler Text"]=!0,Z["Humana Serif"]=!0,Z.Imprint=!0,Z["Ionic No. 5"]=!0,Z.Janson=!0,Z.Joanna=!0,Z.Korinna=!0,Z.Lexicon=!0,Z.LiberationSerif=!0,Z["Liberation Serif"]=!0,Z["Linux Libertine"]=!0,Z.Literaturnaya=!0,Z.Lucida=!0,Z["Lucida Bright"]=!0,Z.Melior=!0,Z.Memphis=!0,Z.Miller=!0,Z.Minion=!0,Z.Modern=!0,Z["Mona Lisa"]=!0,Z["Mrs Eaves"]=!0,Z["MS Serif"]=!0,Z["Museo Slab"]=!0,Z["New York"]=!0,Z["Nimbus Roman"]=!0,Z["NPS Rawlinson Roadway"]=!0,Z.NuptialScript=!0,Z.Palatino=!0,Z.Perpetua=!0,Z.Plantin=!0,Z["Plantin Schoolbook"]=!0,Z.Playbill=!0,Z["Poor Richard"]=!0,Z["Rawlinson Roadway"]=!0,Z.Renault=!0,Z.Requiem=!0,Z.Rockwell=!0,Z.Roman=!0,Z["Rotis Serif"]=!0,Z.Sabon=!0,Z.Scala=!0,Z.Seagull=!0,Z.Sistina=!0,Z.Souvenir=!0,Z.STIX=!0,Z["Stone Informal"]=!0,Z["Stone Serif"]=!0,Z.Sylfaen=!0,Z.Times=!0,Z.Trajan=!0,Z["Trinité"]=!0,Z["Trump Mediaeval"]=!0,Z.Utopia=!0,Z["Vale Type"]=!0,Z["Bitstream Vera"]=!0,Z["Vera Serif"]=!0,Z.Versailles=!0,Z.Wanted=!0,Z.Weiss=!0,Z["Wide Latin"]=!0,Z.Windsor=!0,Z.XITS=!0}),Gq=G8(function(Z){Z.Dingbats=!0,Z.Symbol=!0,Z.ZapfDingbats=!0,Z.Wingdings=!0,Z["Wingdings-Bold"]=!0,Z["Wingdings-Regular"]=!0}),IR=G8(function(Z){Z[2]=10,Z[3]=32,Z[4]=33,Z[5]=34,Z[6]=35,Z[7]=36,Z[8]=37,Z[9]=38,Z[10]=39,Z[11]=40,Z[12]=41,Z[13]=42,Z[14]=43,Z[15]=44,Z[16]=45,Z[17]=46,Z[18]=47,Z[19]=48,Z[20]=49,Z[21]=50,Z[22]=51,Z[23]=52,Z[24]=53,Z[25]=54,Z[26]=55,Z[27]=56,Z[28]=57,Z[29]=58,Z[30]=894,Z[31]=60,Z[32]=61,Z[33]=62,Z[34]=63,Z[35]=64,Z[36]=65,Z[37]=66,Z[38]=67,Z[39]=68,Z[40]=69,Z[41]=70,Z[42]=71,Z[43]=72,Z[44]=73,Z[45]=74,Z[46]=75,Z[47]=76,Z[48]=77,Z[49]=78,Z[50]=79,Z[51]=80,Z[52]=81,Z[53]=82,Z[54]=83,Z[55]=84,Z[56]=85,Z[57]=86,Z[58]=87,Z[59]=88,Z[60]=89,Z[61]=90,Z[62]=91,Z[63]=92,Z[64]=93,Z[65]=94,Z[66]=95,Z[67]=96,Z[68]=97,Z[69]=98,Z[70]=99,Z[71]=100,Z[72]=101,Z[73]=102,Z[74]=103,Z[75]=104,Z[76]=105,Z[77]=106,Z[78]=107,Z[79]=108,Z[80]=109,Z[81]=110,Z[82]=111,Z[83]=112,Z[84]=113,Z[85]=114,Z[86]=115,Z[87]=116,Z[88]=117,Z[89]=118,Z[90]=119,Z[91]=120,Z[92]=121,Z[93]=122,Z[94]=123,Z[95]=124,Z[96]=125,Z[97]=126,Z[98]=196,Z[99]=197,Z[100]=199,Z[101]=201,Z[102]=209,Z[103]=214,Z[104]=220,Z[105]=225,Z[106]=224,Z[107]=226,Z[108]=228,Z[109]=227,Z[110]=229,Z[111]=231,Z[112]=233,Z[113]=232,Z[114]=234,Z[115]=235,Z[116]=237,Z[117]=236,Z[118]=238,Z[119]=239,Z[120]=241,Z[121]=243,Z[122]=242,Z[123]=244,Z[124]=246,Z[125]=245,Z[126]=250,Z[127]=249,Z[128]=251,Z[129]=252,Z[130]=8224,Z[131]=176,Z[132]=162,Z[133]=163,Z[134]=167,Z[135]=8226,Z[136]=182,Z[137]=223,Z[138]=174,Z[139]=169,Z[140]=8482,Z[141]=180,Z[142]=168,Z[143]=8800,Z[144]=198,Z[145]=216,Z[146]=8734,Z[147]=177,Z[148]=8804,Z[149]=8805,Z[150]=165,Z[151]=181,Z[152]=8706,Z[153]=8721,Z[154]=8719,Z[156]=8747,Z[157]=170,Z[158]=186,Z[159]=8486,Z[160]=230,Z[161]=248,Z[162]=191,Z[163]=161,Z[164]=172,Z[165]=8730,Z[166]=402,Z[167]=8776,Z[168]=8710,Z[169]=171,Z[170]=187,Z[171]=8230,Z[179]=8220,Z[180]=8221,Z[181]=8216,Z[182]=8217,Z[200]=193,Z[203]=205,Z[207]=211,Z[210]=218,Z[223]=711,Z[224]=321,Z[225]=322,Z[226]=352,Z[227]=353,Z[228]=381,Z[229]=382,Z[233]=221,Z[234]=253,Z[252]=263,Z[253]=268,Z[254]=269,Z[258]=258,Z[260]=260,Z[261]=261,Z[265]=280,Z[266]=281,Z[267]=282,Z[268]=283,Z[269]=313,Z[275]=323,Z[276]=324,Z[278]=328,Z[283]=344,Z[284]=345,Z[285]=346,Z[286]=347,Z[292]=367,Z[295]=377,Z[296]=378,Z[298]=380,Z[305]=963,Z[306]=964,Z[307]=966,Z[308]=8215,Z[309]=8252,Z[310]=8319,Z[311]=8359,Z[312]=8592,Z[313]=8593,Z[337]=9552,Z[493]=1039,Z[494]=1040,Z[570]=1040,Z[571]=1041,Z[572]=1042,Z[573]=1043,Z[574]=1044,Z[575]=1045,Z[576]=1046,Z[577]=1047,Z[578]=1048,Z[579]=1049,Z[580]=1050,Z[581]=1051,Z[582]=1052,Z[583]=1053,Z[584]=1054,Z[585]=1055,Z[586]=1056,Z[587]=1057,Z[588]=1058,Z[589]=1059,Z[590]=1060,Z[591]=1061,Z[592]=1062,Z[593]=1063,Z[594]=1064,Z[595]=1065,Z[596]=1066,Z[597]=1067,Z[598]=1068,Z[599]=1069,Z[600]=1070,Z[672]=1488,Z[673]=1489,Z[674]=1490,Z[675]=1491,Z[676]=1492,Z[677]=1493,Z[678]=1494,Z[679]=1495,Z[680]=1496,Z[681]=1497,Z[682]=1498,Z[683]=1499,Z[684]=1500,Z[685]=1501,Z[686]=1502,Z[687]=1503,Z[688]=1504,Z[689]=1505,Z[690]=1506,Z[691]=1507,Z[692]=1508,Z[693]=1509,Z[694]=1510,Z[695]=1511,Z[696]=1512,Z[697]=1513,Z[698]=1514,Z[705]=1524,Z[706]=8362,Z[710]=64288,Z[711]=64298,Z[759]=1617,Z[761]=1776,Z[763]=1778,Z[775]=1652,Z[777]=1764,Z[778]=1780,Z[779]=1781,Z[780]=1782,Z[782]=771,Z[783]=64726,Z[786]=8363,Z[788]=8532,Z[790]=768,Z[791]=769,Z[792]=768,Z[795]=803,Z[797]=64336,Z[798]=64337,Z[799]=64342,Z[800]=64343,Z[801]=64344,Z[802]=64345,Z[803]=64362,Z[804]=64363,Z[805]=64364,Z[2424]=7821,Z[2425]=7822,Z[2426]=7823,Z[2427]=7824,Z[2428]=7825,Z[2429]=7826,Z[2430]=7827,Z[2433]=7682,Z[2678]=8045,Z[2679]=8046,Z[2830]=1552,Z[2838]=686,Z[2840]=751,Z[2842]=753,Z[2843]=754,Z[2844]=755,Z[2846]=757,Z[2856]=767,Z[2857]=848,Z[2858]=849,Z[2862]=853,Z[2863]=854,Z[2864]=855,Z[2865]=861,Z[2866]=862,Z[2906]=7460,Z[2908]=7462,Z[2909]=7463,Z[2910]=7464,Z[2912]=7466,Z[2913]=7467,Z[2914]=7468,Z[2916]=7470,Z[2917]=7471,Z[2918]=7472,Z[2920]=7474,Z[2921]=7475,Z[2922]=7476,Z[2924]=7478,Z[2925]=7479,Z[2926]=7480,Z[2928]=7482,Z[2929]=7483,Z[2930]=7484,Z[2932]=7486,Z[2933]=7487,Z[2934]=7488,Z[2936]=7490,Z[2937]=7491,Z[2938]=7492,Z[2940]=7494,Z[2941]=7495,Z[2942]=7496,Z[2944]=7498,Z[2946]=7500,Z[2948]=7502,Z[2950]=7504,Z[2951]=7505,Z[2952]=7506,Z[2954]=7508,Z[2955]=7509,Z[2956]=7510,Z[2958]=7512,Z[2959]=7513,Z[2960]=7514,Z[2962]=7516,Z[2963]=7517,Z[2964]=7518,Z[2966]=7520,Z[2967]=7521,Z[2968]=7522,Z[2970]=7524,Z[2971]=7525,Z[2972]=7526,Z[2974]=7528,Z[2975]=7529,Z[2976]=7530,Z[2978]=1537,Z[2979]=1538,Z[2980]=1539,Z[2982]=1549,Z[2983]=1551,Z[2984]=1552,Z[2986]=1554,Z[2987]=1555,Z[2988]=1556,Z[2990]=1623,Z[2991]=1624,Z[2995]=1775,Z[2999]=1791,Z[3002]=64290,Z[3003]=64291,Z[3004]=64292,Z[3006]=64294,Z[3007]=64295,Z[3008]=64296,Z[3011]=1900,Z[3014]=8223,Z[3015]=8244,Z[3017]=7532,Z[3018]=7533,Z[3019]=7534,Z[3075]=7590,Z[3076]=7591,Z[3079]=7594,Z[3080]=7595,Z[3083]=7598,Z[3084]=7599,Z[3087]=7602,Z[3088]=7603,Z[3091]=7606,Z[3092]=7607,Z[3095]=7610,Z[3096]=7611,Z[3099]=7614,Z[3100]=7615,Z[3103]=7618,Z[3104]=7619,Z[3107]=8337,Z[3108]=8338,Z[3116]=1884,Z[3119]=1885,Z[3120]=1885,Z[3123]=1886,Z[3124]=1886,Z[3127]=1887,Z[3128]=1887,Z[3131]=1888,Z[3132]=1888,Z[3135]=1889,Z[3136]=1889,Z[3139]=1890,Z[3140]=1890,Z[3143]=1891,Z[3144]=1891,Z[3147]=1892,Z[3148]=1892,Z[3153]=580,Z[3154]=581,Z[3157]=584,Z[3158]=585,Z[3161]=588,Z[3162]=589,Z[3165]=891,Z[3166]=892,Z[3169]=1274,Z[3170]=1275,Z[3173]=1278,Z[3174]=1279,Z[3181]=7622,Z[3182]=7623,Z[3282]=11799,Z[3316]=578,Z[3379]=42785,Z[3393]=1159,Z[3416]=8377}),rI=G8(function(Z){Z[227]=322,Z[264]=261,Z[291]=346}),lI=G8(function(Z){Z[1]=32,Z[4]=65,Z[5]=192,Z[6]=193,Z[9]=196,Z[17]=66,Z[18]=67,Z[21]=268,Z[24]=68,Z[28]=69,Z[29]=200,Z[30]=201,Z[32]=282,Z[38]=70,Z[39]=71,Z[44]=72,Z[47]=73,Z[48]=204,Z[49]=205,Z[58]=74,Z[60]=75,Z[62]=76,Z[68]=77,Z[69]=78,Z[75]=79,Z[76]=210,Z[80]=214,Z[87]=80,Z[89]=81,Z[90]=82,Z[92]=344,Z[94]=83,Z[97]=352,Z[100]=84,Z[104]=85,Z[109]=220,Z[115]=86,Z[116]=87,Z[121]=88,Z[122]=89,Z[124]=221,Z[127]=90,Z[129]=381,Z[258]=97,Z[259]=224,Z[260]=225,Z[263]=228,Z[268]=261,Z[271]=98,Z[272]=99,Z[273]=263,Z[275]=269,Z[282]=100,Z[286]=101,Z[287]=232,Z[288]=233,Z[290]=283,Z[295]=281,Z[296]=102,Z[336]=103,Z[346]=104,Z[349]=105,Z[350]=236,Z[351]=237,Z[361]=106,Z[364]=107,Z[367]=108,Z[371]=322,Z[373]=109,Z[374]=110,Z[381]=111,Z[382]=242,Z[383]=243,Z[386]=246,Z[393]=112,Z[395]=113,Z[396]=114,Z[398]=345,Z[400]=115,Z[401]=347,Z[403]=353,Z[410]=116,Z[437]=117,Z[442]=252,Z[448]=118,Z[449]=119,Z[454]=120,Z[455]=121,Z[457]=253,Z[460]=122,Z[462]=382,Z[463]=380,Z[853]=44,Z[855]=58,Z[856]=46,Z[876]=47,Z[878]=45,Z[882]=45,Z[894]=40,Z[895]=41,Z[896]=91,Z[897]=93,Z[923]=64,Z[940]=163,Z[1004]=48,Z[1005]=49,Z[1006]=50,Z[1007]=51,Z[1008]=52,Z[1009]=53,Z[1010]=54,Z[1011]=55,Z[1012]=56,Z[1013]=57,Z[1081]=37,Z[1085]=43,Z[1086]=45});fQ=class fQ extends fX{constructor(Z,q,X){super(X||[0.000488,0,0,0.000488,0,0]),this.glyphs=Z,this.cmap=q}compileGlyphImpl(Z,q){JQ(Z,q,this)}};KQ=class KQ extends fX{constructor(Z,q,X){super(X||[0.001,0,0,0.001,0,0]),this.glyphs=Z.glyphs,this.gsubrs=Z.gsubrs||[],this.subrs=Z.subrs||[],this.cmap=q,this.glyphNameMap=l0(),this.gsubrsBias=Pq(this.gsubrs),this.subrsBias=Pq(this.subrs),this.isCFFCIDFont=Z.isCFFCIDFont,this.fdSelect=Z.fdSelect,this.fdArray=Z.fdArray}compileGlyphImpl(Z,q,X){Qq(Z,q,this,X)}};nI=G8(function(Z){Z.Courier=600,Z["Courier-Bold"]=600,Z["Courier-BoldOblique"]=600,Z["Courier-Oblique"]=600,Z.Helvetica=G8(function(q){q.space=278,q.exclam=278,q.quotedbl=355,q.numbersign=556,q.dollar=556,q.percent=889,q.ampersand=667,q.quoteright=222,q.parenleft=333,q.parenright=333,q.asterisk=389,q.plus=584,q.comma=278,q.hyphen=333,q.period=278,q.slash=278,q.zero=556,q.one=556,q.two=556,q.three=556,q.four=556,q.five=556,q.six=556,q.seven=556,q.eight=556,q.nine=556,q.colon=278,q.semicolon=278,q.less=584,q.equal=584,q.greater=584,q.question=556,q.at=1015,q.A=667,q.B=667,q.C=722,q.D=722,q.E=667,q.F=611,q.G=778,q.H=722,q.I=278,q.J=500,q.K=667,q.L=556,q.M=833,q.N=722,q.O=778,q.P=667,q.Q=778,q.R=722,q.S=667,q.T=611,q.U=722,q.V=667,q.W=944,q.X=667,q.Y=667,q.Z=611,q.bracketleft=278,q.backslash=278,q.bracketright=278,q.asciicircum=469,q.underscore=556,q.quoteleft=222,q.a=556,q.b=556,q.c=500,q.d=556,q.e=556,q.f=278,q.g=556,q.h=556,q.i=222,q.j=222,q.k=500,q.l=222,q.m=833,q.n=556,q.o=556,q.p=556,q.q=556,q.r=333,q.s=500,q.t=278,q.u=556,q.v=500,q.w=722,q.x=500,q.y=500,q.z=500,q.braceleft=334,q.bar=260,q.braceright=334,q.asciitilde=584,q.exclamdown=333,q.cent=556,q.sterling=556,q.fraction=167,q.yen=556,q.florin=556,q.section=556,q.currency=556,q.quotesingle=191,q.quotedblleft=333,q.guillemotleft=556,q.guilsinglleft=333,q.guilsinglright=333,q.fi=500,q.fl=500,q.endash=556,q.dagger=556,q.daggerdbl=556,q.periodcentered=278,q.paragraph=537,q.bullet=350,q.quotesinglbase=222,q.quotedblbase=333,q.quotedblright=333,q.guillemotright=556,q.ellipsis=1000,q.perthousand=1000,q.questiondown=611,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=1000,q.ordfeminine=370,q.Lslash=556,q.Oslash=778,q.OE=1000,q.ordmasculine=365,q.ae=889,q.dotlessi=278,q.lslash=222,q.oslash=611,q.oe=944,q.germandbls=611,q.Idieresis=278,q.eacute=556,q.abreve=556,q.uhungarumlaut=556,q.ecaron=556,q.Ydieresis=667,q.divide=584,q.Yacute=667,q.Acircumflex=667,q.aacute=556,q.Ucircumflex=722,q.yacute=500,q.scommaaccent=500,q.ecircumflex=556,q.Uring=722,q.Udieresis=722,q.aogonek=556,q.Uacute=722,q.uogonek=556,q.Edieresis=667,q.Dcroat=722,q.commaaccent=250,q.copyright=737,q.Emacron=667,q.ccaron=500,q.aring=556,q.Ncommaaccent=722,q.lacute=222,q.agrave=556,q.Tcommaaccent=611,q.Cacute=722,q.atilde=556,q.Edotaccent=667,q.scaron=500,q.scedilla=500,q.iacute=278,q.lozenge=471,q.Rcaron=722,q.Gcommaaccent=778,q.ucircumflex=556,q.acircumflex=556,q.Amacron=667,q.rcaron=333,q.ccedilla=500,q.Zdotaccent=611,q.Thorn=667,q.Omacron=778,q.Racute=722,q.Sacute=667,q.dcaron=643,q.Umacron=722,q.uring=556,q.threesuperior=333,q.Ograve=778,q.Agrave=667,q.Abreve=667,q.multiply=584,q.uacute=556,q.Tcaron=611,q.partialdiff=476,q.ydieresis=500,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=667,q.adieresis=556,q.edieresis=556,q.cacute=500,q.nacute=556,q.umacron=556,q.Ncaron=722,q.Iacute=278,q.plusminus=584,q.brokenbar=260,q.registered=737,q.Gbreve=778,q.Idotaccent=278,q.summation=600,q.Egrave=667,q.racute=333,q.omacron=556,q.Zacute=611,q.Zcaron=611,q.greaterequal=549,q.Eth=722,q.Ccedilla=722,q.lcommaaccent=222,q.tcaron=317,q.eogonek=556,q.Uogonek=722,q.Aacute=667,q.Adieresis=667,q.egrave=556,q.zacute=500,q.iogonek=222,q.Oacute=778,q.oacute=556,q.amacron=556,q.sacute=500,q.idieresis=278,q.Ocircumflex=778,q.Ugrave=722,q.Delta=612,q.thorn=556,q.twosuperior=333,q.Odieresis=778,q.mu=556,q.igrave=278,q.ohungarumlaut=556,q.Eogonek=667,q.dcroat=556,q.threequarters=834,q.Scedilla=667,q.lcaron=299,q.Kcommaaccent=667,q.Lacute=556,q.trademark=1000,q.edotaccent=556,q.Igrave=278,q.Imacron=278,q.Lcaron=556,q.onehalf=834,q.lessequal=549,q.ocircumflex=556,q.ntilde=556,q.Uhungarumlaut=722,q.Eacute=667,q.emacron=556,q.gbreve=556,q.onequarter=834,q.Scaron=667,q.Scommaaccent=667,q.Ohungarumlaut=778,q.degree=400,q.ograve=556,q.Ccaron=722,q.ugrave=556,q.radical=453,q.Dcaron=722,q.rcommaaccent=333,q.Ntilde=722,q.otilde=556,q.Rcommaaccent=722,q.Lcommaaccent=556,q.Atilde=667,q.Aogonek=667,q.Aring=667,q.Otilde=778,q.zdotaccent=500,q.Ecaron=667,q.Iogonek=278,q.kcommaaccent=500,q.minus=584,q.Icircumflex=278,q.ncaron=556,q.tcommaaccent=278,q.logicalnot=584,q.odieresis=556,q.udieresis=556,q.notequal=549,q.gcommaaccent=556,q.eth=556,q.zcaron=500,q.ncommaaccent=556,q.onesuperior=333,q.imacron=278,q.Euro=556}),Z["Helvetica-Bold"]=G8(function(q){q.space=278,q.exclam=333,q.quotedbl=474,q.numbersign=556,q.dollar=556,q.percent=889,q.ampersand=722,q.quoteright=278,q.parenleft=333,q.parenright=333,q.asterisk=389,q.plus=584,q.comma=278,q.hyphen=333,q.period=278,q.slash=278,q.zero=556,q.one=556,q.two=556,q.three=556,q.four=556,q.five=556,q.six=556,q.seven=556,q.eight=556,q.nine=556,q.colon=333,q.semicolon=333,q.less=584,q.equal=584,q.greater=584,q.question=611,q.at=975,q.A=722,q.B=722,q.C=722,q.D=722,q.E=667,q.F=611,q.G=778,q.H=722,q.I=278,q.J=556,q.K=722,q.L=611,q.M=833,q.N=722,q.O=778,q.P=667,q.Q=778,q.R=722,q.S=667,q.T=611,q.U=722,q.V=667,q.W=944,q.X=667,q.Y=667,q.Z=611,q.bracketleft=333,q.backslash=278,q.bracketright=333,q.asciicircum=584,q.underscore=556,q.quoteleft=278,q.a=556,q.b=611,q.c=556,q.d=611,q.e=556,q.f=333,q.g=611,q.h=611,q.i=278,q.j=278,q.k=556,q.l=278,q.m=889,q.n=611,q.o=611,q.p=611,q.q=611,q.r=389,q.s=556,q.t=333,q.u=611,q.v=556,q.w=778,q.x=556,q.y=556,q.z=500,q.braceleft=389,q.bar=280,q.braceright=389,q.asciitilde=584,q.exclamdown=333,q.cent=556,q.sterling=556,q.fraction=167,q.yen=556,q.florin=556,q.section=556,q.currency=556,q.quotesingle=238,q.quotedblleft=500,q.guillemotleft=556,q.guilsinglleft=333,q.guilsinglright=333,q.fi=611,q.fl=611,q.endash=556,q.dagger=556,q.daggerdbl=556,q.periodcentered=278,q.paragraph=556,q.bullet=350,q.quotesinglbase=278,q.quotedblbase=500,q.quotedblright=500,q.guillemotright=556,q.ellipsis=1000,q.perthousand=1000,q.questiondown=611,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=1000,q.ordfeminine=370,q.Lslash=611,q.Oslash=778,q.OE=1000,q.ordmasculine=365,q.ae=889,q.dotlessi=278,q.lslash=278,q.oslash=611,q.oe=944,q.germandbls=611,q.Idieresis=278,q.eacute=556,q.abreve=556,q.uhungarumlaut=611,q.ecaron=556,q.Ydieresis=667,q.divide=584,q.Yacute=667,q.Acircumflex=722,q.aacute=556,q.Ucircumflex=722,q.yacute=556,q.scommaaccent=556,q.ecircumflex=556,q.Uring=722,q.Udieresis=722,q.aogonek=556,q.Uacute=722,q.uogonek=611,q.Edieresis=667,q.Dcroat=722,q.commaaccent=250,q.copyright=737,q.Emacron=667,q.ccaron=556,q.aring=556,q.Ncommaaccent=722,q.lacute=278,q.agrave=556,q.Tcommaaccent=611,q.Cacute=722,q.atilde=556,q.Edotaccent=667,q.scaron=556,q.scedilla=556,q.iacute=278,q.lozenge=494,q.Rcaron=722,q.Gcommaaccent=778,q.ucircumflex=611,q.acircumflex=556,q.Amacron=722,q.rcaron=389,q.ccedilla=556,q.Zdotaccent=611,q.Thorn=667,q.Omacron=778,q.Racute=722,q.Sacute=667,q.dcaron=743,q.Umacron=722,q.uring=611,q.threesuperior=333,q.Ograve=778,q.Agrave=722,q.Abreve=722,q.multiply=584,q.uacute=611,q.Tcaron=611,q.partialdiff=494,q.ydieresis=556,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=667,q.adieresis=556,q.edieresis=556,q.cacute=556,q.nacute=611,q.umacron=611,q.Ncaron=722,q.Iacute=278,q.plusminus=584,q.brokenbar=280,q.registered=737,q.Gbreve=778,q.Idotaccent=278,q.summation=600,q.Egrave=667,q.racute=389,q.omacron=611,q.Zacute=611,q.Zcaron=611,q.greaterequal=549,q.Eth=722,q.Ccedilla=722,q.lcommaaccent=278,q.tcaron=389,q.eogonek=556,q.Uogonek=722,q.Aacute=722,q.Adieresis=722,q.egrave=556,q.zacute=500,q.iogonek=278,q.Oacute=778,q.oacute=611,q.amacron=556,q.sacute=556,q.idieresis=278,q.Ocircumflex=778,q.Ugrave=722,q.Delta=612,q.thorn=611,q.twosuperior=333,q.Odieresis=778,q.mu=611,q.igrave=278,q.ohungarumlaut=611,q.Eogonek=667,q.dcroat=611,q.threequarters=834,q.Scedilla=667,q.lcaron=400,q.Kcommaaccent=722,q.Lacute=611,q.trademark=1000,q.edotaccent=556,q.Igrave=278,q.Imacron=278,q.Lcaron=611,q.onehalf=834,q.lessequal=549,q.ocircumflex=611,q.ntilde=611,q.Uhungarumlaut=722,q.Eacute=667,q.emacron=556,q.gbreve=611,q.onequarter=834,q.Scaron=667,q.Scommaaccent=667,q.Ohungarumlaut=778,q.degree=400,q.ograve=611,q.Ccaron=722,q.ugrave=611,q.radical=549,q.Dcaron=722,q.rcommaaccent=389,q.Ntilde=722,q.otilde=611,q.Rcommaaccent=722,q.Lcommaaccent=611,q.Atilde=722,q.Aogonek=722,q.Aring=722,q.Otilde=778,q.zdotaccent=500,q.Ecaron=667,q.Iogonek=278,q.kcommaaccent=556,q.minus=584,q.Icircumflex=278,q.ncaron=611,q.tcommaaccent=333,q.logicalnot=584,q.odieresis=611,q.udieresis=611,q.notequal=549,q.gcommaaccent=611,q.eth=611,q.zcaron=500,q.ncommaaccent=611,q.onesuperior=333,q.imacron=278,q.Euro=556}),Z["Helvetica-BoldOblique"]=G8(function(q){q.space=278,q.exclam=333,q.quotedbl=474,q.numbersign=556,q.dollar=556,q.percent=889,q.ampersand=722,q.quoteright=278,q.parenleft=333,q.parenright=333,q.asterisk=389,q.plus=584,q.comma=278,q.hyphen=333,q.period=278,q.slash=278,q.zero=556,q.one=556,q.two=556,q.three=556,q.four=556,q.five=556,q.six=556,q.seven=556,q.eight=556,q.nine=556,q.colon=333,q.semicolon=333,q.less=584,q.equal=584,q.greater=584,q.question=611,q.at=975,q.A=722,q.B=722,q.C=722,q.D=722,q.E=667,q.F=611,q.G=778,q.H=722,q.I=278,q.J=556,q.K=722,q.L=611,q.M=833,q.N=722,q.O=778,q.P=667,q.Q=778,q.R=722,q.S=667,q.T=611,q.U=722,q.V=667,q.W=944,q.X=667,q.Y=667,q.Z=611,q.bracketleft=333,q.backslash=278,q.bracketright=333,q.asciicircum=584,q.underscore=556,q.quoteleft=278,q.a=556,q.b=611,q.c=556,q.d=611,q.e=556,q.f=333,q.g=611,q.h=611,q.i=278,q.j=278,q.k=556,q.l=278,q.m=889,q.n=611,q.o=611,q.p=611,q.q=611,q.r=389,q.s=556,q.t=333,q.u=611,q.v=556,q.w=778,q.x=556,q.y=556,q.z=500,q.braceleft=389,q.bar=280,q.braceright=389,q.asciitilde=584,q.exclamdown=333,q.cent=556,q.sterling=556,q.fraction=167,q.yen=556,q.florin=556,q.section=556,q.currency=556,q.quotesingle=238,q.quotedblleft=500,q.guillemotleft=556,q.guilsinglleft=333,q.guilsinglright=333,q.fi=611,q.fl=611,q.endash=556,q.dagger=556,q.daggerdbl=556,q.periodcentered=278,q.paragraph=556,q.bullet=350,q.quotesinglbase=278,q.quotedblbase=500,q.quotedblright=500,q.guillemotright=556,q.ellipsis=1000,q.perthousand=1000,q.questiondown=611,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=1000,q.ordfeminine=370,q.Lslash=611,q.Oslash=778,q.OE=1000,q.ordmasculine=365,q.ae=889,q.dotlessi=278,q.lslash=278,q.oslash=611,q.oe=944,q.germandbls=611,q.Idieresis=278,q.eacute=556,q.abreve=556,q.uhungarumlaut=611,q.ecaron=556,q.Ydieresis=667,q.divide=584,q.Yacute=667,q.Acircumflex=722,q.aacute=556,q.Ucircumflex=722,q.yacute=556,q.scommaaccent=556,q.ecircumflex=556,q.Uring=722,q.Udieresis=722,q.aogonek=556,q.Uacute=722,q.uogonek=611,q.Edieresis=667,q.Dcroat=722,q.commaaccent=250,q.copyright=737,q.Emacron=667,q.ccaron=556,q.aring=556,q.Ncommaaccent=722,q.lacute=278,q.agrave=556,q.Tcommaaccent=611,q.Cacute=722,q.atilde=556,q.Edotaccent=667,q.scaron=556,q.scedilla=556,q.iacute=278,q.lozenge=494,q.Rcaron=722,q.Gcommaaccent=778,q.ucircumflex=611,q.acircumflex=556,q.Amacron=722,q.rcaron=389,q.ccedilla=556,q.Zdotaccent=611,q.Thorn=667,q.Omacron=778,q.Racute=722,q.Sacute=667,q.dcaron=743,q.Umacron=722,q.uring=611,q.threesuperior=333,q.Ograve=778,q.Agrave=722,q.Abreve=722,q.multiply=584,q.uacute=611,q.Tcaron=611,q.partialdiff=494,q.ydieresis=556,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=667,q.adieresis=556,q.edieresis=556,q.cacute=556,q.nacute=611,q.umacron=611,q.Ncaron=722,q.Iacute=278,q.plusminus=584,q.brokenbar=280,q.registered=737,q.Gbreve=778,q.Idotaccent=278,q.summation=600,q.Egrave=667,q.racute=389,q.omacron=611,q.Zacute=611,q.Zcaron=611,q.greaterequal=549,q.Eth=722,q.Ccedilla=722,q.lcommaaccent=278,q.tcaron=389,q.eogonek=556,q.Uogonek=722,q.Aacute=722,q.Adieresis=722,q.egrave=556,q.zacute=500,q.iogonek=278,q.Oacute=778,q.oacute=611,q.amacron=556,q.sacute=556,q.idieresis=278,q.Ocircumflex=778,q.Ugrave=722,q.Delta=612,q.thorn=611,q.twosuperior=333,q.Odieresis=778,q.mu=611,q.igrave=278,q.ohungarumlaut=611,q.Eogonek=667,q.dcroat=611,q.threequarters=834,q.Scedilla=667,q.lcaron=400,q.Kcommaaccent=722,q.Lacute=611,q.trademark=1000,q.edotaccent=556,q.Igrave=278,q.Imacron=278,q.Lcaron=611,q.onehalf=834,q.lessequal=549,q.ocircumflex=611,q.ntilde=611,q.Uhungarumlaut=722,q.Eacute=667,q.emacron=556,q.gbreve=611,q.onequarter=834,q.Scaron=667,q.Scommaaccent=667,q.Ohungarumlaut=778,q.degree=400,q.ograve=611,q.Ccaron=722,q.ugrave=611,q.radical=549,q.Dcaron=722,q.rcommaaccent=389,q.Ntilde=722,q.otilde=611,q.Rcommaaccent=722,q.Lcommaaccent=611,q.Atilde=722,q.Aogonek=722,q.Aring=722,q.Otilde=778,q.zdotaccent=500,q.Ecaron=667,q.Iogonek=278,q.kcommaaccent=556,q.minus=584,q.Icircumflex=278,q.ncaron=611,q.tcommaaccent=333,q.logicalnot=584,q.odieresis=611,q.udieresis=611,q.notequal=549,q.gcommaaccent=611,q.eth=611,q.zcaron=500,q.ncommaaccent=611,q.onesuperior=333,q.imacron=278,q.Euro=556}),Z["Helvetica-Oblique"]=G8(function(q){q.space=278,q.exclam=278,q.quotedbl=355,q.numbersign=556,q.dollar=556,q.percent=889,q.ampersand=667,q.quoteright=222,q.parenleft=333,q.parenright=333,q.asterisk=389,q.plus=584,q.comma=278,q.hyphen=333,q.period=278,q.slash=278,q.zero=556,q.one=556,q.two=556,q.three=556,q.four=556,q.five=556,q.six=556,q.seven=556,q.eight=556,q.nine=556,q.colon=278,q.semicolon=278,q.less=584,q.equal=584,q.greater=584,q.question=556,q.at=1015,q.A=667,q.B=667,q.C=722,q.D=722,q.E=667,q.F=611,q.G=778,q.H=722,q.I=278,q.J=500,q.K=667,q.L=556,q.M=833,q.N=722,q.O=778,q.P=667,q.Q=778,q.R=722,q.S=667,q.T=611,q.U=722,q.V=667,q.W=944,q.X=667,q.Y=667,q.Z=611,q.bracketleft=278,q.backslash=278,q.bracketright=278,q.asciicircum=469,q.underscore=556,q.quoteleft=222,q.a=556,q.b=556,q.c=500,q.d=556,q.e=556,q.f=278,q.g=556,q.h=556,q.i=222,q.j=222,q.k=500,q.l=222,q.m=833,q.n=556,q.o=556,q.p=556,q.q=556,q.r=333,q.s=500,q.t=278,q.u=556,q.v=500,q.w=722,q.x=500,q.y=500,q.z=500,q.braceleft=334,q.bar=260,q.braceright=334,q.asciitilde=584,q.exclamdown=333,q.cent=556,q.sterling=556,q.fraction=167,q.yen=556,q.florin=556,q.section=556,q.currency=556,q.quotesingle=191,q.quotedblleft=333,q.guillemotleft=556,q.guilsinglleft=333,q.guilsinglright=333,q.fi=500,q.fl=500,q.endash=556,q.dagger=556,q.daggerdbl=556,q.periodcentered=278,q.paragraph=537,q.bullet=350,q.quotesinglbase=222,q.quotedblbase=333,q.quotedblright=333,q.guillemotright=556,q.ellipsis=1000,q.perthousand=1000,q.questiondown=611,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=1000,q.ordfeminine=370,q.Lslash=556,q.Oslash=778,q.OE=1000,q.ordmasculine=365,q.ae=889,q.dotlessi=278,q.lslash=222,q.oslash=611,q.oe=944,q.germandbls=611,q.Idieresis=278,q.eacute=556,q.abreve=556,q.uhungarumlaut=556,q.ecaron=556,q.Ydieresis=667,q.divide=584,q.Yacute=667,q.Acircumflex=667,q.aacute=556,q.Ucircumflex=722,q.yacute=500,q.scommaaccent=500,q.ecircumflex=556,q.Uring=722,q.Udieresis=722,q.aogonek=556,q.Uacute=722,q.uogonek=556,q.Edieresis=667,q.Dcroat=722,q.commaaccent=250,q.copyright=737,q.Emacron=667,q.ccaron=500,q.aring=556,q.Ncommaaccent=722,q.lacute=222,q.agrave=556,q.Tcommaaccent=611,q.Cacute=722,q.atilde=556,q.Edotaccent=667,q.scaron=500,q.scedilla=500,q.iacute=278,q.lozenge=471,q.Rcaron=722,q.Gcommaaccent=778,q.ucircumflex=556,q.acircumflex=556,q.Amacron=667,q.rcaron=333,q.ccedilla=500,q.Zdotaccent=611,q.Thorn=667,q.Omacron=778,q.Racute=722,q.Sacute=667,q.dcaron=643,q.Umacron=722,q.uring=556,q.threesuperior=333,q.Ograve=778,q.Agrave=667,q.Abreve=667,q.multiply=584,q.uacute=556,q.Tcaron=611,q.partialdiff=476,q.ydieresis=500,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=667,q.adieresis=556,q.edieresis=556,q.cacute=500,q.nacute=556,q.umacron=556,q.Ncaron=722,q.Iacute=278,q.plusminus=584,q.brokenbar=260,q.registered=737,q.Gbreve=778,q.Idotaccent=278,q.summation=600,q.Egrave=667,q.racute=333,q.omacron=556,q.Zacute=611,q.Zcaron=611,q.greaterequal=549,q.Eth=722,q.Ccedilla=722,q.lcommaaccent=222,q.tcaron=317,q.eogonek=556,q.Uogonek=722,q.Aacute=667,q.Adieresis=667,q.egrave=556,q.zacute=500,q.iogonek=222,q.Oacute=778,q.oacute=556,q.amacron=556,q.sacute=500,q.idieresis=278,q.Ocircumflex=778,q.Ugrave=722,q.Delta=612,q.thorn=556,q.twosuperior=333,q.Odieresis=778,q.mu=556,q.igrave=278,q.ohungarumlaut=556,q.Eogonek=667,q.dcroat=556,q.threequarters=834,q.Scedilla=667,q.lcaron=299,q.Kcommaaccent=667,q.Lacute=556,q.trademark=1000,q.edotaccent=556,q.Igrave=278,q.Imacron=278,q.Lcaron=556,q.onehalf=834,q.lessequal=549,q.ocircumflex=556,q.ntilde=556,q.Uhungarumlaut=722,q.Eacute=667,q.emacron=556,q.gbreve=556,q.onequarter=834,q.Scaron=667,q.Scommaaccent=667,q.Ohungarumlaut=778,q.degree=400,q.ograve=556,q.Ccaron=722,q.ugrave=556,q.radical=453,q.Dcaron=722,q.rcommaaccent=333,q.Ntilde=722,q.otilde=556,q.Rcommaaccent=722,q.Lcommaaccent=556,q.Atilde=667,q.Aogonek=667,q.Aring=667,q.Otilde=778,q.zdotaccent=500,q.Ecaron=667,q.Iogonek=278,q.kcommaaccent=500,q.minus=584,q.Icircumflex=278,q.ncaron=556,q.tcommaaccent=278,q.logicalnot=584,q.odieresis=556,q.udieresis=556,q.notequal=549,q.gcommaaccent=556,q.eth=556,q.zcaron=500,q.ncommaaccent=556,q.onesuperior=333,q.imacron=278,q.Euro=556}),Z.Symbol=G8(function(q){q.space=250,q.exclam=333,q.universal=713,q.numbersign=500,q.existential=549,q.percent=833,q.ampersand=778,q.suchthat=439,q.parenleft=333,q.parenright=333,q.asteriskmath=500,q.plus=549,q.comma=250,q.minus=549,q.period=250,q.slash=278,q.zero=500,q.one=500,q.two=500,q.three=500,q.four=500,q.five=500,q.six=500,q.seven=500,q.eight=500,q.nine=500,q.colon=278,q.semicolon=278,q.less=549,q.equal=549,q.greater=549,q.question=444,q.congruent=549,q.Alpha=722,q.Beta=667,q.Chi=722,q.Delta=612,q.Epsilon=611,q.Phi=763,q.Gamma=603,q.Eta=722,q.Iota=333,q.theta1=631,q.Kappa=722,q.Lambda=686,q.Mu=889,q.Nu=722,q.Omicron=722,q.Pi=768,q.Theta=741,q.Rho=556,q.Sigma=592,q.Tau=611,q.Upsilon=690,q.sigma1=439,q.Omega=768,q.Xi=645,q.Psi=795,q.Zeta=611,q.bracketleft=333,q.therefore=863,q.bracketright=333,q.perpendicular=658,q.underscore=500,q.radicalex=500,q.alpha=631,q.beta=549,q.chi=549,q.delta=494,q.epsilon=439,q.phi=521,q.gamma=411,q.eta=603,q.iota=329,q.phi1=603,q.kappa=549,q.lambda=549,q.mu=576,q.nu=521,q.omicron=549,q.pi=549,q.theta=521,q.rho=549,q.sigma=603,q.tau=439,q.upsilon=576,q.omega1=713,q.omega=686,q.xi=493,q.psi=686,q.zeta=494,q.braceleft=480,q.bar=200,q.braceright=480,q.similar=549,q.Euro=750,q.Upsilon1=620,q.minute=247,q.lessequal=549,q.fraction=167,q.infinity=713,q.florin=500,q.club=753,q.diamond=753,q.heart=753,q.spade=753,q.arrowboth=1042,q.arrowleft=987,q.arrowup=603,q.arrowright=987,q.arrowdown=603,q.degree=400,q.plusminus=549,q.second=411,q.greaterequal=549,q.multiply=549,q.proportional=713,q.partialdiff=494,q.bullet=460,q.divide=549,q.notequal=549,q.equivalence=549,q.approxequal=549,q.ellipsis=1000,q.arrowvertex=603,q.arrowhorizex=1000,q.carriagereturn=658,q.aleph=823,q.Ifraktur=686,q.Rfraktur=795,q.weierstrass=987,q.circlemultiply=768,q.circleplus=768,q.emptyset=823,q.intersection=768,q.union=768,q.propersuperset=713,q.reflexsuperset=713,q.notsubset=713,q.propersubset=713,q.reflexsubset=713,q.element=713,q.notelement=713,q.angle=768,q.gradient=713,q.registerserif=790,q.copyrightserif=790,q.trademarkserif=890,q.product=823,q.radical=549,q.dotmath=250,q.logicalnot=713,q.logicaland=603,q.logicalor=603,q.arrowdblboth=1042,q.arrowdblleft=987,q.arrowdblup=603,q.arrowdblright=987,q.arrowdbldown=603,q.lozenge=494,q.angleleft=329,q.registersans=790,q.copyrightsans=790,q.trademarksans=786,q.summation=713,q.parenlefttp=384,q.parenleftex=384,q.parenleftbt=384,q.bracketlefttp=384,q.bracketleftex=384,q.bracketleftbt=384,q.bracelefttp=494,q.braceleftmid=494,q.braceleftbt=494,q.braceex=494,q.angleright=329,q.integral=274,q.integraltp=686,q.integralex=686,q.integralbt=686,q.parenrighttp=384,q.parenrightex=384,q.parenrightbt=384,q.bracketrighttp=384,q.bracketrightex=384,q.bracketrightbt=384,q.bracerighttp=494,q.bracerightmid=494,q.bracerightbt=494,q.apple=790}),Z["Times-Roman"]=G8(function(q){q.space=250,q.exclam=333,q.quotedbl=408,q.numbersign=500,q.dollar=500,q.percent=833,q.ampersand=778,q.quoteright=333,q.parenleft=333,q.parenright=333,q.asterisk=500,q.plus=564,q.comma=250,q.hyphen=333,q.period=250,q.slash=278,q.zero=500,q.one=500,q.two=500,q.three=500,q.four=500,q.five=500,q.six=500,q.seven=500,q.eight=500,q.nine=500,q.colon=278,q.semicolon=278,q.less=564,q.equal=564,q.greater=564,q.question=444,q.at=921,q.A=722,q.B=667,q.C=667,q.D=722,q.E=611,q.F=556,q.G=722,q.H=722,q.I=333,q.J=389,q.K=722,q.L=611,q.M=889,q.N=722,q.O=722,q.P=556,q.Q=722,q.R=667,q.S=556,q.T=611,q.U=722,q.V=722,q.W=944,q.X=722,q.Y=722,q.Z=611,q.bracketleft=333,q.backslash=278,q.bracketright=333,q.asciicircum=469,q.underscore=500,q.quoteleft=333,q.a=444,q.b=500,q.c=444,q.d=500,q.e=444,q.f=333,q.g=500,q.h=500,q.i=278,q.j=278,q.k=500,q.l=278,q.m=778,q.n=500,q.o=500,q.p=500,q.q=500,q.r=333,q.s=389,q.t=278,q.u=500,q.v=500,q.w=722,q.x=500,q.y=500,q.z=444,q.braceleft=480,q.bar=200,q.braceright=480,q.asciitilde=541,q.exclamdown=333,q.cent=500,q.sterling=500,q.fraction=167,q.yen=500,q.florin=500,q.section=500,q.currency=500,q.quotesingle=180,q.quotedblleft=444,q.guillemotleft=500,q.guilsinglleft=333,q.guilsinglright=333,q.fi=556,q.fl=556,q.endash=500,q.dagger=500,q.daggerdbl=500,q.periodcentered=250,q.paragraph=453,q.bullet=350,q.quotesinglbase=333,q.quotedblbase=444,q.quotedblright=444,q.guillemotright=500,q.ellipsis=1000,q.perthousand=1000,q.questiondown=444,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=889,q.ordfeminine=276,q.Lslash=611,q.Oslash=722,q.OE=889,q.ordmasculine=310,q.ae=667,q.dotlessi=278,q.lslash=278,q.oslash=500,q.oe=722,q.germandbls=500,q.Idieresis=333,q.eacute=444,q.abreve=444,q.uhungarumlaut=500,q.ecaron=444,q.Ydieresis=722,q.divide=564,q.Yacute=722,q.Acircumflex=722,q.aacute=444,q.Ucircumflex=722,q.yacute=500,q.scommaaccent=389,q.ecircumflex=444,q.Uring=722,q.Udieresis=722,q.aogonek=444,q.Uacute=722,q.uogonek=500,q.Edieresis=611,q.Dcroat=722,q.commaaccent=250,q.copyright=760,q.Emacron=611,q.ccaron=444,q.aring=444,q.Ncommaaccent=722,q.lacute=278,q.agrave=444,q.Tcommaaccent=611,q.Cacute=667,q.atilde=444,q.Edotaccent=611,q.scaron=389,q.scedilla=389,q.iacute=278,q.lozenge=471,q.Rcaron=667,q.Gcommaaccent=722,q.ucircumflex=500,q.acircumflex=444,q.Amacron=722,q.rcaron=333,q.ccedilla=444,q.Zdotaccent=611,q.Thorn=556,q.Omacron=722,q.Racute=667,q.Sacute=556,q.dcaron=588,q.Umacron=722,q.uring=500,q.threesuperior=300,q.Ograve=722,q.Agrave=722,q.Abreve=722,q.multiply=564,q.uacute=500,q.Tcaron=611,q.partialdiff=476,q.ydieresis=500,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=611,q.adieresis=444,q.edieresis=444,q.cacute=444,q.nacute=500,q.umacron=500,q.Ncaron=722,q.Iacute=333,q.plusminus=564,q.brokenbar=200,q.registered=760,q.Gbreve=722,q.Idotaccent=333,q.summation=600,q.Egrave=611,q.racute=333,q.omacron=500,q.Zacute=611,q.Zcaron=611,q.greaterequal=549,q.Eth=722,q.Ccedilla=667,q.lcommaaccent=278,q.tcaron=326,q.eogonek=444,q.Uogonek=722,q.Aacute=722,q.Adieresis=722,q.egrave=444,q.zacute=444,q.iogonek=278,q.Oacute=722,q.oacute=500,q.amacron=444,q.sacute=389,q.idieresis=278,q.Ocircumflex=722,q.Ugrave=722,q.Delta=612,q.thorn=500,q.twosuperior=300,q.Odieresis=722,q.mu=500,q.igrave=278,q.ohungarumlaut=500,q.Eogonek=611,q.dcroat=500,q.threequarters=750,q.Scedilla=556,q.lcaron=344,q.Kcommaaccent=722,q.Lacute=611,q.trademark=980,q.edotaccent=444,q.Igrave=333,q.Imacron=333,q.Lcaron=611,q.onehalf=750,q.lessequal=549,q.ocircumflex=500,q.ntilde=500,q.Uhungarumlaut=722,q.Eacute=611,q.emacron=444,q.gbreve=500,q.onequarter=750,q.Scaron=556,q.Scommaaccent=556,q.Ohungarumlaut=722,q.degree=400,q.ograve=500,q.Ccaron=667,q.ugrave=500,q.radical=453,q.Dcaron=722,q.rcommaaccent=333,q.Ntilde=722,q.otilde=500,q.Rcommaaccent=667,q.Lcommaaccent=611,q.Atilde=722,q.Aogonek=722,q.Aring=722,q.Otilde=722,q.zdotaccent=444,q.Ecaron=611,q.Iogonek=333,q.kcommaaccent=500,q.minus=564,q.Icircumflex=333,q.ncaron=500,q.tcommaaccent=278,q.logicalnot=564,q.odieresis=500,q.udieresis=500,q.notequal=549,q.gcommaaccent=500,q.eth=500,q.zcaron=444,q.ncommaaccent=500,q.onesuperior=300,q.imacron=278,q.Euro=500}),Z["Times-Bold"]=G8(function(q){q.space=250,q.exclam=333,q.quotedbl=555,q.numbersign=500,q.dollar=500,q.percent=1000,q.ampersand=833,q.quoteright=333,q.parenleft=333,q.parenright=333,q.asterisk=500,q.plus=570,q.comma=250,q.hyphen=333,q.period=250,q.slash=278,q.zero=500,q.one=500,q.two=500,q.three=500,q.four=500,q.five=500,q.six=500,q.seven=500,q.eight=500,q.nine=500,q.colon=333,q.semicolon=333,q.less=570,q.equal=570,q.greater=570,q.question=500,q.at=930,q.A=722,q.B=667,q.C=722,q.D=722,q.E=667,q.F=611,q.G=778,q.H=778,q.I=389,q.J=500,q.K=778,q.L=667,q.M=944,q.N=722,q.O=778,q.P=611,q.Q=778,q.R=722,q.S=556,q.T=667,q.U=722,q.V=722,q.W=1000,q.X=722,q.Y=722,q.Z=667,q.bracketleft=333,q.backslash=278,q.bracketright=333,q.asciicircum=581,q.underscore=500,q.quoteleft=333,q.a=500,q.b=556,q.c=444,q.d=556,q.e=444,q.f=333,q.g=500,q.h=556,q.i=278,q.j=333,q.k=556,q.l=278,q.m=833,q.n=556,q.o=500,q.p=556,q.q=556,q.r=444,q.s=389,q.t=333,q.u=556,q.v=500,q.w=722,q.x=500,q.y=500,q.z=444,q.braceleft=394,q.bar=220,q.braceright=394,q.asciitilde=520,q.exclamdown=333,q.cent=500,q.sterling=500,q.fraction=167,q.yen=500,q.florin=500,q.section=500,q.currency=500,q.quotesingle=278,q.quotedblleft=500,q.guillemotleft=500,q.guilsinglleft=333,q.guilsinglright=333,q.fi=556,q.fl=556,q.endash=500,q.dagger=500,q.daggerdbl=500,q.periodcentered=250,q.paragraph=540,q.bullet=350,q.quotesinglbase=333,q.quotedblbase=500,q.quotedblright=500,q.guillemotright=500,q.ellipsis=1000,q.perthousand=1000,q.questiondown=500,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=1000,q.ordfeminine=300,q.Lslash=667,q.Oslash=778,q.OE=1000,q.ordmasculine=330,q.ae=722,q.dotlessi=278,q.lslash=278,q.oslash=500,q.oe=722,q.germandbls=556,q.Idieresis=389,q.eacute=444,q.abreve=500,q.uhungarumlaut=556,q.ecaron=444,q.Ydieresis=722,q.divide=570,q.Yacute=722,q.Acircumflex=722,q.aacute=500,q.Ucircumflex=722,q.yacute=500,q.scommaaccent=389,q.ecircumflex=444,q.Uring=722,q.Udieresis=722,q.aogonek=500,q.Uacute=722,q.uogonek=556,q.Edieresis=667,q.Dcroat=722,q.commaaccent=250,q.copyright=747,q.Emacron=667,q.ccaron=444,q.aring=500,q.Ncommaaccent=722,q.lacute=278,q.agrave=500,q.Tcommaaccent=667,q.Cacute=722,q.atilde=500,q.Edotaccent=667,q.scaron=389,q.scedilla=389,q.iacute=278,q.lozenge=494,q.Rcaron=722,q.Gcommaaccent=778,q.ucircumflex=556,q.acircumflex=500,q.Amacron=722,q.rcaron=444,q.ccedilla=444,q.Zdotaccent=667,q.Thorn=611,q.Omacron=778,q.Racute=722,q.Sacute=556,q.dcaron=672,q.Umacron=722,q.uring=556,q.threesuperior=300,q.Ograve=778,q.Agrave=722,q.Abreve=722,q.multiply=570,q.uacute=556,q.Tcaron=667,q.partialdiff=494,q.ydieresis=500,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=667,q.adieresis=500,q.edieresis=444,q.cacute=444,q.nacute=556,q.umacron=556,q.Ncaron=722,q.Iacute=389,q.plusminus=570,q.brokenbar=220,q.registered=747,q.Gbreve=778,q.Idotaccent=389,q.summation=600,q.Egrave=667,q.racute=444,q.omacron=500,q.Zacute=667,q.Zcaron=667,q.greaterequal=549,q.Eth=722,q.Ccedilla=722,q.lcommaaccent=278,q.tcaron=416,q.eogonek=444,q.Uogonek=722,q.Aacute=722,q.Adieresis=722,q.egrave=444,q.zacute=444,q.iogonek=278,q.Oacute=778,q.oacute=500,q.amacron=500,q.sacute=389,q.idieresis=278,q.Ocircumflex=778,q.Ugrave=722,q.Delta=612,q.thorn=556,q.twosuperior=300,q.Odieresis=778,q.mu=556,q.igrave=278,q.ohungarumlaut=500,q.Eogonek=667,q.dcroat=556,q.threequarters=750,q.Scedilla=556,q.lcaron=394,q.Kcommaaccent=778,q.Lacute=667,q.trademark=1000,q.edotaccent=444,q.Igrave=389,q.Imacron=389,q.Lcaron=667,q.onehalf=750,q.lessequal=549,q.ocircumflex=500,q.ntilde=556,q.Uhungarumlaut=722,q.Eacute=667,q.emacron=444,q.gbreve=500,q.onequarter=750,q.Scaron=556,q.Scommaaccent=556,q.Ohungarumlaut=778,q.degree=400,q.ograve=500,q.Ccaron=722,q.ugrave=556,q.radical=549,q.Dcaron=722,q.rcommaaccent=444,q.Ntilde=722,q.otilde=500,q.Rcommaaccent=722,q.Lcommaaccent=667,q.Atilde=722,q.Aogonek=722,q.Aring=722,q.Otilde=778,q.zdotaccent=444,q.Ecaron=667,q.Iogonek=389,q.kcommaaccent=556,q.minus=570,q.Icircumflex=389,q.ncaron=556,q.tcommaaccent=333,q.logicalnot=570,q.odieresis=500,q.udieresis=556,q.notequal=549,q.gcommaaccent=500,q.eth=500,q.zcaron=444,q.ncommaaccent=556,q.onesuperior=300,q.imacron=278,q.Euro=500}),Z["Times-BoldItalic"]=G8(function(q){q.space=250,q.exclam=389,q.quotedbl=555,q.numbersign=500,q.dollar=500,q.percent=833,q.ampersand=778,q.quoteright=333,q.parenleft=333,q.parenright=333,q.asterisk=500,q.plus=570,q.comma=250,q.hyphen=333,q.period=250,q.slash=278,q.zero=500,q.one=500,q.two=500,q.three=500,q.four=500,q.five=500,q.six=500,q.seven=500,q.eight=500,q.nine=500,q.colon=333,q.semicolon=333,q.less=570,q.equal=570,q.greater=570,q.question=500,q.at=832,q.A=667,q.B=667,q.C=667,q.D=722,q.E=667,q.F=667,q.G=722,q.H=778,q.I=389,q.J=500,q.K=667,q.L=611,q.M=889,q.N=722,q.O=722,q.P=611,q.Q=722,q.R=667,q.S=556,q.T=611,q.U=722,q.V=667,q.W=889,q.X=667,q.Y=611,q.Z=611,q.bracketleft=333,q.backslash=278,q.bracketright=333,q.asciicircum=570,q.underscore=500,q.quoteleft=333,q.a=500,q.b=500,q.c=444,q.d=500,q.e=444,q.f=333,q.g=500,q.h=556,q.i=278,q.j=278,q.k=500,q.l=278,q.m=778,q.n=556,q.o=500,q.p=500,q.q=500,q.r=389,q.s=389,q.t=278,q.u=556,q.v=444,q.w=667,q.x=500,q.y=444,q.z=389,q.braceleft=348,q.bar=220,q.braceright=348,q.asciitilde=570,q.exclamdown=389,q.cent=500,q.sterling=500,q.fraction=167,q.yen=500,q.florin=500,q.section=500,q.currency=500,q.quotesingle=278,q.quotedblleft=500,q.guillemotleft=500,q.guilsinglleft=333,q.guilsinglright=333,q.fi=556,q.fl=556,q.endash=500,q.dagger=500,q.daggerdbl=500,q.periodcentered=250,q.paragraph=500,q.bullet=350,q.quotesinglbase=333,q.quotedblbase=500,q.quotedblright=500,q.guillemotright=500,q.ellipsis=1000,q.perthousand=1000,q.questiondown=500,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=1000,q.AE=944,q.ordfeminine=266,q.Lslash=611,q.Oslash=722,q.OE=944,q.ordmasculine=300,q.ae=722,q.dotlessi=278,q.lslash=278,q.oslash=500,q.oe=722,q.germandbls=500,q.Idieresis=389,q.eacute=444,q.abreve=500,q.uhungarumlaut=556,q.ecaron=444,q.Ydieresis=611,q.divide=570,q.Yacute=611,q.Acircumflex=667,q.aacute=500,q.Ucircumflex=722,q.yacute=444,q.scommaaccent=389,q.ecircumflex=444,q.Uring=722,q.Udieresis=722,q.aogonek=500,q.Uacute=722,q.uogonek=556,q.Edieresis=667,q.Dcroat=722,q.commaaccent=250,q.copyright=747,q.Emacron=667,q.ccaron=444,q.aring=500,q.Ncommaaccent=722,q.lacute=278,q.agrave=500,q.Tcommaaccent=611,q.Cacute=667,q.atilde=500,q.Edotaccent=667,q.scaron=389,q.scedilla=389,q.iacute=278,q.lozenge=494,q.Rcaron=667,q.Gcommaaccent=722,q.ucircumflex=556,q.acircumflex=500,q.Amacron=667,q.rcaron=389,q.ccedilla=444,q.Zdotaccent=611,q.Thorn=611,q.Omacron=722,q.Racute=667,q.Sacute=556,q.dcaron=608,q.Umacron=722,q.uring=556,q.threesuperior=300,q.Ograve=722,q.Agrave=667,q.Abreve=667,q.multiply=570,q.uacute=556,q.Tcaron=611,q.partialdiff=494,q.ydieresis=444,q.Nacute=722,q.icircumflex=278,q.Ecircumflex=667,q.adieresis=500,q.edieresis=444,q.cacute=444,q.nacute=556,q.umacron=556,q.Ncaron=722,q.Iacute=389,q.plusminus=570,q.brokenbar=220,q.registered=747,q.Gbreve=722,q.Idotaccent=389,q.summation=600,q.Egrave=667,q.racute=389,q.omacron=500,q.Zacute=611,q.Zcaron=611,q.greaterequal=549,q.Eth=722,q.Ccedilla=667,q.lcommaaccent=278,q.tcaron=366,q.eogonek=444,q.Uogonek=722,q.Aacute=667,q.Adieresis=667,q.egrave=444,q.zacute=389,q.iogonek=278,q.Oacute=722,q.oacute=500,q.amacron=500,q.sacute=389,q.idieresis=278,q.Ocircumflex=722,q.Ugrave=722,q.Delta=612,q.thorn=500,q.twosuperior=300,q.Odieresis=722,q.mu=576,q.igrave=278,q.ohungarumlaut=500,q.Eogonek=667,q.dcroat=500,q.threequarters=750,q.Scedilla=556,q.lcaron=382,q.Kcommaaccent=667,q.Lacute=611,q.trademark=1000,q.edotaccent=444,q.Igrave=389,q.Imacron=389,q.Lcaron=611,q.onehalf=750,q.lessequal=549,q.ocircumflex=500,q.ntilde=556,q.Uhungarumlaut=722,q.Eacute=667,q.emacron=444,q.gbreve=500,q.onequarter=750,q.Scaron=556,q.Scommaaccent=556,q.Ohungarumlaut=722,q.degree=400,q.ograve=500,q.Ccaron=667,q.ugrave=556,q.radical=549,q.Dcaron=722,q.rcommaaccent=389,q.Ntilde=722,q.otilde=500,q.Rcommaaccent=667,q.Lcommaaccent=611,q.Atilde=667,q.Aogonek=667,q.Aring=667,q.Otilde=722,q.zdotaccent=389,q.Ecaron=667,q.Iogonek=389,q.kcommaaccent=500,q.minus=606,q.Icircumflex=389,q.ncaron=556,q.tcommaaccent=278,q.logicalnot=606,q.odieresis=500,q.udieresis=556,q.notequal=549,q.gcommaaccent=500,q.eth=500,q.zcaron=389,q.ncommaaccent=556,q.onesuperior=300,q.imacron=278,q.Euro=500}),Z["Times-Italic"]=G8(function(q){q.space=250,q.exclam=333,q.quotedbl=420,q.numbersign=500,q.dollar=500,q.percent=833,q.ampersand=778,q.quoteright=333,q.parenleft=333,q.parenright=333,q.asterisk=500,q.plus=675,q.comma=250,q.hyphen=333,q.period=250,q.slash=278,q.zero=500,q.one=500,q.two=500,q.three=500,q.four=500,q.five=500,q.six=500,q.seven=500,q.eight=500,q.nine=500,q.colon=333,q.semicolon=333,q.less=675,q.equal=675,q.greater=675,q.question=500,q.at=920,q.A=611,q.B=611,q.C=667,q.D=722,q.E=611,q.F=611,q.G=722,q.H=722,q.I=333,q.J=444,q.K=667,q.L=556,q.M=833,q.N=667,q.O=722,q.P=611,q.Q=722,q.R=611,q.S=500,q.T=556,q.U=722,q.V=611,q.W=833,q.X=611,q.Y=556,q.Z=556,q.bracketleft=389,q.backslash=278,q.bracketright=389,q.asciicircum=422,q.underscore=500,q.quoteleft=333,q.a=500,q.b=500,q.c=444,q.d=500,q.e=444,q.f=278,q.g=500,q.h=500,q.i=278,q.j=278,q.k=444,q.l=278,q.m=722,q.n=500,q.o=500,q.p=500,q.q=500,q.r=389,q.s=389,q.t=278,q.u=500,q.v=444,q.w=667,q.x=444,q.y=444,q.z=389,q.braceleft=400,q.bar=275,q.braceright=400,q.asciitilde=541,q.exclamdown=389,q.cent=500,q.sterling=500,q.fraction=167,q.yen=500,q.florin=500,q.section=500,q.currency=500,q.quotesingle=214,q.quotedblleft=556,q.guillemotleft=500,q.guilsinglleft=333,q.guilsinglright=333,q.fi=500,q.fl=500,q.endash=500,q.dagger=500,q.daggerdbl=500,q.periodcentered=250,q.paragraph=523,q.bullet=350,q.quotesinglbase=333,q.quotedblbase=556,q.quotedblright=556,q.guillemotright=500,q.ellipsis=889,q.perthousand=1000,q.questiondown=500,q.grave=333,q.acute=333,q.circumflex=333,q.tilde=333,q.macron=333,q.breve=333,q.dotaccent=333,q.dieresis=333,q.ring=333,q.cedilla=333,q.hungarumlaut=333,q.ogonek=333,q.caron=333,q.emdash=889,q.AE=889,q.ordfeminine=276,q.Lslash=556,q.Oslash=722,q.OE=944,q.ordmasculine=310,q.ae=667,q.dotlessi=278,q.lslash=278,q.oslash=500,q.oe=667,q.germandbls=500,q.Idieresis=333,q.eacute=444,q.abreve=500,q.uhungarumlaut=500,q.ecaron=444,q.Ydieresis=556,q.divide=675,q.Yacute=556,q.Acircumflex=611,q.aacute=500,q.Ucircumflex=722,q.yacute=444,q.scommaaccent=389,q.ecircumflex=444,q.Uring=722,q.Udieresis=722,q.aogonek=500,q.Uacute=722,q.uogonek=500,q.Edieresis=611,q.Dcroat=722,q.commaaccent=250,q.copyright=760,q.Emacron=611,q.ccaron=444,q.aring=500,q.Ncommaaccent=667,q.lacute=278,q.agrave=500,q.Tcommaaccent=556,q.Cacute=667,q.atilde=500,q.Edotaccent=611,q.scaron=389,q.scedilla=389,q.iacute=278,q.lozenge=471,q.Rcaron=611,q.Gcommaaccent=722,q.ucircumflex=500,q.acircumflex=500,q.Amacron=611,q.rcaron=389,q.ccedilla=444,q.Zdotaccent=556,q.Thorn=611,q.Omacron=722,q.Racute=611,q.Sacute=500,q.dcaron=544,q.Umacron=722,q.uring=500,q.threesuperior=300,q.Ograve=722,q.Agrave=611,q.Abreve=611,q.multiply=675,q.uacute=500,q.Tcaron=556,q.partialdiff=476,q.ydieresis=444,q.Nacute=667,q.icircumflex=278,q.Ecircumflex=611,q.adieresis=500,q.edieresis=444,q.cacute=444,q.nacute=500,q.umacron=500,q.Ncaron=667,q.Iacute=333,q.plusminus=675,q.brokenbar=275,q.registered=760,q.Gbreve=722,q.Idotaccent=333,q.summation=600,q.Egrave=611,q.racute=389,q.omacron=500,q.Zacute=556,q.Zcaron=556,q.greaterequal=549,q.Eth=722,q.Ccedilla=667,q.lcommaaccent=278,q.tcaron=300,q.eogonek=444,q.Uogonek=722,q.Aacute=611,q.Adieresis=611,q.egrave=444,q.zacute=389,q.iogonek=278,q.Oacute=722,q.oacute=500,q.amacron=500,q.sacute=389,q.idieresis=278,q.Ocircumflex=722,q.Ugrave=722,q.Delta=612,q.thorn=500,q.twosuperior=300,q.Odieresis=722,q.mu=500,q.igrave=278,q.ohungarumlaut=500,q.Eogonek=611,q.dcroat=500,q.threequarters=750,q.Scedilla=500,q.lcaron=300,q.Kcommaaccent=667,q.Lacute=556,q.trademark=980,q.edotaccent=444,q.Igrave=333,q.Imacron=333,q.Lcaron=611,q.onehalf=750,q.lessequal=549,q.ocircumflex=500,q.ntilde=500,q.Uhungarumlaut=722,q.Eacute=611,q.emacron=444,q.gbreve=500,q.onequarter=750,q.Scaron=500,q.Scommaaccent=500,q.Ohungarumlaut=722,q.degree=400,q.ograve=500,q.Ccaron=667,q.ugrave=500,q.radical=453,q.Dcaron=722,q.rcommaaccent=389,q.Ntilde=667,q.otilde=500,q.Rcommaaccent=611,q.Lcommaaccent=556,q.Atilde=611,q.Aogonek=611,q.Aring=611,q.Otilde=722,q.zdotaccent=389,q.Ecaron=611,q.Iogonek=333,q.kcommaaccent=444,q.minus=675,q.Icircumflex=333,q.ncaron=500,q.tcommaaccent=278,q.logicalnot=675,q.odieresis=500,q.udieresis=500,q.notequal=549,q.gcommaaccent=500,q.eth=500,q.zcaron=389,q.ncommaaccent=500,q.onesuperior=300,q.imacron=278,q.Euro=500}),Z.ZapfDingbats=G8(function(q){q.space=278,q.a1=974,q.a2=961,q.a202=974,q.a3=980,q.a4=719,q.a5=789,q.a119=790,q.a118=791,q.a117=690,q.a11=960,q.a12=939,q.a13=549,q.a14=855,q.a15=911,q.a16=933,q.a105=911,q.a17=945,q.a18=974,q.a19=755,q.a20=846,q.a21=762,q.a22=761,q.a23=571,q.a24=677,q.a25=763,q.a26=760,q.a27=759,q.a28=754,q.a6=494,q.a7=552,q.a8=537,q.a9=577,q.a10=692,q.a29=786,q.a30=788,q.a31=788,q.a32=790,q.a33=793,q.a34=794,q.a35=816,q.a36=823,q.a37=789,q.a38=841,q.a39=823,q.a40=833,q.a41=816,q.a42=831,q.a43=923,q.a44=744,q.a45=723,q.a46=749,q.a47=790,q.a48=792,q.a49=695,q.a50=776,q.a51=768,q.a52=792,q.a53=759,q.a54=707,q.a55=708,q.a56=682,q.a57=701,q.a58=826,q.a59=815,q.a60=789,q.a61=789,q.a62=707,q.a63=687,q.a64=696,q.a65=689,q.a66=786,q.a67=787,q.a68=713,q.a69=791,q.a70=785,q.a71=791,q.a72=873,q.a73=761,q.a74=762,q.a203=762,q.a75=759,q.a204=759,q.a76=892,q.a77=892,q.a78=788,q.a79=784,q.a81=438,q.a82=138,q.a83=277,q.a84=415,q.a97=392,q.a98=392,q.a99=668,q.a100=668,q.a89=390,q.a90=390,q.a93=317,q.a94=317,q.a91=276,q.a92=276,q.a205=509,q.a85=509,q.a206=410,q.a86=410,q.a87=234,q.a88=234,q.a95=334,q.a96=334,q.a101=732,q.a102=544,q.a103=544,q.a104=910,q.a106=667,q.a107=760,q.a108=760,q.a112=776,q.a111=595,q.a110=694,q.a109=626,q.a120=788,q.a121=788,q.a122=788,q.a123=788,q.a124=788,q.a125=788,q.a126=788,q.a127=788,q.a128=788,q.a129=788,q.a130=788,q.a131=788,q.a132=788,q.a133=788,q.a134=788,q.a135=788,q.a136=788,q.a137=788,q.a138=788,q.a139=788,q.a140=788,q.a141=788,q.a142=788,q.a143=788,q.a144=788,q.a145=788,q.a146=788,q.a147=788,q.a148=788,q.a149=788,q.a150=788,q.a151=788,q.a152=788,q.a153=788,q.a154=788,q.a155=788,q.a156=788,q.a157=788,q.a158=788,q.a159=788,q.a160=894,q.a161=838,q.a163=1016,q.a164=458,q.a196=748,q.a165=924,q.a192=748,q.a166=918,q.a167=927,q.a168=928,q.a169=928,q.a170=834,q.a171=873,q.a172=828,q.a173=924,q.a162=924,q.a174=917,q.a175=930,q.a176=931,q.a177=463,q.a178=883,q.a179=836,q.a193=836,q.a180=867,q.a199=867,q.a181=696,q.a200=696,q.a182=874,q.a201=874,q.a183=760,q.a184=946,q.a197=771,q.a185=865,q.a194=771,q.a198=888,q.a186=967,q.a195=888,q.a187=831,q.a188=873,q.a189=927,q.a190=970,q.a191=918})}),iI=G8(function(Z){Z.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},Z["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},Z["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},Z["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},Z.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},Z["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},Z["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},Z["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},Z["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},Z["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},Z["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},Z["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},Z.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},Z.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}});eI=[4],Zj=[5],qj=[6],Xj=[7],zj=[8],Rj=[12,35],t9=[14],HR=[21],xR=[22],Gj=[30],Pj=[31];Y4=[[57344,63743],[1048576,1114109]],Qj=["ascent","bbox","black","bold","charProcOperatorList","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","disableFontFace","fallbackName","fontExtraProperties","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","systemFontInfo","vertical"],Yj=["cMap","composite","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","subtype","toFontChar","toUnicode","type","vmetrics","widths"];CQ=class CQ extends _6{constructor(Z,q,X,z,R,G){super(),this.shadingType=Z.get("ShadingType");let P=0;if(this.shadingType===_q?P=4:this.shadingType===l2&&(P=6),this.coordsArr=Z.getArray("Coords"),!e8(this.coordsArr,P))throw new h("RadialAxialShading: Invalid /Coords array.");let Q=g1.parse({cs:Z.getRaw("CS")||Z.getRaw("ColorSpace"),xref:q,resources:X,pdfFunctionFactory:z,globalColorSpaceCache:R,localColorSpaceCache:G});this.bbox=T4(Z.getArray("BBox"),null);let Y=0,W=1,$=Z.getArray("Domain");e8($,2)&&([Y,W]=$);let _=!1,J=!1,U=Z.getArray("Extend");var f,K;if(f=U,K=2,Array.isArray(f)&&f.length===K&&f.every((p)=>typeof p=="boolean")&&([_,J]=U),!(this.shadingType!==l2||_&&J)){let[p,F,s,w,c,o]=this.coordsArr,Q1=Math.hypot(p-w,F-c);s<=o+Q1&&o<=s+Q1&&v("Unsupported radial gradient.")}this.extendStart=_,this.extendEnd=J;let I=Z.getRaw("Function"),B=z.create(I,!0),j=(W-Y)/840,V=this.colorStops=[];if(Y>=W||j<=0)return void v1("Bad shading domain.");let x=new Float32Array(Q.numComps),M=new Float32Array(1),H=0;M[0]=Y,B(M,0,x,0);let A=new Uint8ClampedArray(3);Q.getRgb(x,0,A);let[T,k,y]=A;V.push([0,h1.makeHexColor(T,k,y)]);let O=1;M[0]=Y+j,B(M,0,x,0),Q.getRgb(x,0,A);let[D,n,b]=A,l=D-T+1,N=n-k+1,L=b-y+1,m=D-T-1,d=n-k-1,e=b-y-1;for(let p=2;p<840;p++){M[0]=Y+p*j,B(M,0,x,0),Q.getRgb(x,0,A);let[F,s,w]=A,c=p-H;if(l=Math.min(l,(F-T+1)/c),N=Math.min(N,(s-k+1)/c),L=Math.min(L,(w-y+1)/c),m=Math.max(m,(F-T-1)/c),d=Math.max(d,(s-k-1)/c),e=Math.max(e,(w-y-1)/c),!(m<=l&&d<=N&&e<=L)){let o=h1.makeHexColor(D,n,b);V.push([O/840,o]),l=F-D+1,N=s-n+1,L=w-b+1,m=F-D-1,d=s-n-1,e=w-b-1,H=O,T=D,k=n,y=b}O=p,D=F,n=s,b=w}V.push([1,h1.makeHexColor(D,n,b)]);let E="transparent";Z.has("Background")&&(E=Q.getRgbHex(Z.get("Background"),0)),_||(V.unshift([0,E]),V[1][0]+=_6.SMALL_NUMBER),J||(V.at(-1)[0]-=_6.SMALL_NUMBER,V.push([1,E])),this.colorStops=V}getIR(){let{coordsArr:Z,shadingType:q}=this,X,z,R,G,P;return q===_q?(z=[Z[0],Z[1]],R=[Z[2],Z[3]],G=null,P=null,X="axial"):q===l2?(z=[Z[0],Z[1]],R=[Z[3],Z[4]],G=Z[2],P=Z[5],X="radial"):y1(`getPattern type unknown: ${q}`),["RadialAxial",X,this.bbox,this.colorStops,z,R,G,P]}};vQ=Object.create(null);p4=class p4 extends _6{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(Z,q,X,z,R,G){if(super(),!(Z instanceof C1))throw new h("Mesh data is not a stream");let P=Z.dict;this.shadingType=P.get("ShadingType"),this.bbox=T4(P.getArray("BBox"),null);let Q=g1.parse({cs:P.getRaw("CS")||P.getRaw("ColorSpace"),xref:q,resources:X,pdfFunctionFactory:z,globalColorSpaceCache:R,localColorSpaceCache:G});this.background=P.has("Background")?Q.getRgb(P.get("Background"),0):null;let Y=P.getRaw("Function"),W=Y?z.create(Y,!0):null;this.coords=[],this.colors=[],this.figures=[];let $={bitsPerCoordinate:P.get("BitsPerCoordinate"),bitsPerComponent:P.get("BitsPerComponent"),bitsPerFlag:P.get("BitsPerFlag"),decode:P.getArray("Decode"),colorFn:W,colorSpace:Q,numComps:W?1:Q.numComps},_=new FQ(Z,$),J=!1;switch(this.shadingType){case AQ:this._decodeType4Shading(_);break;case LQ:let U=0|P.get("VerticesPerRow");if(U<2)throw new h("Invalid VerticesPerRow");this._decodeType5Shading(_,U);break;case kQ:this._decodeType6Shading(_),J=!0;break;case TQ:this._decodeType7Shading(_),J=!0;break;default:y1("Unsupported mesh type.")}if(J){this._updateBounds();for(let U=0,f=this.figures.length;U<f;U++)this._buildFigureFromPatch(U)}this._updateBounds(),this._packData()}_decodeType4Shading(Z){let q=this.coords,X=this.colors,z=[],R=0;for(;Z.hasData;){let G=Z.readFlag(),P=Z.readCoordinate(),Q=Z.readComponents();if(R===0){if(!(0<=G&&G<=2))throw new h("Unknown type4 flag");switch(G){case 0:R=3;break;case 1:z.push(z.at(-2),z.at(-1)),R=1;break;case 2:z.push(z.at(-3),z.at(-1)),R=1}}z.push(q.length),q.push(P),X.push(Q),R--,Z.align()}this.figures.push({type:"triangles",coords:new Int32Array(z),colors:new Int32Array(z)})}_decodeType5Shading(Z,q){let X=this.coords,z=this.colors,R=[];for(;Z.hasData;){let G=Z.readCoordinate(),P=Z.readComponents();R.push(X.length),X.push(G),z.push(P)}this.figures.push({type:"lattice",coords:new Int32Array(R),colors:new Int32Array(R),verticesPerRow:q})}_decodeType6Shading(Z){let q=this.coords,X=this.colors,z=new Int32Array(16),R=new Int32Array(4);for(;Z.hasData;){let G=Z.readFlag();if(!(0<=G&&G<=3))throw new h("Unknown type6 flag");let P=q.length;for(let J=0,U=G!==0?8:12;J<U;J++)q.push(Z.readCoordinate());let Q=X.length;for(let J=0,U=G!==0?2:4;J<U;J++)X.push(Z.readComponents());let Y,W,$,_;switch(G){case 0:z[12]=P+3,z[13]=P+4,z[14]=P+5,z[15]=P+6,z[8]=P+2,z[11]=P+7,z[4]=P+1,z[7]=P+8,z[0]=P,z[1]=P+11,z[2]=P+10,z[3]=P+9,R[2]=Q+1,R[3]=Q+2,R[0]=Q,R[1]=Q+3;break;case 1:Y=z[12],W=z[13],$=z[14],_=z[15],z[12]=_,z[13]=P+0,z[14]=P+1,z[15]=P+2,z[8]=$,z[11]=P+3,z[4]=W,z[7]=P+4,z[0]=Y,z[1]=P+7,z[2]=P+6,z[3]=P+5,Y=R[2],W=R[3],R[2]=W,R[3]=Q,R[0]=Y,R[1]=Q+1;break;case 2:Y=z[15],W=z[11],z[12]=z[3],z[13]=P+0,z[14]=P+1,z[15]=P+2,z[8]=z[7],z[11]=P+3,z[4]=W,z[7]=P+4,z[0]=Y,z[1]=P+7,z[2]=P+6,z[3]=P+5,Y=R[3],R[2]=R[1],R[3]=Q,R[0]=Y,R[1]=Q+1;break;case 3:z[12]=z[0],z[13]=P+0,z[14]=P+1,z[15]=P+2,z[8]=z[1],z[11]=P+3,z[4]=z[2],z[7]=P+4,z[0]=z[3],z[1]=P+7,z[2]=P+6,z[3]=P+5,R[2]=R[0],R[3]=Q,R[0]=R[1],R[1]=Q+1}z[5]=q.length,q.push([(-4*q[z[0]][0]-q[z[15]][0]+6*(q[z[4]][0]+q[z[1]][0])-2*(q[z[12]][0]+q[z[3]][0])+3*(q[z[13]][0]+q[z[7]][0]))/9,(-4*q[z[0]][1]-q[z[15]][1]+6*(q[z[4]][1]+q[z[1]][1])-2*(q[z[12]][1]+q[z[3]][1])+3*(q[z[13]][1]+q[z[7]][1]))/9]),z[6]=q.length,q.push([(-4*q[z[3]][0]-q[z[12]][0]+6*(q[z[2]][0]+q[z[7]][0])-2*(q[z[0]][0]+q[z[15]][0])+3*(q[z[4]][0]+q[z[14]][0]))/9,(-4*q[z[3]][1]-q[z[12]][1]+6*(q[z[2]][1]+q[z[7]][1])-2*(q[z[0]][1]+q[z[15]][1])+3*(q[z[4]][1]+q[z[14]][1]))/9]),z[9]=q.length,q.push([(-4*q[z[12]][0]-q[z[3]][0]+6*(q[z[8]][0]+q[z[13]][0])-2*(q[z[0]][0]+q[z[15]][0])+3*(q[z[11]][0]+q[z[1]][0]))/9,(-4*q[z[12]][1]-q[z[3]][1]+6*(q[z[8]][1]+q[z[13]][1])-2*(q[z[0]][1]+q[z[15]][1])+3*(q[z[11]][1]+q[z[1]][1]))/9]),z[10]=q.length,q.push([(-4*q[z[15]][0]-q[z[0]][0]+6*(q[z[11]][0]+q[z[14]][0])-2*(q[z[12]][0]+q[z[3]][0])+3*(q[z[2]][0]+q[z[8]][0]))/9,(-4*q[z[15]][1]-q[z[0]][1]+6*(q[z[11]][1]+q[z[14]][1])-2*(q[z[12]][1]+q[z[3]][1])+3*(q[z[2]][1]+q[z[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(z),colors:new Int32Array(R)})}}_decodeType7Shading(Z){let q=this.coords,X=this.colors,z=new Int32Array(16),R=new Int32Array(4);for(;Z.hasData;){let G=Z.readFlag();if(!(0<=G&&G<=3))throw new h("Unknown type7 flag");let P=q.length;for(let J=0,U=G!==0?12:16;J<U;J++)q.push(Z.readCoordinate());let Q=X.length;for(let J=0,U=G!==0?2:4;J<U;J++)X.push(Z.readComponents());let Y,W,$,_;switch(G){case 0:z[12]=P+3,z[13]=P+4,z[14]=P+5,z[15]=P+6,z[8]=P+2,z[9]=P+13,z[10]=P+14,z[11]=P+7,z[4]=P+1,z[5]=P+12,z[6]=P+15,z[7]=P+8,z[0]=P,z[1]=P+11,z[2]=P+10,z[3]=P+9,R[2]=Q+1,R[3]=Q+2,R[0]=Q,R[1]=Q+3;break;case 1:Y=z[12],W=z[13],$=z[14],_=z[15],z[12]=_,z[13]=P+0,z[14]=P+1,z[15]=P+2,z[8]=$,z[9]=P+9,z[10]=P+10,z[11]=P+3,z[4]=W,z[5]=P+8,z[6]=P+11,z[7]=P+4,z[0]=Y,z[1]=P+7,z[2]=P+6,z[3]=P+5,Y=R[2],W=R[3],R[2]=W,R[3]=Q,R[0]=Y,R[1]=Q+1;break;case 2:Y=z[15],W=z[11],z[12]=z[3],z[13]=P+0,z[14]=P+1,z[15]=P+2,z[8]=z[7],z[9]=P+9,z[10]=P+10,z[11]=P+3,z[4]=W,z[5]=P+8,z[6]=P+11,z[7]=P+4,z[0]=Y,z[1]=P+7,z[2]=P+6,z[3]=P+5,Y=R[3],R[2]=R[1],R[3]=Q,R[0]=Y,R[1]=Q+1;break;case 3:z[12]=z[0],z[13]=P+0,z[14]=P+1,z[15]=P+2,z[8]=z[1],z[9]=P+9,z[10]=P+10,z[11]=P+3,z[4]=z[2],z[5]=P+8,z[6]=P+11,z[7]=P+4,z[0]=z[3],z[1]=P+7,z[2]=P+6,z[3]=P+5,R[2]=R[0],R[3]=Q,R[0]=R[1],R[1]=Q+1}this.figures.push({type:"patch",coords:new Int32Array(z),colors:new Int32Array(R)})}}_buildFigureFromPatch(Z){let q=this.figures[Z];t1(q.type==="patch","Unexpected patch mesh figure");let X=this.coords,z=this.colors,R=q.coords,G=q.colors,P=Math.min(X[R[0]][0],X[R[3]][0],X[R[12]][0],X[R[15]][0]),Q=Math.min(X[R[0]][1],X[R[3]][1],X[R[12]][1],X[R[15]][1]),Y=Math.max(X[R[0]][0],X[R[3]][0],X[R[12]][0],X[R[15]][0]),W=Math.max(X[R[0]][1],X[R[3]][1],X[R[12]][1],X[R[15]][1]),$=Math.ceil((Y-P)*p4.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));$=E8($,p4.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,p4.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);let _=Math.ceil((W-Q)*p4.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));_=E8(_,p4.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,p4.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);let J=$+1,U=new Int32Array((_+1)*J),f=new Int32Array((_+1)*J),K=0,I=new Uint8Array(3),B=new Uint8Array(3),j=z[G[0]],V=z[G[1]],x=z[G[2]],M=z[G[3]],H=SR(_),A=SR($);for(let T=0;T<=_;T++){I[0]=(j[0]*(_-T)+x[0]*T)/_|0,I[1]=(j[1]*(_-T)+x[1]*T)/_|0,I[2]=(j[2]*(_-T)+x[2]*T)/_|0,B[0]=(V[0]*(_-T)+M[0]*T)/_|0,B[1]=(V[1]*(_-T)+M[1]*T)/_|0,B[2]=(V[2]*(_-T)+M[2]*T)/_|0;for(let k=0;k<=$;k++,K++){if(!(T!==0&&T!==_||k!==0&&k!==$))continue;let y=0,O=0,D=0;for(let b=0;b<=3;b++)for(let l=0;l<=3;l++,D++){let N=H[T][b]*A[k][l];y+=X[R[D]][0]*N,O+=X[R[D]][1]*N}U[K]=X.length,X.push([y,O]),f[K]=z.length;let n=new Uint8Array(3);n[0]=(I[0]*($-k)+B[0]*k)/$|0,n[1]=(I[1]*($-k)+B[1]*k)/$|0,n[2]=(I[2]*($-k)+B[2]*k)/$|0,z.push(n)}}U[0]=R[0],f[0]=G[0],U[$]=R[3],f[$]=G[1],U[J*_]=R[12],f[J*_]=G[2],U[J*_+$]=R[15],f[J*_+$]=G[3],this.figures[Z]={type:"lattice",coords:U,colors:f,verticesPerRow:J}}_updateBounds(){let Z=this.coords[0][0],q=this.coords[0][1],X=Z,z=q;for(let R=1,G=this.coords.length;R<G;R++){let P=this.coords[R][0],Q=this.coords[R][1];Z=Z>P?P:Z,q=q>Q?Q:q,X=X<P?P:X,z=z<Q?Q:z}this.bounds=[Z,q,X,z]}_packData(){let Z,q,X,z,R=this.coords,G=new Float32Array(2*R.length);for(Z=0,X=0,q=R.length;Z<q;Z++){let W=R[Z];G[X++]=W[0],G[X++]=W[1]}this.coords=G;let P=this.colors,Q=new Uint8Array(3*P.length);for(Z=0,X=0,q=P.length;Z<q;Z++){let W=P[Z];Q[X++]=W[0],Q[X++]=W[1],Q[X++]=W[2]}this.colors=Q;let Y=this.figures;for(Z=0,q=Y.length;Z<q;Z++){let W=Y[Z],$=W.coords,_=W.colors;for(X=0,z=$.length;X<z;X++)$[X]*=2,_[X]*=3}}getIR(){let{bounds:Z}=this;if(Z[2]-Z[0]===0||Z[3]-Z[1]===0)throw new h(`Invalid MeshShading bounds: [${Z}].`);return["Mesh",this.shadingType,this.coords,this.colors,this.figures,Z,this.bbox,this.background]}};bQ=class bQ extends _6{getIR(){return["Dummy"]}};Jj=[1.3877,1,1,1,0.97801,0.92482,0.89552,0.91133,0.81988,0.97566,0.98152,0.93548,0.93548,1.2798,0.85284,0.92794,1,0.96134,1.54657,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.82845,0.82845,0.85284,0.85284,0.85284,0.75859,0.92138,0.83908,0.7762,0.73293,0.87289,0.73133,0.7514,0.81921,0.87356,0.95958,0.59526,0.75727,0.69225,1.04924,0.9121,0.86943,0.79795,0.88198,0.77958,0.70864,0.81055,0.90399,0.88653,0.96017,0.82577,0.77892,0.78257,0.97507,1.54657,0.97507,0.85284,0.89552,0.90176,0.88762,0.8785,0.75241,0.8785,0.90518,0.95015,0.77618,0.8785,0.88401,0.91916,0.86304,0.88401,0.91488,0.8785,0.8801,0.8785,0.8785,0.91343,0.7173,1.04106,0.8785,0.85075,0.95794,0.82616,0.85162,0.79492,0.88331,1.69808,0.88331,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.7801,0.89552,1.24487,1.13254,1.12401,0.96839,0.85284,0.68787,0.70645,0.85592,0.90747,1.01466,1.0088,0.90323,1,1.07463,1,0.91056,0.75806,1.19118,0.96839,0.78864,0.82845,0.84133,0.75859,0.83908,0.83908,0.83908,0.83908,0.83908,0.83908,0.77539,0.73293,0.73133,0.73133,0.73133,0.73133,0.95958,0.95958,0.95958,0.95958,0.88506,0.9121,0.86943,0.86943,0.86943,0.86943,0.86943,0.85284,0.87508,0.90399,0.90399,0.90399,0.90399,0.77892,0.79795,0.90807,0.88762,0.88762,0.88762,0.88762,0.88762,0.88762,0.8715,0.75241,0.90518,0.90518,0.90518,0.90518,0.88401,0.88401,0.88401,0.88401,0.8785,0.8785,0.8801,0.8801,0.8801,0.8801,0.8801,0.90747,0.89049,0.8785,0.8785,0.8785,0.8785,0.85162,0.8785,0.85162,0.83908,0.88762,0.83908,0.88762,0.83908,0.88762,0.73293,0.75241,0.73293,0.75241,0.73293,0.75241,0.73293,0.75241,0.87289,0.83016,0.88506,0.93125,0.73133,0.90518,0.73133,0.90518,0.73133,0.90518,0.73133,0.90518,0.73133,0.90518,0.81921,0.77618,0.81921,0.77618,0.81921,0.77618,1,1,0.87356,0.8785,0.91075,0.89608,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.76229,0.90167,0.59526,0.91916,1,1,0.86304,0.69225,0.88401,1,1,0.70424,0.79468,0.91926,0.88175,0.70823,0.94903,0.9121,0.8785,1,1,0.9121,0.8785,0.87802,0.88656,0.8785,0.86943,0.8801,0.86943,0.8801,0.86943,0.8801,0.87402,0.89291,0.77958,0.91343,1,1,0.77958,0.91343,0.70864,0.7173,0.70864,0.7173,0.70864,0.7173,0.70864,0.7173,1,1,0.81055,0.75841,0.81055,1.06452,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.90399,0.8785,0.96017,0.95794,0.77892,0.85162,0.77892,0.78257,0.79492,0.78257,0.79492,0.78257,0.79492,0.9297,0.56892,0.83908,0.88762,0.77539,0.8715,0.87508,0.89049,1,1,0.81055,1.04106,1.20528,1.20528,1,1.15543,0.70674,0.98387,0.94721,1.33431,1.45894,0.95161,1.06303,0.83908,0.80352,0.57184,0.6965,0.56289,0.82001,0.56029,0.81235,1.02988,0.83908,0.7762,0.68156,0.80367,0.73133,0.78257,0.87356,0.86943,0.95958,0.75727,0.89019,1.04924,0.9121,0.7648,0.86943,0.87356,0.79795,0.78275,0.81055,0.77892,0.9762,0.82577,0.99819,0.84896,0.95958,0.77892,0.96108,1.01407,0.89049,1.02988,0.94211,0.96108,0.8936,0.84021,0.87842,0.96399,0.79109,0.89049,1.00813,1.02988,0.86077,0.87445,0.92099,0.84723,0.86513,0.8801,0.75638,0.85714,0.78216,0.79586,0.87965,0.94211,0.97747,0.78287,0.97926,0.84971,1.02988,0.94211,0.8801,0.94211,0.84971,0.73133,1,1,1,1,1,1,1,1,1,1,1,1,0.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.90518,1,1,1,1,1,1,1,1,1,1,1,1,0.90548,1,1,1,1,1,1,0.96017,0.95794,0.96017,0.95794,0.96017,0.95794,0.77892,0.85162,1,1,0.89552,0.90527,1,0.90363,0.92794,0.92794,0.92794,0.92794,0.87012,0.87012,0.87012,0.89552,0.89552,1.42259,0.71143,1.06152,1,1,1.03372,1.03372,0.97171,1.4956,2.2807,0.93835,0.83406,0.91133,0.84107,0.91133,1,1,1,0.72021,1,1.23108,0.83489,0.88525,0.88525,0.81499,0.90527,1.81055,0.90527,1.81055,1.31006,1.53711,0.94434,1.08696,1,0.95018,0.77192,0.85284,0.90747,1.17534,0.69825,0.9716,1.37077,0.90747,0.90747,0.85356,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.08004,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,0.90727,0.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Uj={lineHeight:1.2207,lineGap:0.2207},fj=[1.3877,1,1,1,0.97801,0.92482,0.89552,0.91133,0.81988,0.97566,0.98152,0.93548,0.93548,1.2798,0.85284,0.92794,1,0.96134,1.56239,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.82845,0.82845,0.85284,0.85284,0.85284,0.75859,0.92138,0.83908,0.7762,0.71805,0.87289,0.73133,0.7514,0.81921,0.87356,0.95958,0.59526,0.75727,0.69225,1.04924,0.90872,0.85938,0.79795,0.87068,0.77958,0.69766,0.81055,0.90399,0.88653,0.96068,0.82577,0.77892,0.78257,0.97507,1.529,0.97507,0.85284,0.89552,0.90176,0.94908,0.86411,0.74012,0.86411,0.88323,0.95015,0.86411,0.86331,0.88401,0.91916,0.86304,0.88401,0.9039,0.86331,0.86331,0.86411,0.86411,0.90464,0.70852,1.04106,0.86331,0.84372,0.95794,0.82616,0.84548,0.79492,0.88331,1.69808,0.88331,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.7801,0.89552,1.24487,1.13254,1.19129,0.96839,0.85284,0.68787,0.70645,0.85592,0.90747,1.01466,1.0088,0.90323,1,1.07463,1,0.91056,0.75806,1.19118,0.96839,0.78864,0.82845,0.84133,0.75859,0.83908,0.83908,0.83908,0.83908,0.83908,0.83908,0.77539,0.71805,0.73133,0.73133,0.73133,0.73133,0.95958,0.95958,0.95958,0.95958,0.88506,0.90872,0.85938,0.85938,0.85938,0.85938,0.85938,0.85284,0.87068,0.90399,0.90399,0.90399,0.90399,0.77892,0.79795,0.90807,0.94908,0.94908,0.94908,0.94908,0.94908,0.94908,0.85887,0.74012,0.88323,0.88323,0.88323,0.88323,0.88401,0.88401,0.88401,0.88401,0.8785,0.86331,0.86331,0.86331,0.86331,0.86331,0.86331,0.90747,0.89049,0.86331,0.86331,0.86331,0.86331,0.84548,0.86411,0.84548,0.83908,0.94908,0.83908,0.94908,0.83908,0.94908,0.71805,0.74012,0.71805,0.74012,0.71805,0.74012,0.71805,0.74012,0.87289,0.79538,0.88506,0.92726,0.73133,0.88323,0.73133,0.88323,0.73133,0.88323,0.73133,0.88323,0.73133,0.88323,0.81921,0.86411,0.81921,0.86411,0.81921,0.86411,1,1,0.87356,0.86331,0.91075,0.8777,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.95958,0.88401,0.76467,0.90167,0.59526,0.91916,1,1,0.86304,0.69225,0.88401,1,1,0.70424,0.77312,0.91926,0.88175,0.70823,0.94903,0.90872,0.86331,1,1,0.90872,0.86331,0.86906,0.88116,0.86331,0.85938,0.86331,0.85938,0.86331,0.85938,0.86331,0.87402,0.86549,0.77958,0.90464,1,1,0.77958,0.90464,0.69766,0.70852,0.69766,0.70852,0.69766,0.70852,0.69766,0.70852,1,1,0.81055,0.75841,0.81055,1.06452,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.90399,0.86331,0.96068,0.95794,0.77892,0.84548,0.77892,0.78257,0.79492,0.78257,0.79492,0.78257,0.79492,0.9297,0.56892,0.83908,0.94908,0.77539,0.85887,0.87068,0.89049,1,1,0.81055,1.04106,1.20528,1.20528,1,1.15543,0.70088,0.98387,0.94721,1.33431,1.45894,0.95161,1.48387,0.83908,0.80352,0.57118,0.6965,0.56347,0.79179,0.55853,0.80346,1.02988,0.83908,0.7762,0.67174,0.86036,0.73133,0.78257,0.87356,0.86441,0.95958,0.75727,0.89019,1.04924,0.90872,0.74889,0.85938,0.87891,0.79795,0.7957,0.81055,0.77892,0.97447,0.82577,0.97466,0.87179,0.95958,0.77892,0.94252,0.95612,0.8753,1.02988,0.92733,0.94252,0.87411,0.84021,0.8728,0.95612,0.74081,0.8753,1.02189,1.02988,0.84814,0.87445,0.91822,0.84723,0.85668,0.86331,0.81344,0.87581,0.76422,0.82046,0.96057,0.92733,0.99375,0.78022,0.95452,0.86015,1.02988,0.92733,0.86331,0.92733,0.86015,0.73133,1,1,1,1,1,1,1,1,1,1,1,1,0.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.88323,1,1,1,1,1,1,1,1,1,1,1,1,0.85174,1,1,1,1,1,1,0.96068,0.95794,0.96068,0.95794,0.96068,0.95794,0.77892,0.84548,1,1,0.89552,0.90527,1,0.90363,0.92794,0.92794,0.92794,0.89807,0.87012,0.87012,0.87012,0.89552,0.89552,1.42259,0.71094,1.06152,1,1,1.03372,1.03372,0.97171,1.4956,2.2807,0.92972,0.83406,0.91133,0.83326,0.91133,1,1,1,0.72021,1,1.23108,0.83489,0.88525,0.88525,0.81499,0.90616,1.81055,0.90527,1.81055,1.3107,1.53711,0.94434,1.08696,1,0.95018,0.77192,0.85284,0.90747,1.17534,0.69825,0.9716,1.37077,0.90747,0.90747,0.85356,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.08004,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,0.90727,0.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Kj={lineHeight:1.2207,lineGap:0.2207},Bj=[1.3877,1,1,1,1.17223,1.1293,0.89552,0.91133,0.80395,1.02269,1.15601,0.91056,0.91056,1.2798,0.85284,0.89807,1,0.90861,1.39543,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.96309,0.96309,0.85284,0.85284,0.85284,0.83319,0.88071,0.8675,0.81552,0.72346,0.85193,0.73206,0.7522,0.81105,0.86275,0.90685,0.6377,0.77892,0.75593,1.02638,0.89249,0.84118,0.77452,0.85374,0.75186,0.67789,0.79776,0.88844,0.85066,0.94309,0.77818,0.7306,0.76659,1.10369,1.38313,1.10369,1.06139,0.89552,0.8739,0.9245,0.9245,0.83203,0.9245,0.85865,1.09842,0.9245,0.9245,1.03297,1.07692,0.90918,1.03297,0.94959,0.9245,0.92274,0.9245,0.9245,1.02933,0.77832,1.20562,0.9245,0.8916,0.98986,0.86621,0.89453,0.79004,0.94152,1.77256,0.94152,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.91729,0.89552,1.17889,1.13254,1.16359,0.92098,0.85284,0.68787,0.71353,0.84737,0.90747,1.0088,1.0044,0.87683,1,1.09091,1,0.92229,0.739,1.15642,0.92098,0.76288,0.80504,0.80972,0.75859,0.8675,0.8675,0.8675,0.8675,0.8675,0.8675,0.76318,0.72346,0.73206,0.73206,0.73206,0.73206,0.90685,0.90685,0.90685,0.90685,0.86477,0.89249,0.84118,0.84118,0.84118,0.84118,0.84118,0.85284,0.84557,0.88844,0.88844,0.88844,0.88844,0.7306,0.77452,0.86331,0.9245,0.9245,0.9245,0.9245,0.9245,0.9245,0.84843,0.83203,0.85865,0.85865,0.85865,0.85865,0.82601,0.82601,0.82601,0.82601,0.94469,0.9245,0.92274,0.92274,0.92274,0.92274,0.92274,0.90747,0.86651,0.9245,0.9245,0.9245,0.9245,0.89453,0.9245,0.89453,0.8675,0.9245,0.8675,0.9245,0.8675,0.9245,0.72346,0.83203,0.72346,0.83203,0.72346,0.83203,0.72346,0.83203,0.85193,0.8875,0.86477,0.99034,0.73206,0.85865,0.73206,0.85865,0.73206,0.85865,0.73206,0.85865,0.73206,0.85865,0.81105,0.9245,0.81105,0.9245,0.81105,0.9245,1,1,0.86275,0.9245,0.90872,0.93591,0.90685,0.82601,0.90685,0.82601,0.90685,0.82601,0.90685,1.03297,0.90685,0.82601,0.77896,1.05611,0.6377,1.07692,1,1,0.90918,0.75593,1.03297,1,1,0.76032,0.9375,0.98156,0.93407,0.77261,1.11429,0.89249,0.9245,1,1,0.89249,0.9245,0.92534,0.86698,0.9245,0.84118,0.92274,0.84118,0.92274,0.84118,0.92274,0.8667,0.86291,0.75186,1.02933,1,1,0.75186,1.02933,0.67789,0.77832,0.67789,0.77832,0.67789,0.77832,0.67789,0.77832,1,1,0.79776,0.97655,0.79776,1.23023,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.88844,0.9245,0.94309,0.98986,0.7306,0.89453,0.7306,0.76659,0.79004,0.76659,0.79004,0.76659,0.79004,1.09231,0.54873,0.8675,0.9245,0.76318,0.84843,0.84557,0.86651,1,1,0.79776,1.20562,1.18622,1.18622,1,1.1437,0.67009,0.96334,0.93695,1.35191,1.40909,0.95161,1.48387,0.8675,0.90861,0.6192,0.7363,0.64824,0.82411,0.56321,0.85696,1.23516,0.8675,0.81552,0.7286,0.84134,0.73206,0.76659,0.86275,0.84369,0.90685,0.77892,0.85871,1.02638,0.89249,0.75828,0.84118,0.85984,0.77452,0.76466,0.79776,0.7306,0.90782,0.77818,0.903,0.87291,0.90685,0.7306,0.99058,1.03667,0.94635,1.23516,0.9849,0.99058,0.92393,0.8916,0.942,1.03667,0.75026,0.94635,1.0297,1.23516,0.90918,0.94048,0.98217,0.89746,0.84153,0.92274,0.82507,0.88832,0.84438,0.88178,1.03525,0.9849,1.00225,0.78086,0.97248,0.89404,1.23516,0.9849,0.92274,0.9849,0.89404,0.73206,1,1,1,1,1,1,1,1,1,1,1,1,0.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.85865,1,1,1,1,1,1,1,1,1,1,1,1,0.90933,1,1,1,1,1,1,0.94309,0.98986,0.94309,0.98986,0.94309,0.98986,0.7306,0.89453,1,1,0.89552,0.90527,1,0.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,0.89552,0.89552,1.42259,0.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,0.97858,0.82616,0.91133,0.83437,0.91133,1,1,1,0.70508,1,1.23108,0.79801,0.84426,0.84426,0.774,0.90572,1.81055,0.90749,1.81055,1.28809,1.55469,0.94434,1.07806,1,0.97094,0.7589,0.85284,0.90747,1.19658,0.69825,0.97622,1.33512,0.90747,0.90747,0.85284,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.0336,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Ij={lineHeight:1.2207,lineGap:0.2207},jj=[1.3877,1,1,1,1.17223,1.1293,0.89552,0.91133,0.80395,1.02269,1.15601,0.91056,0.91056,1.2798,0.85284,0.89807,1,0.90861,1.39016,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.91133,0.96309,0.96309,0.85284,0.85284,0.85284,0.83319,0.88071,0.8675,0.81552,0.73834,0.85193,0.73206,0.7522,0.81105,0.86275,0.90685,0.6377,0.77892,0.75593,1.02638,0.89385,0.85122,0.77452,0.86503,0.75186,0.68887,0.79776,0.88844,0.85066,0.94258,0.77818,0.7306,0.76659,1.10369,1.39016,1.10369,1.06139,0.89552,0.8739,0.86128,0.94469,0.8457,0.94469,0.89464,1.09842,0.84636,0.94469,1.03297,1.07692,0.90918,1.03297,0.95897,0.94469,0.9482,0.94469,0.94469,1.04692,0.78223,1.20562,0.94469,0.90332,0.98986,0.86621,0.90527,0.79004,0.94152,1.77256,0.94152,0.85284,0.97801,0.89552,0.91133,0.89552,0.91133,1.91729,0.89552,1.17889,1.13254,1.08707,0.92098,0.85284,0.68787,0.71353,0.84737,0.90747,1.0088,1.0044,0.87683,1,1.09091,1,0.92229,0.739,1.15642,0.92098,0.76288,0.80504,0.80972,0.75859,0.8675,0.8675,0.8675,0.8675,0.8675,0.8675,0.76318,0.73834,0.73206,0.73206,0.73206,0.73206,0.90685,0.90685,0.90685,0.90685,0.86477,0.89385,0.85122,0.85122,0.85122,0.85122,0.85122,0.85284,0.85311,0.88844,0.88844,0.88844,0.88844,0.7306,0.77452,0.86331,0.86128,0.86128,0.86128,0.86128,0.86128,0.86128,0.8693,0.8457,0.89464,0.89464,0.89464,0.89464,0.82601,0.82601,0.82601,0.82601,0.94469,0.94469,0.9482,0.9482,0.9482,0.9482,0.9482,0.90747,0.86651,0.94469,0.94469,0.94469,0.94469,0.90527,0.94469,0.90527,0.8675,0.86128,0.8675,0.86128,0.8675,0.86128,0.73834,0.8457,0.73834,0.8457,0.73834,0.8457,0.73834,0.8457,0.85193,0.92454,0.86477,0.9921,0.73206,0.89464,0.73206,0.89464,0.73206,0.89464,0.73206,0.89464,0.73206,0.89464,0.81105,0.84636,0.81105,0.84636,0.81105,0.84636,1,1,0.86275,0.94469,0.90872,0.95786,0.90685,0.82601,0.90685,0.82601,0.90685,0.82601,0.90685,1.03297,0.90685,0.82601,0.77741,1.05611,0.6377,1.07692,1,1,0.90918,0.75593,1.03297,1,1,0.76032,0.90452,0.98156,1.11842,0.77261,1.11429,0.89385,0.94469,1,1,0.89385,0.94469,0.95877,0.86901,0.94469,0.85122,0.9482,0.85122,0.9482,0.85122,0.9482,0.8667,0.90016,0.75186,1.04692,1,1,0.75186,1.04692,0.68887,0.78223,0.68887,0.78223,0.68887,0.78223,0.68887,0.78223,1,1,0.79776,0.92188,0.79776,1.23023,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.88844,0.94469,0.94258,0.98986,0.7306,0.90527,0.7306,0.76659,0.79004,0.76659,0.79004,0.76659,0.79004,1.09231,0.54873,0.8675,0.86128,0.76318,0.8693,0.85311,0.86651,1,1,0.79776,1.20562,1.18622,1.18622,1,1.1437,0.67742,0.96334,0.93695,1.35191,1.40909,0.95161,1.48387,0.86686,0.90861,0.62267,0.74359,0.65649,0.85498,0.56963,0.88254,1.23516,0.8675,0.81552,0.75443,0.84503,0.73206,0.76659,0.86275,0.85122,0.90685,0.77892,0.85746,1.02638,0.89385,0.75657,0.85122,0.86275,0.77452,0.74171,0.79776,0.7306,0.95165,0.77818,0.89772,0.88831,0.90685,0.7306,0.98142,1.02191,0.96576,1.23516,0.99018,0.98142,0.9236,0.89258,0.94035,1.02191,0.78848,0.96576,0.9561,1.23516,0.90918,0.92578,0.95424,0.89746,0.83969,0.9482,0.80113,0.89442,0.85208,0.86155,0.98022,0.99018,1.00452,0.81209,0.99247,0.89181,1.23516,0.99018,0.9482,0.99018,0.89181,0.73206,1,1,1,1,1,1,1,1,1,1,1,1,0.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.89464,1,1,1,1,1,1,1,1,1,1,1,1,0.96766,1,1,1,1,1,1,0.94258,0.98986,0.94258,0.98986,0.94258,0.98986,0.7306,0.90527,1,1,0.89552,0.90527,1,0.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,0.89552,0.89552,1.42259,0.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,0.99331,0.82616,0.91133,0.84286,0.91133,1,1,1,0.70508,1,1.23108,0.79801,0.84426,0.84426,0.774,0.90527,1.81055,0.90527,1.81055,1.28809,1.55469,0.94434,1.07806,1,0.97094,0.7589,0.85284,0.90747,1.19658,0.69825,0.97622,1.33512,0.90747,0.90747,0.85356,0.90747,0.90747,1.44947,0.85284,0.8941,0.8941,0.70572,0.8,0.70572,0.70572,0.70572,0.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.99862,0.99862,1,1,1,1,1,1.0336,0.91027,1,1,1,0.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,0.99413,0.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],Vj={lineHeight:1.2207,lineGap:0.2207},Hj=[0.76116,1,1,1.0006,0.99998,0.99974,0.99973,0.99973,0.99982,0.99977,1.00087,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.00003,1.00003,1.00003,1.00026,0.9999,0.99977,0.99977,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,0.99973,0.99977,1.00026,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,0.99998,1.0006,0.99998,1.00003,0.99973,0.99998,0.99973,1.00026,0.99973,1.00026,0.99973,0.99998,1.00026,1.00026,1.0006,1.0006,0.99973,1.0006,0.99982,1.00026,1.00026,1.00026,1.00026,0.99959,0.99973,0.99998,1.00026,0.99973,1.00022,0.99973,0.99973,1,0.99959,1.00077,0.99959,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.00077,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.99973,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,0.99977,0.99977,0.99977,0.99977,0.99977,0.99977,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,0.99973,1.00026,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,1.03374,0.99977,1.00026,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,0.99977,1.00026,0.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,0.99973,0.99973,1.0006,0.99977,0.99973,0.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,0.99999,1.00026,1.0006,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.9993,0.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,0.99977,0.99959,0.99977,0.99959,0.99977,0.99959,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00026,0.99998,1.00026,0.8121,1.00026,0.99998,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,1.00016,1.00022,1.00001,0.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,0.99973,0.99977,0.99973,1,0.99982,1.00022,1.00026,1.00001,0.99973,1.00026,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,1.00034,0.99977,1,0.99997,1.00026,1.00078,1.00036,0.99973,1.00013,1.0006,0.99977,0.99977,0.99988,0.85148,1.00001,1.00026,0.99977,1.00022,1.0006,0.99977,1.00001,0.99999,0.99977,1.00069,1.00022,0.99977,1.00001,0.99984,1.00026,1.00001,1.00024,1.00001,0.9999,1,1.0006,1.00001,1.00041,0.99962,1.00026,1.0006,0.99995,1.00041,0.99942,0.99973,0.99927,1.00082,0.99902,1.00026,1.00087,1.0006,1.00069,0.99973,0.99867,0.99973,0.9993,1.00026,1.00049,1.00056,1,0.99988,0.99935,0.99995,0.99954,1.00055,0.99945,1.00032,1.0006,0.99995,1.00026,0.99995,1.00032,1.00001,1.00008,0.99971,1.00019,0.9994,1.00001,1.0006,1.00044,0.99973,1.00023,1.00047,1,0.99942,0.99561,0.99989,1.00035,0.99977,1.00035,0.99977,1.00019,0.99944,1.00001,1.00021,0.99926,1.00035,1.00035,0.99942,1.00048,0.99999,0.99977,1.00022,1.00035,1.00001,0.99977,1.00026,0.99989,1.00057,1.00001,0.99936,1.00052,1.00012,0.99996,1.00043,1,1.00035,0.9994,0.99976,1.00035,0.99973,1.00052,1.00041,1.00119,1.00037,0.99973,1.00002,0.99986,1.00041,1.00041,0.99902,0.9996,1.00034,0.99999,1.00026,0.99999,1.00026,0.99973,1.00052,0.99973,1,0.99973,1.00041,1.00075,0.9994,1.0003,0.99999,1,1.00041,0.99955,1,0.99915,0.99973,0.99973,1.00026,1.00119,0.99955,0.99973,1.0006,0.99911,1.0006,1.00026,0.99972,1.00026,0.99902,1.00041,0.99973,0.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,0.99973,1,1,0.99973,1,1,0.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,0.99973,0.99973,0.99972,1,1,1.00106,0.99999,0.99998,0.99998,0.99999,0.99998,1.66475,1,0.99973,0.99973,1.00023,0.99973,0.99971,1.00047,1.00023,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,0.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,0.99561,1.00027,1.00031,1.00031,0.99915,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.99972,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,0.99998,0.99998,0.99998,0.99998,1,1,1,1,1,1,1,1,1,1,1],xj={lineHeight:1.2,lineGap:0.2},Mj=[0.76116,1,1,1.0006,0.99998,0.99974,0.99973,0.99973,0.99982,0.99977,1.00087,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.00003,1.00003,1.00003,1.00026,0.9999,0.99977,0.99977,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,0.99973,0.99977,1.00026,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,0.99998,1.0006,0.99998,1.00003,0.99973,0.99998,0.99973,1.00026,0.99973,1.00026,0.99973,0.99998,1.00026,1.00026,1.0006,1.0006,0.99973,1.0006,0.99982,1.00026,1.00026,1.00026,1.00026,0.99959,0.99973,0.99998,1.00026,0.99973,1.00022,0.99973,0.99973,1,0.99959,1.00077,0.99959,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.00077,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.99973,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,0.99977,0.99977,0.99977,0.99977,0.99977,0.99977,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,0.99973,1.00026,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,1.0044,0.99977,1.00026,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,0.99977,1.00026,0.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,0.99971,0.99973,0.99973,1.0006,0.99977,0.99973,0.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,0.99999,1.00026,1.0006,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.9993,0.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,0.99977,0.99959,0.99977,0.99959,0.99977,0.99959,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00026,0.99998,1.00026,0.8121,1.00026,0.99998,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,0.99977,1.00026,1.00016,1.00022,1.00001,0.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,0.99973,0.99977,0.99973,1,0.99982,1.00022,1.00026,1.00001,0.99973,1.00026,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99977,1,1,1.00026,0.99969,0.99972,0.99981,0.9998,1.0006,0.99977,0.99977,1.00022,0.91155,1.00001,1.00026,0.99977,1.00022,1.0006,0.99977,1.00001,0.99999,0.99977,0.99966,1.00022,1.00032,1.00001,0.99944,1.00026,1.00001,0.99968,1.00001,1.00047,1,1.0006,1.00001,0.99981,1.00101,1.00026,1.0006,0.99948,0.99981,1.00064,0.99973,0.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,0.99973,1.01322,0.99973,1.00065,1.00026,1.00012,0.99923,1,1.00064,1.00076,0.99948,1.00055,1.00063,1.00007,0.99943,1.0006,0.99948,1.00026,0.99948,0.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,0.99973,0.99978,1.00001,1.00057,0.99989,0.99967,0.99964,0.99967,0.99977,0.99999,0.99977,1.00038,0.99977,1.00001,0.99973,1.00066,0.99967,0.99967,1.00041,0.99998,0.99999,0.99977,1.00022,0.99967,1.00001,0.99977,1.00026,0.99964,1.00031,1.00001,0.99999,0.99999,1,1.00023,1,1,0.99999,1.00035,1.00001,0.99999,0.99973,0.99977,0.99999,1.00058,0.99973,0.99973,0.99955,0.9995,1.00026,1.00026,1.00032,0.99989,1.00034,0.99999,1.00026,1.00026,1.00026,0.99973,0.45998,0.99973,1.00026,0.99973,1.00001,0.99999,0.99982,0.99994,0.99996,1,1.00042,1.00044,1.00029,1.00023,0.99973,0.99973,1.00026,0.99949,1.00002,0.99973,1.0006,1.0006,1.0006,0.99975,1.00026,1.00026,1.00032,0.98685,0.99973,1.00026,1,1,0.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,0.99973,1,1,0.99973,1,1,0.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,0.99973,0.99973,0.99972,1,1,1.00106,0.99999,0.99998,0.99998,0.99999,0.99998,1.66475,1,0.99973,0.99973,1,0.99973,0.99971,0.99978,1,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,0.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,0.99561,1.00027,1.00031,1.00031,0.99915,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.99972,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,0.99998,0.99998,0.99998,0.99998,1,1,1,1,1,1,1,1,1,1,1],Aj={lineHeight:1.35,lineGap:0.2},Lj=[0.76116,1,1,1.0006,1.0006,1.00006,0.99973,0.99973,0.99982,1.00001,1.00043,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1,1.00003,1.00003,1.00003,0.99973,0.99987,1.00001,1.00001,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,1,1.00001,0.99973,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,0.99949,0.99973,0.99998,0.99973,0.99973,1,0.99973,0.99973,1.0006,0.99973,0.99973,0.99924,0.99924,1,0.99924,0.99999,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.0006,0.99973,1,0.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.0009,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.9998,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,1,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.06409,1.00026,0.99973,0.99973,0.99973,0.99973,1,0.99973,1,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,0.99977,1,0.99977,1,0.99977,1,0.99977,1,0.99977,1.0288,0.99977,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,0.99977,0.99973,0.99977,0.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,0.99924,1.0006,1.0006,0.99946,1.00034,1,0.99924,1.00001,1,1,0.99973,0.99924,0.99973,0.99924,0.99973,1.06311,0.99973,1.00024,0.99973,0.99924,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,1.00041,0.9998,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1,1.00016,0.99977,0.99998,0.99977,0.99998,0.99977,0.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,0.89547,1.00026,1.0006,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,1.00016,0.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,0.99924,0.99973,1.00001,0.99973,1,0.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,1.00001,1,1.00054,0.99977,1.00084,1.00007,0.99973,1.00013,0.99924,1.00001,1.00001,0.99945,0.91221,1.00001,1.00026,0.99977,1.00022,1.0006,1.00001,1.00001,0.99999,0.99977,0.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,0.99945,0.99897,0.99968,0.99924,1.00036,0.99945,0.99949,1,1.0006,0.99897,0.99918,0.99968,0.99911,0.99924,1,0.99962,1.01487,1,1.0005,0.99973,1.00012,1.00043,1,0.99995,0.99994,1.00036,0.99947,1.00019,1.00063,1.00025,0.99924,1.00036,0.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,0.99957,0.99972,0.9994,0.99954,0.99975,1.00051,1.00001,1.00019,1.00001,1.0001,0.99986,1.00001,1.00001,1.00038,0.99954,0.99954,0.9994,1.00066,0.99999,0.99977,1.00022,1.00054,1.00001,0.99977,1.00026,0.99975,1.0001,1.00001,0.99993,0.9995,0.99955,1.00016,0.99978,0.99974,1.00019,1.00022,0.99955,1.00053,0.99973,1.00089,1.00005,0.99967,1.00048,0.99973,1.00002,1.00034,0.99973,0.99973,0.99964,1.00006,1.00066,0.99947,0.99973,0.98894,0.99973,1,0.44898,1,0.99946,1,1.00039,1.00082,0.99991,0.99991,0.99985,1.00022,1.00023,1.00061,1.00006,0.99966,0.99973,0.99973,0.99973,1.00019,1.0008,1,0.99924,0.99924,0.99924,0.99983,1.00044,0.99973,0.99964,0.98332,1,0.99973,1,1,0.99962,0.99895,1.00016,0.99977,1.00016,0.99977,1.00016,0.99977,1.00001,1,1,1,0.99973,1,1,0.99955,0.99924,0.99924,0.99924,0.99924,0.99998,0.99998,0.99998,0.99973,0.99973,0.99972,1,1,1.00267,0.99999,0.99998,0.99998,1,0.99998,1.66475,1,0.99973,0.99973,1.00023,0.99973,1.00423,0.99925,0.99999,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,0.96329,1,1.20985,1.39713,1.00003,0.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.95317,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,0.99998,0.99998,0.99998,0.99998,1,1,1,1,1,1,1,1,1,1,1],kj={lineHeight:1.35,lineGap:0.2},Tj=[0.76116,1,1,1.0006,1.0006,1.00006,0.99973,0.99973,0.99982,1.00001,1.00043,0.99998,0.99998,0.99959,1.00003,1.0006,0.99998,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.0006,1,1.00003,1.00003,1.00003,0.99973,0.99987,1.00001,1.00001,0.99977,0.99977,1.00001,1.00026,1.00022,0.99977,1.0006,1,1.00001,0.99973,0.99999,0.99977,1.00022,1.00001,1.00022,0.99977,1.00001,1.00026,0.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,0.99949,0.99973,0.99998,0.99973,0.99973,1,0.99973,0.99973,1.0006,0.99973,0.99973,0.99924,0.99924,1,0.99924,0.99999,0.99973,0.99973,0.99973,0.99973,0.99998,1,1.0006,0.99973,1,0.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,0.99998,0.99973,0.99973,0.99973,0.99973,1.0009,0.99973,0.99998,1.00025,0.99968,0.99973,1.00003,1.00025,0.60299,1.00024,1.06409,1,1,0.99998,1,0.9998,1.0006,0.99998,1,0.99936,0.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,0.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,0.99977,0.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,0.99977,0.99977,0.99977,0.99977,1.00001,1.00001,1.00026,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99982,1,0.99973,0.99973,0.99973,0.99973,1.0006,1.0006,1.0006,1.0006,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,0.99973,1.06409,1.00026,0.99973,0.99973,0.99973,0.99973,1,0.99973,1,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,0.99977,1,0.99977,1,0.99977,1,0.99977,1,0.99977,1.04596,0.99977,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00001,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,0.99977,0.99973,0.99977,0.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,0.99924,1.0006,1.0006,1.00019,1.00034,1,0.99924,1.00001,1,1,0.99973,0.99924,0.99973,0.99924,0.99973,1.02572,0.99973,1.00005,0.99973,0.99924,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99999,0.9998,0.99973,1.00022,0.99973,1.00022,0.99973,1.00022,0.99973,1,1.00016,0.99977,0.99998,0.99977,0.99998,0.99977,0.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,0.84533,1.00026,1.0006,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,0.99977,0.99973,1.00016,0.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,0.99924,0.99973,1.00001,0.99973,1,0.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99928,1,0.99977,1.00013,1.00055,0.99947,0.99945,0.99941,0.99924,1.00001,1.00001,1.0004,0.91621,1.00001,1.00026,0.99977,1.00022,1.0006,1.00001,1.00005,0.99999,0.99977,1.00015,1.00022,0.99977,1.00001,0.99973,1.00026,1.00001,1.00019,1.00001,0.99946,1,1.0006,1.00001,0.99978,1.00045,0.99973,0.99924,1.00023,0.99978,0.99966,1,1.00065,1.00045,1.00019,0.99973,0.99973,0.99924,1,1,0.96499,1,1.00055,0.99973,1.00008,1.00027,1,0.9997,0.99995,1.00023,0.99933,1.00019,1.00015,1.00031,0.99924,1.00023,0.99973,1.00023,1.00031,1.00001,0.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,0.99988,0.99975,1,1.00082,0.99561,0.9996,1.00035,1.00001,0.99962,1.00001,1.00092,0.99964,1.00001,0.99963,0.99999,1.00035,1.00035,1.00082,0.99962,0.99999,0.99977,1.00022,1.00035,1.00001,0.99977,1.00026,0.9996,0.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,0.99971,0.99962,1.00035,0.99975,0.99977,0.99973,1.00043,0.99953,1.0007,0.99915,0.99973,1.00008,0.99892,1.00073,1.00073,1.00114,0.99915,1.00073,0.99955,0.99973,1.00092,0.99973,1,0.99998,1,1.0003,1,1.00043,1.00001,0.99969,1.0003,1,1.00035,1.00001,0.9995,1,1.00092,0.99973,0.99973,0.99973,1.0007,0.9995,1,0.99924,1.0006,0.99924,0.99972,1.00062,0.99973,1.00114,1.00073,1,0.99955,1,1,1.00047,0.99968,1.00016,0.99977,1.00016,0.99977,1.00016,0.99977,1.00001,1,1,1,0.99973,1,1,0.99955,0.99924,0.99924,0.99924,0.99924,0.99998,0.99998,0.99998,0.99973,0.99973,0.99972,1,1,1.00267,0.99999,0.99998,0.99998,1,0.99998,1.66475,1,0.99973,0.99973,1.00023,0.99973,0.99971,0.99925,1.00023,1,0.99991,0.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,0.96329,1,1.20985,1.39713,1.00003,0.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,0.99915,1.00031,1.00031,0.99999,1.00003,0.99999,0.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,0.99999,1,0.99861,0.99861,1,1.00026,1.00026,1.00026,1.00026,0.95317,0.99999,0.99999,0.99999,0.99999,1.40483,1,0.99977,1.00054,1,1,0.99953,0.99962,1.00042,0.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Nj={lineHeight:1.2,lineGap:0.2},u6=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1000,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1000,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1000,1000,552,278,278,278,278,500,500,500,556,556,350,1000,1000,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1000,768,600,834,834,834,834,1000,500,1000,500,1000,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],g6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],d6=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1000,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1000,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1000,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1000,1000,552,278,278,278,278,500,500,500,556,556,350,1000,1000,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1000,768,600,834,834,834,834,999,500,1000,500,1000,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],c6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],h6=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1000,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1000,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1000,1000,552,222,222,222,222,333,333,333,556,556,350,1000,1000,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1000,768,600,834,834,834,834,1000,500,998,500,1000,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],s6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],r6=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1000,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1000,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1000,1000,552,222,222,222,222,333,333,333,556,556,350,1000,1000,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1000,768,600,834,834,834,834,1000,500,1000,500,1000,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1000,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],l6=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Cj=[1.36898,1,1,0.72706,0.80479,0.83734,0.98894,0.99793,0.9897,0.93884,0.86209,0.94292,0.94292,1.16661,1.02058,0.93582,0.96694,0.93582,1.19137,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.99793,0.78076,0.78076,1.02058,1.02058,1.02058,0.72851,0.78966,0.90838,0.83637,0.82391,0.96376,0.80061,0.86275,0.8768,0.95407,1.0258,0.73901,0.85022,0.83655,1.0156,0.95546,0.92179,0.87107,0.92179,0.82114,0.8096,0.89713,0.94438,0.95353,0.94083,0.91905,0.90406,0.9446,0.94292,1.18777,0.94292,1.02058,0.89903,0.90088,0.94938,0.97898,0.81093,0.97571,0.94938,1.024,0.9577,0.95933,0.98621,1.0474,0.97455,0.98981,0.9672,0.95933,0.9446,0.97898,0.97407,0.97646,0.78036,1.10208,0.95442,0.95298,0.97579,0.9332,0.94039,0.938,0.80687,1.01149,0.80687,1.02058,0.80479,0.99793,0.99793,0.99793,0.99793,1.01149,1.00872,0.90088,0.91882,1.0213,0.8361,1.02058,0.62295,0.54324,0.89022,1.08595,1,1,0.90088,1,0.97455,0.93582,0.90088,1,1.05686,0.8361,0.99642,0.99642,0.99642,0.72851,0.90838,0.90838,0.90838,0.90838,0.90838,0.90838,0.868,0.82391,0.80061,0.80061,0.80061,0.80061,1.0258,1.0258,1.0258,1.0258,0.97484,0.95546,0.92179,0.92179,0.92179,0.92179,0.92179,1.02058,0.92179,0.94438,0.94438,0.94438,0.94438,0.90406,0.86958,0.98225,0.94938,0.94938,0.94938,0.94938,0.94938,0.94938,0.9031,0.81093,0.94938,0.94938,0.94938,0.94938,0.98621,0.98621,0.98621,0.98621,0.93969,0.95933,0.9446,0.9446,0.9446,0.9446,0.9446,1.08595,0.9446,0.95442,0.95442,0.95442,0.95442,0.94039,0.97898,0.94039,0.90838,0.94938,0.90838,0.94938,0.90838,0.94938,0.82391,0.81093,0.82391,0.81093,0.82391,0.81093,0.82391,0.81093,0.96376,0.84313,0.97484,0.97571,0.80061,0.94938,0.80061,0.94938,0.80061,0.94938,0.80061,0.94938,0.80061,0.94938,0.8768,0.9577,0.8768,0.9577,0.8768,0.9577,1,1,0.95407,0.95933,0.97069,0.95933,1.0258,0.98621,1.0258,0.98621,1.0258,0.98621,1.0258,0.98621,1.0258,0.98621,0.887,1.01591,0.73901,1.0474,1,1,0.97455,0.83655,0.98981,1,1,0.83655,0.73977,0.83655,0.73903,0.84638,1.033,0.95546,0.95933,1,1,0.95546,0.95933,0.8271,0.95417,0.95933,0.92179,0.9446,0.92179,0.9446,0.92179,0.9446,0.936,0.91964,0.82114,0.97646,1,1,0.82114,0.97646,0.8096,0.78036,0.8096,0.78036,1,1,0.8096,0.78036,1,1,0.89713,0.77452,0.89713,1.10208,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94438,0.95442,0.94083,0.97579,0.90406,0.94039,0.90406,0.9446,0.938,0.9446,0.938,0.9446,0.938,1,0.99793,0.90838,0.94938,0.868,0.9031,0.92179,0.9446,1,1,0.89713,1.10208,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90989,0.9358,0.91945,0.83181,0.75261,0.87992,0.82976,0.96034,0.83689,0.97268,1.0078,0.90838,0.83637,0.8019,0.90157,0.80061,0.9446,0.95407,0.92436,1.0258,0.85022,0.97153,1.0156,0.95546,0.89192,0.92179,0.92361,0.87107,0.96318,0.89713,0.93704,0.95638,0.91905,0.91709,0.92796,1.0258,0.93704,0.94836,1.0373,0.95933,1.0078,0.95871,0.94836,0.96174,0.92601,0.9498,0.98607,0.95776,0.95933,1.05453,1.0078,0.98275,0.9314,0.95617,0.91701,1.05993,0.9446,0.78367,0.9553,1,0.86832,1.0128,0.95871,0.99394,0.87548,0.96361,0.86774,1.0078,0.95871,0.9446,0.95871,0.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.94083,0.97579,0.94083,0.97579,0.94083,0.97579,0.90406,0.94039,0.96694,1,0.89903,1,1,1,0.93582,0.93582,0.93582,1,0.908,0.908,0.918,0.94219,0.94219,0.96544,1,1.285,1,1,0.81079,0.81079,1,1,0.74854,1,1,1,1,0.99793,1,1,1,0.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,0.80535,0.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Fj={lineHeight:1.2,lineGap:0.2},vj=[1.36898,1,1,0.66227,0.80779,0.81625,0.97276,0.97276,0.97733,0.92222,0.83266,0.94292,0.94292,1.16148,1.02058,0.93582,0.96694,0.93582,1.17337,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.97276,0.78076,0.78076,1.02058,1.02058,1.02058,0.71541,0.76813,0.85576,0.80591,0.80729,0.94299,0.77512,0.83655,0.86523,0.92222,0.98621,0.71743,0.81698,0.79726,0.98558,0.92222,0.90637,0.83809,0.90637,0.80729,0.76463,0.86275,0.90699,0.91605,0.9154,0.85308,0.85458,0.90531,0.94292,1.21296,0.94292,1.02058,0.89903,1.18616,0.99613,0.91677,0.78216,0.91677,0.90083,0.98796,0.9135,0.92168,0.95381,0.98981,0.95298,0.95381,0.93459,0.92168,0.91513,0.92004,0.91677,0.95077,0.748,1.04502,0.91677,0.92061,0.94236,0.89544,0.89364,0.9,0.80687,0.8578,0.80687,1.02058,0.80779,0.97276,0.97276,0.97276,0.97276,0.8578,0.99973,1.18616,0.91339,1.08074,0.82891,1.02058,0.55509,0.71526,0.89022,1.08595,1,1,1.18616,1,0.96736,0.93582,1.18616,1,1.04864,0.82711,0.99043,0.99043,0.99043,0.71541,0.85576,0.85576,0.85576,0.85576,0.85576,0.85576,0.845,0.80729,0.77512,0.77512,0.77512,0.77512,0.98621,0.98621,0.98621,0.98621,0.95961,0.92222,0.90637,0.90637,0.90637,0.90637,0.90637,1.02058,0.90251,0.90699,0.90699,0.90699,0.90699,0.85458,0.83659,0.94951,0.99613,0.99613,0.99613,0.99613,0.99613,0.99613,0.85811,0.78216,0.90083,0.90083,0.90083,0.90083,0.95381,0.95381,0.95381,0.95381,0.9135,0.92168,0.91513,0.91513,0.91513,0.91513,0.91513,1.08595,0.91677,0.91677,0.91677,0.91677,0.91677,0.89364,0.92332,0.89364,0.85576,0.99613,0.85576,0.99613,0.85576,0.99613,0.80729,0.78216,0.80729,0.78216,0.80729,0.78216,0.80729,0.78216,0.94299,0.76783,0.95961,0.91677,0.77512,0.90083,0.77512,0.90083,0.77512,0.90083,0.77512,0.90083,0.77512,0.90083,0.86523,0.9135,0.86523,0.9135,0.86523,0.9135,1,1,0.92222,0.92168,0.92222,0.92168,0.98621,0.95381,0.98621,0.95381,0.98621,0.95381,0.98621,0.95381,0.98621,0.95381,0.86036,0.97096,0.71743,0.98981,1,1,0.95298,0.79726,0.95381,1,1,0.79726,0.6894,0.79726,0.74321,0.81691,1.0006,0.92222,0.92168,1,1,0.92222,0.92168,0.79464,0.92098,0.92168,0.90637,0.91513,0.90637,0.91513,0.90637,0.91513,0.909,0.87514,0.80729,0.95077,1,1,0.80729,0.95077,0.76463,0.748,0.76463,0.748,1,1,0.76463,0.748,1,1,0.86275,0.72651,0.86275,1.04502,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.90699,0.91677,0.9154,0.94236,0.85458,0.89364,0.85458,0.90531,0.9,0.90531,0.9,0.90531,0.9,1,0.97276,0.85576,0.99613,0.845,0.85811,0.90251,0.91677,1,1,0.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,0.85576,0.80178,0.66862,0.7927,0.69323,0.88127,0.72459,0.89711,0.95381,0.85576,0.80591,0.7805,0.94729,0.77512,0.90531,0.92222,0.90637,0.98621,0.81698,0.92655,0.98558,0.92222,0.85359,0.90637,0.90976,0.83809,0.94523,0.86275,0.83509,0.93157,0.85308,0.83392,0.92346,0.98621,0.83509,0.92886,0.91324,0.92168,0.95381,0.90646,0.92886,0.90557,0.86847,0.90276,0.91324,0.86842,0.92168,0.99531,0.95381,0.9224,0.85408,0.92699,0.86847,1.0051,0.91513,0.80487,0.93481,1,0.88159,1.05214,0.90646,0.97355,0.81539,0.89398,0.85923,0.95381,0.90646,0.91513,0.90646,0.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.9154,0.94236,0.9154,0.94236,0.9154,0.94236,0.85458,0.89364,0.96694,1,0.89903,1,1,1,0.91782,0.91782,0.91782,1,0.896,0.896,0.896,0.9332,0.9332,0.95973,1,1.26,1,1,0.80479,0.80178,1,1,0.85633,1,1,1,1,0.97276,1,1,1,0.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,0.79199,0.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],bj={lineHeight:1.2,lineGap:0.2},Sj=[1.36898,1,1,0.65507,0.84943,0.85639,0.88465,0.88465,0.86936,0.88307,0.86948,0.85283,0.85283,1.06383,1.02058,0.75945,0.9219,0.75945,1.17337,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.88465,0.75945,0.75945,1.02058,1.02058,1.02058,0.69046,0.70926,0.85158,0.77812,0.76852,0.89591,0.70466,0.76125,0.80094,0.86822,0.83864,0.728,0.77212,0.79475,0.93637,0.87514,0.8588,0.76013,0.8588,0.72421,0.69866,0.77598,0.85991,0.80811,0.87832,0.78112,0.77512,0.8562,1.0222,1.18417,1.0222,1.27014,0.89903,1.15012,0.93859,0.94399,0.846,0.94399,0.81453,1.0186,0.94219,0.96017,1.03075,1.02175,0.912,1.03075,0.96998,0.96017,0.93859,0.94399,0.94399,0.95493,0.746,1.12658,0.94578,0.91,0.979,0.882,0.882,0.83,0.85034,0.83537,0.85034,1.02058,0.70869,0.88465,0.88465,0.88465,0.88465,0.83537,0.90083,1.15012,0.9161,0.94565,0.73541,1.02058,0.53609,0.69353,0.79519,1.08595,1,1,1.15012,1,0.91974,0.75945,1.15012,1,0.9446,0.73361,0.9005,0.9005,0.9005,0.62864,0.85158,0.85158,0.85158,0.85158,0.85158,0.85158,0.773,0.76852,0.70466,0.70466,0.70466,0.70466,0.83864,0.83864,0.83864,0.83864,0.90561,0.87514,0.8588,0.8588,0.8588,0.8588,0.8588,1.02058,0.85751,0.85991,0.85991,0.85991,0.85991,0.77512,0.76013,0.88075,0.93859,0.93859,0.93859,0.93859,0.93859,0.93859,0.8075,0.846,0.81453,0.81453,0.81453,0.81453,0.82424,0.82424,0.82424,0.82424,0.9278,0.96017,0.93859,0.93859,0.93859,0.93859,0.93859,1.08595,0.8562,0.94578,0.94578,0.94578,0.94578,0.882,0.94578,0.882,0.85158,0.93859,0.85158,0.93859,0.85158,0.93859,0.76852,0.846,0.76852,0.846,0.76852,0.846,0.76852,0.846,0.89591,0.8544,0.90561,0.94399,0.70466,0.81453,0.70466,0.81453,0.70466,0.81453,0.70466,0.81453,0.70466,0.81453,0.80094,0.94219,0.80094,0.94219,0.80094,0.94219,1,1,0.86822,0.96017,0.86822,0.96017,0.83864,0.82424,0.83864,0.82424,0.83864,0.82424,0.83864,1.03075,0.83864,0.82424,0.81402,1.02738,0.728,1.02175,1,1,0.912,0.79475,1.03075,1,1,0.79475,0.83911,0.79475,0.66266,0.80553,1.06676,0.87514,0.96017,1,1,0.87514,0.96017,0.86865,0.87396,0.96017,0.8588,0.93859,0.8588,0.93859,0.8588,0.93859,0.867,0.84759,0.72421,0.95493,1,1,0.72421,0.95493,0.69866,0.746,0.69866,0.746,1,1,0.69866,0.746,1,1,0.77598,0.88417,0.77598,1.12658,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.85991,0.94578,0.87832,0.979,0.77512,0.882,0.77512,0.8562,0.83,0.8562,0.83,0.8562,0.83,1,0.88465,0.85158,0.93859,0.773,0.8075,0.85751,0.8562,1,1,0.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,0.85158,0.77025,0.62264,0.7646,0.65351,0.86026,0.69461,0.89947,1.03075,0.85158,0.77812,0.76449,0.88836,0.70466,0.8562,0.86822,0.8588,0.83864,0.77212,0.85308,0.93637,0.87514,0.82352,0.8588,0.85701,0.76013,0.89058,0.77598,0.8156,0.82565,0.78112,0.77899,0.89386,0.83864,0.8156,0.9486,0.92388,0.96186,1.03075,0.91123,0.9486,0.93298,0.878,0.93942,0.92388,0.84596,0.96186,0.95119,1.03075,0.922,0.88787,0.95829,0.88,0.93559,0.93859,0.78815,0.93758,1,0.89217,1.03737,0.91123,0.93969,0.77487,0.85769,0.86799,1.03075,0.91123,0.93859,0.91123,0.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.87832,0.979,0.87832,0.979,0.87832,0.979,0.77512,0.882,0.9219,1,0.89903,1,1,1,0.87321,0.87321,0.87321,1,1.027,1.027,1.027,0.86847,0.86847,0.79121,1,1.124,1,1,0.73572,0.73572,1,1,0.85034,1,1,1,1,0.88465,1,1,1,0.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,0.74948,0.75187,1.02058,0.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],mj={lineHeight:1.2,lineGap:0.2},Oj=[1.36898,1,1,0.76305,0.82784,0.94935,0.89364,0.92241,0.89073,0.90706,0.98472,0.85283,0.85283,1.0664,1.02058,0.74505,0.9219,0.74505,1.23456,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.92241,0.74505,0.74505,1.02058,1.02058,1.02058,0.73002,0.72601,0.91755,0.8126,0.80314,0.92222,0.73764,0.79726,0.83051,0.90284,0.86023,0.74,0.8126,0.84869,0.96518,0.91115,0.8858,0.79761,0.8858,0.74498,0.73914,0.81363,0.89591,0.83659,0.89633,0.85608,0.8111,0.90531,1.0222,1.22736,1.0222,1.27014,0.89903,0.90088,0.86667,1.0231,0.896,1.01411,0.90083,1.05099,1.00512,0.99793,1.05326,1.09377,0.938,1.06226,1.00119,0.99793,0.98714,1.0231,1.01231,0.98196,0.792,1.19137,0.99074,0.962,1.01915,0.926,0.942,0.856,0.85034,0.92006,0.85034,1.02058,0.69067,0.92241,0.92241,0.92241,0.92241,0.92006,0.9332,0.90088,0.91882,0.93484,0.75339,1.02058,0.56866,0.54324,0.79519,1.08595,1,1,0.90088,1,0.95325,0.74505,0.90088,1,0.97198,0.75339,0.91009,0.91009,0.91009,0.66466,0.91755,0.91755,0.91755,0.91755,0.91755,0.91755,0.788,0.80314,0.73764,0.73764,0.73764,0.73764,0.86023,0.86023,0.86023,0.86023,0.92915,0.91115,0.8858,0.8858,0.8858,0.8858,0.8858,1.02058,0.8858,0.89591,0.89591,0.89591,0.89591,0.8111,0.79611,0.89713,0.86667,0.86667,0.86667,0.86667,0.86667,0.86667,0.86936,0.896,0.90083,0.90083,0.90083,0.90083,0.84224,0.84224,0.84224,0.84224,0.97276,0.99793,0.98714,0.98714,0.98714,0.98714,0.98714,1.08595,0.89876,0.99074,0.99074,0.99074,0.99074,0.942,1.0231,0.942,0.91755,0.86667,0.91755,0.86667,0.91755,0.86667,0.80314,0.896,0.80314,0.896,0.80314,0.896,0.80314,0.896,0.92222,0.93372,0.92915,1.01411,0.73764,0.90083,0.73764,0.90083,0.73764,0.90083,0.73764,0.90083,0.73764,0.90083,0.83051,1.00512,0.83051,1.00512,0.83051,1.00512,1,1,0.90284,0.99793,0.90976,0.99793,0.86023,0.84224,0.86023,0.84224,0.86023,0.84224,0.86023,1.05326,0.86023,0.84224,0.82873,1.07469,0.74,1.09377,1,1,0.938,0.84869,1.06226,1,1,0.84869,0.83704,0.84869,0.81441,0.85588,1.08927,0.91115,0.99793,1,1,0.91115,0.99793,0.91887,0.90991,0.99793,0.8858,0.98714,0.8858,0.98714,0.8858,0.98714,0.894,0.91434,0.74498,0.98196,1,1,0.74498,0.98196,0.73914,0.792,0.73914,0.792,1,1,0.73914,0.792,1,1,0.81363,0.904,0.81363,1.19137,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89591,0.99074,0.89633,1.01915,0.8111,0.942,0.8111,0.90531,0.856,0.90531,0.856,0.90531,0.856,1,0.92241,0.91755,0.86667,0.788,0.86936,0.8858,0.89876,1,1,0.81363,1.19137,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90088,0.90388,1.03901,0.92138,0.78105,0.7154,0.86169,0.80513,0.94007,0.82528,0.98612,1.06226,0.91755,0.8126,0.81884,0.92819,0.73764,0.90531,0.90284,0.8858,0.86023,0.8126,0.91172,0.96518,0.91115,0.83089,0.8858,0.87791,0.79761,0.89297,0.81363,0.88157,0.89992,0.85608,0.81992,0.94307,0.86023,0.88157,0.95308,0.98699,0.99793,1.06226,0.95817,0.95308,0.97358,0.928,0.98088,0.98699,0.92761,0.99793,0.96017,1.06226,0.986,0.944,0.95978,0.938,0.96705,0.98714,0.80442,0.98972,1,0.89762,1.04552,0.95817,0.99007,0.87064,0.91879,0.88888,1.06226,0.95817,0.98714,0.95817,0.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.89633,1.01915,0.89633,1.01915,0.89633,1.01915,0.8111,0.942,0.9219,1,0.89903,1,1,1,0.93173,0.93173,0.93173,1,1.06304,1.06304,1.06904,0.89903,0.89903,0.80549,1,1.156,1,1,0.76575,0.76575,1,1,0.72458,1,1,1,1,0.92241,1,1,1,0.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,0.74705,0.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],yj={lineHeight:1.2,lineGap:0.2},pj=[1.76738,1,1,0.99297,0.9824,1.04016,1.06497,1.03424,0.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,0.9754,1.21408,0.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,0.81378,0.81378,1.2107,1.2107,1.2107,0.71703,0.97847,0.97363,0.88776,0.8641,1.02096,0.79795,0.85132,0.914,1.06085,1.1406,0.8007,0.89858,0.83693,1.14889,1.09398,0.97489,0.92094,0.97489,0.90399,0.84041,0.95923,1.00135,1,1.06467,0.98243,0.90996,0.99361,1.1085,1.56942,1.1085,1.2107,0.74627,0.94282,0.96752,1.01519,0.86304,1.01359,0.97278,1.15103,1.01359,0.98561,1.02285,1.02285,1.00527,1.02285,1.0302,0.99041,1.0008,1.01519,1.01359,1.02258,0.79104,1.16862,0.99041,0.97454,1.02511,0.99298,0.96752,0.95801,0.94856,1.16579,0.94856,1.2107,0.9824,1.03424,1.03424,1,1.03424,1.16579,0.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,0.75155,0.94994,1.28826,1.21408,1.21408,0.91056,1,0.91572,0.9754,0.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,0.71703,0.97363,0.97363,0.97363,0.97363,0.97363,0.97363,0.93506,0.8641,0.79795,0.79795,0.79795,0.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,0.97426,0.97426,0.97426,0.97426,0.97426,1.2107,0.97489,1.00135,1.00135,1.00135,1.00135,0.90996,0.92094,1.02798,0.96752,0.96752,0.96752,0.96752,0.96752,0.96752,0.93136,0.86304,0.97278,0.97278,0.97278,0.97278,1.02285,1.02285,1.02285,1.02285,0.97122,0.99041,1,1,1,1,1,1.28826,1.0008,0.99041,0.99041,0.99041,0.99041,0.96752,1.01519,0.96752,0.97363,0.96752,0.97363,0.96752,0.97363,0.96752,0.8641,0.86304,0.8641,0.86304,0.8641,0.86304,0.8641,0.86304,1.02096,1.03057,1.02096,1.03517,0.79795,0.97278,0.79795,0.97278,0.79795,0.97278,0.79795,0.97278,0.79795,0.97278,0.914,1.01359,0.914,1.01359,0.914,1.01359,1,1,1.06085,0.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,0.97138,1.08692,0.8007,1.02285,1,1,1.00527,0.83693,1.02285,1,1,0.83693,0.9455,0.83693,0.90418,0.83693,1.13005,1.09398,0.99041,1,1,1.09398,0.99041,0.96692,1.09251,0.99041,0.97489,1.0008,0.97489,1.0008,0.97489,1.0008,0.93994,0.97931,0.90399,1.02258,1,1,0.90399,1.02258,0.84041,0.79104,0.84041,0.79104,0.84041,0.79104,0.84041,0.79104,1,1,0.95923,1.07034,0.95923,1.16862,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.00135,0.99041,1.06467,1.02511,0.90996,0.96752,0.90996,0.99361,0.95801,0.99361,0.95801,0.99361,0.95801,1.07733,1.03424,0.97363,0.96752,0.93506,0.93136,0.97489,1.0008,1,1,0.95923,1.16862,1.15103,1.15103,1.01173,1.03959,0.75953,0.81378,0.79912,1.15103,1.21994,0.95161,0.87815,1.01149,0.81525,0.7676,0.98167,1.01134,1.02546,0.84097,1.03089,1.18102,0.97363,0.88776,0.85134,0.97826,0.79795,0.99361,1.06085,0.97489,1.1406,0.89858,1.0388,1.14889,1.09398,0.86039,0.97489,1.0595,0.92094,0.94793,0.95923,0.90996,0.99346,0.98243,1.02112,0.95493,1.1406,0.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,0.97531,1.0106,1.0008,1.13189,1.18102,1.02277,0.98683,1.0016,0.99561,1.07237,1.0008,0.90434,0.99921,0.93803,0.8965,1.23085,1.06628,1.04983,0.96268,1.0499,0.98439,1.18102,1.06628,1.0008,1.06628,0.98439,0.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,0.90996,0.96752,1,1.21408,0.89903,1,1,0.75155,1.04394,1.04394,1.04394,1.04394,0.98633,0.98633,0.98633,0.73047,0.73047,1.20642,0.91211,1.25635,1.222,1.02956,1.03372,1.03372,0.96039,1.24633,1,1.12454,0.93503,1.03424,1.19687,1.03424,1,1,1,0.771,1,1,1.15749,1.15749,1.15749,1.10948,0.86279,0.94434,0.86279,0.94434,0.86182,1,1,1.16897,1,0.96085,0.90137,1.2107,1.18416,1.13973,0.69825,0.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.18874,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Dj={lineHeight:1.33008,lineGap:0},wj=[1.76738,1,1,0.98946,1.03959,1.04016,1.02809,1.036,0.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,0.9754,1.21261,0.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,0.81378,0.81378,1.21237,1.21237,1.21237,0.73541,0.97847,0.97363,0.89723,0.87897,1.0426,0.79429,0.85292,0.91149,1.05815,1.1406,0.79631,0.90128,0.83853,1.04396,1.10615,0.97552,0.94436,0.97552,0.88641,0.80527,0.96083,1.00135,1,1.06777,0.9817,0.91142,0.99361,1.11144,1.57293,1.11144,1.21237,0.74627,1.31818,1.06585,0.97042,0.83055,0.97042,0.93503,1.1261,0.97042,0.97922,1.14236,0.94552,1.01054,1.14236,1.02471,0.97922,0.94165,0.97042,0.97042,1.0276,0.78929,1.1261,0.97922,0.95874,1.02197,0.98507,0.96752,0.97168,0.95107,1.16579,0.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,0.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,0.79487,0.94994,1.29004,1.24047,1.24047,1.31818,1,0.91484,0.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,0.73541,0.97363,0.97363,0.97363,0.97363,0.97363,0.97363,0.94385,0.87897,0.79429,0.79429,0.79429,0.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,0.97552,0.97552,0.97552,0.97552,0.97552,1.21237,0.97552,1.00135,1.00135,1.00135,1.00135,0.91142,0.94436,0.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,0.96705,0.83055,0.93503,0.93503,0.93503,0.93503,1.14236,1.14236,1.14236,1.14236,0.93125,0.97922,0.94165,0.94165,0.94165,0.94165,0.94165,1.29004,0.94165,0.97922,0.97922,0.97922,0.97922,0.96752,0.97042,0.96752,0.97363,1.06585,0.97363,1.06585,0.97363,1.06585,0.87897,0.83055,0.87897,0.83055,0.87897,0.83055,0.87897,0.83055,1.0426,1.0033,1.0426,0.97042,0.79429,0.93503,0.79429,0.93503,0.79429,0.93503,0.79429,0.93503,0.79429,0.93503,0.91149,0.97042,0.91149,0.97042,0.91149,0.97042,1,1,1.05815,0.97922,1.05815,0.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,0.97441,1.04302,0.79631,1.01582,1,1,1.01054,0.83853,1.14236,1,1,0.83853,1.09125,0.83853,0.90418,0.83853,1.19508,1.10615,0.97922,1,1,1.10615,0.97922,1.01034,1.10466,0.97922,0.97552,0.94165,0.97552,0.94165,0.97552,0.94165,0.91602,0.91981,0.88641,1.0276,1,1,0.88641,1.0276,0.80527,0.78929,0.80527,0.78929,0.80527,0.78929,0.80527,0.78929,1,1,0.96083,1.05403,0.95923,1.16862,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.00135,0.97922,1.06777,1.02197,0.91142,0.96752,0.91142,0.99361,0.97168,0.99361,0.97168,0.99361,0.97168,1.23199,1.036,0.97363,1.06585,0.94385,0.96705,0.97552,0.94165,1,1,0.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,0.95161,1.27126,1.00811,0.83284,0.77702,0.99137,0.95253,1.0347,0.86142,1.07205,1.14236,0.97363,0.89723,0.86869,1.09818,0.79429,0.99361,1.05815,0.97552,1.1406,0.90128,1.06662,1.04396,1.10615,0.84918,0.97552,1.04694,0.94436,0.98015,0.96083,0.91142,1.00356,0.9817,1.01945,0.98999,1.1406,0.91142,1.04961,0.9898,1.00639,1.14236,1.07514,1.04961,0.99607,1.02897,1.008,0.9898,0.95134,1.00639,1.11121,1.14236,1.00518,0.97981,1.02186,1,1.08578,0.94165,0.99314,0.98387,0.93028,0.93377,1.35125,1.07514,1.10687,0.93491,1.04232,1.00351,1.14236,1.07514,0.94165,1.07514,1.00351,0.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.93503,1,1,1,1,1,1,1,1,1,1,1,1,0.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,0.91142,0.96752,1,1.21261,0.89903,1,1,0.75155,1.04745,1.04745,1.04745,1.04394,0.98633,0.98633,0.98633,0.72959,0.72959,1.20502,0.91406,1.26514,1.222,1.02956,1.03372,1.03372,0.96039,1.24633,1,1.09125,0.93327,1.03336,1.16541,1.036,1,1,1,0.771,1,1,1.15574,1.15574,1.15574,1.15574,0.86364,0.94434,0.86279,0.94434,0.86224,1,1,1.16798,1,0.96085,0.90068,1.21237,1.18416,1.13904,0.69825,0.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.18775,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Ej={lineHeight:1.33008,lineGap:0},uj=[1.76738,1,1,0.98946,1.14763,1.05365,1.06234,0.96927,0.92586,1.15373,1.18414,0.91349,0.91349,1.07403,1.17308,0.78383,1.20088,0.78383,1.42531,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.78383,0.78383,1.17308,1.17308,1.17308,0.77349,0.94565,0.94729,0.85944,0.88506,0.9858,0.74817,0.80016,0.88449,0.98039,0.95782,0.69238,0.89898,0.83231,0.98183,1.03989,0.96924,0.86237,0.96924,0.80595,0.74524,0.86091,0.95402,0.94143,0.98448,0.8858,0.83089,0.93285,1.0949,1.39016,1.0949,1.45994,0.74627,1.04839,0.97454,0.97454,0.87207,0.97454,0.87533,1.06151,0.97454,1.00176,1.16484,1.08132,0.98047,1.16484,1.02989,1.01054,0.96225,0.97454,0.97454,1.06598,0.79004,1.16344,1.00351,0.94629,0.9973,0.91016,0.96777,0.9043,0.91082,0.92481,0.91082,1.17308,0.95748,0.96927,0.96927,1,0.96927,0.92481,0.80597,1.04839,1.23393,1.1781,0.9245,1.17308,1.20808,0.63218,0.94261,1.24822,1.09971,1.09971,1.04839,1,0.85273,0.78032,1.04839,1.09971,1.22326,0.9245,1.09836,1.13525,1.15222,0.70424,0.94729,0.94729,0.94729,0.94729,0.94729,0.94729,0.85498,0.88506,0.74817,0.74817,0.74817,0.74817,0.95782,0.95782,0.95782,0.95782,0.9858,1.03989,0.96924,0.96924,0.96924,0.96924,0.96924,1.17308,0.96924,0.95402,0.95402,0.95402,0.95402,0.83089,0.86237,0.88409,0.97454,0.97454,0.97454,0.97454,0.97454,0.97454,0.92916,0.87207,0.87533,0.87533,0.87533,0.87533,0.93146,0.93146,0.93146,0.93146,0.93854,1.01054,0.96225,0.96225,0.96225,0.96225,0.96225,1.24822,0.8761,1.00351,1.00351,1.00351,1.00351,0.96777,0.97454,0.96777,0.94729,0.97454,0.94729,0.97454,0.94729,0.97454,0.88506,0.87207,0.88506,0.87207,0.88506,0.87207,0.88506,0.87207,0.9858,0.95391,0.9858,0.97454,0.74817,0.87533,0.74817,0.87533,0.74817,0.87533,0.74817,0.87533,0.74817,0.87533,0.88449,0.97454,0.88449,0.97454,0.88449,0.97454,1,1,0.98039,1.00176,0.98039,1.00176,0.95782,0.93146,0.95782,0.93146,0.95782,0.93146,0.95782,1.16484,0.95782,0.93146,0.84421,1.12761,0.69238,1.08132,1,1,0.98047,0.83231,1.16484,1,1,0.84723,1.04861,0.84723,0.78755,0.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,0.9857,1.03849,1.01054,0.96924,0.96225,0.96924,0.96225,0.96924,0.96225,0.92383,0.90171,0.80595,1.06598,1,1,0.80595,1.06598,0.74524,0.79004,0.74524,0.79004,0.74524,0.79004,0.74524,0.79004,1,1,0.86091,1.02759,0.85771,1.16344,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.95402,1.00351,0.98448,0.9973,0.83089,0.96777,0.83089,0.93285,0.9043,0.93285,0.9043,0.93285,0.9043,1.31868,0.96927,0.94729,0.97454,0.85498,0.92916,0.96924,0.8761,1,1,0.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,0.81965,0.81965,0.94729,0.78032,0.71022,0.90883,0.84171,0.99877,0.77596,1.05734,1.2,0.94729,0.85944,0.82791,0.9607,0.74817,0.93285,0.98039,0.96924,0.95782,0.89898,0.98316,0.98183,1.03989,0.78614,0.96924,0.97642,0.86237,0.86075,0.86091,0.83089,0.90082,0.8858,0.97296,1.01284,0.95782,0.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,0.98205,1.03809,1.05097,1.04,0.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,0.96225,0.8965,0.97783,0.93574,0.94818,1.30679,1.0675,1.11826,0.99821,1.0557,1.0326,1.2,1.0675,0.96225,1.0675,1.0326,0.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.87533,1,1,1,1,1,1,1,1,1,1,1,1,0.98705,1,1,1,1,1,1,0.98448,0.9973,0.98448,0.9973,0.98448,0.9973,0.83089,0.96777,1,1.20088,0.89903,1,1,0.75155,0.94945,0.94945,0.94945,0.94945,1.12317,1.12317,1.12317,0.67603,0.67603,1.15621,0.73584,1.21191,1.22135,1.06483,0.94868,0.94868,0.95996,1.24633,1,1.07497,0.87709,0.96927,1.01473,0.96927,1,1,1,0.77295,1,1,1.09836,1.09836,1.09836,1.01522,0.86321,0.94434,0.8649,0.94434,0.86182,1,1,1.083,1,0.91578,0.86438,1.17308,1.18416,1.14589,0.69825,0.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.17984,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],gj={lineHeight:1.33008,lineGap:0},dj=[1.76738,1,1,0.98594,1.02285,1.10454,1.06234,0.96927,0.92037,1.19985,1.2046,0.90616,0.90616,1.07152,1.1714,0.78032,1.20088,0.78032,1.40246,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.96927,0.78032,0.78032,1.1714,1.1714,1.1714,0.80597,0.94084,0.96706,0.85944,0.85734,0.97093,0.75842,0.79936,0.88198,0.9831,0.95782,0.71387,0.86969,0.84636,1.07796,1.03584,0.96924,0.83968,0.96924,0.82826,0.79649,0.85771,0.95132,0.93119,0.98965,0.88433,0.8287,0.93365,1.08612,1.3638,1.08612,1.45786,0.74627,0.80499,0.91484,1.05707,0.92383,1.05882,0.9403,1.12654,1.05882,1.01756,1.09011,1.09011,0.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,0.84863,1.21968,1.01756,0.95801,1.00068,0.91797,0.96777,0.9043,0.90351,0.92105,0.90351,1.1714,0.85337,0.96927,0.96927,0.99912,0.96927,0.92105,0.80597,1.2434,1.20808,1.05937,0.90957,1.1714,1.20808,0.75155,0.94261,1.24644,1.09971,1.09971,0.84751,1,0.85273,0.78032,0.61584,1.05425,1.17914,0.90957,1.08665,1.11593,1.14169,0.73381,0.96706,0.96706,0.96706,0.96706,0.96706,0.96706,0.86035,0.85734,0.75842,0.75842,0.75842,0.75842,0.95782,0.95782,0.95782,0.95782,0.97093,1.03584,0.96924,0.96924,0.96924,0.96924,0.96924,1.1714,0.96924,0.95132,0.95132,0.95132,0.95132,0.8287,0.83968,0.89049,0.91484,0.91484,0.91484,0.91484,0.91484,0.91484,0.93575,0.92383,0.9403,0.9403,0.9403,0.9403,0.8717,0.8717,0.8717,0.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,0.95923,1.01756,1.01756,1.01756,1.01756,0.96777,1.05707,0.96777,0.96706,0.91484,0.96706,0.91484,0.96706,0.91484,0.85734,0.92383,0.85734,0.92383,0.85734,0.92383,0.85734,0.92383,0.97093,1.0969,0.97093,1.05882,0.75842,0.9403,0.75842,0.9403,0.75842,0.9403,0.75842,0.9403,0.75842,0.9403,0.88198,1.05882,0.88198,1.05882,0.88198,1.05882,1,1,0.9831,1.01756,0.9831,1.01756,0.95782,0.8717,0.95782,0.8717,0.95782,0.8717,0.95782,1.09011,0.95782,0.8717,0.84784,1.11551,0.71387,1.09011,1,1,0.99414,0.84636,1.09011,1,1,0.84636,1.0536,0.84636,0.94298,0.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,0.96924,1.05356,0.96924,1.05356,0.96924,1.05356,0.93066,0.98293,0.82826,1.04399,1,1,0.82826,1.04399,0.79649,0.84863,0.79649,0.84863,0.79649,0.84863,0.79649,0.84863,1,1,0.85771,1.17318,0.85771,1.21968,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.95132,1.01756,0.98965,1.00068,0.8287,0.96777,0.8287,0.93365,0.9043,0.93365,0.9043,0.93365,0.9043,1.08571,0.96927,0.96706,0.91484,0.86035,0.93575,0.96924,0.95923,1,1,0.85771,1.21968,1.11437,1.11437,0.93109,0.91202,0.60411,0.84164,0.55572,1.01173,0.97361,0.81818,0.81818,0.96635,0.78032,0.72727,0.92366,0.98601,1.03405,0.77968,1.09799,1.2,0.96706,0.85944,0.85638,0.96491,0.75842,0.93365,0.9831,0.96924,0.95782,0.86969,0.94152,1.07796,1.03584,0.78437,0.96924,0.98715,0.83968,0.83491,0.85771,0.8287,0.94492,0.88433,0.9287,1.0098,0.95782,0.8287,1.0625,0.98248,1.03424,1.2,1.01071,1.0625,0.95246,1.03809,1.04912,0.98248,1.00221,1.03424,1.05443,1.2,1.04785,0.99609,1.00169,1.05176,0.99346,1.05356,0.9087,1.03004,0.95542,0.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,0.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,0.98965,1.00068,0.98965,1.00068,0.98965,1.00068,0.8287,0.96777,1,1.20088,0.89903,1,1,0.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,0.67428,0.67428,1.16039,0.73291,1.20996,1.22135,1.06483,0.94868,0.94868,0.95996,1.24633,1,1.07497,0.87796,0.96927,1.01518,0.96927,1,1,1,0.77295,1,1,1.10539,1.10539,1.11358,1.06967,0.86279,0.94434,0.86279,0.94434,0.86182,1,1,1.083,1,0.91578,0.86507,1.1714,1.18416,1.14589,0.69825,0.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,0.99862,0.99862,1,0.87025,0.87025,0.87025,0.87025,1.18083,1.42603,1,1.42603,1.42603,0.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],cj={lineHeight:1.33008,lineGap:0},hj=G8(function(Z){Z["MyriadPro-Regular"]=Z["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:Oj,baseWidths:r6,baseMapping:l6,metrics:yj},Z["MyriadPro-Bold"]=Z["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:Cj,baseWidths:u6,baseMapping:g6,metrics:Fj},Z["MyriadPro-It"]=Z["MyriadPro-Italic"]=Z["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:Sj,baseWidths:h6,baseMapping:s6,metrics:mj},Z["MyriadPro-BoldIt"]=Z["MyriadPro-BoldItalic"]=Z["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:vj,baseWidths:d6,baseMapping:c6,metrics:bj},Z.ArialMT=Z.Arial=Z["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:r6,baseMapping:l6},Z["Arial-BoldMT"]=Z["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:u6,baseMapping:g6},Z["Arial-ItalicMT"]=Z["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:h6,baseMapping:s6},Z["Arial-BoldItalicMT"]=Z["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:d6,baseMapping:c6},Z["Calibri-Regular"]={name:"LiberationSans-Regular",factors:jj,baseWidths:r6,baseMapping:l6,metrics:Vj},Z["Calibri-Bold"]={name:"LiberationSans-Bold",factors:Jj,baseWidths:u6,baseMapping:g6,metrics:Uj},Z["Calibri-Italic"]={name:"LiberationSans-Italic",factors:Bj,baseWidths:h6,baseMapping:s6,metrics:Ij},Z["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:fj,baseWidths:d6,baseMapping:c6,metrics:Kj},Z["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:dj,baseWidths:r6,baseMapping:l6,metrics:cj},Z["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:pj,baseWidths:u6,baseMapping:g6,metrics:Dj},Z["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:uj,baseWidths:h6,baseMapping:s6,metrics:gj},Z["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:wj,baseWidths:d6,baseMapping:c6,metrics:Ej},Z["Helvetica-Regular"]=Z.Helvetica={name:"LiberationSans-Regular",factors:Tj,baseWidths:r6,baseMapping:l6,metrics:Nj},Z["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:Hj,baseWidths:u6,baseMapping:g6,metrics:xj},Z["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:Lj,baseWidths:h6,baseMapping:s6,metrics:kj},Z["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Mj,baseWidths:d6,baseMapping:c6,metrics:Aj}});r8={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};Jq=class Jq extends t4{set(Z,q=null,X){if(typeof Z!="string")throw Error('LocalImageCache.set - expected "name" argument.');if(q){if(this._imageCache.has(q))return;return this._nameRefMap.set(Z,q),void this._imageCache.put(q,X)}this._imageMap.has(Z)||this._imageMap.set(Z,X)}};VX=class VX extends t4{set(Z=null,q=null,X){if(typeof Z!="string"&&!q)throw Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(q){if(this._imageCache.has(q))return;return Z!==null&&this._nameRefMap.set(Z,q),void this._imageCache.put(q,X)}this._imageMap.has(Z)||this._imageMap.set(Z,X)}};yQ=class yQ extends t4{constructor(Z){super({onlyRefs:!0})}set(Z=null,q,X){if(!q)throw Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(q)||this._imageCache.put(q,X)}};Uq=class Uq extends t4{set(Z,q=null,X){if(typeof Z!="string")throw Error('LocalGStateCache.set - expected "name" argument.');if(q){if(this._imageCache.has(q))return;return this._nameRefMap.set(Z,q),void this._imageCache.put(q,X)}this._imageMap.has(Z)||this._imageMap.set(Z,X)}};pQ=class pQ extends t4{constructor(Z){super({onlyRefs:!0})}set(Z=null,q,X){if(!q)throw Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(q)||this._imageCache.put(q,X)}};DQ=class DQ extends t4{constructor(Z){super({onlyRefs:!0})}set(Z=null,q,X){if(!q)throw Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(q)||this._imageCache.put(q,X)}};wQ=class wQ extends t4{constructor(Z){super({onlyRefs:!0})}set(Z=null,q,X){if(!q)throw Error('GlobalColorSpaceCache.set - expected "ref" argument.');this._imageCache.has(q)||this._imageCache.put(q,X)}clear(){this._imageCache.clear()}};uQ=class uQ extends w5{constructor(Z,q,X){super("args"),this.index=Z,this.min=q,this.max=X}visit(Z){Z.visitArgument(this)}};r4=class r4 extends w5{constructor(Z){super("literal"),this.number=Z,this.min=Z,this.max=Z}visit(Z){Z.visitLiteral(this)}};Q9=class Q9 extends w5{constructor(Z,q,X,z,R){super("binary"),this.op=Z,this.arg1=q,this.arg2=X,this.min=z,this.max=R}visit(Z){Z.visitBinaryOperation(this)}};gQ=class gQ extends w5{constructor(Z,q){super("max"),this.arg=Z,this.min=Z.min,this.max=q}visit(Z){Z.visitMin(this)}};Kq=class Kq extends w5{constructor(Z,q,X){super("var"),this.index=Z,this.min=q,this.max=X}visit(Z){Z.visitVariable(this)}};Bq=class Bq extends w5{constructor(Z,q){super("definition"),this.variable=Z,this.arg=q}visit(Z){Z.visitVariableDefinition(this)}};aj=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],nj=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];v4=[],c1=[];pR=class Z{#Z;#q;#z;static strings=["fontFamily","fontWeight","italicAngle"];static write(q){let X=new TextEncoder,z={},R=0;for(let W of Z.strings){let $=X.encode(q[W]);z[W]=$,R+=4+$.length}let G=new ArrayBuffer(R),P=new Uint8Array(G),Q=new DataView(G),Y=0;for(let W of Z.strings){let $=z[W],_=$.length;Q.setUint32(Y,_),P.set($,Y+4),Y+=4+_}return t1(Y===G.byteLength,"CssFontInfo.write: Buffer overflow"),G}constructor(q){this.#Z=q,this.#q=new DataView(this.#Z),this.#z=new TextDecoder}#X(q){t1(q<Z.strings.length,"Invalid string index");let X=0;for(let R=0;R<q;R++)X+=this.#q.getUint32(X)+4;let z=this.#q.getUint32(X);return this.#z.decode(new Uint8Array(this.#Z,X+4,z))}get fontFamily(){return this.#X(0)}get fontWeight(){return this.#X(1)}get italicAngle(){return this.#X(2)}},DR=class Z{#Z;#q;#z;static strings=["css","loadedName","baseFontName","src"];static write(q){let X=new TextEncoder,z={},R=0;for(let J of Z.strings){let U=X.encode(q[J]);z[J]=U,R+=4+U.length}R+=4;let G,P,Q=1+R;q.style&&(G=X.encode(q.style.style),P=X.encode(q.style.weight),Q+=4+G.length+4+P.length);let Y=new ArrayBuffer(Q),W=new Uint8Array(Y),$=new DataView(Y),_=0;$.setUint8(_++,q.guessFallback?1:0),$.setUint32(_,0),_+=4,R=0;for(let J of Z.strings){let U=z[J],f=U.length;R+=4+f,$.setUint32(_,f),W.set(U,_+4),_+=4+f}return $.setUint32(_-R-4,R),q.style&&($.setUint32(_,G.length),W.set(G,_+4),_+=4+G.length,$.setUint32(_,P.length),W.set(P,_+4),_+=4+P.length),t1(_<=Y.byteLength,"SubstitionInfo.write: Buffer overflow"),Y.transferToFixedLength(_)}constructor(q){this.#Z=q,this.#q=new DataView(this.#Z),this.#z=new TextDecoder}get guessFallback(){return this.#q.getUint8(0)!==0}#X(q){t1(q<Z.strings.length,"Invalid string index");let X=5;for(let R=0;R<q;R++)X+=this.#q.getUint32(X)+4;let z=this.#q.getUint32(X);return this.#z.decode(new Uint8Array(this.#Z,X+4,z))}get css(){return this.#X(0)}get loadedName(){return this.#X(1)}get baseFontName(){return this.#X(2)}get src(){return this.#X(3)}get style(){let q=1;q+=4+this.#q.getUint32(q);let X=this.#q.getUint32(q),z=this.#z.decode(new Uint8Array(this.#Z,q+4,X));q+=4+X;let R=this.#q.getUint32(q);return{style:z,weight:this.#z.decode(new Uint8Array(this.#Z,q+4,R))}}},ej=class Z{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#Z=Math.ceil(2*this.bools.length/8);static#q=this.#Z+8*this.numbers.length;static#z=this.#q+1+8;static#X=this.#z+1+48;static#R=this.#X+1+6;#G;#Q;#P;constructor({data:q,extra:X}){this.#G=q,this.#Q=new TextDecoder,this.#P=new DataView(this.#G),X&&Object.assign(this,X)}#Y(q){t1(q<Z.bools.length,"Invalid boolean index");let X=Math.floor(q/4),z=2*q%8,R=this.#P.getUint8(X)>>z&3;return R===0?void 0:R===2}get black(){return this.#Y(0)}get bold(){return this.#Y(1)}get disableFontFace(){return this.#Y(2)}get fontExtraProperties(){return this.#Y(3)}get isInvalidPDFjsFont(){return this.#Y(4)}get isType3Font(){return this.#Y(5)}get italic(){return this.#Y(6)}get missingFile(){return this.#Y(7)}get remeasure(){return this.#Y(8)}get vertical(){return this.#Y(9)}#W(q){return t1(q<Z.numbers.length,"Invalid number index"),this.#P.getFloat64(Z.#Z+8*q)}get ascent(){return this.#W(0)}get defaultWidth(){return this.#W(1)}get descent(){return this.#W(2)}get bbox(){let q=Z.#q;if(this.#P.getUint8(q)===0)return;q+=1;let X=[];for(let z=0;z<4;z++)X.push(this.#P.getInt16(q,!0)),q+=2;return X}get fontMatrix(){let q=Z.#z;if(this.#P.getUint8(q)===0)return;q+=1;let X=[];for(let z=0;z<6;z++)X.push(this.#P.getFloat64(q,!0)),q+=8;return X}get defaultVMetrics(){let q=Z.#X;if(this.#P.getUint8(q)===0)return;q+=1;let X=[];for(let z=0;z<3;z++)X.push(this.#P.getInt16(q,!0)),q+=2;return X}#J(q){t1(q<Z.strings.length,"Invalid string index");let X=Z.#R+4;for(let G=0;G<q;G++)X+=this.#P.getUint32(X)+4;let z=this.#P.getUint32(X),R=new Uint8Array(z);return R.set(new Uint8Array(this.#G,X+4,z)),this.#Q.decode(R)}get fallbackName(){return this.#J(0)}get loadedName(){return this.#J(1)}get mimetype(){return this.#J(2)}get name(){return this.#J(3)}get data(){let q=Z.#R;q+=4+this.#P.getUint32(q),q+=4+this.#P.getUint32(q),q+=4+this.#P.getUint32(q);let X=this.#P.getUint32(q);if(X!==0)return new Uint8Array(this.#G,q+4,X)}clearData(){let q=Z.#R;q+=4+this.#P.getUint32(q),q+=4+this.#P.getUint32(q),q+=4+this.#P.getUint32(q);let X=this.#P.getUint32(q);new Uint8Array(this.#G,q+4,X).fill(0),this.#P.setUint32(q,0)}get cssFontInfo(){let q=Z.#R;q+=4+this.#P.getUint32(q),q+=4+this.#P.getUint32(q);let X=this.#P.getUint32(q);if(X===0)return null;let z=new Uint8Array(X);return z.set(new Uint8Array(this.#G,q+4,X)),new pR(z.buffer)}get systemFontInfo(){let q=Z.#R;q+=4+this.#P.getUint32(q);let X=this.#P.getUint32(q);if(X===0)return null;let z=new Uint8Array(X);return z.set(new Uint8Array(this.#G,q+4,X)),new DR(z.buffer)}static write(q){let X=q.systemFontInfo?DR.write(q.systemFontInfo):null,z=q.cssFontInfo?pR.write(q.cssFontInfo):null,R=new TextEncoder,G={},P=0;for(let K of Z.strings)G[K]=R.encode(q[K]),P+=4+G[K].length;let Q=Z.#R+4+P+4+(X?X.byteLength:0)+4+(z?z.byteLength:0)+4+(q.data?q.data.length:0),Y=new ArrayBuffer(Q),W=new Uint8Array(Y),$=new DataView(Y),_=0,J=Z.bools.length,U=0,f=0;for(let K=0;K<J;K++){let I=q[Z.bools[K]];U|=(I===void 0?0:I?2:1)<<f,f+=2,f!==8&&K!==J-1||($.setUint8(_++,U),U=0,f=0)}t1(_===Z.#Z,"FontInfo.write: Boolean properties offset mismatch");for(let K of Z.numbers)$.setFloat64(_,q[K]),_+=8;if(t1(_===Z.#q,"FontInfo.write: Number properties offset mismatch"),q.bbox){$.setUint8(_++,4);for(let K of q.bbox)$.setInt16(_,K,!0),_+=2}else $.setUint8(_++,0),_+=8;if(t1(_===Z.#z,"FontInfo.write: BBox properties offset mismatch"),q.fontMatrix){$.setUint8(_++,6);for(let K of q.fontMatrix)$.setFloat64(_,K,!0),_+=8}else $.setUint8(_++,0),_+=48;if(t1(_===Z.#X,"FontInfo.write: FontMatrix properties offset mismatch"),q.defaultVMetrics){$.setUint8(_++,1);for(let K of q.defaultVMetrics)$.setInt16(_,K,!0),_+=2}else $.setUint8(_++,0),_+=6;t1(_===Z.#R,"FontInfo.write: DefaultVMetrics properties offset mismatch"),$.setUint32(Z.#R,0),_+=4;for(let K of Z.strings){let I=G[K],B=I.length;$.setUint32(_,B),W.set(I,_+4),_+=4+B}if($.setUint32(Z.#R,_-Z.#R-4),X){let K=X.byteLength;$.setUint32(_,K),t1(_+4+K<=Y.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo"),W.set(new Uint8Array(X),_+4),_+=4+K}else $.setUint32(_,0),_+=4;if(z){let K=z.byteLength;$.setUint32(_,K),t1(_+4+K<=Y.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo"),W.set(new Uint8Array(z),_+4),_+=4+K}else $.setUint32(_,0),_+=4;return q.data===void 0?($.setUint32(_,0),_+=4):($.setUint32(_,q.data.length),W.set(q.data,_+4),_+=4+q.data.length),t1(_<=Y.byteLength,"FontInfo.write: Buffer overflow"),Y.transferToFixedLength(_)}},$5={style:"normal",weight:"normal"},f5={style:"normal",weight:"bold"},K5={style:"italic",weight:"normal"},B5={style:"italic",weight:"bold"},U7=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:$5,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:f5,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:K5,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:B5,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:$5,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:f5,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:K5,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:B5,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],style:$5,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:f5,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:K5,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:B5,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:$5,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:f5,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:K5,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:B5,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:$5,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:f5,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:K5,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:B5,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:$5}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),ZV=new Map([["Arial-Black","ArialBlack"]]);XV=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,isImageDecoderSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,useWasm:!0,useWorkerFetch:!0,cMapUrl:null,iccUrl:null,standardFontDataUrl:null,wasmUrl:null}),dR=Promise.resolve();rQ=class rQ extends l4{constructor(Z){super(new o8(Z))}parse(){let Z={fn:0,args:[]},q={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;Z.args.length=0,this.read(Z);){if(this.savedStatesDepth!==0)continue;let{fn:X,args:z}=Z;switch(0|X){case s4:let[R,G]=z;R instanceof t&&(q.fontName=R.name),typeof G=="number"&&G>0&&(q.fontSize=G);break;case n0:g1.rgb.getRgbItem(z,0,q.fontColor,0);break;case a7:g1.gray.getRgbItem(z,0,q.fontColor,0);break;case n7:g1.cmyk.getRgbItem(z,0,q.fontColor,0)}}}catch(X){v(`parseDefaultAppearance - ignoring errors: "${X}".`)}return q}};lQ=class lQ extends l4{constructor(Z,q,X,z){super(Z),this.stream=Z,this.evaluatorOptions=q,this.xref=X,this.globalColorSpaceCache=z,this.resources=Z.dict?.get("Resources")}parse(){let Z={fn:0,args:[]},q={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:g1.gray},X=!1,z=[];try{for(;Z.args.length=0,!X&&this.read(Z);){let{fn:R,args:G}=Z;switch(0|R){case y0:z.push({scaleFactor:q.scaleFactor,fontSize:q.fontSize,fontName:q.fontName,fontColor:q.fontColor.slice(),fillColorSpace:q.fillColorSpace});break;case Y0:q=z.pop()||q;break;case S5:q.scaleFactor*=Math.hypot(G[0],G[1]);break;case s4:let[P,Q]=G;P instanceof t&&(q.fontName=P.name),typeof Q=="number"&&Q>0&&(q.fontSize=Q*q.scaleFactor);break;case Z9:q.fillColorSpace=g1.parse({cs:G[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:this._localColorSpaceCache});break;case q9:q.fillColorSpace.getRgbItem(G,0,q.fontColor,0);break;case n0:g1.rgb.getRgbItem(G,0,q.fontColor,0);break;case a7:g1.gray.getRgbItem(G,0,q.fontColor,0);break;case n7:g1.cmyk.getRgbItem(G,0,q.fontColor,0);break;case B4:case $3:case _3:case J3:X=!0}}}catch(R){v(`parseAppearanceStream - ignoring errors: "${R}".`)}return this.stream.reset(),delete q.scaleFactor,delete q.fillColorSpace,q}get _localColorSpaceCache(){return X1(this,"_localColorSpaceCache",new VX)}get _pdfFunctionFactory(){return X1(this,"_pdfFunctionFactory",new HX({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}};GV=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],PV=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];_5=class _5 extends AX{constructor(Z,q){super(Z,q,"Names")}};w7=class w7 extends AX{constructor(Z,q){super(Z,q,"Nums")}};Z2=class Z2 extends kX{constructor({hasAttributes:Z=!1,lowerCaseName:q=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=K7,this._hasAttributes=Z,this._lowerCaseName=q}parseFromString(Z){if(this._currentFragment=[],this._stack=[],this._errorCode=K7,this.parseXml(Z),this._errorCode!==K7)return;let[q]=this._currentFragment;return q?{documentElement:q}:void 0}onText(Z){if(function(X){for(let z=0,R=X.length;z<R;z++)if(!a5(X,z))return!1;return!0}(Z))return;let q=new J6("#text",Z);this._currentFragment.push(q)}onCdata(Z){let q=new J6("#text",Z);this._currentFragment.push(q)}onBeginElement(Z,q,X){this._lowerCaseName&&(Z=Z.toLowerCase());let z=new J6(Z);z.childNodes=[],this._hasAttributes&&(z.attributes=q),this._currentFragment.push(z),X||(this._stack.push(this._currentFragment),this._currentFragment=z.childNodes)}onEndElement(Z){this._currentFragment=this._stack.pop()||[];let q=this._currentFragment.at(-1);if(!q)return null;for(let X of q.childNodes)X.parentNode=q;return q}onError(Z){this._errorCode=Z}};v3=function(Z,q,X){if(!Array.isArray(X)||X.length<2)return!1;let[z,R,...G]=X;if(!Z(z)&&!Number.isInteger(z))return!1;if(!q(R))return!1;let P=G.length,Q=!0;switch(R.name){case"XYZ":if(P<2||P>3)return!1;break;case"Fit":case"FitB":return P===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(P>1)return!1;break;case"FitR":if(P!==4)return!1;Q=!1;break;default:return!1}for(let Y of G)if(!(typeof Y=="number"||Q&&Y===null))return!1;return!0}.bind(null,(Z)=>Z instanceof P1,Q8);Y9=Symbol(),T5=Symbol(),Y8=Symbol(),a4=Symbol(),b0=Symbol(),z6=Symbol(),a2=Symbol(),D0=Symbol(),e0=Symbol(),a=Symbol("content"),v0=Symbol("data"),A6=Symbol(),u=Symbol("extra"),Z8=Symbol(),q2=Symbol(),xq=Symbol(),eQ=Symbol(),N5=Symbol(),W9=Symbol(),E7=Symbol(),B7=Symbol(),NX=Symbol(),u8=Symbol(),I7=Symbol(),S8=Symbol(),L6=Symbol(),K4=Symbol(),I8=Symbol(),L1=Symbol(),K8=Symbol(),e1=Symbol(),u7=Symbol(),n5=Symbol(),Mq=Symbol(),n2=Symbol(),CX=Symbol(),E5=Symbol(),R6=Symbol(),E4=Symbol(),j7=Symbol(),L4=Symbol(),N4=Symbol(),g7=Symbol(),d7=Symbol(),JV=Symbol(),B8=Symbol("namespaceId"),d1=Symbol("nodeName"),j5=Symbol(),X4=Symbol(),Aq=Symbol(),k4=Symbol(),G4=Symbol(),W0=Symbol(),b6=Symbol(),h4=Symbol(),ZY=Symbol("root"),G7=Symbol(),x4=Symbol(),Lq=Symbol(),qY=Symbol(),_0=Symbol(),p0=Symbol(),A8=Symbol(),XY=Symbol(),H1=Symbol(),V7=Symbol(),u1=Symbol(),a1=Symbol("uid"),g0=Symbol(),j8={config:{id:0,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:(Z)=>Z==="http://ns.adobe.com/xdp/pdf/"},signature:{id:6,check:(Z)=>Z==="http://www.w3.org/2000/09/xmldsig#"},sourceSet:{id:7,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:(Z)=>Z==="http://www.w3.org/1999/XSL/Transform"},template:{id:9,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:(Z)=>Z.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:(Z)=>Z==="http://ns.adobe.com/xdp/"},xfdf:{id:12,check:(Z)=>Z==="http://ns.adobe.com/xfdf/"},xhtml:{id:13,check:(Z)=>Z==="http://www.w3.org/1999/xhtml"},xmpmeta:{id:14,check:(Z)=>Z==="http://ns.adobe.com/xmpmeta/"}},UV={pt:(Z)=>Z,cm:(Z)=>Z/2.54*72,mm:(Z)=>Z/25.4*72,in:(Z)=>72*Z,px:(Z)=>Z},fV=/([+-]?\d+\.?\d*)(.*)/;aR=/^[^.[]+/,KV=/^[^\]]+/,PY=new Map([["$data",(Z,q)=>Z.datasets?Z.datasets.data:Z],["$record",(Z,q)=>(Z.datasets?Z.datasets.data:Z)[S8]()[0]],["$template",(Z,q)=>Z.template],["$connectionSet",(Z,q)=>Z.connectionSet],["$form",(Z,q)=>Z.form],["$layout",(Z,q)=>Z.layout],["$host",(Z,q)=>Z.host],["$dataWindow",(Z,q)=>Z.dataWindow],["$event",(Z,q)=>Z.event],["!",(Z,q)=>Z.datasets],["$xfa",(Z,q)=>Z],["xfa",(Z,q)=>Z],["$",(Z,q)=>q]]),nR=new WeakMap;C2=Symbol(),Q5=Symbol(),r5=Symbol(),F1=Symbol("_children"),PZ=Symbol(),S4=Symbol(),QZ=Symbol(),iR=Symbol(),YZ=Symbol(),tR=Symbol(),WZ=Symbol(),P7=Symbol(),F2=Symbol(),N0=Symbol("parent"),o6=Symbol(),a6=Symbol(),$Z=Symbol(),YY=j8.datasets.id;g=class g{constructor(Z,q,X=!1){this[B8]=Z,this[d1]=q,this[WZ]=X,this[N0]=null,this[F1]=[],this[a1]=`${q}${Tq++}`,this[e1]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(Z){let q=this,X=null;for(let{name:z,index:R}of Z){for(let G=0,P=isFinite(R)?R:0;G<=P;G++){let Q=q[B8]===YY?-1:q[B8];X=new z4(Q,z),q[Y8](X)}q=X}return X}[X4](Z){if(!this[WZ]||!this[Aq](Z))return!1;let q=Z[d1],X=this[q];if(!(X instanceof C))return X!==null&&this[h4](X),this[q]=Z,this[Y8](Z),!0;if(X.push(Z))return this[Y8](Z),!0;let z="";return this.id?z=` (id: ${this.id})`:this.name&&(z=` (name: ${this.name} ${this.h.value})`),v(`XFA - node "${this[d1]}"${z} has already enough "${q}"!`),!1}[Aq](Z){return this.hasOwnProperty(Z[d1])&&Z[B8]===this[B8]}[j7](){return!1}[Y9](){return!1}[CX](){return!1}[E5](){return!1}[W0](){this.para&&this[K8]()[u].paraStack.pop()}[b6](){this[K8]()[u].paraStack.push(this.para)}[Lq](Z){this.id&&this[B8]===j8.template.id&&Z.set(this.id,this)}[K8](){return this[e1].template}[L4](){return!1}[N4](){return!1}[Y8](Z){Z[N0]=this,this[F1].push(Z),!Z[e1]&&this[e1]&&(Z[e1]=this[e1])}[h4](Z){let q=this[F1].indexOf(Z);this[F1].splice(q,1)}[u7](){return this.hasOwnProperty("value")}[_0](Z){}[k4](Z){}[Z8](){}[b0](Z){delete this[WZ],this[a2]&&(Z.clean(this[a2]),delete this[a2])}[Mq](Z){return this[F1].indexOf(Z)}[n2](Z,q){q[N0]=this,this[F1].splice(Z,0,q),!q[e1]&&this[e1]&&(q[e1]=this[e1])}[g7](){return!this.name}[JV](){return""}[A8](){return this[F1].length===0?this[a]:this[F1].map((Z)=>Z[A8]()).join("")}get[r5](){let Z=Object.getPrototypeOf(this);if(!Z._attributes){let q=Z._attributes=new Set;for(let X of Object.getOwnPropertyNames(this)){if(this[X]===null||this[X]instanceof g||this[X]instanceof C)break;q.add(X)}}return X1(this,r5,Z._attributes)}[E4](Z){let q=this;for(;q;){if(q===Z)return!0;q=q[L1]()}return!1}[L1](){return this[N0]}[I8](){return this[L1]()}[S8](Z=null){return Z?this[Z]:this[F1]}[A6](){let Z=Object.create(null);this[a]&&(Z.$content=this[a]);for(let q of Object.getOwnPropertyNames(this)){let X=this[q];X!==null&&(X instanceof g?Z[q]=X[A6]():X instanceof C?X.isEmpty()||(Z[q]=X.dump()):Z[q]=X)}return Z}[u1](){return null}[H1](){return K1.EMPTY}*[L6](){for(let Z of this[S8]())yield Z}*[iR](Z,q){for(let X of this[L6]())if(!Z||q===Z.has(X[d1])){let z=this[N5](),R=X[H1](z);R.success||(this[u].failingNode=X),yield R}}[q2](){return null}[T5](Z,q){this[u].children.push(Z)}[N5](){}[a4]({filter:Z=null,include:q=!0}){if(this[u].generator){let X=this[N5](),z=this[u].failingNode[H1](X);if(!z.success)return z;z.html&&this[T5](z.html,z.bbox),delete this[u].failingNode}else this[u].generator=this[iR](Z,q);for(;;){let X=this[u].generator.next();if(X.done)break;let z=X.value;if(!z.success)return z;z.html&&this[T5](z.html,z.bbox)}return this[u].generator=null,K1.EMPTY}[qY](Z){this[a6]=new Set(Object.keys(Z))}[tR](Z){let q=this[r5],X=this[a6];return[...Z].filter((z)=>q.has(z)&&!X.has(z))}[G7](Z,q=new Set){for(let X of this[F1])X[o6](Z,q)}[o6](Z,q){let X=this[YZ](Z,q);X?this[C2](X,Z,q):this[G7](Z,q)}[YZ](Z,q){let{use:X,usehref:z}=this;if(!X&&!z)return null;let R=null,G=null,P=null,Q=X;if(z?(Q=z,z.startsWith("#som(")&&z.endsWith(")")?G=z.slice(5,-1):z.startsWith(".#som(")&&z.endsWith(")")?G=z.slice(6,-1):z.startsWith("#")?P=z.slice(1):z.startsWith(".#")&&(P=z.slice(2))):X.startsWith("#")?P=X.slice(1):G=X,this.use=this.usehref="",P?R=Z.get(P):(R=D4(Z.get(ZY),this,G,!0,!1),R&&(R=R[0])),!R)return v(`XFA - Invalid prototype reference: ${Q}.`),null;if(R[d1]!==this[d1])return v(`XFA - Incompatible prototype: ${R[d1]} !== ${this[d1]}.`),null;if(q.has(R))return v("XFA - Cycle detected in prototypes use."),null;q.add(R);let Y=R[YZ](Z,q);return Y&&R[C2](Y,Z,q),R[G7](Z,q),q.delete(R),R}[C2](Z,q,X){if(X.has(Z))return void v("XFA - Cycle detected in prototypes use.");!this[a]&&Z[a]&&(this[a]=Z[a]),new Set(X).add(Z);for(let z of this[tR](Z[a6]))this[z]=Z[z],this[a6]&&this[a6].add(z);for(let z of Object.getOwnPropertyNames(this)){if(this[r5].has(z))continue;let R=this[z],G=Z[z];if(R instanceof C){for(let P of R[F1])P[o6](q,X);for(let P=R[F1].length,Q=G[F1].length;P<Q;P++){let Y=Z[F1][P][D0]();if(!R.push(Y))break;Y[N0]=this,this[F1].push(Y),Y[o6](q,X)}}else if(R===null){if(G!==null){let P=G[D0]();P[N0]=this,this[z]=P,this[F1].push(P),P[o6](q,X)}}else R[G7](q,X),G&&R[C2](G,q,X)}}static[PZ](Z){return Array.isArray(Z)?Z.map((q)=>g[PZ](q)):typeof Z=="object"&&Z!==null?Object.assign({},Z):Z}[D0](){let Z=Object.create(Object.getPrototypeOf(this));for(let q of Object.getOwnPropertySymbols(this))try{Z[q]=this[q]}catch{X1(Z,q,this[q])}Z[a1]=`${Z[d1]}${Tq++}`,Z[F1]=[];for(let q of Object.getOwnPropertyNames(this)){if(this[r5].has(q)){Z[q]=g[PZ](this[q]);continue}let X=this[q];Z[q]=X instanceof C?new C(X[P7]):null}for(let q of this[F1]){let X=q[d1],z=q[D0]();Z[F1].push(z),z[N0]=Z,Z[X]===null?Z[X]=z:Z[X][F1].push(z)}return Z}[S8](Z=null){return Z?this[F1].filter((q)=>q[d1]===Z):this[F1]}[W9](Z){return this[Z]}[E7](Z,q,X=!0){return Array.from(this[B7](Z,q,X))}*[B7](Z,q,X=!0){if(Z!=="parent"){for(let z of this[F1])z[d1]===Z&&(yield z),z.name===Z&&(yield z),(q||z[g7]())&&(yield*z[B7](Z,q,!1));X&&this[r5].has(Z)&&(yield new J9(this,Z,this[Z]))}else yield this[N0]}};C=class C{constructor(Z=1/0){this[P7]=Z,this[F1]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(Z){return this[F1].length<=this[P7]?(this[F1].push(Z),!0):(v(`XFA - node "${Z[d1]}" accepts no more than ${this[P7]} children`),!1)}isEmpty(){return this[F1].length===0}dump(){return this[F1].length===1?this[F1][0][A6]():this[F1].map((Z)=>Z[A6]())}[D0](){let Z=new C(this[P7]);return Z[F1]=this[F1].map((q)=>q[D0]()),Z}get children(){return this[F1]}clear(){this[F1].length=0}};J9=class J9{constructor(Z,q,X){this[N0]=Z,this[d1]=q,this[a]=X,this[e0]=!1,this[a1]="attribute"+Tq++}[L1](){return this[N0]}[R6](){return!0}[NX](){return this[a].trim()}[_0](Z){Z=Z.value||"",this[a]=Z.toString()}[A8](){return this[a]}[E4](Z){return this[N0]===Z||this[N0][E4](Z)}};z4=class z4 extends g{constructor(Z,q,X={}){if(super(Z,q),this[a]="",this[S4]=null,q!=="#text"){let z=new Map;this[Q5]=z;for(let[R,G]of Object.entries(X))z.set(R,new J9(this,R,G));if(X.hasOwnProperty(j5)){let R=X[j5].xfa.dataNode;R!==void 0&&(R==="dataGroup"?this[S4]=!1:R==="dataValue"&&(this[S4]=!0))}}this[e0]=!1}[V7](Z){let q=this[d1];if(q==="#text")return void Z.push($6(this[a]));let X=EZ(q),z=this[B8]===YY?"xfa:":"";Z.push(`<${z}${X}`);for(let[R,G]of this[Q5].entries()){let P=EZ(R);Z.push(` ${P}="${$6(G[a])}"`)}if(this[S4]!==null&&(this[S4]?Z.push(' xfa:dataNode="dataValue"'):Z.push(' xfa:dataNode="dataGroup"')),this[a]||this[F1].length!==0){if(Z.push(">"),this[a])typeof this[a]=="string"?Z.push($6(this[a])):this[a][V7](Z);else for(let R of this[F1])R[V7](Z);Z.push(`</${z}${X}>`)}else Z.push("/>")}[X4](Z){if(this[a]){let q=new z4(this[B8],"#text");this[Y8](q),q[a]=this[a],this[a]=""}return this[Y8](Z),!0}[k4](Z){this[a]+=Z}[Z8](){if(this[a]&&this[F1].length>0){let Z=new z4(this[B8],"#text");this[Y8](Z),Z[a]=this[a],delete this[a]}}[H1](){return this[d1]==="#text"?K1.success({name:"#text",value:this[a]}):K1.EMPTY}[S8](Z=null){return Z?this[F1].filter((q)=>q[d1]===Z):this[F1]}[eQ](){return this[Q5]}[W9](Z){let q=this[Q5].get(Z);return q!==void 0?q:this[S8](Z)}*[B7](Z,q){let X=this[Q5].get(Z);X&&(yield X);for(let z of this[F1])z[d1]===Z&&(yield z),q&&(yield*z[B7](Z,q))}*[xq](Z,q){let X=this[Q5].get(Z);!X||q&&X[e0]||(yield X);for(let z of this[F1])yield*z[xq](Z,q)}*[I7](Z,q,X){for(let z of this[F1])z[d1]!==Z||X&&z[e0]||(yield z),q&&(yield*z[I7](Z,q,X))}[R6](){return this[S4]===null?this[F1].length===0||this[F1][0][B8]===j8.xhtml.id:this[S4]}[NX](){return this[S4]===null?this[F1].length===0?this[a].trim():this[F1][0][B8]===j8.xhtml.id?this[F1][0][A8]().trim():null:this[a].trim()}[_0](Z){Z=Z.value||"",this[a]=Z.toString()}[A6](Z=!1){let q=Object.create(null);Z&&(q.$ns=this[B8]),this[a]&&(q.$content=this[a]),q.$name=this[d1],q.children=[];for(let X of this[F1])q.children.push(X[A6](Z));q.attributes=Object.create(null);for(let[X,z]of this[Q5])q.attributes[X]=z[a];return q}};P8=class P8 extends g{constructor(Z,q){super(Z,q),this[a]=""}[k4](Z){this[a]+=Z}[Z8](){}};r1=class r1 extends P8{constructor(Z,q,X){super(Z,q),this[F2]=X}[Z8](){this[a]=_9({data:this[a],defaultValue:this[F2][0],validate:(Z)=>this[F2].includes(Z)})}[b0](Z){super[b0](Z),delete this[F2]}};b1=class b1 extends P8{[Z8](){this[a]=this[a].trim()}};S0=class S0 extends P8{constructor(Z,q,X,z){super(Z,q),this[QZ]=X,this[$Z]=z}[Z8](){this[a]=A1({data:this[a],defaultValue:this[QZ],validate:this[$Z]})}[b0](Z){super[b0](Z),delete this[QZ],delete this[$Z]}};M8=class M8 extends S0{constructor(Z,q){super(Z,q,0,(X)=>X===1)}};bX=class bX extends S0{constructor(Z,q){super(Z,q,1,(X)=>X===0)}};eR={anchorType(Z,q){let X=Z[I8]();if(X&&(!X.layout||X.layout==="position"))switch("transform"in q||(q.transform=""),Z.anchorType){case"bottomCenter":q.transform+="translate(-50%, -100%)";break;case"bottomLeft":q.transform+="translate(0,-100%)";break;case"bottomRight":q.transform+="translate(-100%,-100%)";break;case"middleCenter":q.transform+="translate(-50%,-50%)";break;case"middleLeft":q.transform+="translate(0,-50%)";break;case"middleRight":q.transform+="translate(-100%,-50%)";break;case"topCenter":q.transform+="translate(-50%,0)";break;case"topRight":q.transform+="translate(-100%,0)"}},dimensions(Z,q){let X=Z[I8](),z=Z.w,R=Z.h;if(X.layout?.includes("row")){let G=X[u],P=Z.colSpan,Q;P===-1?(Q=Math.sumPrecise(G.columnWidths.slice(G.currentColumn)),G.currentColumn=0):(Q=Math.sumPrecise(G.columnWidths.slice(G.currentColumn,G.currentColumn+P)),G.currentColumn=(G.currentColumn+Z.colSpan)%G.columnWidths.length),isNaN(Q)||(z=Z.w=Q)}q.width=z!==""?M1(z):"auto",q.height=R!==""?M1(R):"auto"},position(Z,q){let X=Z[I8]();X?.layout&&X.layout!=="position"||(q.position="absolute",q.left=M1(Z.x),q.top=M1(Z.y))},rotate(Z,q){Z.rotate&&(("transform"in q)||(q.transform=""),q.transform+=`rotate(-${Z.rotate}deg)`,q.transformOrigin="top left")},presence(Z,q){switch(Z.presence){case"invisible":q.visibility="hidden";break;case"hidden":case"inactive":q.display="none"}},hAlign(Z,q){if(Z[d1]==="para")switch(Z.hAlign){case"justifyAll":q.textAlign="justify-all";break;case"radix":q.textAlign="left";break;default:q.textAlign=Z.hAlign}else switch(Z.hAlign){case"left":q.alignSelf="start";break;case"center":q.alignSelf="center";break;case"right":q.alignSelf="end"}},margin(Z,q){Z.margin&&(q.margin=Z.margin[u1]().margin)}};z1=j8.template.id,HV=/^H(\d+)$/,xV=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),MV=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];xY=class xY extends b1{constructor(Z){super(z1,"appearanceFilter"),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};DX=class DX extends g{constructor(Z){super(z1,"arc",!0),this.circular=A1({data:Z.circular,defaultValue:0,validate:(q)=>q===1}),this.hand=i(Z.hand,["even","left","right"]),this.id=Z.id||"",this.startAngle=b3({data:Z.startAngle,defaultValue:0,validate:(q)=>!0}),this.sweepAngle=b3({data:Z.sweepAngle,defaultValue:360,validate:(q)=>!0}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.edge=null,this.fill=null}[H1](){let Z=this.edge||new m6({}),q=Z[u1](),X=Object.create(null),z;this.fill?.presence==="visible"?Object.assign(X,this.fill[u1]()):X.fill="transparent",X.strokeWidth=M1(Z.presence==="visible"?Z.thickness:0),X.stroke=q.color;let R={xmlns:F5,style:{width:"100%",height:"100%",overflow:"visible"}};if(this.sweepAngle===360)z={name:"ellipse",attributes:{xmlns:F5,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:X}};else{let P=this.startAngle*Math.PI/180,Q=this.sweepAngle*Math.PI/180,Y=this.sweepAngle>180?1:0,[W,$,_,J]=[50*(1+Math.cos(P)),50*(1-Math.sin(P)),50*(1+Math.cos(P+Q)),50*(1-Math.sin(P+Q))];z={name:"path",attributes:{xmlns:F5,d:`M ${W} ${$} A 50 50 0 ${Y} 0 ${_} ${J}`,vectorEffect:"non-scaling-stroke",style:X}},Object.assign(R,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}let G={name:"svg",children:[z],attributes:R};return OX(this[L1]()[L1]())?K1.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[G]}):(G.attributes.style.position="absolute",K1.success(G))}};MY=class MY extends g{constructor(Z){super(z1,"area",!0),this.colSpan=A1({data:Z.colSpan,defaultValue:1,validate:(q)=>q>=1||q===-1}),this.id=Z.id||"",this.name=Z.name||"",this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.x=_1(Z.x,"0pt"),this.y=_1(Z.y,"0pt"),this.desc=null,this.extras=null,this.area=new C,this.draw=new C,this.exObject=new C,this.exclGroup=new C,this.field=new C,this.subform=new C,this.subformSet=new C}*[L6](){yield*pX(this)}[g7](){return!0}[E5](){return!0}[T5](Z,q){let[X,z,R,G]=q;this[u].width=Math.max(this[u].width,X+R),this[u].height=Math.max(this[u].height,z+G),this[u].children.push(Z)}[N5](){return this[u].availableSpace}[H1](Z){let q=X0(this,"position"),X={style:q,id:this[a1],class:["xfaArea"]};S6(this)&&X.class.push("xfaPrintOnly"),this.name&&(X.xfaName=this.name);let z=[];this[u]={children:z,width:0,height:0,availableSpace:Z};let R=this[a4]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!R.success)return R.isBreak()?R:(delete this[u],K1.FAILURE);q.width=M1(this[u].width),q.height=M1(this[u].height);let G={name:"div",attributes:X,children:z},P=[this.x,this.y,this[u].width,this[u].height];return delete this[u],K1.success(G,P)}};AY=class AY extends g{constructor(Z){super(z1,"assist",!0),this.id=Z.id||"",this.role=Z.role||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.speak=null,this.toolTip=null}[H1](){return this.toolTip?.[a]||null}};LY=class LY extends g{constructor(Z){super(z1,"barcode",!0),this.charEncoding=_9({data:Z.charEncoding?Z.charEncoding.toLowerCase():"",defaultValue:"",validate:(q)=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(q)||q.match(/iso-8859-\d{2}/)}),this.checksum=i(Z.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=A1({data:Z.dataColumnCount,defaultValue:-1,validate:(q)=>q>=0}),this.dataLength=A1({data:Z.dataLength,defaultValue:-1,validate:(q)=>q>=0}),this.dataPrep=i(Z.dataPrep,["none","flateCompress"]),this.dataRowCount=A1({data:Z.dataRowCount,defaultValue:-1,validate:(q)=>q>=0}),this.endChar=Z.endChar||"",this.errorCorrectionLevel=A1({data:Z.errorCorrectionLevel,defaultValue:-1,validate:(q)=>q>=0&&q<=8}),this.id=Z.id||"",this.moduleHeight=_1(Z.moduleHeight,"5mm"),this.moduleWidth=_1(Z.moduleWidth,"0.25mm"),this.printCheckDigit=A1({data:Z.printCheckDigit,defaultValue:0,validate:(q)=>q===1}),this.rowColumnRatio=oR(Z.rowColumnRatio),this.startChar=Z.startChar||"",this.textLocation=i(Z.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=A1({data:Z.truncate,defaultValue:0,validate:(q)=>q===1}),this.type=i(Z.type?Z.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"]),this.upsMode=i(Z.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.wideNarrowRatio=oR(Z.wideNarrowRatio),this.encrypt=null,this.extras=null}};kY=class kY extends g{constructor(Z){super(z1,"bind",!0),this.match=i(Z.match,["once","dataRef","global","none"]),this.ref=Z.ref||"",this.picture=null}};O3=class O3 extends g{constructor(Z){super(z1,"bindItems"),this.connection=Z.connection||"",this.labelRef=Z.labelRef||"",this.ref=Z.ref||"",this.valueRef=Z.valueRef||""}};TY=class TY extends g{constructor(Z){super(z1,"bookend"),this.id=Z.id||"",this.leader=Z.leader||"",this.trailer=Z.trailer||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};NY=class NY extends M8{constructor(Z){super(z1,"boolean"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[H1](Z){return e4(this[a]===1?"1":"0")}};wX=class wX extends g{constructor(Z){super(z1,"border",!0),this.break=i(Z.break,["close","open"]),this.hand=i(Z.hand,["even","left","right"]),this.id=Z.id||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.corner=new C(4),this.edge=new C(4),this.extras=null,this.fill=null,this.margin=null}[u8](){if(!this[u]){let Z=this.edge.children.slice();if(Z.length<4){let z=Z.at(-1)||new m6({});for(let R=Z.length;R<4;R++)Z.push(z)}let q=Z.map((z)=>z.thickness),X=[0,0,0,0];this.margin&&(X[0]=this.margin.topInset,X[1]=this.margin.rightInset,X[2]=this.margin.bottomInset,X[3]=this.margin.leftInset),this[u]={widths:q,insets:X,edges:Z}}return this[u]}[u1](){let{edges:Z}=this[u8](),q=Z.map((z)=>{let R=z[u1]();return R.color||="#000000",R}),X=Object.create(null);if(this.margin&&Object.assign(X,this.margin[u1]()),this.fill?.presence==="visible"&&Object.assign(X,this.fill[u1]()),this.corner.children.some((z)=>z.radius!==0)){let z=this.corner.children.map((R)=>R[u1]());if(z.length===2||z.length===3){let R=z.at(-1);for(let G=z.length;G<4;G++)z.push(R)}X.borderRadius=z.map((R)=>R.radius).join(" ")}switch(this.presence){case"invisible":case"hidden":X.borderStyle="";break;case"inactive":X.borderStyle="none";break;default:X.borderStyle=q.map((z)=>z.style).join(" ")}return X.borderWidth=q.map((z)=>z.width).join(" "),X.borderColor=q.map((z)=>z.color).join(" "),X}};CY=class CY extends g{constructor(Z){super(z1,"break",!0),this.after=i(Z.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=Z.afterTarget||"",this.before=i(Z.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=Z.beforeTarget||"",this.bookendLeader=Z.bookendLeader||"",this.bookendTrailer=Z.bookendTrailer||"",this.id=Z.id||"",this.overflowLeader=Z.overflowLeader||"",this.overflowTarget=Z.overflowTarget||"",this.overflowTrailer=Z.overflowTrailer||"",this.startNew=A1({data:Z.startNew,defaultValue:0,validate:(q)=>q===1}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}};EX=class EX extends g{constructor(Z){super(z1,"breakAfter",!0),this.id=Z.id||"",this.leader=Z.leader||"",this.startNew=A1({data:Z.startNew,defaultValue:0,validate:(q)=>q===1}),this.target=Z.target||"",this.targetType=i(Z.targetType,["auto","contentArea","pageArea"]),this.trailer=Z.trailer||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.script=null}};uX=class uX extends g{constructor(Z){super(z1,"breakBefore",!0),this.id=Z.id||"",this.leader=Z.leader||"",this.startNew=A1({data:Z.startNew,defaultValue:0,validate:(q)=>q===1}),this.target=Z.target||"",this.targetType=i(Z.targetType,["auto","contentArea","pageArea"]),this.trailer=Z.trailer||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.script=null}[H1](Z){return this[u]={},K1.FAILURE}};FY=class FY extends g{constructor(Z){super(z1,"button",!0),this.highlight=i(Z.highlight,["inverted","none","outline","push"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}[H1](Z){let q=this[L1]()[L1](),X={name:"button",attributes:{id:this[a1],class:["xfaButton"],style:{}},children:[]};for(let z of q.event.children){if(z.activity!=="click"||!z.script)continue;let R=LP(z.script[a]);if(!R)continue;let G=BY(R.url);G&&X.children.push({name:"a",attributes:{id:"link"+this[a1],href:G,newWindow:R.newWindow,class:["xfaLink"],style:{}},children:[]})}return K1.success(X)}};vY=class vY extends g{constructor(Z){super(z1,"calculate",!0),this.id=Z.id||"",this.override=i(Z.override,["disabled","error","ignore","warning"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.message=null,this.script=null}};bY=class bY extends g{constructor(Z){super(z1,"caption",!0),this.id=Z.id||"",this.placement=i(Z.placement,["left","bottom","inline","right","top"]),this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil(_1(Z.reserve)),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[_0](Z){yX(this,Z)}[u8](Z){if(!this[u]){let{width:q,height:X}=Z;switch(this.placement){case"left":case"right":case"inline":q=this.reserve<=0?q:this.reserve;break;case"top":case"bottom":X=this.reserve<=0?X:this.reserve}this[u]=SX(this,{width:q})}return this[u]}[H1](Z){if(!this.value)return K1.EMPTY;this[b6]();let q=this.value[H1](Z).html;if(!q)return this[W0](),K1.EMPTY;let X=this.reserve;if(this.reserve<=0){let{w:G,h:P}=this[u8](Z);switch(this.placement){case"left":case"right":case"inline":this.reserve=G;break;case"top":case"bottom":this.reserve=P}}let z=[];typeof q=="string"?z.push({name:"#text",value:q}):z.push(q);let R=X0(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(R.width=M1(this.reserve));break;case"top":case"bottom":this.reserve>0&&(R.height=M1(this.reserve))}return fY(this,null,q),this[W0](),this.reserve=X,K1.success({name:"div",attributes:{style:R,class:["xfaCaption"]},children:z})}};SY=class SY extends b1{constructor(Z){super(z1,"certificate"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};mY=class mY extends g{constructor(Z){super(z1,"certificates",!0),this.credentialServerPolicy=i(Z.credentialServerPolicy,["optional","required"]),this.id=Z.id||"",this.url=Z.url||"",this.urlPolicy=Z.urlPolicy||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}};gX=class gX extends g{constructor(Z){super(z1,"checkButton",!0),this.id=Z.id||"",this.mark=i(Z.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=i(Z.shape,["square","round"]),this.size=_1(Z.size,"10pt"),this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.extras=null,this.margin=null}[H1](Z){let q=X0(this,"margin"),X=M1(this.size),z,R,G;q.width=q.height=X;let P=this[L1]()[L1](),Q=P.items.children.length&&P.items.children[0][H1]().html||[],Y={on:(Q[0]!==void 0?Q[0]:"on").toString(),off:(Q[1]!==void 0?Q[1]:"off").toString()},W=(P.value?.[A8]()||"off")===Y.on||void 0,$=P[I8](),_=P[a1],J;$ instanceof sX?(G=$[a1],z="radio",R="xfaRadio",J=$[v0]?.[a1]||$[a1]):(z="checkbox",R="xfaCheckbox",J=P[v0]?.[a1]||P[a1]);let U={name:"input",attributes:{class:[R],style:q,fieldId:_,dataId:J,type:z,checked:W,xfaOn:Y.on,xfaOff:Y.off,"aria-label":y5(P),"aria-required":!1}};return G&&(U.attributes.name=G),X2(P)&&(U.attributes["aria-required"]=!0,U.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[U]})}};dX=class dX extends g{constructor(Z){super(z1,"choiceList",!0),this.commitOn=i(Z.commitOn,["select","exit"]),this.id=Z.id||"",this.open=i(Z.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=A1({data:Z.textEntry,defaultValue:0,validate:(q)=>q===1}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.extras=null,this.margin=null}[H1](Z){let q=X0(this,"border","margin"),X=this[L1]()[L1](),z={fontSize:`calc(${X.font?.size||10}px * var(--total-scale-factor))`},R=[];if(X.items.children.length>0){let P=X.items,Q=0,Y=0;P.children.length===2&&(Q=P.children[0].save,Y=1-Q);let W=P.children[Q][H1]().html,$=P.children[Y][H1]().html,_=!1,J=X.value?.[A8]()||"";for(let U=0,f=W.length;U<f;U++){let K={name:"option",attributes:{value:$[U]||W[U],style:z},value:W[U]};$[U]===J&&(K.attributes.selected=_=!0),R.push(K)}_||R.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}let G={class:["xfaSelect"],fieldId:X[a1],dataId:X[v0]?.[a1]||X[a1],style:q,"aria-label":y5(X),"aria-required":!1};return X2(X)&&(G["aria-required"]=!0,G.required=!0),this.open==="multiSelect"&&(G.multiple=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:R,attributes:G}]})}};OY=class OY extends g{constructor(Z){super(z1,"color",!0),this.cSpace=i(Z.cSpace,["SRGB"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.value=Z.value?function(q,X=[0,0,0]){let[z,R,G]=X;if(!q)return{r:z,g:R,b:G};let P=q.split(",",3).map((Q)=>E8(parseInt(Q.trim(),10),0,255)).map((Q)=>isNaN(Q)?0:Q);return P.length<3||([z,R,G]=P),{r:z,g:R,b:G}}(Z.value):"",this.extras=null}[u7](){return!1}[u1](){return this.value?h1.makeHexColor(this.value.r,this.value.g,this.value.b):null}};yY=class yY extends g{constructor(Z){super(z1,"comb"),this.id=Z.id||"",this.numberOfCells=A1({data:Z.numberOfCells,defaultValue:0,validate:(q)=>q>=0}),this.use=Z.use||"",this.usehref=Z.usehref||""}};pY=class pY extends g{constructor(Z){super(z1,"connect",!0),this.connection=Z.connection||"",this.id=Z.id||"",this.ref=Z.ref||"",this.usage=i(Z.usage,["exportAndImport","exportOnly","importOnly"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.picture=null}};V9=class V9 extends g{constructor(Z){super(z1,"contentArea",!0),this.h=_1(Z.h),this.id=Z.id||"",this.name=Z.name||"",this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.w=_1(Z.w),this.x=_1(Z.x,"0pt"),this.y=_1(Z.y,"0pt"),this.desc=null,this.extras=null}[H1](Z){let q={left:M1(this.x),top:M1(this.y),width:M1(this.w),height:M1(this.h)},X=["xfaContentarea"];return S6(this)&&X.push("xfaPrintOnly"),K1.success({name:"div",children:[],attributes:{style:q,class:X,id:this[a1]}})}};cX=class cX extends g{constructor(Z){super(z1,"corner",!0),this.id=Z.id||"",this.inverted=A1({data:Z.inverted,defaultValue:0,validate:(q)=>q===1}),this.join=i(Z.join,["square","round"]),this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.radius=_1(Z.radius),this.stroke=i(Z.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=_1(Z.thickness,"0.5pt"),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null}[u1](){let Z=X0(this,"visibility");return Z.radius=M1(this.join==="square"?0:this.radius),Z}};DY=class DY extends P8{constructor(Z){super(z1,"date"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){let Z=this[a].trim();this[a]=Z?new Date(Z):null}[H1](Z){return e4(this[a]?this[a].toString():"")}};wY=class wY extends P8{constructor(Z){super(z1,"dateTime"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){let Z=this[a].trim();this[a]=Z?new Date(Z):null}[H1](Z){return e4(this[a]?this[a].toString():"")}};EY=class EY extends g{constructor(Z){super(z1,"dateTimeEdit",!0),this.hScrollPolicy=i(Z.hScrollPolicy,["auto","off","on"]),this.id=Z.id||"",this.picker=i(Z.picker,["host","none"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[H1](Z){let q=X0(this,"border","font","margin"),X=this[L1]()[L1](),z={name:"input",attributes:{type:"text",fieldId:X[a1],dataId:X[v0]?.[a1]||X[a1],class:["xfaTextfield"],style:q,"aria-label":y5(X),"aria-required":!1}};return X2(X)&&(z.attributes["aria-required"]=!0,z.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[z]})}};uY=class uY extends P8{constructor(Z){super(z1,"decimal"),this.fracDigits=A1({data:Z.fracDigits,defaultValue:2,validate:(q)=>!0}),this.id=Z.id||"",this.leadDigits=A1({data:Z.leadDigits,defaultValue:-1,validate:(q)=>!0}),this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){let Z=parseFloat(this[a].trim());this[a]=isNaN(Z)?null:Z}[H1](Z){return e4(this[a]!==null?this[a].toString():"")}};gY=class gY extends g{constructor(Z){super(z1,"defaultUi",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}};dY=class dY extends g{constructor(Z){super(z1,"desc",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.boolean=new C,this.date=new C,this.dateTime=new C,this.decimal=new C,this.exData=new C,this.float=new C,this.image=new C,this.integer=new C,this.text=new C,this.time=new C}};cY=class cY extends r1{constructor(Z){super(z1,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};hY=class hY extends g{constructor(Z){super(z1,"digestMethods",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.digestMethod=new C}};hX=class hX extends g{constructor(Z){super(z1,"draw",!0),this.anchorType=i(Z.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:Z.colSpan,defaultValue:1,validate:(q)=>q>=1||q===-1}),this.h=Z.h?_1(Z.h):"",this.hAlign=i(Z.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=Z.id||"",this.locale=Z.locale||"",this.maxH=_1(Z.maxH,"0pt"),this.maxW=_1(Z.maxW,"0pt"),this.minH=_1(Z.minH,"0pt"),this.minW=_1(Z.minW,"0pt"),this.name=Z.name||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(Z.relevant),this.rotate=A1({data:Z.rotate,defaultValue:0,validate:(q)=>q%90==0}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.w=Z.w?_1(Z.w):"",this.x=_1(Z.x,"0pt"),this.y=_1(Z.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new C}[_0](Z){yX(this,Z)}[H1](Z){if(K9(this),this.presence==="hidden"||this.presence==="inactive")return K1.EMPTY;U9(this),this[b6]();let q=this.w,X=this.h,{w:z,h:R,isBroken:G}=SX(this,Z);if(z&&this.w===""){if(G&&this[I8]()[N4]())return this[W0](),K1.FAILURE;this.w=z}if(R&&this.h===""&&(this.h=R),I9(this),!f9(this,Z))return this.w=q,this.h=X,this[W0](),K1.FAILURE;j9(this);let P=X0(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");WY(this,P),P.margin&&(P.padding=P.margin,delete P.margin);let Q=["xfaDraw"];this.font&&Q.push("xfaFont"),S6(this)&&Q.push("xfaPrintOnly");let Y={style:P,id:this[a1],class:Q};this.name&&(Y.xfaName=this.name);let W={name:"div",attributes:Y,children:[]};B9(this,Y);let $=$Y(this,W,Z),_=this.value?this.value[H1](Z).html:null;return _===null?(this.w=q,this.h=X,this[W0](),K1.success(C5(this,W),$)):(W.children.push(_),fY(this,P,_),this.w=q,this.h=X,this[W0](),K1.success(C5(this,W),$))}};m6=class m6 extends g{constructor(Z){super(z1,"edge",!0),this.cap=i(Z.cap,["square","butt","round"]),this.id=Z.id||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.stroke=i(Z.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=_1(Z.thickness,"0.5pt"),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null}[u1](){let Z=X0(this,"visibility");if(Object.assign(Z,{linecap:this.cap,width:M1(this.thickness),color:this.color?this.color[u1]():"#000000",style:""}),this.presence!=="visible")Z.style="none";else switch(this.stroke){case"solid":Z.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":Z.style="dashed";break;case"dotted":Z.style="dotted";break;case"embossed":Z.style="ridge";break;case"etched":Z.style="groove";break;case"lowered":Z.style="inset";break;case"raised":Z.style="outset"}return Z}};sY=class sY extends r1{constructor(Z){super(z1,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};rY=class rY extends g{constructor(Z){super(z1,"encodings",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.encoding=new C}};lY=class lY extends g{constructor(Z){super(z1,"encrypt",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.certificate=null}};oY=class oY extends g{constructor(Z){super(z1,"encryptData",!0),this.id=Z.id||"",this.operation=i(Z.operation,["encrypt","decrypt"]),this.target=Z.target||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.filter=null,this.manifest=null}};aY=class aY extends g{constructor(Z){super(z1,"encryption",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.certificate=new C}};nY=class nY extends r1{constructor(Z){super(z1,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};iY=class iY extends g{constructor(Z){super(z1,"encryptionMethods",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.encryptionMethod=new C}};AV=class extends g{constructor(Z){super(z1,"event",!0),this.activity=i(Z.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"]),this.id=Z.id||"",this.listen=i(Z.listen,["refOnly","refAndDescendents"]),this.name=Z.name||"",this.ref=Z.ref||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}};tY=class tY extends P8{constructor(Z){super(z1,"exData"),this.contentType=Z.contentType||"",this.href=Z.href||"",this.id=Z.id||"",this.maxLength=A1({data:Z.maxLength,defaultValue:-1,validate:(q)=>q>=-1}),this.name=Z.name||"",this.rid=Z.rid||"",this.transferEncoding=i(Z.transferEncoding,["none","base64","package"]),this.use=Z.use||"",this.usehref=Z.usehref||""}[CX](){return this.contentType==="text/html"}[X4](Z){return(this.contentType==="text/html"&&Z[B8]===j8.xhtml.id||this.contentType==="text/xml")&&(this[a]=Z,!0)}[H1](Z){return this.contentType==="text/html"&&this[a]?this[a][H1](Z):K1.EMPTY}};eY=class eY extends g{constructor(Z){super(z1,"exObject",!0),this.archive=Z.archive||"",this.classId=Z.classId||"",this.codeBase=Z.codeBase||"",this.codeType=Z.codeType||"",this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.boolean=new C,this.date=new C,this.dateTime=new C,this.decimal=new C,this.exData=new C,this.exObject=new C,this.float=new C,this.image=new C,this.integer=new C,this.text=new C,this.time=new C}};sX=class sX extends g{constructor(Z){super(z1,"exclGroup",!0),this.access=i(Z.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=Z.accessKey||"",this.anchorType=i(Z.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:Z.colSpan,defaultValue:1,validate:(q)=>q>=1||q===-1}),this.h=Z.h?_1(Z.h):"",this.hAlign=i(Z.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=Z.id||"",this.layout=i(Z.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=_1(Z.maxH,"0pt"),this.maxW=_1(Z.maxW,"0pt"),this.minH=_1(Z.minH,"0pt"),this.minW=_1(Z.minW,"0pt"),this.name=Z.name||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.w=Z.w?_1(Z.w):"",this.x=_1(Z.x,"0pt"),this.y=_1(Z.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new C,this.event=new C,this.field=new C,this.setProperty=new C}[E5](){return!0}[u7](){return!0}[_0](Z){for(let q of this.field.children){if(!q.value){let X=new L9({});q[Y8](X),q.value=X}q.value[_0](Z)}}[N4](){return this.layout.endsWith("-tb")&&this[u].attempt===0&&this[u].numberInLine>0||this[L1]()[N4]()}[L4](){let Z=this[I8]();return!!Z[L4]()&&(this[u]._isSplittable!==void 0?this[u]._isSplittable:this.layout==="position"||this.layout.includes("row")?(this[u]._isSplittable=!1,!1):(!Z.layout?.endsWith("-tb")||Z[u].numberInLine===0)&&(this[u]._isSplittable=!0,!0))}[q2](){return jY(this)}[T5](Z,q){VY(this,Z,q)}[N5](){return HY(this)}[H1](Z){if(K9(this),this.presence==="hidden"||this.presence==="inactive"||this.h===0||this.w===0)return K1.EMPTY;U9(this);let q=[],X={id:this[a1],class:[]};mX(this,X.class),this[u]||=Object.create(null),Object.assign(this[u],{children:q,attributes:X,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,Z.width),height:Math.min(this.h||1/0,Z.height)},width:0,height:0,prevHeight:0,currentWidth:0});let z=this[L4]();if(z||I9(this),!f9(this,Z))return K1.FAILURE;let R=new Set(["field"]);if(this.layout.includes("row")){let I=this[I8]().columnWidths;Array.isArray(I)&&I.length>0&&(this[u].columnWidths=I,this[u].currentColumn=0)}let G=X0(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),P=["xfaExclgroup"],Q=_Y(this);Q&&P.push(Q),S6(this)&&P.push("xfaPrintOnly"),X.style=G,X.class=P,this.name&&(X.xfaName=this.name),this[b6]();let Y=this.layout==="lr-tb"||this.layout==="rl-tb",W=Y?2:1;for(;this[u].attempt<W;this[u].attempt++){Y&&this[u].attempt===1&&(this[u].numberInLine=0);let I=this[a4]({filter:R,include:!0});if(I.success)break;if(I.isBreak())return this[W0](),I;if(Y&&this[u].attempt===0&&this[u].numberInLine===0&&!this[K8]()[u].noLayoutFailure){this[u].attempt=W;break}}if(this[W0](),z||j9(this),this[u].attempt===W)return z||delete this[u],K1.FAILURE;let $=0,_=0;this.margin&&($=this.margin.leftInset+this.margin.rightInset,_=this.margin.topInset+this.margin.bottomInset);let J=Math.max(this[u].width+$,this.w||0),U=Math.max(this[u].height+_,this.h||0),f=[this.x,this.y,J,U];this.w===""&&(G.width=M1(J)),this.h===""&&(G.height=M1(U));let K={name:"div",attributes:X,children:q};return B9(this,X),delete this[u],K1.success(C5(this,K),f)}};ZW=class ZW extends g{constructor(Z){super(z1,"execute"),this.connection=Z.connection||"",this.executeType=i(Z.executeType,["import","remerge"]),this.id=Z.id||"",this.runAt=i(Z.runAt,["client","both","server"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};qW=class qW extends g{constructor(Z){super(z1,"extras",!0),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.boolean=new C,this.date=new C,this.dateTime=new C,this.decimal=new C,this.exData=new C,this.extras=new C,this.float=new C,this.image=new C,this.integer=new C,this.text=new C,this.time=new C}};H9=class H9 extends g{constructor(Z){super(z1,"field",!0),this.access=i(Z.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=Z.accessKey||"",this.anchorType=i(Z.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:Z.colSpan,defaultValue:1,validate:(q)=>q>=1||q===-1}),this.h=Z.h?_1(Z.h):"",this.hAlign=i(Z.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=Z.id||"",this.locale=Z.locale||"",this.maxH=_1(Z.maxH,"0pt"),this.maxW=_1(Z.maxW,"0pt"),this.minH=_1(Z.minH,"0pt"),this.minW=_1(Z.minW,"0pt"),this.name=Z.name||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(Z.relevant),this.rotate=A1({data:Z.rotate,defaultValue:0,validate:(q)=>q%90==0}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.w=Z.w?_1(Z.w):"",this.x=_1(Z.x,"0pt"),this.y=_1(Z.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new C(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new C,this.connect=new C,this.event=new C,this.setProperty=new C}[E5](){return!0}[_0](Z){yX(this,Z)}[H1](Z){if(K9(this),!this.ui){let I;switch(this.ui=new A9({}),this.ui[e1]=this[e1],this[Y8](this.ui),this.items.children.length){case 0:I=new nX({}),this.ui.textEdit=I;break;case 1:I=new gX({}),this.ui.checkButton=I;break;case 2:I=new dX({}),this.ui.choiceList=I}this.ui[Y8](I)}if(!this.ui||this.presence==="hidden"||this.presence==="inactive"||this.h===0||this.w===0)return K1.EMPTY;this.caption&&delete this.caption[u],this[b6]();let q=this.caption?this.caption[H1](Z).html:null,X=this.w,z=this.h,R=0,G=0;this.margin&&(R=this.margin.leftInset+this.margin.rightInset,G=this.margin.topInset+this.margin.bottomInset);let P=null;if(this.w===""||this.h===""){let I=null,B=null,j=0,V=0;if(this.ui.checkButton)j=V=this.ui.checkButton.size;else{let{w:x,h:M}=SX(this,Z);x!==null?(j=x,V=M):V=function(H,A=!1){let T=null;if(H){let D=$9(H.typeface),n=H[e1].fontFinder.find(D);T=FX(H,n)}if(!T)return{lineHeight:12,lineGap:2,lineNoGap:10};let k=H.size||10,y=T.lineHeight?Math.max(A?0:1.2,T.lineHeight):1.2,O=T.lineGap===void 0?0.2:T.lineGap;return{lineHeight:y*k,lineGap:O*k,lineNoGap:Math.max(1,y-O)*k}}(this.font,!0).lineNoGap}if(P=qG(this.ui[u8]()),j+=P.w,V+=P.h,this.caption){let{w:x,h:M,isBroken:H}=this.caption[u8](Z);if(H&&this[I8]()[N4]())return this[W0](),K1.FAILURE;switch(I=x,B=M,this.caption.placement){case"left":case"right":case"inline":I+=j;break;case"top":case"bottom":B+=V}}else I=j,B=V;I&&this.w===""&&(I+=R,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<I?I:this.minW)),B&&this.h===""&&(B+=G,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<B?B:this.minH))}if(this[W0](),U9(this),I9(this),!f9(this,Z))return this.w=X,this.h=z,this[W0](),K1.FAILURE;j9(this);let Q=X0(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");WY(this,Q);let Y=["xfaField"];this.font&&Y.push("xfaFont"),S6(this)&&Y.push("xfaPrintOnly");let W={style:Q,id:this[a1],class:Y};Q.margin&&(Q.padding=Q.margin,delete Q.margin),mX(this,Y),this.name&&(W.xfaName=this.name);let $=[],_={name:"div",attributes:W,children:$};B9(this,W);let J=this.border?this.border[u1]():null,U=$Y(this,_,Z),f=this.ui[H1]().html;if(!f)return Object.assign(Q,J),K1.success(C5(this,_),U);this[p0]&&(f.children?.[0]?f.children[0].attributes.tabindex=this[p0]:f.attributes.tabindex=this[p0]),f.attributes.style||=Object.create(null);let K=null;if(this.ui.button?(f.children.length===1&&([K]=f.children.splice(0,1)),Object.assign(f.attributes.style,J)):Object.assign(Q,J),$.push(f),this.value){if(this.ui.imageEdit)f.children.push(this.value[H1]().html);else if(!this.ui.button){let I="";if(this.value.exData)I=this.value.exData[A8]();else if(this.value.text)I=this.value.text[u8]();else{let B=this.value[H1]().html;B!==null&&(I=B.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(f.children[0].attributes.maxLength=this.value.text.maxChars),I&&(this.ui.numericEdit&&(I=parseFloat(I),I=isNaN(I)?"":I.toString()),f.children[0].name==="textarea"?f.children[0].attributes.textContent=I:f.children[0].attributes.value=I)}}if(!this.ui.imageEdit&&f.children?.[0]&&this.h){P=P||qG(this.ui[u8]());let I=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){I=this.caption.reserve,I<=0&&(I=this.caption[u8](Z).h);let B=this.h-I-G-P.h;f.children[0].attributes.style.height=M1(B)}else f.children[0].attributes.style.height="100%"}if(K&&f.children.push(K),!q)return f.attributes.class&&f.attributes.class.push("xfaLeft"),this.w=X,this.h=z,K1.success(C5(this,_),U);if(this.ui.button)return Q.padding&&delete Q.padding,q.name==="div"&&(q.name="span"),f.children.push(q),K1.success(_,U);switch(this.ui.checkButton&&(q.attributes.class[0]="xfaCaptionForCheckButton"),f.attributes.class||=[],f.children.splice(0,0,q),this.caption.placement){case"left":case"inline":f.attributes.class.push("xfaLeft");break;case"right":f.attributes.class.push("xfaRight");break;case"top":f.attributes.class.push("xfaTop");break;case"bottom":f.attributes.class.push("xfaBottom")}return this.w=X,this.h=z,K1.success(C5(this,_),U)}};XW=class XW extends g{constructor(Z){super(z1,"fill",!0),this.id=Z.id||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[u1](){let Z=this[L1](),q=Z[L1]()[L1](),X=Object.create(null),z="color",R=z;Z instanceof wX&&(z="background-color",R="background",q instanceof A9&&(X.backgroundColor="white")),(Z instanceof lX||Z instanceof DX)&&(z=R="fill",X.fill="white");for(let G of Object.getOwnPropertyNames(this)){if(G==="extras"||G==="color")continue;let P=this[G];if(!(P instanceof g))continue;let Q=P[u1](this.color);return Q&&(X[Q.startsWith("#")?z:R]=Q),X}if(this.color?.value){let G=this.color[u1]();X[G.startsWith("#")?z:R]=G}return X}};zW=class zW extends g{constructor(Z){super(z1,"filter",!0),this.addRevocationInfo=i(Z.addRevocationInfo,["","required","optional","none"]),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.version=A1({data:this.version,defaultValue:5,validate:(q)=>q>=1&&q<=5}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}};RW=class RW extends P8{constructor(Z){super(z1,"float"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){let Z=parseFloat(this[a].trim());this[a]=isNaN(Z)?null:Z}[H1](Z){return e4(this[a]!==null?this[a].toString():"")}};GW=class GW extends g{constructor(Z){super(z1,"font",!0),this.baselineShift=_1(Z.baselineShift),this.fontHorizontalScale=b3({data:Z.fontHorizontalScale,defaultValue:100,validate:(q)=>q>=0}),this.fontVerticalScale=b3({data:Z.fontVerticalScale,defaultValue:100,validate:(q)=>q>=0}),this.id=Z.id||"",this.kerningMode=i(Z.kerningMode,["none","pair"]),this.letterSpacing=_1(Z.letterSpacing,"0"),this.lineThrough=A1({data:Z.lineThrough,defaultValue:0,validate:(q)=>q===1||q===2}),this.lineThroughPeriod=i(Z.lineThroughPeriod,["all","word"]),this.overline=A1({data:Z.overline,defaultValue:0,validate:(q)=>q===1||q===2}),this.overlinePeriod=i(Z.overlinePeriod,["all","word"]),this.posture=i(Z.posture,["normal","italic"]),this.size=_1(Z.size,"10pt"),this.typeface=Z.typeface||"Courier",this.underline=A1({data:Z.underline,defaultValue:0,validate:(q)=>q===1||q===2}),this.underlinePeriod=i(Z.underlinePeriod,["all","word"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.weight=i(Z.weight,["normal","bold"]),this.extras=null,this.fill=null}[b0](Z){super[b0](Z),this[e1].usedTypefaces.add(this.typeface)}[u1](){let Z=X0(this,"fill"),q=Z.color;return q&&(q==="#000000"?delete Z.color:q.startsWith("#")||(Z.background=q,Z.backgroundClip="text",Z.color="transparent")),this.baselineShift&&(Z.verticalAlign=M1(this.baselineShift)),Z.fontKerning=this.kerningMode==="none"?"none":"normal",Z.letterSpacing=M1(this.letterSpacing),this.lineThrough!==0&&(Z.textDecoration="line-through",this.lineThrough===2&&(Z.textDecorationStyle="double")),this.overline!==0&&(Z.textDecoration="overline",this.overline===2&&(Z.textDecorationStyle="double")),Z.fontStyle=this.posture,Z.fontSize=M1(0.99*this.size),KY(this,this,this[e1].fontFinder,Z),this.underline!==0&&(Z.textDecoration="underline",this.underline===2&&(Z.textDecorationStyle="double")),Z.fontWeight=this.weight,Z}};PW=class PW extends g{constructor(Z){super(z1,"format",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.picture=null}};QW=class QW extends b1{constructor(Z){super(z1,"handler"),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};YW=class YW extends g{constructor(Z){super(z1,"hyphenation"),this.excludeAllCaps=A1({data:Z.excludeAllCaps,defaultValue:0,validate:(q)=>q===1}),this.excludeInitialCap=A1({data:Z.excludeInitialCap,defaultValue:0,validate:(q)=>q===1}),this.hyphenate=A1({data:Z.hyphenate,defaultValue:0,validate:(q)=>q===1}),this.id=Z.id||"",this.pushCharacterCount=A1({data:Z.pushCharacterCount,defaultValue:3,validate:(q)=>q>=0}),this.remainCharacterCount=A1({data:Z.remainCharacterCount,defaultValue:3,validate:(q)=>q>=0}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.wordCharacterCount=A1({data:Z.wordCharacterCount,defaultValue:7,validate:(q)=>q>=0})}};WW=class extends b1{constructor(Z){super(z1,"image"),this.aspect=i(Z.aspect,["fit","actual","height","none","width"]),this.contentType=Z.contentType||"",this.href=Z.href||"",this.id=Z.id||"",this.name=Z.name||"",this.transferEncoding=i(Z.transferEncoding,["base64","none","package"]),this.use=Z.use||"",this.usehref=Z.usehref||""}[H1](){if(this.contentType&&!xV.has(this.contentType.toLowerCase()))return K1.EMPTY;let Z=this[e1].images?.get(this.href);if(!Z&&(this.href||!this[a]))return K1.EMPTY;var q;if(Z||this.transferEncoding!=="base64"||(q=this[a],Z=Uint8Array.fromBase64?Uint8Array.fromBase64(q):w8(atob(q))),!Z)return K1.EMPTY;if(!this.contentType){for(let[G,P]of MV)if(Z.length>G.length&&G.every((Q,Y)=>Q===Z[Y])){this.contentType=P;break}if(!this.contentType)return K1.EMPTY}let X=new Blob([Z],{type:this.contentType}),z;switch(this.aspect){case"fit":case"actual":break;case"height":z={height:"100%",objectFit:"fill"};break;case"none":z={width:"100%",height:"100%",objectFit:"fill"};break;case"width":z={width:"100%",objectFit:"fill"}}let R=this[L1]();return K1.success({name:"img",attributes:{class:["xfaImage"],style:z,src:URL.createObjectURL(X),alt:R?y5(R[L1]()):null}})}};$W=class $W extends g{constructor(Z){super(z1,"imageEdit",!0),this.data=i(Z.data,["link","embed"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.extras=null,this.margin=null}[H1](Z){return this.data==="embed"?K1.success({name:"div",children:[],attributes:{}}):K1.EMPTY}};_W=class _W extends P8{constructor(Z){super(z1,"integer"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){let Z=parseInt(this[a].trim(),10);this[a]=isNaN(Z)?null:Z}[H1](Z){return e4(this[a]!==null?this[a].toString():"")}};JW=class JW extends g{constructor(Z){super(z1,"issuers",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.certificate=new C}};y3=class y3 extends g{constructor(Z){super(z1,"items",!0),this.id=Z.id||"",this.name=Z.name||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.ref=Z.ref||"",this.save=A1({data:Z.save,defaultValue:0,validate:(q)=>q===1}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.boolean=new C,this.date=new C,this.dateTime=new C,this.decimal=new C,this.exData=new C,this.float=new C,this.image=new C,this.integer=new C,this.text=new C,this.time=new C}[H1](){let Z=[];for(let q of this[S8]())Z.push(q[A8]());return K1.success(Z)}};UW=class UW extends g{constructor(Z){super(z1,"keep",!0),this.id=Z.id||"";let q=["none","contentArea","pageArea"];this.intact=i(Z.intact,q),this.next=i(Z.next,q),this.previous=i(Z.previous,q),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}};fW=class fW extends g{constructor(Z){super(z1,"keyUsage");let q=["","yes","no"];this.crlSign=i(Z.crlSign,q),this.dataEncipherment=i(Z.dataEncipherment,q),this.decipherOnly=i(Z.decipherOnly,q),this.digitalSignature=i(Z.digitalSignature,q),this.encipherOnly=i(Z.encipherOnly,q),this.id=Z.id||"",this.keyAgreement=i(Z.keyAgreement,q),this.keyCertSign=i(Z.keyCertSign,q),this.keyEncipherment=i(Z.keyEncipherment,q),this.nonRepudiation=i(Z.nonRepudiation,q),this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};KW=class KW extends g{constructor(Z){super(z1,"line",!0),this.hand=i(Z.hand,["even","left","right"]),this.id=Z.id||"",this.slope=i(Z.slope,["\\","/"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.edge=null}[H1](){let Z=this[L1]()[L1](),q=this.edge||new m6({}),X=q[u1](),z=Object.create(null),R=q.presence==="visible"?q.thickness:0,G,P,Q,Y;z.strokeWidth=M1(R),z.stroke=X.color;let W="100%",$="100%";Z.w<=R?([G,P,Q,Y]=["50%",0,"50%","100%"],W=z.strokeWidth):Z.h<=R?([G,P,Q,Y]=[0,"50%","100%","50%"],$=z.strokeWidth):this.slope==="\\"?[G,P,Q,Y]=[0,0,"100%","100%"]:[G,P,Q,Y]=[0,"100%","100%",0];let _={name:"svg",children:[{name:"line",attributes:{xmlns:F5,x1:G,y1:P,x2:Q,y2:Y,style:z}}],attributes:{xmlns:F5,width:W,height:$,style:{overflow:"visible"}}};return OX(Z)?K1.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[_]}):(_.attributes.style.position="absolute",K1.success(_))}};BW=class BW extends g{constructor(Z){super(z1,"linear",!0),this.id=Z.id||"",this.type=i(Z.type,["toRight","toBottom","toLeft","toTop"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null}[u1](Z){return Z=Z?Z[u1]():"#FFFFFF",`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${Z}, ${this.color?this.color[u1]():"#000000"})`}};IW=class IW extends P8{constructor(Z){super(z1,"lockDocument"),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){this[a]=i(this[a],["auto","0","1"])}};jW=class jW extends g{constructor(Z){super(z1,"manifest",!0),this.action=i(Z.action,["include","all","exclude"]),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.ref=new C}};VW=class VW extends g{constructor(Z){super(z1,"margin",!0),this.bottomInset=_1(Z.bottomInset,"0"),this.id=Z.id||"",this.leftInset=_1(Z.leftInset,"0"),this.rightInset=_1(Z.rightInset,"0"),this.topInset=_1(Z.topInset,"0"),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}[u1](){return{margin:M1(this.topInset)+" "+M1(this.rightInset)+" "+M1(this.bottomInset)+" "+M1(this.leftInset)}}};HW=class HW extends g{constructor(Z){super(z1,"mdp"),this.id=Z.id||"",this.permissions=A1({data:Z.permissions,defaultValue:2,validate:(q)=>q===1||q===3}),this.signatureType=i(Z.signatureType,["filler","author"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};xW=class xW extends g{constructor(Z){super(z1,"medium"),this.id=Z.id||"",this.imagingBBox=function(q){if(!q)return{x:-1,y:-1,width:-1,height:-1};let z=q.split(",",4).map((Y)=>_1(Y.trim(),"-1"));if(z.length<4||z[2]<0||z[3]<0)return{x:-1,y:-1,width:-1,height:-1};let[R,G,P,Q]=z;return{x:R,y:G,width:P,height:Q}}(Z.imagingBBox),this.long=_1(Z.long),this.orientation=i(Z.orientation,["portrait","landscape"]),this.short=_1(Z.short),this.stock=Z.stock||"",this.trayIn=i(Z.trayIn,["auto","delegate","pageFront"]),this.trayOut=i(Z.trayOut,["auto","delegate"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};MW=class MW extends g{constructor(Z){super(z1,"message",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.text=new C}};AW=class AW extends g{constructor(Z){super(z1,"numericEdit",!0),this.hScrollPolicy=i(Z.hScrollPolicy,["auto","off","on"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[H1](Z){let q=X0(this,"border","font","margin"),X=this[L1]()[L1](),z={name:"input",attributes:{type:"text",fieldId:X[a1],dataId:X[v0]?.[a1]||X[a1],class:["xfaTextfield"],style:q,"aria-label":y5(X),"aria-required":!1}};return X2(X)&&(z.attributes["aria-required"]=!0,z.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[z]})}};LW=class LW extends g{constructor(Z){super(z1,"occur",!0),this.id=Z.id||"",this.initial=Z.initial!==""?A1({data:Z.initial,defaultValue:"",validate:(q)=>!0}):"",this.max=Z.max!==""?A1({data:Z.max,defaultValue:1,validate:(q)=>!0}):"",this.min=Z.min!==""?A1({data:Z.min,defaultValue:1,validate:(q)=>!0}):"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}[b0](){let Z=this[L1](),q=this.min;this.min===""&&(this.min=Z instanceof p5||Z instanceof c7?0:1),this.max===""&&(this.max=q===""?Z instanceof p5||Z instanceof c7?-1:1:this.min),this.max!==-1&&this.max<this.min&&(this.max=this.min),this.initial===""&&(this.initial=Z instanceof M9?1:this.min)}};kW=class kW extends b1{constructor(Z){super(z1,"oid"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};TW=class TW extends g{constructor(Z){super(z1,"oids",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.oid=new C}};rX=class rX extends g{constructor(Z){super(z1,"overflow"),this.id=Z.id||"",this.leader=Z.leader||"",this.target=Z.target||"",this.trailer=Z.trailer||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[u8](){if(!this[u]){let Z=this[L1](),q=this[K8](),X=q[x4](this.target,Z),z=q[x4](this.leader,Z),R=q[x4](this.trailer,Z);this[u]={target:X?.[0]||null,leader:z?.[0]||null,trailer:R?.[0]||null,addLeader:!1,addTrailer:!1}}return this[u]}};p5=class p5 extends g{constructor(Z){super(z1,"pageArea",!0),this.blankOrNotBlank=i(Z.blankOrNotBlank,["any","blank","notBlank"]),this.id=Z.id||"",this.initialNumber=A1({data:Z.initialNumber,defaultValue:1,validate:(q)=>!0}),this.name=Z.name||"",this.numbered=A1({data:Z.numbered,defaultValue:1,validate:(q)=>!0}),this.oddOrEven=i(Z.oddOrEven,["any","even","odd"]),this.pagePosition=i(Z.pagePosition,["any","first","last","only","rest"]),this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new C,this.contentArea=new C,this.draw=new C,this.exclGroup=new C,this.field=new C,this.subform=new C}[d7](){return this[u]?!this.occur||this.occur.max===-1||this[u].numberOfUse<this.occur.max:(this[u]={numberOfUse:0},!0)}[z6](){delete this[u]}[K4](){this[u]||={numberOfUse:0};let Z=this[L1]();return Z.relation==="orderedOccurrence"&&this[d7]()?(this[u].numberOfUse+=1,this):Z[K4]()}[N5](){return this[u].space||{width:0,height:0}}[H1](){this[u]||={numberOfUse:1};let Z=[];this[u].children=Z;let q=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(q.width=M1(this.medium.short),q.height=M1(this.medium.long),this[u].space={width:this.medium.short,height:this.medium.long},this.medium.orientation==="landscape"){let X=q.width;q.width=q.height,q.height=X,this[u].space={width:this.medium.long,height:this.medium.short}}}else v("XFA - No medium specified in pageArea: please file a bug.");return this[a4]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[a4]({filter:new Set(["contentArea"]),include:!0}),K1.success({name:"div",children:Z,attributes:{class:["xfaPage"],id:this[a1],style:q,xfaName:this.name}})}};c7=class c7 extends g{constructor(Z){super(z1,"pageSet",!0),this.duplexImposition=i(Z.duplexImposition,["longEdge","shortEdge"]),this.id=Z.id||"",this.name=Z.name||"",this.relation=i(Z.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.occur=null,this.pageArea=new C,this.pageSet=new C}[z6](){for(let Z of this.pageArea.children)Z[z6]();for(let Z of this.pageSet.children)Z[z6]()}[d7](){return!this.occur||this.occur.max===-1||this[u].numberOfUse<this.occur.max}[K4](){if(this[u]||={numberOfUse:1,pageIndex:-1,pageSetIndex:-1},this.relation==="orderedOccurrence"){if(this[u].pageIndex+1<this.pageArea.children.length)return this[u].pageIndex+=1,this.pageArea.children[this[u].pageIndex][K4]();if(this[u].pageSetIndex+1<this.pageSet.children.length)return this[u].pageSetIndex+=1,this.pageSet.children[this[u].pageSetIndex][K4]();if(this[d7]())return this[u].numberOfUse+=1,this[u].pageIndex=-1,this[u].pageSetIndex=-1,this[K4]();let R=this[L1]();return R instanceof c7?R[K4]():(this[z6](),this[K4]())}let Z=this[K8]()[u].pageNumber,q=Z%2==0?"even":"odd",X=Z===0?"first":"rest",z=this.pageArea.children.find((R)=>R.oddOrEven===q&&R.pagePosition===X);return z||(z=this.pageArea.children.find((R)=>R.oddOrEven==="any"&&R.pagePosition===X),z||(z=this.pageArea.children.find((R)=>R.oddOrEven==="any"&&R.pagePosition==="any"),z||this.pageArea.children[0]))}};NW=class NW extends g{constructor(Z){super(z1,"para",!0),this.hAlign=i(Z.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=Z.id||"",this.lineHeight=Z.lineHeight?_1(Z.lineHeight,"0pt"):"",this.marginLeft=Z.marginLeft?_1(Z.marginLeft,"0pt"):"",this.marginRight=Z.marginRight?_1(Z.marginRight,"0pt"):"",this.orphans=A1({data:Z.orphans,defaultValue:0,validate:(q)=>q>=0}),this.preserve=Z.preserve||"",this.radixOffset=Z.radixOffset?_1(Z.radixOffset,"0pt"):"",this.spaceAbove=Z.spaceAbove?_1(Z.spaceAbove,"0pt"):"",this.spaceBelow=Z.spaceBelow?_1(Z.spaceBelow,"0pt"):"",this.tabDefault=Z.tabDefault?_1(this.tabDefault):"",this.tabStops=(Z.tabStops||"").trim().split(/\s+/).map((q,X)=>X%2==1?_1(q):q),this.textIndent=Z.textIndent?_1(Z.textIndent,"0pt"):"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.vAlign=i(Z.vAlign,["top","bottom","middle"]),this.widows=A1({data:Z.widows,defaultValue:0,validate:(q)=>q>=0}),this.hyphenation=null}[u1](){let Z=X0(this,"hAlign");return this.marginLeft!==""&&(Z.paddingLeft=M1(this.marginLeft)),this.marginRight!==""&&(Z.paddingRight=M1(this.marginRight)),this.spaceAbove!==""&&(Z.paddingTop=M1(this.spaceAbove)),this.spaceBelow!==""&&(Z.paddingBottom=M1(this.spaceBelow)),this.textIndent!==""&&(Z.textIndent=M1(this.textIndent),JY(Z)),this.lineHeight>0&&(Z.lineHeight=M1(this.lineHeight)),this.tabDefault!==""&&(Z.tabSize=M1(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(Z,this.hyphenatation[u1]()),Z}};CW=class CW extends g{constructor(Z){super(z1,"passwordEdit",!0),this.hScrollPolicy=i(Z.hScrollPolicy,["auto","off","on"]),this.id=Z.id||"",this.passwordChar=Z.passwordChar||"*",this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.extras=null,this.margin=null}};FW=class FW extends g{constructor(Z){super(z1,"pattern",!0),this.id=Z.id||"",this.type=i(Z.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null}[u1](Z){Z=Z?Z[u1]():"#FFFFFF";let q=this.color?this.color[u1]():"#000000",X="repeating-linear-gradient",z=`${Z},${Z} 5px,${q} 5px,${q} 10px`;switch(this.type){case"crossHatch":return`${X}(to top,${z}) ${X}(to right,${z})`;case"crossDiagonal":return`${X}(45deg,${z}) ${X}(-45deg,${z})`;case"diagonalLeft":return`${X}(45deg,${z})`;case"diagonalRight":return`${X}(-45deg,${z})`;case"horizontal":return`${X}(to top,${z})`;case"vertical":return`${X}(to right,${z})`}return""}};vW=class vW extends b1{constructor(Z){super(z1,"picture"),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};bW=class bW extends g{constructor(Z){super(z1,"proto",!0),this.appearanceFilter=new C,this.arc=new C,this.area=new C,this.assist=new C,this.barcode=new C,this.bindItems=new C,this.bookend=new C,this.boolean=new C,this.border=new C,this.break=new C,this.breakAfter=new C,this.breakBefore=new C,this.button=new C,this.calculate=new C,this.caption=new C,this.certificate=new C,this.certificates=new C,this.checkButton=new C,this.choiceList=new C,this.color=new C,this.comb=new C,this.connect=new C,this.contentArea=new C,this.corner=new C,this.date=new C,this.dateTime=new C,this.dateTimeEdit=new C,this.decimal=new C,this.defaultUi=new C,this.desc=new C,this.digestMethod=new C,this.digestMethods=new C,this.draw=new C,this.edge=new C,this.encoding=new C,this.encodings=new C,this.encrypt=new C,this.encryptData=new C,this.encryption=new C,this.encryptionMethod=new C,this.encryptionMethods=new C,this.event=new C,this.exData=new C,this.exObject=new C,this.exclGroup=new C,this.execute=new C,this.extras=new C,this.field=new C,this.fill=new C,this.filter=new C,this.float=new C,this.font=new C,this.format=new C,this.handler=new C,this.hyphenation=new C,this.image=new C,this.imageEdit=new C,this.integer=new C,this.issuers=new C,this.items=new C,this.keep=new C,this.keyUsage=new C,this.line=new C,this.linear=new C,this.lockDocument=new C,this.manifest=new C,this.margin=new C,this.mdp=new C,this.medium=new C,this.message=new C,this.numericEdit=new C,this.occur=new C,this.oid=new C,this.oids=new C,this.overflow=new C,this.pageArea=new C,this.pageSet=new C,this.para=new C,this.passwordEdit=new C,this.pattern=new C,this.picture=new C,this.radial=new C,this.reason=new C,this.reasons=new C,this.rectangle=new C,this.ref=new C,this.script=new C,this.setProperty=new C,this.signData=new C,this.signature=new C,this.signing=new C,this.solid=new C,this.speak=new C,this.stipple=new C,this.subform=new C,this.subformSet=new C,this.subjectDN=new C,this.subjectDNs=new C,this.submit=new C,this.text=new C,this.textEdit=new C,this.time=new C,this.timeStamp=new C,this.toolTip=new C,this.traversal=new C,this.traverse=new C,this.ui=new C,this.validate=new C,this.value=new C,this.variables=new C}};SW=class SW extends g{constructor(Z){super(z1,"radial",!0),this.id=Z.id||"",this.type=i(Z.type,["toEdge","toCenter"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null}[u1](Z){Z=Z?Z[u1]():"#FFFFFF";let q=this.color?this.color[u1]():"#000000";return`radial-gradient(circle at center, ${this.type==="toEdge"?`${Z},${q}`:`${q},${Z}`})`}};mW=class mW extends b1{constructor(Z){super(z1,"reason"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};OW=class OW extends g{constructor(Z){super(z1,"reasons",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.reason=new C}};lX=class lX extends g{constructor(Z){super(z1,"rectangle",!0),this.hand=i(Z.hand,["even","left","right"]),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.corner=new C(4),this.edge=new C(4),this.fill=null}[H1](){let Z=this.edge.children.length?this.edge.children[0]:new m6({}),q=Z[u1](),X=Object.create(null);this.fill?.presence==="visible"?Object.assign(X,this.fill[u1]()):X.fill="transparent",X.strokeWidth=M1(Z.presence==="visible"?Z.thickness:0),X.stroke=q.color;let z=(this.corner.children.length?this.corner.children[0]:new cX({}))[u1](),R={name:"svg",children:[{name:"rect",attributes:{xmlns:F5,width:"100%",height:"100%",x:0,y:0,rx:z.radius,ry:z.radius,style:X}}],attributes:{xmlns:F5,style:{overflow:"visible"},width:"100%",height:"100%"}};return OX(this[L1]()[L1]())?K1.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[R]}):(R.attributes.style.position="absolute",K1.success(R))}};yW=class yW extends b1{constructor(Z){super(z1,"ref"),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};pW=class pW extends b1{constructor(Z){super(z1,"script"),this.binding=Z.binding||"",this.contentType=Z.contentType||"",this.id=Z.id||"",this.name=Z.name||"",this.runAt=i(Z.runAt,["client","both","server"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};p3=class p3 extends g{constructor(Z){super(z1,"setProperty"),this.connection=Z.connection||"",this.ref=Z.ref||"",this.target=Z.target||""}};DW=class DW extends g{constructor(Z){super(z1,"signData",!0),this.id=Z.id||"",this.operation=i(Z.operation,["sign","clear","verify"]),this.ref=Z.ref||"",this.target=Z.target||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.filter=null,this.manifest=null}};wW=class wW extends g{constructor(Z){super(z1,"signature",!0),this.id=Z.id||"",this.type=i(Z.type,["PDF1.3","PDF1.6"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}};EW=class EW extends g{constructor(Z){super(z1,"signing",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.certificate=new C}};uW=class uW extends g{constructor(Z){super(z1,"solid",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null}[u1](Z){return Z?Z[u1]():"#FFFFFF"}};gW=class gW extends b1{constructor(Z){super(z1,"speak"),this.disable=A1({data:Z.disable,defaultValue:0,validate:(q)=>q===1}),this.id=Z.id||"",this.priority=i(Z.priority,["custom","caption","name","toolTip"]),this.rid=Z.rid||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};dW=class dW extends g{constructor(Z){super(z1,"stipple",!0),this.id=Z.id||"",this.rate=A1({data:Z.rate,defaultValue:50,validate:(q)=>q>=0&&q<=100}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.color=null,this.extras=null}[u1](Z){let q=this.rate/100;return h1.makeHexColor(Math.round(Z.value.r*(1-q)+this.value.r*q),Math.round(Z.value.g*(1-q)+this.value.g*q),Math.round(Z.value.b*(1-q)+this.value.b*q))}};oX=class oX extends g{constructor(Z){super(z1,"subform",!0),this.access=i(Z.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=A1({data:Z.allowMacro,defaultValue:0,validate:(q)=>q===1}),this.anchorType=i(Z.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=A1({data:Z.colSpan,defaultValue:1,validate:(q)=>q>=1||q===-1}),this.columnWidths=(Z.columnWidths||"").trim().split(/\s+/).map((q)=>q==="-1"?-1:_1(q)),this.h=Z.h?_1(Z.h):"",this.hAlign=i(Z.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=Z.id||"",this.layout=i(Z.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=Z.locale||"",this.maxH=_1(Z.maxH,"0pt"),this.maxW=_1(Z.maxW,"0pt"),this.mergeMode=i(Z.mergeMode,["consumeData","matchTemplate"]),this.minH=_1(Z.minH,"0pt"),this.minW=_1(Z.minW,"0pt"),this.name=Z.name||"",this.presence=i(Z.presence,["visible","hidden","inactive","invisible"]),this.relevant=d0(Z.relevant),this.restoreState=i(Z.restoreState,["manual","auto"]),this.scope=i(Z.scope,["name","none"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.w=Z.w?_1(Z.w):"",this.x=_1(Z.x,"0pt"),this.y=_1(Z.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new C,this.breakAfter=new C,this.breakBefore=new C,this.connect=new C,this.draw=new C,this.event=new C,this.exObject=new C,this.exclGroup=new C,this.field=new C,this.proto=new C,this.setProperty=new C,this.subform=new C,this.subformSet=new C}[I8](){let Z=this[L1]();return Z instanceof x9?Z[I8]():Z}[E5](){return!0}[N4](){return this.layout.endsWith("-tb")&&this[u].attempt===0&&this[u].numberInLine>0||this[L1]()[N4]()}*[L6](){yield*pX(this)}[q2](){return jY(this)}[T5](Z,q){VY(this,Z,q)}[N5](){return HY(this)}[L4](){let Z=this[I8]();return!!Z[L4]()&&(this[u]._isSplittable!==void 0?this[u]._isSplittable:this.layout==="position"||this.layout.includes("row")||this.keep&&this.keep.intact!=="none"?(this[u]._isSplittable=!1,!1):(!Z.layout?.endsWith("-tb")||Z[u].numberInLine===0)&&(this[u]._isSplittable=!0,!0))}[H1](Z){if(K9(this),this.break){if(this.break.after!=="auto"||this.break.afterTarget!==""){let V=new EX({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});V[e1]=this[e1],this[Y8](V),this.breakAfter.push(V)}if(this.break.before!=="auto"||this.break.beforeTarget!==""){let V=new uX({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});V[e1]=this[e1],this[Y8](V),this.breakBefore.push(V)}if(this.break.overflowTarget!==""){let V=new rX({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});V[e1]=this[e1],this[Y8](V),this.overflow.push(V)}this[h4](this.break),this.break=null}if(this.presence==="hidden"||this.presence==="inactive")return K1.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&v("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){let V=this.breakBefore.children[0];if(XG(V))return K1.breakNode(V)}if(this[u]?.afterBreakAfter)return K1.EMPTY;U9(this);let q=[],X={id:this[a1],class:[]};mX(this,X.class),this[u]||=Object.create(null),Object.assign(this[u],{children:q,line:null,attributes:X,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,Z.width),height:Math.min(this.h||1/0,Z.height)},width:0,height:0,prevHeight:0,currentWidth:0});let z=this[K8](),R=z[u].noLayoutFailure,G=this[L4]();if(G||I9(this),!f9(this,Z))return K1.FAILURE;let P=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){let V=this[I8]().columnWidths;Array.isArray(V)&&V.length>0&&(this[u].columnWidths=V,this[u].currentColumn=0)}let Q=X0(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),Y=["xfaSubform"],W=_Y(this);if(W&&Y.push(W),X.style=Q,X.class=Y,this.name&&(X.xfaName=this.name),this.overflow){let V=this.overflow[u8]();V.addLeader&&(V.addLeader=!1,zG(this,V.leader,Z))}this[b6]();let $=this.layout==="lr-tb"||this.layout==="rl-tb",_=$?2:1;for(;this[u].attempt<_;this[u].attempt++){$&&this[u].attempt===1&&(this[u].numberInLine=0);let V=this[a4]({filter:P,include:!0});if(V.success)break;if(V.isBreak())return this[W0](),V;if($&&this[u].attempt===0&&this[u].numberInLine===0&&!z[u].noLayoutFailure){this[u].attempt=_;break}}if(this[W0](),G||j9(this),z[u].noLayoutFailure=R,this[u].attempt===_)return this.overflow&&(this[K8]()[u].overflowNode=this.overflow),G||delete this[u],K1.FAILURE;if(this.overflow){let V=this.overflow[u8]();V.addTrailer&&(V.addTrailer=!1,zG(this,V.trailer,Z))}let J=0,U=0;this.margin&&(J=this.margin.leftInset+this.margin.rightInset,U=this.margin.topInset+this.margin.bottomInset);let f=Math.max(this[u].width+J,this.w||0),K=Math.max(this[u].height+U,this.h||0),I=[this.x,this.y,f,K];if(this.w===""&&(Q.width=M1(f)),this.h===""&&(Q.height=M1(K)),(Q.width==="0px"||Q.height==="0px")&&q.length===0)return K1.EMPTY;let B={name:"div",attributes:X,children:q};B9(this,X);let j=K1.success(C5(this,B),I);if(this.breakAfter.children.length>=1){let V=this.breakAfter.children[0];if(XG(V))return this[u].afterBreakAfter=j,K1.breakNode(V)}return delete this[u],j}};x9=class x9 extends g{constructor(Z){super(z1,"subformSet",!0),this.id=Z.id||"",this.name=Z.name||"",this.relation=i(Z.relation,["ordered","choice","unordered"]),this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new C,this.breakBefore=new C,this.subform=new C,this.subformSet=new C}*[L6](){yield*pX(this)}[I8](){let Z=this[L1]();for(;!(Z instanceof oX);)Z=Z[L1]();return Z}[E5](){return!0}};cW=class cW extends P8{constructor(Z){super(z1,"subjectDN"),this.delimiter=Z.delimiter||",",this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){this[a]=new Map(this[a].split(this.delimiter).map((Z)=>((Z=Z.split("=",2))[0]=Z[0].trim(),Z)))}};hW=class hW extends g{constructor(Z){super(z1,"subjectDNs",!0),this.id=Z.id||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.subjectDN=new C}};sW=class sW extends g{constructor(Z){super(z1,"submit",!0),this.embedPDF=A1({data:Z.embedPDF,defaultValue:0,validate:(q)=>q===1}),this.format=i(Z.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=Z.id||"",this.target=Z.target||"",this.textEncoding=_9({data:Z.textEncoding?Z.textEncoding.toLowerCase():"",defaultValue:"",validate:(q)=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(q)||q.match(/iso-8859-\d{2}/)}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.xdpContent=Z.xdpContent||"",this.encrypt=null,this.encryptData=new C,this.signData=new C}};M9=class M9 extends g{constructor(Z){super(z1,"template",!0),this.baseProfile=i(Z.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new C}[Z8](){this.subform.children.length===0&&v("XFA - No subforms in template node."),this.subform.children.length>=2&&v("XFA - Several subforms in template node: please file a bug."),this[p0]=5000}[L4](){return!0}[x4](Z,q){return Z.startsWith("#")?[this[n5].get(Z.slice(1))]:D4(this,q,Z,!0,!0)}*[XY](){if(!this.subform.children.length)return K1.success({name:"div",children:[]});this[u]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};let Z=this.subform.children[0];Z.pageSet[z6]();let q=Z.pageSet.pageArea.children,X={name:"div",children:[]},z=null,R=null,G=null;if(Z.breakBefore.children.length>=1?(R=Z.breakBefore.children[0],G=R.target):Z.subform.children.length>=1&&Z.subform.children[0].breakBefore.children.length>=1?(R=Z.subform.children[0].breakBefore.children[0],G=R.target):Z.break?.beforeTarget?(R=Z.break,G=R.beforeTarget):Z.subform.children.length>=1&&Z.subform.children[0].break?.beforeTarget&&(R=Z.subform.children[0].break,G=R.beforeTarget),R){let U=this[x4](G,R[L1]());U instanceof p5&&(z=U,R[u]={})}z||=q[0],z[u]={numberOfUse:1};let P=z[L1](),Q;P[u]={numberOfUse:1,pageIndex:P.pageArea.children.indexOf(z),pageSetIndex:0};let Y=null,W=null,$=!0,_=0,J=0;for(;;){if($)_=0;else if(X.children.pop(),++_===3)return v("XFA - Something goes wrong: please file a bug."),X;Q=null,this[u].currentPageArea=z;let U=z[H1]().html;X.children.push(U),Y&&(this[u].noLayoutFailure=!0,U.children.push(Y[H1](z[u].space).html),Y=null),W&&(this[u].noLayoutFailure=!0,U.children.push(W[H1](z[u].space).html),W=null);let f=z.contentArea.children,K=U.children.filter((B)=>B.attributes.class.includes("xfaContentarea"));$=!1,this[u].firstUnsplittable=null,this[u].noLayoutFailure=!1;let I=(B)=>{let j=Z[q2]();j&&($||=j.children?.length>0,K[B].children.push(j))};for(let B=J,j=f.length;B<j;B++){let V=this[u].currentContentArea=f[B],x={width:V.w,height:V.h};J=0,Y&&(K[B].children.push(Y[H1](x).html),Y=null),W&&(K[B].children.push(W[H1](x).html),W=null);let M=Z[H1](x);if(M.success)return M.html?($||=M.html.children?.length>0,K[B].children.push(M.html)):!$&&X.children.length>1&&X.children.pop(),X;if(M.isBreak()){let H=M.breakNode;if(I(B),H.targetType==="auto")continue;H.leader&&(Y=this[x4](H.leader,H[L1]()),Y=Y?Y[0]:null),H.trailer&&(W=this[x4](H.trailer,H[L1]()),W=W?W[0]:null),H.targetType==="pageArea"?(Q=H[u].target,B=1/0):H[u].target?(Q=H[u].target,J=H[u].index+1,B=1/0):B=H[u].index;continue}if(this[u].overflowNode){let H=this[u].overflowNode;this[u].overflowNode=null;let A=H[u8](),T=A.target;A.addLeader=A.leader!==null,A.addTrailer=A.trailer!==null,I(B);let k=B;if(B=1/0,T instanceof p5)Q=T;else if(T instanceof V9){let y=f.indexOf(T);y!==-1?y>k?B=y-1:J=y:(Q=T[L1](),J=Q.contentArea.children.indexOf(T))}continue}I(B)}this[u].pageNumber+=1,Q&&(Q[d7]()?Q[u].numberOfUse+=1:Q=null),z=Q||z[K4](),yield null}}};aX=class aX extends P8{constructor(Z){super(z1,"text"),this.id=Z.id||"",this.maxChars=A1({data:Z.maxChars,defaultValue:0,validate:(q)=>q>=0}),this.name=Z.name||"",this.rid=Z.rid||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Y9](){return!0}[X4](Z){return Z[B8]===j8.xhtml.id?(this[a]=Z,!0):(v(`XFA - Invalid content in Text: ${Z[d1]}.`),!1)}[k4](Z){this[a]instanceof g||super[k4](Z)}[Z8](){typeof this[a]=="string"&&(this[a]=this[a].replaceAll(`\r
|
|
32
|
-
`,`
|
|
33
|
-
`))}[u8](){return typeof this[a]=="string"?this[a].split(/[\u2029\u2028\n]/).filter((Z)=>!!Z).join(`
|
|
34
|
-
`):this[a][A8]()}[H1](Z){if(typeof this[a]=="string"){let q=e4(this[a]).html;return this[a].includes("\u2029")?(q.name="div",q.children=[],this[a].split("\u2029").map((X)=>X.split(/[\u2028\n]/).flatMap((z)=>[{name:"span",value:z},{name:"br"}])).forEach((X)=>{q.children.push({name:"p",children:X})})):/[\u2028\n]/.test(this[a])&&(q.name="div",q.children=[],this[a].split(/[\u2028\n]/).forEach((X)=>{q.children.push({name:"span",value:X},{name:"br"})})),K1.success(q)}return this[a][H1](Z)}};nX=class nX extends g{constructor(Z){super(z1,"textEdit",!0),this.allowRichText=A1({data:Z.allowRichText,defaultValue:0,validate:(q)=>q===1}),this.hScrollPolicy=i(Z.hScrollPolicy,["auto","off","on"]),this.id=Z.id||"",this.multiLine=A1({data:Z.multiLine,defaultValue:"",validate:(q)=>q===0||q===1}),this.use=Z.use||"",this.usehref=Z.usehref||"",this.vScrollPolicy=i(Z.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[H1](Z){let q=X0(this,"border","font","margin"),X,z=this[L1]()[L1]();return this.multiLine===""&&(this.multiLine=z instanceof hX?1:0),X=this.multiLine===1?{name:"textarea",attributes:{dataId:z[v0]?.[a1]||z[a1],fieldId:z[a1],class:["xfaTextfield"],style:q,"aria-label":y5(z),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:z[v0]?.[a1]||z[a1],fieldId:z[a1],class:["xfaTextfield"],style:q,"aria-label":y5(z),"aria-required":!1}},X2(z)&&(X.attributes["aria-required"]=!0,X.attributes.required=!0),K1.success({name:"label",attributes:{class:["xfaLabel"]},children:[X]})}};rW=class rW extends b1{constructor(Z){super(z1,"time"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}[Z8](){let Z=this[a].trim();this[a]=Z?new Date(Z):null}[H1](Z){return e4(this[a]?this[a].toString():"")}};lW=class lW extends g{constructor(Z){super(z1,"timeStamp"),this.id=Z.id||"",this.server=Z.server||"",this.type=i(Z.type,["optional","required"]),this.use=Z.use||"",this.usehref=Z.usehref||""}};oW=class oW extends b1{constructor(Z){super(z1,"toolTip"),this.id=Z.id||"",this.rid=Z.rid||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};aW=class aW extends g{constructor(Z){super(z1,"traversal",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.traverse=new C}};nW=class nW extends g{constructor(Z){super(z1,"traverse",!0),this.id=Z.id||"",this.operation=i(Z.operation,["next","back","down","first","left","right","up"]),this.ref=Z.ref||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[g7](){return!1}};A9=class A9 extends g{constructor(Z){super(z1,"ui",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[u8](){if(this[u]===void 0){for(let Z of Object.getOwnPropertyNames(this)){if(Z==="extras"||Z==="picture")continue;let q=this[Z];if(q instanceof g)return this[u]=q,q}this[u]=null}return this[u]}[H1](Z){let q=this[u8]();return q?q[H1](Z):K1.EMPTY}};iW=class iW extends g{constructor(Z){super(z1,"validate",!0),this.formatTest=i(Z.formatTest,["warning","disabled","error"]),this.id=Z.id||"",this.nullTest=i(Z.nullTest,["disabled","error","warning"]),this.scriptTest=i(Z.scriptTest,["error","disabled","warning"]),this.use=Z.use||"",this.usehref=Z.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}};L9=class L9 extends g{constructor(Z){super(z1,"value",!0),this.id=Z.id||"",this.override=A1({data:Z.override,defaultValue:0,validate:(q)=>q===1}),this.relevant=d0(Z.relevant),this.use=Z.use||"",this.usehref=Z.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[_0](Z){let q=this[L1]();if(q instanceof H9&&q.ui?.imageEdit)return this.image||(this.image=new WW({}),this[Y8](this.image)),void(this.image[a]=Z[a]);let X=Z[d1];if(this[X]===null){for(let z of Object.getOwnPropertyNames(this)){let R=this[z];R instanceof g&&(this[z]=null,this[h4](R))}this[Z[d1]]=Z,this[Y8](Z)}else this[X][a]=Z[a]}[A8](){if(this.exData)return typeof this.exData[a]=="string"?this.exData[a].trim():this.exData[a][A8]().trim();for(let Z of Object.getOwnPropertyNames(this)){if(Z==="image")continue;let q=this[Z];if(q instanceof g)return(q[a]||"").toString().trim()}return null}[H1](Z){for(let q of Object.getOwnPropertyNames(this)){let X=this[q];if(X instanceof g)return X[H1](Z)}return K1.EMPTY}};tW=class tW extends g{constructor(Z){super(z1,"variables",!0),this.id=Z.id||"",this.use=Z.use||"",this.usehref=Z.usehref||"",this.boolean=new C,this.date=new C,this.dateTime=new C,this.decimal=new C,this.exData=new C,this.float=new C,this.image=new C,this.integer=new C,this.manifest=new C,this.script=new C,this.text=new C,this.time=new C}[g7](){return!0}};D3=class D3{static[g0](Z,q){if(D3.hasOwnProperty(Z)){let X=D3[Z](q);return X[qY](q),X}}static appearanceFilter(Z){return new xY(Z)}static arc(Z){return new DX(Z)}static area(Z){return new MY(Z)}static assist(Z){return new AY(Z)}static barcode(Z){return new LY(Z)}static bind(Z){return new kY(Z)}static bindItems(Z){return new O3(Z)}static bookend(Z){return new TY(Z)}static boolean(Z){return new NY(Z)}static border(Z){return new wX(Z)}static break(Z){return new CY(Z)}static breakAfter(Z){return new EX(Z)}static breakBefore(Z){return new uX(Z)}static button(Z){return new FY(Z)}static calculate(Z){return new vY(Z)}static caption(Z){return new bY(Z)}static certificate(Z){return new SY(Z)}static certificates(Z){return new mY(Z)}static checkButton(Z){return new gX(Z)}static choiceList(Z){return new dX(Z)}static color(Z){return new OY(Z)}static comb(Z){return new yY(Z)}static connect(Z){return new pY(Z)}static contentArea(Z){return new V9(Z)}static corner(Z){return new cX(Z)}static date(Z){return new DY(Z)}static dateTime(Z){return new wY(Z)}static dateTimeEdit(Z){return new EY(Z)}static decimal(Z){return new uY(Z)}static defaultUi(Z){return new gY(Z)}static desc(Z){return new dY(Z)}static digestMethod(Z){return new cY(Z)}static digestMethods(Z){return new hY(Z)}static draw(Z){return new hX(Z)}static edge(Z){return new m6(Z)}static encoding(Z){return new sY(Z)}static encodings(Z){return new rY(Z)}static encrypt(Z){return new lY(Z)}static encryptData(Z){return new oY(Z)}static encryption(Z){return new aY(Z)}static encryptionMethod(Z){return new nY(Z)}static encryptionMethods(Z){return new iY(Z)}static event(Z){return new AV(Z)}static exData(Z){return new tY(Z)}static exObject(Z){return new eY(Z)}static exclGroup(Z){return new sX(Z)}static execute(Z){return new ZW(Z)}static extras(Z){return new qW(Z)}static field(Z){return new H9(Z)}static fill(Z){return new XW(Z)}static filter(Z){return new zW(Z)}static float(Z){return new RW(Z)}static font(Z){return new GW(Z)}static format(Z){return new PW(Z)}static handler(Z){return new QW(Z)}static hyphenation(Z){return new YW(Z)}static image(Z){return new WW(Z)}static imageEdit(Z){return new $W(Z)}static integer(Z){return new _W(Z)}static issuers(Z){return new JW(Z)}static items(Z){return new y3(Z)}static keep(Z){return new UW(Z)}static keyUsage(Z){return new fW(Z)}static line(Z){return new KW(Z)}static linear(Z){return new BW(Z)}static lockDocument(Z){return new IW(Z)}static manifest(Z){return new jW(Z)}static margin(Z){return new VW(Z)}static mdp(Z){return new HW(Z)}static medium(Z){return new xW(Z)}static message(Z){return new MW(Z)}static numericEdit(Z){return new AW(Z)}static occur(Z){return new LW(Z)}static oid(Z){return new kW(Z)}static oids(Z){return new TW(Z)}static overflow(Z){return new rX(Z)}static pageArea(Z){return new p5(Z)}static pageSet(Z){return new c7(Z)}static para(Z){return new NW(Z)}static passwordEdit(Z){return new CW(Z)}static pattern(Z){return new FW(Z)}static picture(Z){return new vW(Z)}static proto(Z){return new bW(Z)}static radial(Z){return new SW(Z)}static reason(Z){return new mW(Z)}static reasons(Z){return new OW(Z)}static rectangle(Z){return new lX(Z)}static ref(Z){return new yW(Z)}static script(Z){return new pW(Z)}static setProperty(Z){return new p3(Z)}static signData(Z){return new DW(Z)}static signature(Z){return new wW(Z)}static signing(Z){return new EW(Z)}static solid(Z){return new uW(Z)}static speak(Z){return new gW(Z)}static stipple(Z){return new dW(Z)}static subform(Z){return new oX(Z)}static subformSet(Z){return new x9(Z)}static subjectDN(Z){return new cW(Z)}static subjectDNs(Z){return new hW(Z)}static submit(Z){return new sW(Z)}static template(Z){return new M9(Z)}static text(Z){return new aX(Z)}static textEdit(Z){return new nX(Z)}static time(Z){return new rW(Z)}static timeStamp(Z){return new lW(Z)}static toolTip(Z){return new oW(Z)}static traversal(Z){return new aW(Z)}static traverse(Z){return new nW(Z)}static ui(Z){return new A9(Z)}static validate(Z){return new iW(Z)}static value(Z){return new L9(Z)}static variables(Z){return new tW(Z)}};RG=j8.datasets.id;Z1=j8.config.id;q$=class q$ extends g{constructor(Z){super(Z1,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new C}};X$=class X$ extends g{constructor(Z){super(Z1,"acrobat7",!0),this.dynamicRender=null}};z$=class z$ extends r1{constructor(Z){super(Z1,"ADBE_JSConsole",["delegate","Enable","Disable"])}};R$=class R$ extends r1{constructor(Z){super(Z1,"ADBE_JSDebugger",["delegate","Enable","Disable"])}};G$=class G$ extends M8{constructor(Z){super(Z1,"addSilentPrint")}};P$=class P$ extends M8{constructor(Z){super(Z1,"addViewerPreferences")}};Q$=class Q$ extends bX{constructor(Z){super(Z1,"adjustData")}};Y$=class Y$ extends S0{constructor(Z){super(Z1,"adobeExtensionLevel",0,(q)=>q>=1&&q<=8)}};W$=class W$ extends g{constructor(Z){super(Z1,"agent",!0),this.name=Z.name?Z.name.trim():"",this.common=new C}};$$=class $$ extends P8{constructor(Z){super(Z1,"alwaysEmbed")}};_$=class _$ extends b1{constructor(Z){super(Z1,"amd")}};J$=class J$ extends g{constructor(Z){super(Z1,"area"),this.level=A1({data:Z.level,defaultValue:0,validate:(q)=>q>=1&&q<=3}),this.name=i(Z.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}};U$=class U$ extends r1{constructor(Z){super(Z1,"attributes",["preserve","delegate","ignore"])}};f$=class f$ extends r1{constructor(Z){super(Z1,"autoSave",["disabled","enabled"])}};K$=class K$ extends b1{constructor(Z){super(Z1,"base")}};B$=class B$ extends g{constructor(Z){super(Z1,"batchOutput"),this.format=i(Z.format,["none","concat","zip","zipCompress"])}};I$=class I$ extends P8{constructor(Z){super(Z1,"behaviorOverride")}[Z8](){this[a]=new Map(this[a].trim().split(/\s+/).filter((Z)=>Z.includes(":")).map((Z)=>Z.split(":",2)))}};j$=class j$ extends g{constructor(Z){super(Z1,"cache",!0),this.templateCache=null}};V$=class V$ extends M8{constructor(Z){super(Z1,"change")}};H$=class H$ extends g{constructor(Z){super(Z1,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new C}};x$=class x$ extends g{constructor(Z){super(Z1,"compress"),this.scope=i(Z.scope,["imageOnly","document"])}};M$=class M$ extends M8{constructor(Z){super(Z1,"compressLogicalStructure")}};A$=class A$ extends bX{constructor(Z){super(Z1,"compressObjectStream")}};L$=class L$ extends g{constructor(Z){super(Z1,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}};k$=class k$ extends g{constructor(Z){super(Z1,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new C}};T$=class T$ extends r1{constructor(Z){super(Z1,"conformance",["A","B"])}};N$=class N$ extends M8{constructor(Z){super(Z1,"contentCopy")}};C$=class C$ extends S0{constructor(Z){super(Z1,"copies",1,(q)=>q>=1)}};F$=class F$ extends b1{constructor(Z){super(Z1,"creator")}};v$=class v$ extends S0{constructor(Z){super(Z1,"currentPage",0,(q)=>q>=0)}};b$=class b$ extends g{constructor(Z){super(Z1,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new C,this.transform=new C}};S$=class S$ extends g{constructor(Z){super(Z1,"debug",!0),this.uri=null}};m$=class m$ extends P8{constructor(Z){super(Z1,"defaultTypeface"),this.writingScript=i(Z.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}};O$=class O$ extends r1{constructor(Z){super(Z1,"destination",["pdf","pcl","ps","webClient","zpl"])}};y$=class y$ extends M8{constructor(Z){super(Z1,"documentAssembly")}};p$=class p$ extends g{constructor(Z){super(Z1,"driver",!0),this.name=Z.name?Z.name.trim():"",this.fontInfo=null,this.xdc=null}};D$=class D$ extends r1{constructor(Z){super(Z1,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}};w$=class w$ extends r1{constructor(Z){super(Z1,"dynamicRender",["forbidden","required"])}};E$=class E$ extends M8{constructor(Z){super(Z1,"embed")}};u$=class u$ extends M8{constructor(Z){super(Z1,"encrypt")}};g$=class g$ extends g{constructor(Z){super(Z1,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}};d$=class d$ extends r1{constructor(Z){super(Z1,"encryptionLevel",["40bit","128bit"])}};c$=class c$ extends b1{constructor(Z){super(Z1,"enforce")}};h$=class h$ extends g{constructor(Z){super(Z1,"equate"),this.force=A1({data:Z.force,defaultValue:1,validate:(q)=>q===0}),this.from=Z.from||"",this.to=Z.to||""}};s$=class s$ extends g{constructor(Z){super(Z1,"equateRange"),this.from=Z.from||"",this.to=Z.to||"",this._unicodeRange=Z.unicodeRange||""}get unicodeRange(){let Z=[],q=/U\+([0-9a-fA-F]+)/,X=this._unicodeRange;for(let z of X.split(",").map((R)=>R.trim()).filter((R)=>!!R))z=z.split("-",2).map((R)=>{let G=R.match(q);return G?parseInt(G[1],16):0}),z.length===1&&z.push(z[0]),Z.push(z);return X1(this,"unicodeRange",Z)}};r$=class r$ extends P8{constructor(Z){super(Z1,"exclude")}[Z8](){this[a]=this[a].trim().split(/\s+/).filter((Z)=>Z&&["calculate","close","enter","exit","initialize","ready","validate"].includes(Z))}};l$=class l$ extends b1{constructor(Z){super(Z1,"excludeNS")}};o$=class o$ extends r1{constructor(Z){super(Z1,"flipLabel",["usePrinterSetting","on","off"])}};a$=class a$ extends g{constructor(Z){super(Z1,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new C,this.defaultTypeface=new C,this.neverEmbed=new C}};n$=class n$ extends M8{constructor(Z){super(Z1,"formFieldFilling")}};i$=class i$ extends b1{constructor(Z){super(Z1,"groupParent")}};t$=class t$ extends r1{constructor(Z){super(Z1,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}};e$=class e$ extends b1{constructor(Z){super(Z1,"includeXDPContent")}};Z_=class Z_ extends r1{constructor(Z){super(Z1,"incrementalLoad",["none","forwardOnly"])}};q_=class q_ extends M8{constructor(Z){super(Z1,"incrementalMerge")}};X_=class X_ extends M8{constructor(Z){super(Z1,"interactive")}};z_=class z_ extends r1{constructor(Z){super(Z1,"jog",["usePrinterSetting","none","pageSet"])}};R_=class R_ extends g{constructor(Z){super(Z1,"labelPrinter",!0),this.name=i(Z.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}};G_=class G_ extends r1{constructor(Z){super(Z1,"layout",["paginate","panel"])}};P_=class P_ extends S0{constructor(Z){super(Z1,"level",0,(q)=>q>0)}};Q_=class Q_ extends M8{constructor(Z){super(Z1,"linearized")}};Y_=class Y_ extends b1{constructor(Z){super(Z1,"locale")}};W_=class W_ extends b1{constructor(Z){super(Z1,"localeSet")}};$_=class $_ extends g{constructor(Z){super(Z1,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}};__=class __ extends g{constructor(Z){super(Z1,"map",!0),this.equate=new C,this.equateRange=new C}};J_=class J_ extends g{constructor(Z){super(Z1,"mediumInfo",!0),this.map=null}};U_=class U_ extends g{constructor(Z){super(Z1,"message",!0),this.msgId=null,this.severity=null}};f_=class f_ extends g{constructor(Z){super(Z1,"messaging",!0),this.message=new C}};K_=class K_ extends r1{constructor(Z){super(Z1,"mode",["append","overwrite"])}};B_=class B_ extends M8{constructor(Z){super(Z1,"modifyAnnots")}};I_=class I_ extends S0{constructor(Z){super(Z1,"msgId",1,(q)=>q>=1)}};j_=class j_ extends b1{constructor(Z){super(Z1,"nameAttr")}};V_=class V_ extends P8{constructor(Z){super(Z1,"neverEmbed")}};H_=class H_ extends S0{constructor(Z){super(Z1,"numberOfCopies",null,(q)=>q>=2&&q<=5)}};x_=class x_ extends g{constructor(Z){super(Z1,"openAction",!0),this.destination=null}};M_=class M_ extends g{constructor(Z){super(Z1,"output",!0),this.to=null,this.type=null,this.uri=null}};A_=class A_ extends b1{constructor(Z){super(Z1,"outputBin")}};L_=class L_ extends g{constructor(Z){super(Z1,"outputXSL",!0),this.uri=null}};k_=class k_ extends r1{constructor(Z){super(Z1,"overprint",["none","both","draw","field"])}};T_=class T_ extends b1{constructor(Z){super(Z1,"packets")}[Z8](){this[a]!=="*"&&(this[a]=this[a].trim().split(/\s+/).filter((Z)=>["config","datasets","template","xfdf","xslt"].includes(Z)))}};N_=class N_ extends g{constructor(Z){super(Z1,"pageOffset"),this.x=A1({data:Z.x,defaultValue:"useXDCSetting",validate:(q)=>!0}),this.y=A1({data:Z.y,defaultValue:"useXDCSetting",validate:(q)=>!0})}};C_=class C_ extends b1{constructor(Z){super(Z1,"pageRange")}[Z8](){let Z=this[a].trim().split(/\s+/).map((X)=>parseInt(X,10)),q=[];for(let X=0,z=Z.length;X<z;X+=2)q.push(Z.slice(X,X+2));this[a]=q}};F_=class F_ extends r1{constructor(Z){super(Z1,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}};v_=class v_ extends r1{constructor(Z){super(Z1,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}};b_=class b_ extends S0{constructor(Z){super(Z1,"part",1,(q)=>!1)}};S_=class S_ extends g{constructor(Z){super(Z1,"pcl",!0),this.name=Z.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}};m_=class m_ extends g{constructor(Z){super(Z1,"pdf",!0),this.name=Z.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}};O_=class O_ extends g{constructor(Z){super(Z1,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}};y_=class y_ extends g{constructor(Z){super(Z1,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}};p_=class p_ extends M8{constructor(Z){super(Z1,"pickTrayByPDFSize")}};D_=class D_ extends b1{constructor(Z){super(Z1,"picture")}};w_=class w_ extends M8{constructor(Z){super(Z1,"plaintextMetadata")}};E_=class E_ extends r1{constructor(Z){super(Z1,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}};u_=class u_ extends g{constructor(Z){super(Z1,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new C,this.labelPrinter=new C,this.pcl=new C,this.pdf=new C,this.ps=new C,this.submitUrl=new C,this.webClient=new C,this.zpl=new C}};g_=class g_ extends M8{constructor(Z){super(Z1,"print")}};d_=class d_ extends M8{constructor(Z){super(Z1,"printHighQuality")}};c_=class c_ extends r1{constructor(Z){super(Z1,"printScaling",["appdefault","noScaling"])}};h_=class h_ extends b1{constructor(Z){super(Z1,"printerName")}};s_=class s_ extends b1{constructor(Z){super(Z1,"producer")}};r_=class r_ extends g{constructor(Z){super(Z1,"ps",!0),this.name=Z.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}};LV=class extends P8{constructor(Z){super(Z1,"range")}[Z8](){this[a]=this[a].split(",",2).map((Z)=>Z.split("-").map((q)=>parseInt(q.trim(),10))).filter((Z)=>Z.every((q)=>!isNaN(q))).map((Z)=>(Z.length===1&&Z.push(Z[0]),Z))}};l_=class l_ extends P8{constructor(Z){super(Z1,"record")}[Z8](){this[a]=this[a].trim();let Z=parseInt(this[a],10);!isNaN(Z)&&Z>=0&&(this[a]=Z)}};o_=class o_ extends P8{constructor(Z){super(Z1,"relevant")}[Z8](){this[a]=this[a].trim().split(/\s+/)}};a_=class a_ extends P8{constructor(Z){super(Z1,"rename")}[Z8](){this[a]=this[a].trim(),(this[a].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[a]))&&v("XFA - Rename: invalid XFA name")}};n_=class n_ extends r1{constructor(Z){super(Z1,"renderPolicy",["server","client"])}};i_=class i_ extends r1{constructor(Z){super(Z1,"runScripts",["both","client","none","server"])}};t_=class t_ extends g{constructor(Z){super(Z1,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}};e_=class e_ extends r1{constructor(Z){super(Z1,"scriptModel",["XFA","none"])}};ZJ=class ZJ extends r1{constructor(Z){super(Z1,"severity",["ignore","error","information","trace","warning"])}};qJ=class qJ extends g{constructor(Z){super(Z1,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}};XJ=class XJ extends g{constructor(Z){super(Z1,"staple"),this.mode=i(Z.mode,["usePrinterSetting","on","off"])}};zJ=class zJ extends b1{constructor(Z){super(Z1,"startNode")}};RJ=class RJ extends S0{constructor(Z){super(Z1,"startPage",0,(q)=>!0)}};GJ=class GJ extends r1{constructor(Z){super(Z1,"submitFormat",["html","delegate","fdf","xml","pdf"])}};PJ=class PJ extends b1{constructor(Z){super(Z1,"submitUrl")}};QJ=class QJ extends S0{constructor(Z){super(Z1,"subsetBelow",100,(q)=>q>=0&&q<=100)}};YJ=class YJ extends M8{constructor(Z){super(Z1,"suppressBanner")}};WJ=class WJ extends M8{constructor(Z){super(Z1,"tagged")}};$J=class $J extends g{constructor(Z){super(Z1,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}};_J=class _J extends r1{constructor(Z){super(Z1,"threshold",["trace","error","information","warning"])}};JJ=class JJ extends r1{constructor(Z){super(Z1,"to",["null","memory","stderr","stdout","system","uri"])}};UJ=class UJ extends g{constructor(Z){super(Z1,"templateCache"),this.maxEntries=A1({data:Z.maxEntries,defaultValue:5,validate:(q)=>q>=0})}};fJ=class fJ extends g{constructor(Z){super(Z1,"trace",!0),this.area=new C}};KJ=class KJ extends g{constructor(Z){super(Z1,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}};BJ=class BJ extends r1{constructor(Z){super(Z1,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}};IJ=class IJ extends b1{constructor(Z){super(Z1,"uri")}};jJ=class jJ extends r1{constructor(Z){super(Z1,"validate",["preSubmit","prePrint","preExecute","preSave"])}};VJ=class VJ extends P8{constructor(Z){super(Z1,"validateApprovalSignatures")}[Z8](){this[a]=this[a].trim().split(/\s+/).filter((Z)=>["docReady","postSign"].includes(Z))}};HJ=class HJ extends r1{constructor(Z){super(Z1,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}};xJ=class xJ extends r1{constructor(Z){super(Z1,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}};MJ=class MJ extends g{constructor(Z){super(Z1,"VersionControl"),this.outputBelow=i(Z.outputBelow,["warn","error","update"]),this.sourceAbove=i(Z.sourceAbove,["warn","error"]),this.sourceBelow=i(Z.sourceBelow,["update","maintain"])}};AJ=class AJ extends g{constructor(Z){super(Z1,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}};LJ=class LJ extends g{constructor(Z){super(Z1,"webClient",!0),this.name=Z.name?Z.name.trim():"",this.fontInfo=null,this.xdc=null}};kJ=class kJ extends r1{constructor(Z){super(Z1,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}};TJ=class TJ extends P8{constructor(Z){super(Z1,"window")}[Z8](){let Z=this[a].split(",",2).map((q)=>parseInt(q.trim(),10));Z.some((q)=>isNaN(q))?this[a]=[0,0]:(Z.length===1&&Z.push(Z[0]),this[a]=Z)}};NJ=class NJ extends g{constructor(Z){super(Z1,"xdc",!0),this.uri=new C,this.xsl=new C}};CJ=class CJ extends g{constructor(Z){super(Z1,"xdp",!0),this.packets=null}};FJ=class FJ extends g{constructor(Z){super(Z1,"xsl",!0),this.debug=null,this.uri=null}};vJ=class vJ extends g{constructor(Z){super(Z1,"zpl",!0),this.name=Z.name?Z.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}};w3=class w3{static[g0](Z,q){if(w3.hasOwnProperty(Z))return w3[Z](q)}static acrobat(Z){return new q$(Z)}static acrobat7(Z){return new X$(Z)}static ADBE_JSConsole(Z){return new z$(Z)}static ADBE_JSDebugger(Z){return new R$(Z)}static addSilentPrint(Z){return new G$(Z)}static addViewerPreferences(Z){return new P$(Z)}static adjustData(Z){return new Q$(Z)}static adobeExtensionLevel(Z){return new Y$(Z)}static agent(Z){return new W$(Z)}static alwaysEmbed(Z){return new $$(Z)}static amd(Z){return new _$(Z)}static area(Z){return new J$(Z)}static attributes(Z){return new U$(Z)}static autoSave(Z){return new f$(Z)}static base(Z){return new K$(Z)}static batchOutput(Z){return new B$(Z)}static behaviorOverride(Z){return new I$(Z)}static cache(Z){return new j$(Z)}static change(Z){return new V$(Z)}static common(Z){return new H$(Z)}static compress(Z){return new x$(Z)}static compressLogicalStructure(Z){return new M$(Z)}static compressObjectStream(Z){return new A$(Z)}static compression(Z){return new L$(Z)}static config(Z){return new k$(Z)}static conformance(Z){return new T$(Z)}static contentCopy(Z){return new N$(Z)}static copies(Z){return new C$(Z)}static creator(Z){return new F$(Z)}static currentPage(Z){return new v$(Z)}static data(Z){return new b$(Z)}static debug(Z){return new S$(Z)}static defaultTypeface(Z){return new m$(Z)}static destination(Z){return new O$(Z)}static documentAssembly(Z){return new y$(Z)}static driver(Z){return new p$(Z)}static duplexOption(Z){return new D$(Z)}static dynamicRender(Z){return new w$(Z)}static embed(Z){return new E$(Z)}static encrypt(Z){return new u$(Z)}static encryption(Z){return new g$(Z)}static encryptionLevel(Z){return new d$(Z)}static enforce(Z){return new c$(Z)}static equate(Z){return new h$(Z)}static equateRange(Z){return new s$(Z)}static exclude(Z){return new r$(Z)}static excludeNS(Z){return new l$(Z)}static flipLabel(Z){return new o$(Z)}static fontInfo(Z){return new a$(Z)}static formFieldFilling(Z){return new n$(Z)}static groupParent(Z){return new i$(Z)}static ifEmpty(Z){return new t$(Z)}static includeXDPContent(Z){return new e$(Z)}static incrementalLoad(Z){return new Z_(Z)}static incrementalMerge(Z){return new q_(Z)}static interactive(Z){return new X_(Z)}static jog(Z){return new z_(Z)}static labelPrinter(Z){return new R_(Z)}static layout(Z){return new G_(Z)}static level(Z){return new P_(Z)}static linearized(Z){return new Q_(Z)}static locale(Z){return new Y_(Z)}static localeSet(Z){return new W_(Z)}static log(Z){return new $_(Z)}static map(Z){return new __(Z)}static mediumInfo(Z){return new J_(Z)}static message(Z){return new U_(Z)}static messaging(Z){return new f_(Z)}static mode(Z){return new K_(Z)}static modifyAnnots(Z){return new B_(Z)}static msgId(Z){return new I_(Z)}static nameAttr(Z){return new j_(Z)}static neverEmbed(Z){return new V_(Z)}static numberOfCopies(Z){return new H_(Z)}static openAction(Z){return new x_(Z)}static output(Z){return new M_(Z)}static outputBin(Z){return new A_(Z)}static outputXSL(Z){return new L_(Z)}static overprint(Z){return new k_(Z)}static packets(Z){return new T_(Z)}static pageOffset(Z){return new N_(Z)}static pageRange(Z){return new C_(Z)}static pagination(Z){return new F_(Z)}static paginationOverride(Z){return new v_(Z)}static part(Z){return new b_(Z)}static pcl(Z){return new S_(Z)}static pdf(Z){return new m_(Z)}static pdfa(Z){return new O_(Z)}static permissions(Z){return new y_(Z)}static pickTrayByPDFSize(Z){return new p_(Z)}static picture(Z){return new D_(Z)}static plaintextMetadata(Z){return new w_(Z)}static presence(Z){return new E_(Z)}static present(Z){return new u_(Z)}static print(Z){return new g_(Z)}static printHighQuality(Z){return new d_(Z)}static printScaling(Z){return new c_(Z)}static printerName(Z){return new h_(Z)}static producer(Z){return new s_(Z)}static ps(Z){return new r_(Z)}static range(Z){return new LV(Z)}static record(Z){return new l_(Z)}static relevant(Z){return new o_(Z)}static rename(Z){return new a_(Z)}static renderPolicy(Z){return new n_(Z)}static runScripts(Z){return new i_(Z)}static script(Z){return new t_(Z)}static scriptModel(Z){return new e_(Z)}static severity(Z){return new ZJ(Z)}static silentPrint(Z){return new qJ(Z)}static staple(Z){return new XJ(Z)}static startNode(Z){return new zJ(Z)}static startPage(Z){return new RJ(Z)}static submitFormat(Z){return new GJ(Z)}static submitUrl(Z){return new PJ(Z)}static subsetBelow(Z){return new QJ(Z)}static suppressBanner(Z){return new YJ(Z)}static tagged(Z){return new WJ(Z)}static template(Z){return new $J(Z)}static templateCache(Z){return new UJ(Z)}static threshold(Z){return new _J(Z)}static to(Z){return new JJ(Z)}static trace(Z){return new fJ(Z)}static transform(Z){return new KJ(Z)}static type(Z){return new BJ(Z)}static uri(Z){return new IJ(Z)}static validate(Z){return new jJ(Z)}static validateApprovalSignatures(Z){return new VJ(Z)}static validationMessaging(Z){return new HJ(Z)}static version(Z){return new xJ(Z)}static versionControl(Z){return new MJ(Z)}static viewerPreferences(Z){return new AJ(Z)}static webClient(Z){return new LJ(Z)}static whitespace(Z){return new kJ(Z)}static window(Z){return new TJ(Z)}static xdc(Z){return new NJ(Z)}static xdp(Z){return new CJ(Z)}static xsl(Z){return new FJ(Z)}static zpl(Z){return new vJ(Z)}};m0=j8.connectionSet.id;bJ=class bJ extends g{constructor(Z){super(m0,"connectionSet",!0),this.wsdlConnection=new C,this.xmlConnection=new C,this.xsdConnection=new C}};SJ=class SJ extends g{constructor(Z){super(m0,"effectiveInputPolicy"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};mJ=class mJ extends g{constructor(Z){super(m0,"effectiveOutputPolicy"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};OJ=class OJ extends b1{constructor(Z){super(m0,"operation"),this.id=Z.id||"",this.input=Z.input||"",this.name=Z.name||"",this.output=Z.output||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};yJ=class yJ extends b1{constructor(Z){super(m0,"rootElement"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};pJ=class pJ extends b1{constructor(Z){super(m0,"soapAction"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};DJ=class DJ extends b1{constructor(Z){super(m0,"soapAddress"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};wJ=class wJ extends b1{constructor(Z){super(m0,"uri"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};EJ=class EJ extends b1{constructor(Z){super(m0,"wsdlAddress"),this.id=Z.id||"",this.name=Z.name||"",this.use=Z.use||"",this.usehref=Z.usehref||""}};uJ=class uJ extends g{constructor(Z){super(m0,"wsdlConnection",!0),this.dataDescription=Z.dataDescription||"",this.name=Z.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}};gJ=class gJ extends g{constructor(Z){super(m0,"xmlConnection",!0),this.dataDescription=Z.dataDescription||"",this.name=Z.name||"",this.uri=null}};dJ=class dJ extends g{constructor(Z){super(m0,"xsdConnection",!0),this.dataDescription=Z.dataDescription||"",this.name=Z.name||"",this.rootElement=null,this.uri=null}};E3=class E3{static[g0](Z,q){if(E3.hasOwnProperty(Z))return E3[Z](q)}static connectionSet(Z){return new bJ(Z)}static effectiveInputPolicy(Z){return new SJ(Z)}static effectiveOutputPolicy(Z){return new mJ(Z)}static operation(Z){return new OJ(Z)}static rootElement(Z){return new yJ(Z)}static soapAction(Z){return new pJ(Z)}static soapAddress(Z){return new DJ(Z)}static uri(Z){return new wJ(Z)}static wsdlAddress(Z){return new EJ(Z)}static wsdlConnection(Z){return new uJ(Z)}static xmlConnection(Z){return new gJ(Z)}static xsdConnection(Z){return new dJ(Z)}};Nq=j8.datasets.id;cJ=class cJ extends z4{constructor(Z){super(Nq,"data",Z)}[j7](){return!0}};hJ=class hJ extends g{constructor(Z){super(Nq,"datasets",!0),this.data=null,this.Signature=null}[X4](Z){let q=Z[d1];(q==="data"&&Z[B8]===Nq||q==="Signature"&&Z[B8]===j8.signature.id)&&(this[q]=Z),this[Y8](Z)}};u3=class u3{static[g0](Z,q){if(u3.hasOwnProperty(Z))return u3[Z](q)}static datasets(Z){return new hJ(Z)}static data(Z){return new cJ(Z)}};$8=j8.localeSet.id;sJ=class sJ extends g{constructor(Z){super($8,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new C(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new C(2)}};rJ=class rJ extends b1{constructor(Z){super($8,"currencySymbol"),this.name=i(Z.name,["symbol","isoname","decimal"])}};lJ=class lJ extends g{constructor(Z){super($8,"currencySymbols",!0),this.currencySymbol=new C(3)}};oJ=class oJ extends b1{constructor(Z){super($8,"datePattern"),this.name=i(Z.name,["full","long","med","short"])}};aJ=class aJ extends g{constructor(Z){super($8,"datePatterns",!0),this.datePattern=new C(4)}};nJ=class nJ extends P8{constructor(Z){super($8,"dateTimeSymbols")}};iJ=class iJ extends b1{constructor(Z){super($8,"day")}};tJ=class tJ extends g{constructor(Z){super($8,"dayNames",!0),this.abbr=A1({data:Z.abbr,defaultValue:0,validate:(q)=>q===1}),this.day=new C(7)}};eJ=class eJ extends b1{constructor(Z){super($8,"era")}};ZU=class ZU extends g{constructor(Z){super($8,"eraNames",!0),this.era=new C(2)}};qU=class qU extends g{constructor(Z){super($8,"locale",!0),this.desc=Z.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}};XU=class XU extends g{constructor(Z){super($8,"localeSet",!0),this.locale=new C}};zU=class zU extends b1{constructor(Z){super($8,"meridiem")}};RU=class RU extends g{constructor(Z){super($8,"meridiemNames",!0),this.meridiem=new C(2)}};GU=class GU extends b1{constructor(Z){super($8,"month")}};PU=class PU extends g{constructor(Z){super($8,"monthNames",!0),this.abbr=A1({data:Z.abbr,defaultValue:0,validate:(q)=>q===1}),this.month=new C(12)}};QU=class QU extends b1{constructor(Z){super($8,"numberPattern"),this.name=i(Z.name,["full","long","med","short"])}};YU=class YU extends g{constructor(Z){super($8,"numberPatterns",!0),this.numberPattern=new C(4)}};WU=class WU extends b1{constructor(Z){super($8,"numberSymbol"),this.name=i(Z.name,["decimal","grouping","percent","minus","zero"])}};$U=class $U extends g{constructor(Z){super($8,"numberSymbols",!0),this.numberSymbol=new C(5)}};_U=class _U extends b1{constructor(Z){super($8,"timePattern"),this.name=i(Z.name,["full","long","med","short"])}};JU=class JU extends g{constructor(Z){super($8,"timePatterns",!0),this.timePattern=new C(4)}};UU=class UU extends g{constructor(Z){super($8,"typeFace",!0),this.name=""|Z.name}};fU=class fU extends g{constructor(Z){super($8,"typeFaces",!0),this.typeFace=new C}};g3=class g3{static[g0](Z,q){if(g3.hasOwnProperty(Z))return g3[Z](q)}static calendarSymbols(Z){return new sJ(Z)}static currencySymbol(Z){return new rJ(Z)}static currencySymbols(Z){return new lJ(Z)}static datePattern(Z){return new oJ(Z)}static datePatterns(Z){return new aJ(Z)}static dateTimeSymbols(Z){return new nJ(Z)}static day(Z){return new iJ(Z)}static dayNames(Z){return new tJ(Z)}static era(Z){return new eJ(Z)}static eraNames(Z){return new ZU(Z)}static locale(Z){return new qU(Z)}static localeSet(Z){return new XU(Z)}static meridiem(Z){return new zU(Z)}static meridiemNames(Z){return new RU(Z)}static month(Z){return new GU(Z)}static monthNames(Z){return new PU(Z)}static numberPattern(Z){return new QU(Z)}static numberPatterns(Z){return new YU(Z)}static numberSymbol(Z){return new WU(Z)}static numberSymbols(Z){return new $U(Z)}static timePattern(Z){return new _U(Z)}static timePatterns(Z){return new JU(Z)}static typeFace(Z){return new UU(Z)}static typeFaces(Z){return new fU(Z)}};kV=j8.signature.id;KU=class KU extends g{constructor(Z){super(kV,"signature",!0)}};d3=class d3{static[g0](Z,q){if(d3.hasOwnProperty(Z))return d3[Z](q)}static signature(Z){return new KU(Z)}};TV=j8.stylesheet.id;BU=class BU extends g{constructor(Z){super(TV,"stylesheet",!0)}};c3=class c3{static[g0](Z,q){if(c3.hasOwnProperty(Z))return c3[Z](q)}static stylesheet(Z){return new BU(Z)}};NV=j8.xdp.id;IU=class IU extends g{constructor(Z){super(NV,"xdp",!0),this.uuid=Z.uuid||"",this.timeStamp=Z.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new C,this.template=null}[Aq](Z){let q=j8[Z[d1]];return q&&Z[B8]===q.id}};h3=class h3{static[g0](Z,q){if(h3.hasOwnProperty(Z))return h3[Z](q)}static xdp(Z){return new IU(Z)}};CV=j8.xhtml.id,b2=Symbol(),FV=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),vV=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",(Z)=>Z==="none"?"none":"normal"],["xfa-font-horizontal-scale",(Z)=>`scaleX(${Math.max(0,parseInt(Z)/100).toFixed(2)})`],["xfa-font-vertical-scale",(Z)=>`scaleY(${Math.max(0,parseInt(Z)/100).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(Z,q)=>M1(0.99*(Z=q.fontSize=Math.abs(_1(Z))))],["letter-spacing",(Z)=>M1(_1(Z))],["line-height",(Z)=>M1(_1(Z))],["margin",(Z)=>M1(_1(Z))],["margin-bottom",(Z)=>M1(_1(Z))],["margin-left",(Z)=>M1(_1(Z))],["margin-right",(Z)=>M1(_1(Z))],["margin-top",(Z)=>M1(_1(Z))],["text-indent",(Z)=>M1(_1(Z))],["font-family",(Z)=>Z],["vertical-align",(Z)=>M1(_1(Z))]]),bV=/\s+/g,SV=/[\r\n]+/g,mV=/\r\n?/g;yV=new Set(["body","html"]);J0=class J0 extends z4{constructor(Z,q){super(CV,q),this[b2]=!1,this.style=Z.style||""}[b0](Z){var q;super[b0](Z),this.style=(q=this).style?q.style.split(";").filter((X)=>!!X.trim()).map((X)=>X.split(":",2).map((z)=>z.trim())).filter(([X,z])=>(X==="font-family"&&q[e1].usedTypefaces.add(z),FV.has(X))).map((X)=>X.join(":")).join(";"):""}[Y9](){return!yV.has(this[d1])}[k4](Z,q=!1){q?this[b2]=!0:(Z=Z.replaceAll(SV,""),this.style.includes("xfa-spacerun:yes")||(Z=Z.replaceAll(bV," "))),Z&&(this[a]+=Z)}[G4](Z,q=!0){let X=Object.create(null),z={top:NaN,bottom:NaN,left:NaN,right:NaN},R=null;for(let[G,P]of this.style.split(";").map((Q)=>Q.split(":",2)))switch(G){case"font-family":X.typeface=$9(P);break;case"font-size":X.size=_1(P);break;case"font-weight":X.weight=P;break;case"font-style":X.posture=P;break;case"letter-spacing":X.letterSpacing=_1(P);break;case"margin":let Q=P.split(/ \t/).map((Y)=>_1(Y));switch(Q.length){case 1:z.top=z.bottom=z.left=z.right=Q[0];break;case 2:z.top=z.bottom=Q[0],z.left=z.right=Q[1];break;case 3:z.top=Q[0],z.bottom=Q[2],z.left=z.right=Q[1];break;case 4:z.top=Q[0],z.left=Q[1],z.bottom=Q[2],z.right=Q[3]}break;case"margin-top":z.top=_1(P);break;case"margin-bottom":z.bottom=_1(P);break;case"margin-left":z.left=_1(P);break;case"margin-right":z.right=_1(P);break;case"line-height":R=_1(P)}if(Z.pushData(X,z,R),this[a])Z.addString(this[a]);else for(let G of this[S8]())G[d1]!=="#text"?G[G4](Z):Z.addString(G[a]);q&&Z.popFont()}[H1](Z){let q=[];if(this[u]={children:q},this[a4]({}),q.length===0&&!this[a])return K1.EMPTY;let X;return X=this[b2]?this[a]?this[a].replaceAll(mV,`
|
|
35
|
-
`):void 0:this[a]||void 0,K1.success({name:this[d1],attributes:{href:this.href,style:OV(this.style,this,this[b2])},children:q,value:X})}};jU=class jU extends J0{constructor(Z){super(Z,"a"),this.href=BY(Z.href)||""}};VU=class VU extends J0{constructor(Z){super(Z,"b")}[G4](Z){Z.pushFont({weight:"bold"}),super[G4](Z),Z.popFont()}};HU=class HU extends J0{constructor(Z){super(Z,"body")}[H1](Z){let q=super[H1](Z),{html:X}=q;return X?(X.name="div",X.attributes.class=["xfaRich"],q):K1.EMPTY}};xU=class xU extends J0{constructor(Z){super(Z,"br")}[A8](){return`
|
|
36
|
-
`}[G4](Z){Z.addString(`
|
|
37
|
-
`)}[H1](Z){return K1.success({name:"br"})}};MU=class MU extends J0{constructor(Z){super(Z,"html")}[H1](Z){let q=[];if(this[u]={children:q},this[a4]({}),q.length===0)return K1.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[a]||""});if(q.length===1){let X=q[0];if(X.attributes?.class.includes("xfaRich"))return K1.success(X)}return K1.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:q})}};AU=class AU extends J0{constructor(Z){super(Z,"i")}[G4](Z){Z.pushFont({posture:"italic"}),super[G4](Z),Z.popFont()}};LU=class LU extends J0{constructor(Z){super(Z,"li")}};kU=class kU extends J0{constructor(Z){super(Z,"ol")}};TU=class TU extends J0{constructor(Z){super(Z,"p")}[G4](Z){super[G4](Z,!1),Z.addString(`
|
|
38
|
-
`),Z.addPara(),Z.popFont()}[A8](){return this[L1]()[S8]().at(-1)===this?super[A8]():super[A8]()+`
|
|
39
|
-
`}};NU=class NU extends J0{constructor(Z){super(Z,"span")}};CU=class CU extends J0{constructor(Z){super(Z,"sub")}};FU=class FU extends J0{constructor(Z){super(Z,"sup")}};vU=class vU extends J0{constructor(Z){super(Z,"ul")}};k6=class k6{static[g0](Z,q){if(k6.hasOwnProperty(Z))return k6[Z](q)}static a(Z){return new jU(Z)}static b(Z){return new VU(Z)}static body(Z){return new HU(Z)}static br(Z){return new xU(Z)}static html(Z){return new MU(Z)}static i(Z){return new AU(Z)}static li(Z){return new LU(Z)}static ol(Z){return new kU(Z)}static p(Z){return new TU(Z)}static span(Z){return new NU(Z)}static sub(Z){return new CU(Z)}static sup(Z){return new FU(Z)}static ul(Z){return new vU(Z)}};GG={config:w3,connection:E3,datasets:u3,localeSet:g3,signature:d3,stylesheet:c3,template:D3,xdp:h3,xhtml:k6};Cq=class Cq{constructor(Z){this.namespaceId=Z}[g0](Z,q){return new z4(this.namespaceId,Z,q)}};bU=class bU extends g{constructor(Z){super(-1,"root",Object.create(null)),this.element=null,this[n5]=Z}[X4](Z){return this.element=Z,!0}[Z8](){super[Z8](),this.element.template instanceof M9&&(this[n5].set(ZY,this.element),this.element.template[G7](this[n5]),this.element.template[n5]=this[n5])}};SU=class SU extends g{constructor(){super(-1,"",Object.create(null))}[X4](Z){return!1}};s3=class s3 extends kX{constructor(Z=null,q=!1){super(),this._builder=new mU(Z),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=K7,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=q}parse(Z){if(this.parseXml(Z),this._errorCode===K7)return this._current[Z8](),this._current.element}onText(Z){Z=Z.replace(this._nbsps,(q)=>q.slice(1)+" "),this._richText||this._current[Y9]()?this._current[k4](Z,this._richText):this._whiteRegex.test(Z)||this._current[k4](Z.trim())}onCdata(Z){this._current[k4](Z)}_mkAttributes(Z,q){let X=null,z=null,R=Object.create({});for(let{name:G,value:P}of Z)if(G==="xmlns")X?v(`XFA - multiple namespace definition in <${q}>`):X=P;else if(G.startsWith("xmlns:")){let Q=G.substring(6);z??=[],z.push({prefix:Q,value:P})}else{let Q=G.indexOf(":");if(Q===-1)R[G]=P;else{let Y=R[j5]??=Object.create(null),[W,$]=[G.slice(0,Q),G.slice(Q+1)];(Y[W]||=Object.create(null))[$]=P}}return[X,z,R]}_getNameAndPrefix(Z,q){let X=Z.indexOf(":");return X===-1?[Z,null]:[Z.substring(X+1),q?"":Z.substring(0,X)]}onBeginElement(Z,q,X){let[z,R,G]=this._mkAttributes(q,Z),[P,Q]=this._getNameAndPrefix(Z,this._builder.isNsAgnostic()),Y=this._builder.build({nsPrefix:Q,name:P,attributes:G,namespace:z,prefixes:R});if(Y[e1]=this._globalData,X)return Y[Z8](),this._current[X4](Y)&&Y[Lq](this._ids),void Y[b0](this._builder);this._stack.push(this._current),this._current=Y}onEndElement(Z){let q=this._current;if(q[CX]()&&typeof q[a]=="string"){let X=new s3;X._globalData=this._globalData;let z=X.parse(q[a]);q[a]=null,q[X4](z)}q[Z8](),this._current=this._stack.pop(),this._current[X4](q)&&q[Lq](this._ids),q[b0](this._builder)}onError(Z){this._errorCode=Z}};z0=class z0 extends O6{constructor(Z){super(Z);let{dict:q}=Z;if(q.has("IRT")){let z=q.getRaw("IRT");this.data.inReplyTo=z instanceof P1?z.toString():null;let R=q.get("RT");this.data.replyType=R instanceof t?R.name:YB}let X=null;if(this.data.replyType===lG){let z=q.get("IRT");this.setTitle(z.get("T")),this.data.titleObj=this._title,this.setContents(z.get("Contents")),this.data.contentsObj=this._contents,z.has("CreationDate")?(this.setCreationDate(z.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,z.has("M")?(this.setModificationDate(z.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,X=z.getRaw("Popup"),z.has("C")?(this.setColor(z.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(q.get("CreationDate")),this.data.creationDate=this.creationDate,X=q.getRaw("Popup"),q.has("C")||(this.data.color=null);this.data.popupRef=X instanceof P1?X.toString():null,q.has("RC")&&(this.data.richText=z2.getRichTextAsHtml(q.get("RC")))}setCreationDate(Z){this.creationDate=typeof Z=="string"?Z:null}_setDefaultAppearance({xref:Z,extra:q,strokeColor:X,fillColor:z,blendMode:R,strokeAlpha:G,fillAlpha:P,pointsCallback:Q}){let Y=this.data.rect=[1/0,1/0,-1/0,-1/0],W=["q"];q&&W.push(q),X&&W.push(`${X[0]} ${X[1]} ${X[2]} RG`),z&&W.push(`${z[0]} ${z[1]} ${z[2]} rg`);let $=this.data.quadPoints||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(let j=0,V=$.length;j<V;j+=8){let x=Q(W,$.subarray(j,j+8));h1.rectBoundingBox(...x,Y)}W.push("Q");let _=new S(Z),J=new S(Z);J.setIfName("Subtype","Form");let U=new o8(W.join(" "));U.dict=J,_.set("Fm0",U);let f=new S(Z);R&&f.setIfName("BM",R),f.setIfNumber("CA",G),f.setIfNumber("ca",P);let K=new S(Z);K.set("GS0",f);let I=new S(Z);I.set("ExtGState",K),I.set("XObject",_);let B=new S(Z);B.set("Resources",I),B.set("BBox",Y),this.appearance=new o8("/GS0 gs /Fm0 Do"),this.appearance.dict=B,this._streams.push(this.appearance,U)}static async createNewAnnotation(Z,q,X,z){let R=q.ref||=Z.getNewTemporaryRef(),G=await this.createNewAppearanceStream(q,Z,z),P;if(G){let W=Z.getNewTemporaryRef();P=this.createNewDict(q,Z,{apRef:W}),X.put(W,{data:G})}else P=this.createNewDict(q,Z,{});Number.isInteger(q.parentTreeId)&&P.set("StructParent",q.parentTreeId),X.put(R,{data:P});let Q={ref:R},{popup:Y}=q;if(Y){if(Y.deleted)return P.delete("Popup"),P.delete("Contents"),P.delete("RC"),Q;let W=Y.ref||=Z.getNewTemporaryRef();Y.parent=R;let $=k9.createNewDict(Y,Z);return X.put(W,{data:$}),P.setIfDefined("Contents",x0(Y.contents)),P.set("Popup",W),[Q,{ref:W}]}return Q}static async createNewPrintAnnotation(Z,q,X,z){let R=await this.createNewAppearanceStream(X,q,z),G=this.createNewDict(X,q,R?{ap:R}:{}),P=new this.prototype.constructor({dict:G,xref:q,annotationGlobals:Z,evaluatorOptions:z.evaluatorOptions});return X.ref&&(P.ref=P.refToReplace=X.ref),P}};E0=class E0 extends O6{constructor(Z){super(Z);let{dict:q,xref:X,annotationGlobals:z}=Z,R=this.data;this._needAppearances=Z.needAppearances,R.annotationType=N8.WIDGET,R.fieldName===void 0&&(R.fieldName=this._constructFieldName(q)),R.actions===void 0&&(R.actions=X9(X,q,oG));let G=F0({dict:q,key:"V",getArray:!0});R.fieldValue=this._decodeFormValue(G);let P=F0({dict:q,key:"DV",getArray:!0});if(R.defaultFieldValue=this._decodeFormValue(P),G===void 0&&z.xfaDatasets){let _=this._title.str;_&&(this._hasValueFromXFA=!0,R.fieldValue=G=z.xfaDatasets.getValue(_))}G===void 0&&R.defaultFieldValue!==null&&(R.fieldValue=R.defaultFieldValue),R.alternativeText=E1(q.get("TU")||""),this.setDefaultAppearance(Z),R.hasAppearance||=this._needAppearances&&R.fieldValue!==void 0&&R.fieldValue!==null;let Q=F0({dict:q,key:"FT"});R.fieldType=Q instanceof t?Q.name:null;let Y=F0({dict:q,key:"DR"}),W=z.acroForm.get("DR"),$=this.appearance?.dict.get("Resources");this._fieldResources={localResources:Y,acroFormResources:W,appearanceResources:$,mergedResources:S.merge({xref:X,dictArray:[Y,$,W],mergeSubDicts:!0})},R.fieldFlags=F0({dict:q,key:"Ff"}),(!Number.isInteger(R.fieldFlags)||R.fieldFlags<0)&&(R.fieldFlags=0),R.password=this.hasFieldFlag(KB),R.readOnly=this.hasFieldFlag(JB),R.required=this.hasFieldFlag(UB),R.hidden=this._hasFlag(R.annotationFlags,$7)||this._hasFlag(R.annotationFlags,z3)}_decodeFormValue(Z){return Array.isArray(Z)?Z.filter((q)=>typeof q=="string").map((q)=>E1(q)):Z instanceof t?E1(Z.name):typeof Z=="string"?E1(Z):null}hasFieldFlag(Z){return!!(this.data.fieldFlags&Z)}_isViewable(Z){return!0}mustBeViewed(Z,q){return q?this.viewable:super.mustBeViewed(Z,q)&&!this._hasFlag(this.flags,z3)}getRotationMatrix(Z){let q=Z?.get(this.data.id)?.rotation;return q===void 0&&(q=this.rotation),q===0?w0:M3(q,this.width,this.height)}getBorderAndBackgroundAppearances(Z){let q=Z?.get(this.data.id)?.rotation;if(q===void 0&&(q=this.rotation),!this.backgroundColor&&!this.borderColor)return"";let X=q===0||q===180?`0 0 ${this.width} ${this.height} re`:`0 0 ${this.height} ${this.width} re`,z="";if(this.backgroundColor&&(z=`${q4(this.backgroundColor,!0)} ${X} f `),this.borderColor)z+=`${this.borderStyle.width||1} w ${q4(this.borderColor,!1)} ${X} S `;return z}async getOperatorList(Z,q,X,z){if(X&sG&&!(this instanceof iX)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new O8,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(Z,q,X,z);let R=await this._getAppearance(Z,q,X,z);if(this.appearance&&R===null)return super.getOperatorList(Z,q,X,z);let G=new O8;if(!this._defaultAppearance||R===null)return{opList:G,separateForm:!1,separateCanvas:!1};let P=!!(this.data.hasOwnCanvas&&X&q3),Q=[0,0,this.width,this.height],Y=Fq(this.data.rect,Q,[1,0,0,1,0,0]),W;this.oc&&(W=await Z.parseMarkedContentProps(this.oc,null)),W!==void 0&&G.addOp(i0,["OC",W]),G.addOp(fP,[this.data.id,this.data.rect,Y,this.getRotationMatrix(z),P]);let $=new o8(R);return await Z.getOperatorList({stream:$,task:q,resources:this._fieldResources.mergedResources,operatorList:G}),G.addOp(KP,[]),W!==void 0&&G.addOp(B6,[]),{opList:G,separateForm:!1,separateCanvas:P}}_getMKDict(Z){let q=new S(null);return Z&&q.set("R",Z),q.setIfArray("BC",g8(this.borderColor)),q.setIfArray("BG",g8(this.backgroundColor)),q.size>0?q:null}amendSavedDict(Z,q){}setValue(Z,q,X,z){let{dict:R,ref:G}=function(P,Q,Y){let W=new U8,$=P,_={dict:null,ref:null};for(;P instanceof S&&!W.has(Q)&&(W.put(Q),!P.has("T"));){if(!((Q=P.getRaw("Parent"))instanceof P1))return _;P=Y.fetch(Q)}return P instanceof S&&P!==$&&(_.dict=P,_.ref=Q),_}(Z,this.ref,X);if(R){if(!z.has(G)){let P=R.clone();return P.set("V",q),z.put(G,{data:P}),P}}else Z.set("V",q);return null}async save(Z,q,X,z){let R=X?.get(this.data.id),G=this._buildFlags(R?.noView,R?.noPrint),P=R?.value,Q=R?.rotation;if(P===this.data.fieldValue||P===void 0){if(!this._hasValueFromXFA&&Q===void 0&&G===void 0)return;P||=this.data.fieldValue}if(Q===void 0&&!this._hasValueFromXFA&&Array.isArray(P)&&Array.isArray(this.data.fieldValue)&&N7(P,this.data.fieldValue)&&G===void 0)return;Q===void 0&&(Q=this.rotation);let Y=null;if(!this._needAppearances&&(Y=await this._getAppearance(Z,q,cz,X),Y===null&&G===void 0))return;let W=!1;Y?.needAppearances&&(W=!0,Y=null);let{xref:$}=Z,_=$.fetchIfRef(this.ref);if(!(_ instanceof S))return;let J=new S($);for(let I of _.getKeys())I!=="AP"&&J.set(I,_.getRaw(I));if(G!==void 0&&(J.set("F",G),Y===null&&!W)){let I=_.getRaw("AP");I&&J.set("AP",I)}let U={path:this.data.fieldName,value:P},f=this.setValue(J,Array.isArray(P)?P.map(x0):x0(P),$,z);this.amendSavedDict(X,f||J);let K=this._getMKDict(Q);if(K&&J.set("MK",K),z.put(this.ref,{data:J,xfa:U,needAppearances:W}),Y!==null){let I=$.getNewTemporaryRef(),B=new S($);J.set("AP",B),B.set("N",I);let j=this._getSaveFieldResources($),V=new o8(Y),x=V.dict=new S($);x.setIfName("Subtype","Form"),x.set("Resources",j);let M=Q%180==0?[0,0,this.width,this.height]:[0,0,this.height,this.width];x.set("BBox",M);let H=this.getRotationMatrix(X);H!==w0&&x.set("Matrix",H),z.put(I,{data:V,xfa:null,needAppearances:!1})}J.set("M",`D:${m5()}`)}async _getAppearance(Z,q,X,z){if(this.data.password)return null;let R=z?.get(this.data.id),G,P;if(R&&(G=R.formattedValue||R.value,P=R.rotation),P===void 0&&G===void 0&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;let Q=this.getBorderAndBackgroundAppearances(z);if(G===void 0&&(G=this.data.fieldValue,!G))return`/Tx BMC q ${Q}Q EMC`;if(Array.isArray(G)&&G.length===1&&(G=G[0]),t1(typeof G=="string","Expected `value` to be a string."),G=G.trimEnd(),this.data.combo)G=this.data.options.find(({exportValue:A})=>G===A)?.displayValue||G;if(G==="")return`/Tx BMC q ${Q}Q EMC`;P===void 0&&(P=this.rotation);let Y,W=-1;this.data.multiLine?(Y=G.split(/\r\n?|\n/).map((H)=>H.normalize("NFC")),W=Y.length):Y=[G.replace(/\r\n?|\n/,"").normalize("NFC")];let{width:$,height:_}=this;P!==90&&P!==270||([$,_]=[_,$]),this._defaultAppearance||(this.data.defaultAppearanceData=MX(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let J,U,f,K=await E0._getFontData(Z,q,this.data.defaultAppearanceData,this._fieldResources.mergedResources),I=[],B=!1;for(let H of Y){let A=K.encodeString(H);A.length>1&&(B=!0),I.push(A.join(""))}if(B&&X&cz)return{needAppearances:!0};if(B&&this._isOffscreenCanvasSupported){let H=this.data.comb?"monospace":"sans-serif",A=new t0(Z.xref,H),T=A.createFontResources(Y.join("")),k=T.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){let D=this._fieldResources.mergedResources.get("Font");for(let n of k.getKeys())D.set(n,k.getRaw(n))}else this._fieldResources.mergedResources.set("Font",k);let y=A.fontName.name;K=await E0._getFontData(Z,q,{fontName:y,fontSize:0},T);for(let D=0,n=I.length;D<n;D++)I[D]=TP(Y[D]);let O=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=y,[J,U,f]=this._computeFontSize(_-2,$-4,G,K,W),this.data.defaultAppearanceData=O}else this._isOffscreenCanvasSupported||v("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."),[J,U,f]=this._computeFontSize(_-2,$-4,G,K,W);let j=K.descent;j=isNaN(j)?uz*f:Math.max(uz*f,Math.abs(j)*U);let V=Math.min(Math.floor((_-U)/2),1),x=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(J,I,K,U,$,_,x,2,V,j,f,z);if(this.data.comb)return this._getCombAppearance(J,K,I[0],U,$,_,2,V,j,f,z);let M=V+j;if(x===0||x>2)return`/Tx BMC q ${Q}BT `+J+` 1 0 0 1 ${O1(2)} ${O1(M)} Tm (${j6(I[0])}) Tj ET Q EMC`;return`/Tx BMC q ${Q}BT `+J+` 1 0 0 1 0 0 Tm ${this._renderText(I[0],K,U,$,x,{shift:0},2,M)} ET Q EMC`}static async _getFontData(Z,q,X,z){let R=new O8,G={font:null,clone(){return this}},{fontName:P,fontSize:Q}=X;return await Z.handleSetFont(z,[P&&t.get(P),Q],null,R,q,G,null),G.font}_getTextWidth(Z,q){return Math.sumPrecise(q.charsToGlyphs(Z).map((X)=>X.width))/1000}_computeFontSize(Z,q,X,z,R){let{fontSize:G}=this.data.defaultAppearanceData,P=(G||12)*M5,Q=Math.round(Z/P);if(!G){let Y=(_)=>Math.floor(100*_)/100;if(R===-1){let _=this._getTextWidth(X,z);G=Y(Math.min(Z/M5,q/_)),Q=1}else{let _=X.split(/\r\n?|\n/),J=[];for(let f of _){let K=z.encodeString(f).join(""),I=z.charsToGlyphs(K),B=z.getCharPositions(K);J.push({line:K,glyphs:I,positions:B})}let U=(f)=>{let K=0;for(let I of J)if(K+=this._splitLine(null,z,f,q,I).length*f,K>Z)return!0;return!1};for(Q=Math.max(Q,R);P=Z/Q,G=Y(P/M5),U(G);)Q++}let{fontName:W,fontColor:$}=this.data.defaultAppearanceData;this._defaultAppearance=function({fontSize:_,fontName:J,fontColor:U}){return`/${XX(J)} ${_} Tf ${q4(U,!0)}`}({fontSize:G,fontName:W,fontColor:$})}return[this._defaultAppearance,G,Z/Q]}_renderText(Z,q,X,z,R,G,P,Q){let Y;if(R===1)Y=(z-this._getTextWidth(Z,q)*X)/2;else if(R===2)Y=z-this._getTextWidth(Z,q)*X-P;else Y=P;let W=O1(Y-G.shift);return G.shift=Y,`${W} ${Q=O1(Q)} Td (${j6(Z)}) Tj`}_getSaveFieldResources(Z){let{localResources:q,appearanceResources:X,acroFormResources:z}=this._fieldResources,R=this.data.defaultAppearanceData?.fontName;if(!R)return q||S.empty;for(let G of[q,X])if(G instanceof S){let P=G.get("Font");if(P instanceof S&&P.has(R))return G}if(z instanceof S){let G=z.get("Font");if(G instanceof S&&G.has(R)){let P=new S(Z);P.set(R,G.getRaw(R));let Q=new S(Z);return Q.set("Font",P),S.merge({xref:Z,dictArray:[Q,q],mergeSubDicts:!0})}}return q||S.empty}getFieldObject(){return null}};yU=class yU extends E0{constructor(Z){super(Z);let{dict:q}=Z;q.has("PMD")&&(this.flags|=$7,this.data.hidden=!0,v("Barcodes are not supported")),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0,typeof this.data.fieldValue!="string"&&(this.data.fieldValue="");let X=F0({dict:q,key:"Q"});(!Number.isInteger(X)||X<0||X>2)&&(X=null),this.data.textAlignment=X;let z=F0({dict:q,key:"MaxLen"});(!Number.isInteger(z)||z<0)&&(z=0),this.data.maxLen=z,this.data.multiLine=this.hasFieldFlag(fB),this.data.comb=this.hasFieldFlag(MB)&&!this.data.multiLine&&!this.data.password&&!this.hasFieldFlag(VB)&&this.data.maxLen!==0,this.data.doNotScroll=this.hasFieldFlag(xB);let{data:{actions:R}}=this;if(!R)return;let G=/^AF(Date|Time)_(?:Keystroke|Format)(?:Ex)?\(['"]?([^'"]+)['"]?\);$/,P=!1;(R.Format?.length===1&&R.Keystroke?.length===1&&G.test(R.Format[0])&&G.test(R.Keystroke[0])||R.Format?.length===0&&R.Keystroke?.length===1&&G.test(R.Keystroke[0])||R.Keystroke?.length===0&&R.Format?.length===1&&G.test(R.Format[0]))&&(P=!0);let Q=[];R.Format&&Q.push(...R.Format),R.Keystroke&&Q.push(...R.Keystroke),P&&(delete R.Keystroke,R.Format=Q);for(let Y of Q){let W=Y.match(G);if(!W)continue;let $=W[1]==="Date",_=W[2],J=parseInt(_,10);if(isNaN(J)||Math.floor(Math.log10(J))+1!==W[2].length||(_=($?GV:PV)[J]??_),this.data.datetimeFormat=_,!P)break;if($){/HH|MM|ss|h/.test(_)?(this.data.datetimeType="datetime-local",this.data.timeStep=/ss/.test(_)?1:60):this.data.datetimeType="date";break}this.data.datetimeType="time",this.data.timeStep=/ss/.test(_)?1:60;break}}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(Z,q,X,z,R,G,P,Q,Y,W,$){let _=R/this.data.maxLen,J=this.getBorderAndBackgroundAppearances($),U=[],f=q.getCharPositions(X);for(let[I,B]of f)U.push(`(${j6(X.substring(I,B))}) Tj`);let K=U.join(` ${O1(_)} 0 Td `);return`/Tx BMC q ${J}BT `+Z+` 1 0 0 1 ${O1(P)} ${O1(Q+Y)} Tm ${K} ET Q EMC`}_getMultilineAppearance(Z,q,X,z,R,G,P,Q,Y,W,$,_){let J=[],U=R-2*Q,f={shift:0};for(let B=0,j=q.length;B<j;B++){let V=q[B],x=this._splitLine(V,X,z,U);for(let M=0,H=x.length;M<H;M++){let A=x[M],T=B===0&&M===0?-Y-($-W):-$;J.push(this._renderText(A,X,z,R,P,f,Q,T))}}let K=this.getBorderAndBackgroundAppearances(_),I=J.join(`
|
|
40
|
-
`);return`/Tx BMC q ${K}BT `+Z+` 1 0 0 1 0 ${O1(G)} Tm ${I} ET Q EMC`}_splitLine(Z,q,X,z,R={}){Z=R.line||Z;let G=R.glyphs||q.charsToGlyphs(Z);if(G.length<=1)return[Z];let P=R.positions||q.getCharPositions(Z),Q=X/1000,Y=[],W=-1,$=-1,_=-1,J=0,U=0;for(let f=0,K=G.length;f<K;f++){let[I,B]=P[f],j=G[f],V=j.width*Q;j.unicode===" "?U+V>z?(Y.push(Z.substring(J,I)),J=I,U=V,W=-1,_=-1):(U+=V,W=I,$=B,_=f):U+V>z?W!==-1?(Y.push(Z.substring(J,$)),J=$,f=_+1,W=-1,U=0):(Y.push(Z.substring(J,I)),J=I,U=V):U+=V}return J<Z.length&&Y.push(Z.substring(J,Z.length)),Y}async extractTextContent(Z,q,X){await super.extractTextContent(Z,q,X);let z=this.data.textContent;if(!z)return;let R=z.join(`
|
|
41
|
-
`);if(R===this.data.fieldValue)return;let G=R.replaceAll(/([.*+?^${}()|[\]\\])|(\s+)/g,(P,Q)=>Q?`\\${Q}`:"\\s+");new RegExp(`^\\s*${G}\\s*$`).test(this.data.fieldValue)&&(this.data.textContent=this.data.fieldValue.split(`
|
|
42
|
-
`))}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.data.password,charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,datetimeFormat:this.data.datetimeFormat,hasDatetimeHTML:!!this.data.datetimeType,type:"text"}}};pU=class pU extends E0{constructor(Z){super(Z),this.checkedAppearance=null,this.uncheckedAppearance=null;let q=this.hasFieldFlag(BB),X=this.hasFieldFlag(IB);this.data.checkBox=!q&&!X,this.data.radioButton=q&&!X,this.data.pushButton=X,this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(Z):this.data.radioButton?this._processRadioButton(Z):this.data.pushButton?(this.data.hasOwnCanvas=!0,this.data.noHTML=!1,this._processPushButton(Z)):v("Invalid field flags for button widget annotation")}async getOperatorList(Z,q,X,z){if(this.data.pushButton)return super.getOperatorList(Z,q,X,!1,z);let R=null,G=null;if(z){let Q=z.get(this.data.id);R=Q?Q.value:null,G=Q?Q.rotation:null}if(R===null&&this.appearance)return super.getOperatorList(Z,q,X,z);R==null&&(R=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);let P=R?this.checkedAppearance:this.uncheckedAppearance;if(P){let Q=this.appearance,Y=g4(P.dict.getArray("Matrix"),w0);G&&P.dict.set("Matrix",this.getRotationMatrix(z)),this.appearance=P;let W=super.getOperatorList(Z,q,X,z);return this.appearance=Q,P.dict.set("Matrix",Y),W}return{opList:new O8,separateForm:!1,separateCanvas:!1}}async save(Z,q,X,z){this.data.checkBox?this._saveCheckbox(Z,q,X,z):this.data.radioButton&&this._saveRadioButton(Z,q,X,z)}async _saveCheckbox(Z,q,X,z){if(!X)return;let R=X.get(this.data.id),G=this._buildFlags(R?.noView,R?.noPrint),P=R?.rotation,Q=R?.value;if(P===void 0&&G===void 0){if(Q===void 0)return;if(this.data.fieldValue===this.data.exportValue===Q)return}let Y=Z.xref.fetchIfRef(this.ref);if(!(Y instanceof S))return;Y=Y.clone(),P===void 0&&(P=this.rotation),Q===void 0&&(Q=this.data.fieldValue===this.data.exportValue);let W={path:this.data.fieldName,value:Q?this.data.exportValue:""},$=t.get(Q?this.data.exportValue:"Off");this.setValue(Y,$,Z.xref,z),Y.set("AS",$),Y.set("M",`D:${m5()}`),G!==void 0&&Y.set("F",G);let _=this._getMKDict(P);_&&Y.set("MK",_),z.put(this.ref,{data:Y,xfa:W,needAppearances:!1})}async _saveRadioButton(Z,q,X,z){if(!X)return;let R=X.get(this.data.id),G=this._buildFlags(R?.noView,R?.noPrint),P=R?.rotation,Q=R?.value;if(P===void 0&&G===void 0){if(Q===void 0)return;if(this.data.fieldValue===this.data.buttonValue===Q)return}let Y=Z.xref.fetchIfRef(this.ref);if(!(Y instanceof S))return;Y=Y.clone(),Q===void 0&&(Q=this.data.fieldValue===this.data.buttonValue),P===void 0&&(P=this.rotation);let W={path:this.data.fieldName,value:Q?this.data.buttonValue:""},$=t.get(Q?this.data.buttonValue:"Off");Q&&this.setValue(Y,$,Z.xref,z),Y.set("AS",$),Y.set("M",`D:${m5()}`),G!==void 0&&Y.set("F",G);let _=this._getMKDict(P);_&&Y.set("MK",_),z.put(this.ref,{data:Y,xfa:W,needAppearances:!1})}_getDefaultCheckedAppearance(Z,q){let{width:X,height:z}=this,R=[0,0,X,z],G=0.8*Math.min(X,z),P,Q;q==="check"?(P={width:0.755*G,height:0.705*G},Q="3"):q==="disc"?(P={width:0.791*G,height:0.705*G},Q="l"):y1(`_getDefaultCheckedAppearance - unsupported type: ${q}`);let Y=`q BT /PdfJsZaDb ${G} Tf 0 g ${O1((X-P.width)/2)} ${O1((z-P.height)/2)} Td (${Q}) Tj ET Q`,W=new S(Z.xref);W.set("FormType",1),W.setIfName("Subtype","Form"),W.setIfName("Type","XObject"),W.set("BBox",R),W.set("Matrix",[1,0,0,1,0,0]),W.set("Length",Y.length);let $=new S(Z.xref),_=new S(Z.xref);_.set("PdfJsZaDb",this.fallbackFontDict),$.set("Font",_),W.set("Resources",$),this.checkedAppearance=new o8(Y),this.checkedAppearance.dict=W,this._streams.push(this.checkedAppearance)}_processCheckBox(Z){let q=Z.dict.get("AP");if(!(q instanceof S))return;let X=q.get("N");if(!(X instanceof S))return;let z=this._decodeFormValue(Z.dict.get("AS"));typeof z=="string"&&(this.data.fieldValue=z);let R=this.data.fieldValue!==null&&this.data.fieldValue!=="Off"?this.data.fieldValue:"Yes",G=this._decodeFormValue(X.getKeys());if(G.length===0)G.push("Off",R);else if(G.length===1)G[0]==="Off"?G.push(R):G.unshift("Off");else if(G.includes(R))G.length=0,G.push("Off",R);else{let Y=G.find((W)=>W!=="Off");G.length=0,G.push("Off",Y)}G.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=G[1];let P=X.get(this.data.exportValue);this.checkedAppearance=P instanceof C1?P:null;let Q=X.get("Off");this.uncheckedAppearance=Q instanceof C1?Q:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(Z,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,this.data.defaultFieldValue===null&&(this.data.defaultFieldValue="Off")}_processRadioButton(Z){this.data.buttonValue=null;let q=Z.dict.get("Parent");if(q instanceof S){this.parent=Z.dict.getRaw("Parent");let P=q.get("V");P instanceof t&&(this.data.fieldValue=this._decodeFormValue(P))}let X=Z.dict.get("AP");if(!(X instanceof S))return;let z=X.get("N");if(!(z instanceof S))return;for(let P of z.getKeys())if(P!=="Off"){this.data.buttonValue=this._decodeFormValue(P);break}let R=z.get(this.data.buttonValue);this.checkedAppearance=R instanceof C1?R:null;let G=z.get("Off");this.uncheckedAppearance=G instanceof C1?G:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(Z,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,this.data.defaultFieldValue===null&&(this.data.defaultFieldValue="Off")}_processPushButton(Z){let{dict:q,annotationGlobals:X}=Z;q.has("A")||q.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!q.has("A")&&!q.has("AA"),x6.parseDestDictionary({destDict:q,resultObj:this.data,docBaseUrl:X.baseUrl,docAttachments:X.attachments})):v("Push buttons without action dictionaries are not supported")}getFieldObject(){let Z,q="button";return this.data.checkBox?(q="checkbox",Z=this.data.exportValue):this.data.radioButton&&(q="radiobutton",Z=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:Z,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:q}}get fallbackFontDict(){let Z=new S;return Z.setIfName("BaseFont","ZapfDingbats"),Z.setIfName("Type","FallbackType"),Z.setIfName("Subtype","FallbackType"),Z.setIfName("Encoding","ZapfDingbatsEncoding"),X1(this,"fallbackFontDict",Z)}};DU=class DU extends E0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;this.indices=q.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];let z=F0({dict:q,key:"Opt"});if(Array.isArray(z))for(let R=0,G=z.length;R<G;R++){let P=X.fetchIfRef(z[R]),Q=Array.isArray(P);this.data.options[R]={exportValue:this._decodeFormValue(Q?X.fetchIfRef(P[0]):P),displayValue:this._decodeFormValue(Q?X.fetchIfRef(P[1]):P)}}if(this.hasIndices){this.data.fieldValue=[];let R=this.data.options.length;for(let G of this.indices)Number.isInteger(G)&&G>=0&&G<R&&this.data.fieldValue.push(this.data.options[G].exportValue)}else typeof this.data.fieldValue=="string"?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||=[];this.data.options.length===0&&this.data.fieldValue.length>0&&(this.data.options=this.data.fieldValue.map((R)=>({exportValue:R,displayValue:R}))),this.data.combo=this.hasFieldFlag(jB),this.data.multiSelect=this.hasFieldFlag(HB),this._hasText=!0}getFieldObject(){let Z=this.data.combo?"combobox":"listbox",q=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:q,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:Z}}amendSavedDict(Z,q){if(!this.hasIndices)return;let X=Z?.get(this.data.id)?.value;Array.isArray(X)||(X=[X]);let z=[],{options:R}=this.data;for(let G=0,P=0,Q=R.length;G<Q;G++)R[G].exportValue===X[P]&&(z.push(G),P+=1);q.set("I",z)}async _getAppearance(Z,q,X,z){if(this.data.combo)return super._getAppearance(Z,q,X,z);let R,G,P=z?.get(this.data.id);if(P&&(G=P.rotation,R=P.value),G===void 0&&R===void 0&&!this._needAppearances)return null;R===void 0?R=this.data.fieldValue:Array.isArray(R)||(R=[R]);let{width:Q,height:Y}=this;G!==90&&G!==270||([Q,Y]=[Y,Q]);let W=this.data.options.length,$=[];for(let M=0;M<W;M++){let{exportValue:H}=this.data.options[M];R.includes(H)&&$.push(M)}this._defaultAppearance||(this.data.defaultAppearanceData=MX(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let _=await E0._getFontData(Z,q,this.data.defaultAppearanceData,this._fieldResources.mergedResources),J,{fontSize:U}=this.data.defaultAppearanceData;if(U)J=this._defaultAppearance;else{let M=(Y-1)/W,H,A=-1;for(let{displayValue:T}of this.data.options){let k=this._getTextWidth(T,_);k>A&&(A=k,H=T)}[J,U]=this._computeFontSize(M,Q-4,H,_,-1)}let f=U*M5,K=(f-U)/2,I=Math.floor(Y/f),B=0;if($.length>0){let M=Math.min(...$),H=Math.max(...$);B=Math.max(0,H-I+1),B>M&&(B=M)}let j=Math.min(B+I+1,W),V=["/Tx BMC q",`1 1 ${Q} ${Y} re W n`];if($.length){V.push("0.600006 0.756866 0.854904 rg");for(let M of $)B<=M&&M<j&&V.push(`1 ${Y-(M-B+1)*f} ${Q} ${f} re f`)}V.push("BT",J,`1 0 0 1 0 ${Y} Tm`);let x={shift:0};for(let M=B;M<j;M++){let{displayValue:H}=this.data.options[M],A=M===B?K:0;V.push(this._renderText(H,_,U,Q,0,x,2,-f+A))}return V.push("ET Q EMC"),V.join(`
|
|
43
|
-
`)}};iX=class iX extends E0{constructor(Z){super(Z),this.data.fieldValue=null,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!this.data.hasOwnCanvas}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}};wU=class wU extends z0{constructor(Z){super(Z),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;let{dict:q}=Z;this.data.annotationType=N8.TEXT,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=q.has("Name")?q.get("Name").name:"Note"),q.has("State")?(this.data.state=q.get("State")||null,this.data.stateModel=q.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}};EU=class EU extends O6{constructor(Z){super(Z);let{dict:q,annotationGlobals:X}=Z;this.data.annotationType=N8.LINK,this.data.noHTML=!1;let z=R2(q,this.rectangle);z&&(this.data.quadPoints=z),this.data.borderColor||=this.data.color,x6.parseDestDictionary({destDict:q,resultObj:this.data,docBaseUrl:X.baseUrl,docAttachments:X.attachments})}get overlaysTextContent(){return!0}};k9=class k9 extends O6{constructor(Z){super(Z);let{dict:q}=Z;this.data.annotationType=N8.POPUP,this.data.noHTML=!1,this.width!==0&&this.height!==0||(this.data.rect=null);let X=q.get("Parent");if(!X)return void v("Popup annotation has a missing or invalid parent annotation.");if(this.data.parentRect=T4(X.getArray("Rect"),null),this.data.creationDate=X.get("CreationDate")||"",Q8(X.get("RT"),lG)&&(X=X.get("IRT")),X.has("M")?(this.setModificationDate(X.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,X.has("C")?(this.setColor(X.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){let z=X.get("F");this._isViewable(z)&&this.setFlags(z)}this.setTitle(X.get("T")),this.data.titleObj=this._title,this.setContents(X.get("Contents")),this.data.contentsObj=this._contents,X.has("RC")&&(this.data.richText=z2.getRichTextAsHtml(X.get("RC"))),this.data.open=!!q.get("Open")}static createNewDict(Z,q,X){let{oldAnnotation:z,rect:R,parent:G}=Z,P=z||new S(q);return P.setIfNotExists("Type",t.get("Annot")),P.setIfNotExists("Subtype",t.get("Popup")),P.setIfNotExists("Open",!1),P.setIfArray("Rect",R),P.set("Parent",G),P}static async createNewAppearanceStream(Z,q,X){return null}};i2=class i2 extends z0{constructor(Z){super(Z),this.data.hasOwnCanvas=this.data.noRotate,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1;let{annotationGlobals:q,evaluatorOptions:X,xref:z}=Z;if(this.data.annotationType=N8.FREETEXT,this.setDefaultAppearance(Z),this._hasAppearance=!!this.appearance,this._hasAppearance){let{fontColor:R,fontSize:G}=function(P,Q,Y,W){return new lQ(P,Q,Y,W).parse()}(this.appearance,X,z,q.globalColorSpaceCache);this.data.defaultAppearanceData.fontColor=R,this.data.defaultAppearanceData.fontSize=G||10}else{this.data.defaultAppearanceData.fontSize||=10;let{fontColor:R,fontSize:G}=this.data.defaultAppearanceData;if(this._contents.str){this.data.textContent=this._contents.str.split(/\r\n?|\n/).map((W)=>W.trimEnd());let{coords:P,bbox:Q,matrix:Y}=t0.getFirstPositionInfo(this.rectangle,this.rotation,G);this.data.textPosition=this._transformPoint(P,Q,Y)}if(this._isOffscreenCanvasSupported){let P=Z.dict.get("CA"),Q=new t0(z,"sans-serif");this.appearance=Q.createAppearance(this._contents.str,this.rectangle,this.rotation,G,R,P),this._streams.push(this.appearance)}else v("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}}get hasTextContent(){return this._hasAppearance}static createNewDict(Z,q,{apRef:X,ap:z}){let{color:R,date:G,fontSize:P,oldAnnotation:Q,rect:Y,rotation:W,user:$,value:_}=Z,J=Q||new S(q);J.setIfNotExists("Type",t.get("Annot")),J.setIfNotExists("Subtype",t.get("FreeText")),J.set(Q?"M":"CreationDate",`D:${m5(G)}`),Q&&J.delete("RC"),J.setIfArray("Rect",Y);let U=`/Helv ${P} Tf ${q4(R,!0)}`;if(J.set("DA",U),J.setIfDefined("Contents",x0(_)),J.setIfNotExists("F",4),J.setIfNotExists("Border",[0,0,0]),J.setIfNumber("Rotate",W),J.setIfDefined("T",x0($)),X||z){let f=new S(q);J.set("AP",f),f.set("N",X||z)}return J}static async createNewAppearanceStream(Z,q,X){let{baseFontRef:z,evaluator:R,task:G}=X,{color:P,fontSize:Q,rect:Y,rotation:W,value:$}=Z;if(!P)return null;let _=new S(q),J=new S(q);if(z)J.set("Helv",z);else{let p=new S(q);p.setIfName("BaseFont","Helvetica"),p.setIfName("Type","Font"),p.setIfName("Subtype","Type1"),p.setIfName("Encoding","WinAnsiEncoding"),J.set("Helv",p)}_.set("Font",J);let U=await E0._getFontData(R,G,{fontName:"Helv",fontSize:Q},_),[f,K,I,B]=Y,j=I-f,V=B-K;W%180!=0&&([j,V]=[V,j]);let x=$.split(`
|
|
44
|
-
`),M=Q/1000,H=-1/0,A=[];for(let p of x){let F=U.encodeString(p);if(F.length>1)return null;p=F.join(""),A.push(p);let s=0,w=U.charsToGlyphs(p);for(let c of w)s+=c.width*M;H=Math.max(H,s)}let T=1;H>j&&(T=j/H);let k=1,y=M5*Q,O=1*Q,D=y*x.length;D>V&&(k=V/D);let n=Q*Math.min(T,k),b,l,N;switch(W){case 0:N=[1,0,0,1],l=[Y[0],Y[1],j,V],b=[Y[0],Y[3]-O];break;case 90:N=[0,1,-1,0],l=[Y[1],-Y[2],j,V],b=[Y[1],-Y[0]-O];break;case 180:N=[-1,0,0,-1],l=[-Y[2],-Y[3],j,V],b=[-Y[2],-Y[1]-O];break;case 270:N=[0,-1,1,0],l=[-Y[3],Y[0],j,V],b=[-Y[3],Y[2]-O]}let L=["q",`${N.join(" ")} 0 0 cm`,`${l.join(" ")} re W n`,"BT",`${q4(P,!0)}`,`0 Tc /Helv ${O1(n)} Tf`];L.push(`${b.join(" ")} Td (${j6(A[0])}) Tj`);let m=O1(y);for(let p=1,F=A.length;p<F;p++){let s=A[p];L.push(`0 -${m} Td (${j6(s)}) Tj`)}L.push("ET","Q");let d=L.join(`
|
|
45
|
-
`),e=new S(q);e.set("FormType",1),e.setIfName("Subtype","Form"),e.setIfName("Type","XObject"),e.set("BBox",Y),e.set("Resources",_),e.set("Matrix",[1,0,0,1,-Y[0],-Y[1]]);let E=new o8(d);return E.dict=e,E}};uU=class uU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;this.data.annotationType=N8.LINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;let z=cZ(q.getArray("L"),[0,0,0,0]);if(this.data.lineCoordinates=h1.normalizeRect(z),this.setLineEndings(q.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){let R=g8(this.color,[0,0,0]),G=q.get("CA"),P=g8(v5(q.getArray("IC"),null)),Q=P?G:null,Y=this.borderStyle.width||1,W=2*Y,$=[this.data.lineCoordinates[0]-W,this.data.lineCoordinates[1]-W,this.data.lineCoordinates[2]+W,this.data.lineCoordinates[3]+W];h1.intersect(this.rectangle,$)||(this.rectangle=$),this._setDefaultAppearance({xref:X,extra:`${Y} w`,strokeColor:R,fillColor:P,strokeAlpha:G,fillAlpha:Q,pointsCallback:(_,J)=>(_.push(`${z[0]} ${z[1]} m`,`${z[2]} ${z[3]} l`,"S"),[J[0]-Y,J[7]-Y,J[2]+Y,J[3]+Y])})}}};gU=class gU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;if(this.data.annotationType=N8.SQUARE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,!this.appearance){let z=g8(this.color,[0,0,0]),R=q.get("CA"),G=g8(v5(q.getArray("IC"),null)),P=G?R:null;if(this.borderStyle.width===0&&!G)return;this._setDefaultAppearance({xref:X,extra:`${this.borderStyle.width} w`,strokeColor:z,fillColor:G,strokeAlpha:R,fillAlpha:P,pointsCallback:(Q,Y)=>{let W=Y[4]+this.borderStyle.width/2,$=Y[5]+this.borderStyle.width/2,_=Y[6]-Y[4]-this.borderStyle.width,J=Y[3]-Y[7]-this.borderStyle.width;return Q.push(`${W} ${$} ${_} ${J} re`),G?Q.push("B"):Q.push("S"),[Y[0],Y[7],Y[2],Y[3]]}})}}};dU=class dU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;if(this.data.annotationType=N8.CIRCLE,!this.appearance){let z=g8(this.color,[0,0,0]),R=q.get("CA"),G=g8(v5(q.getArray("IC"),null)),P=G?R:null;if(this.borderStyle.width===0&&!G)return;let Q=1.3333333333333333*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:X,extra:`${this.borderStyle.width} w`,strokeColor:z,fillColor:G,strokeAlpha:R,fillAlpha:P,pointsCallback:(Y,W)=>{let $=W[0]+this.borderStyle.width/2,_=W[1]-this.borderStyle.width/2,J=W[6]-this.borderStyle.width/2,U=W[7]+this.borderStyle.width/2,f=$+(J-$)/2,K=_+(U-_)/2,I=(J-$)/2*Q,B=(U-_)/2*Q;return Y.push(`${f} ${U} m`,`${f+I} ${U} ${J} ${K+B} ${J} ${K} c`,`${J} ${K-B} ${f+I} ${_} ${f} ${_} c`,`${f-I} ${_} ${$} ${K-B} ${$} ${K} c`,`${$} ${K+B} ${f-I} ${U} ${f} ${U} c`,"h"),G?Y.push("B"):Y.push("S"),[W[0],W[7],W[2],W[3]]}})}}};tX=class tX extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;this.data.annotationType=N8.POLYLINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.vertices=null,this instanceof eX||(this.setLineEndings(q.getArray("LE")),this.data.lineEndings=this.lineEndings);let z=q.getArray("Vertices");if(!e8(z,null))return;let R=this.data.vertices=Float32Array.from(z);if(!this.appearance){let G=g8(this.color,[0,0,0]),P=q.get("CA"),Q,Y=v5(q.getArray("IC"),null);Y&&(Y=g8(Y)),Q=Y?this.color?Y.every((J,U)=>J===G[U])?"f":"B":"f":"S";let W=this.borderStyle.width||1,$=2*W,_=[1/0,1/0,-1/0,-1/0];for(let J=0,U=R.length;J<U;J+=2)h1.rectBoundingBox(R[J]-$,R[J+1]-$,R[J]+$,R[J+1]+$,_);h1.intersect(this.rectangle,_)||(this.rectangle=_),this._setDefaultAppearance({xref:X,extra:`${W} w`,strokeColor:G,strokeAlpha:P,fillColor:Y,fillAlpha:Y?P:null,pointsCallback:(J,U)=>{for(let f=0,K=R.length;f<K;f+=2)J.push(`${R[f]} ${R[f+1]} ${f===0?"m":"l"}`);return J.push(Q),[U[0],U[7],U[2],U[3]]}})}}};eX=class eX extends tX{constructor(Z){super(Z),this.data.annotationType=N8.POLYGON}};cU=class cU extends z0{constructor(Z){super(Z),this.data.annotationType=N8.CARET}};i5=class i5 extends z0{constructor(Z){super(Z),this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1;let{dict:q,xref:X}=Z;this.data.annotationType=N8.INK,this.data.inkLists=[],this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1,this.data.opacity=q.get("CA")||1;let z=q.getArray("InkList");if(Array.isArray(z)){for(let R=0,G=z.length;R<G;++R){if(!Array.isArray(z[R]))continue;let P=new Float32Array(z[R].length);this.data.inkLists.push(P);for(let Q=0,Y=z[R].length;Q<Y;Q+=2){let W=X.fetchIfRef(z[R][Q]),$=X.fetchIfRef(z[R][Q+1]);typeof W=="number"&&typeof $=="number"&&(P[Q]=W,P[Q+1]=$)}}if(!this.appearance){let R=g8(this.color,[0,0,0]),G=q.get("CA"),P=this.borderStyle.width||1,Q=2*P,Y=[1/0,1/0,-1/0,-1/0];for(let W of this.data.inkLists)for(let $=0,_=W.length;$<_;$+=2)h1.rectBoundingBox(W[$]-Q,W[$+1]-Q,W[$]+Q,W[$+1]+Q,Y);h1.intersect(this.rectangle,Y)||(this.rectangle=Y),this._setDefaultAppearance({xref:X,extra:`${P} w`,strokeColor:R,strokeAlpha:G,pointsCallback:(W,$)=>{for(let _ of this.data.inkLists){for(let J=0,U=_.length;J<U;J+=2)W.push(`${_[J]} ${_[J+1]} ${J===0?"m":"l"}`);W.push("S")}return[$[0],$[7],$[2],$[3]]}})}}}static createNewDict(Z,q,{apRef:X,ap:z}){let{oldAnnotation:R,color:G,date:P,opacity:Q,paths:Y,outlines:W,rect:$,rotation:_,thickness:J,user:U}=Z,f=R||new S(q);if(f.setIfNotExists("Type",t.get("Annot")),f.setIfNotExists("Subtype",t.get("Ink")),f.set(R?"M":"CreationDate",`D:${m5(P)}`),f.setIfArray("Rect",$),f.setIfArray("InkList",W?.points||Y?.points),f.setIfNotExists("F",4),f.setIfNumber("Rotate",_),f.setIfDefined("T",x0(U)),W&&f.setIfName("IT","InkHighlight"),J>0){let K=new S(q);f.set("BS",K),K.set("W",J)}if(f.setIfArray("C",g8(G)),f.setIfNumber("CA",Q),z||X){let K=new S(q);f.set("AP",K),K.set("N",X||z)}return f}static async createNewAppearanceStream(Z,q,X){if(Z.outlines)return this.createNewAppearanceStreamForHighlight(Z,q,X);let{color:z,rect:R,paths:G,thickness:P,opacity:Q}=Z;if(!z)return null;let Y=[`${P} w 1 J 1 j`,`${q4(z,!1)}`];Q!==1&&Y.push("/R0 gs");for(let J of G.lines){Y.push(`${O1(J[4])} ${O1(J[5])} m`);for(let U=6,f=J.length;U<f;U+=6)if(isNaN(J[U]))Y.push(`${O1(J[U+4])} ${O1(J[U+5])} l`);else{let[K,I,B,j,V,x]=J.slice(U,U+6);Y.push([K,I,B,j,V,x].map(O1).join(" ")+" c")}J.length===6&&Y.push(`${O1(J[4])} ${O1(J[5])} l`)}Y.push("S");let W=Y.join(`
|
|
46
|
-
`),$=new S(q);if($.set("FormType",1),$.setIfName("Subtype","Form"),$.setIfName("Type","XObject"),$.set("BBox",R),$.set("Length",W.length),Q!==1){let J=new S(q),U=new S(q),f=new S(q);f.set("CA",Q),f.setIfName("Type","ExtGState"),U.set("R0",f),J.set("ExtGState",U),$.set("Resources",J)}let _=new o8(W);return _.dict=$,_}static async createNewAppearanceStreamForHighlight(Z,q,X){let{color:z,rect:R,outlines:{outline:G},opacity:P}=Z;if(!z)return null;let Q=[`${q4(z,!0)}`,"/R0 gs"];Q.push(`${O1(G[4])} ${O1(G[5])} m`);for(let f=6,K=G.length;f<K;f+=6)if(isNaN(G[f]))Q.push(`${O1(G[f+4])} ${O1(G[f+5])} l`);else{let[I,B,j,V,x,M]=G.slice(f,f+6);Q.push([I,B,j,V,x,M].map(O1).join(" ")+" c")}Q.push("h f");let Y=Q.join(`
|
|
47
|
-
`),W=new S(q);W.set("FormType",1),W.setIfName("Subtype","Form"),W.setIfName("Type","XObject"),W.set("BBox",R),W.set("Length",Y.length);let $=new S(q),_=new S(q);$.set("ExtGState",_),W.set("Resources",$);let J=new S(q);_.set("R0",J),J.setIfName("BM","Multiply"),P!==1&&(J.set("ca",P),J.setIfName("Type","ExtGState"));let U=new o8(Y);return U.dict=W,U}};t2=class t2 extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;if(this.data.annotationType=N8.HIGHLIGHT,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1,this.data.opacity=q.get("CA")||1,this.data.quadPoints=R2(q,null)){let z=this.appearance?.dict.get("Resources");if(!this.appearance||!z?.has("ExtGState")){this.appearance&&v("HighlightAnnotation - ignoring built-in appearance stream.");let R=g8(this.color,[1,1,0]),G=q.get("CA");this._setDefaultAppearance({xref:X,fillColor:R,blendMode:"Multiply",fillAlpha:G,pointsCallback:(P,Q)=>(P.push(`${Q[0]} ${Q[1]} m`,`${Q[2]} ${Q[3]} l`,`${Q[6]} ${Q[7]} l`,`${Q[4]} ${Q[5]} l`,"f"),[Q[0],Q[7],Q[2],Q[3]])})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}static createNewDict(Z,q,{apRef:X,ap:z}){let{color:R,date:G,oldAnnotation:P,opacity:Q,rect:Y,rotation:W,user:$,quadPoints:_}=Z,J=P||new S(q);if(J.setIfNotExists("Type",t.get("Annot")),J.setIfNotExists("Subtype",t.get("Highlight")),J.set(P?"M":"CreationDate",`D:${m5(G)}`),J.setIfArray("Rect",Y),J.setIfNotExists("F",4),J.setIfNotExists("Border",[0,0,0]),J.setIfNumber("Rotate",W),J.setIfArray("QuadPoints",_),J.setIfArray("C",g8(R)),J.setIfNumber("CA",Q),J.setIfDefined("T",x0($)),X||z){let U=new S(q);J.set("AP",U),U.set("N",X||z)}return J}static async createNewAppearanceStream(Z,q,X){let{color:z,rect:R,outlines:G,opacity:P}=Z;if(!z)return null;let Q=[`${q4(z,!0)}`,"/R0 gs"],Y=[];for(let K of G){Y.length=0,Y.push(`${O1(K[0])} ${O1(K[1])} m`);for(let I=2,B=K.length;I<B;I+=2)Y.push(`${O1(K[I])} ${O1(K[I+1])} l`);Y.push("h"),Q.push(Y.join(`
|
|
48
|
-
`))}Q.push("f*");let W=Q.join(`
|
|
49
|
-
`),$=new S(q);$.set("FormType",1),$.setIfName("Subtype","Form"),$.setIfName("Type","XObject"),$.set("BBox",R),$.set("Length",W.length);let _=new S(q),J=new S(q);_.set("ExtGState",J),$.set("Resources",_);let U=new S(q);J.set("R0",U),U.setIfName("BM","Multiply"),P!==1&&(U.set("ca",P),U.setIfName("Type","ExtGState"));let f=new o8(W);return f.dict=$,f}};hU=class hU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;if(this.data.annotationType=N8.UNDERLINE,this.data.quadPoints=R2(q,null)){if(!this.appearance){let z=g8(this.color,[0,0,0]),R=q.get("CA");this._setDefaultAppearance({xref:X,extra:"[] 0 d 0.571 w",strokeColor:z,strokeAlpha:R,pointsCallback:(G,P)=>(G.push(`${P[4]} ${P[5]+1.3} m`,`${P[6]} ${P[7]+1.3} l`,"S"),[P[0],P[7],P[2],P[3]])})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}};sU=class sU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;if(this.data.annotationType=N8.SQUIGGLY,this.data.quadPoints=R2(q,null)){if(!this.appearance){let z=g8(this.color,[0,0,0]),R=q.get("CA");this._setDefaultAppearance({xref:X,extra:"[] 0 d 1 w",strokeColor:z,strokeAlpha:R,pointsCallback:(G,P)=>{let Q=(P[1]-P[5])/6,Y=Q,W=P[4],$=P[5],_=P[6];G.push(`${W} ${$+Y} m`);do W+=2,Y=Y===0?Q:0,G.push(`${W} ${$+Y} l`);while(W<_);return G.push("S"),[P[4],$-2*Q,_,$+2*Q]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}};rU=class rU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z;if(this.data.annotationType=N8.STRIKEOUT,this.data.quadPoints=R2(q,null)){if(!this.appearance){let z=g8(this.color,[0,0,0]),R=q.get("CA");this._setDefaultAppearance({xref:X,extra:"[] 0 d 1 w",strokeColor:z,strokeAlpha:R,pointsCallback:(G,P)=>(G.push((P[0]+P[4])/2+" "+(P[1]+P[5])/2+" m",(P[2]+P[6])/2+" "+(P[3]+P[7])/2+" l","S"),[P[0],P[7],P[2],P[3]])})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}};J5=class J5 extends z0{#Z=null;constructor(Z){super(Z),this.data.annotationType=N8.STAMP,this.data.hasOwnCanvas=this.data.noRotate,this.data.isEditable=!this.data.noHTML,this.data.noHTML=!1}mustBeViewedWhenEditing(Z,q=null){return Z?!this.data.isEditable||(this.#Z??=this.data.hasOwnCanvas,this.data.hasOwnCanvas=!0,!0):(this.#Z!==null&&(this.data.hasOwnCanvas=this.#Z,this.#Z=null),!q?.has(this.data.id))}static async createImage(Z,q){let{width:X,height:z}=Z,R=new OffscreenCanvas(X,z),G=R.getContext("2d",{alpha:!0});G.drawImage(Z,0,0);let P=G.getImageData(0,0,X,z).data,Q=new Uint32Array(P.buffer),Y=Q.some(Z0.isLittleEndian?(f)=>f>>>24!=255:(f)=>!!(255&~f));Y&&(G.fillStyle="white",G.fillRect(0,0,X,z),G.drawImage(Z,0,0));let W=R.convertToBlob({type:"image/jpeg",quality:1}).then((f)=>f.arrayBuffer()),$=t.get("XObject"),_=t.get("Image"),J=new S(q);J.set("Type",$),J.set("Subtype",_),J.set("BitsPerComponent",8),J.setIfName("ColorSpace","DeviceRGB"),J.setIfName("Filter","DCTDecode"),J.set("BBox",[0,0,X,z]),J.set("Width",X),J.set("Height",z);let U=null;if(Y){let f=new Uint8Array(Q.length);if(Z0.isLittleEndian)for(let I=0,B=Q.length;I<B;I++)f[I]=Q[I]>>>24;else for(let I=0,B=Q.length;I<B;I++)f[I]=255&Q[I];let K=new S(q);K.set("Type",$),K.set("Subtype",_),K.set("BitsPerComponent",8),K.setIfName("ColorSpace","DeviceGray"),K.set("Width",X),K.set("Height",z),U=new W8(f,0,0,K)}return{imageStream:new W8(await W,0,0,J),smaskStream:U,width:X,height:z}}static createNewDict(Z,q,{apRef:X,ap:z}){let{date:R,oldAnnotation:G,rect:P,rotation:Q,user:Y}=Z,W=G||new S(q);if(W.setIfNotExists("Type",t.get("Annot")),W.setIfNotExists("Subtype",t.get("Stamp")),W.set(G?"M":"CreationDate",`D:${m5(R)}`),W.setIfArray("Rect",P),W.setIfNotExists("F",4),W.setIfNotExists("Border",[0,0,0]),W.setIfNumber("Rotate",Q),W.setIfDefined("T",x0(Y)),X||z){let $=new S(q);W.set("AP",$),$.set("N",X||z)}return W}static async#q(Z,q){let{areContours:X,color:z,rect:R,lines:G,thickness:P}=Z;if(!z)return null;let Q=[`${P} w 1 J 1 j`,`${q4(z,X)}`];for(let _ of G){Q.push(`${O1(_[4])} ${O1(_[5])} m`);for(let J=6,U=_.length;J<U;J+=6)if(isNaN(_[J]))Q.push(`${O1(_[J+4])} ${O1(_[J+5])} l`);else{let[f,K,I,B,j,V]=_.slice(J,J+6);Q.push([f,K,I,B,j,V].map(O1).join(" ")+" c")}_.length===6&&Q.push(`${O1(_[4])} ${O1(_[5])} l`)}Q.push(X?"F":"S");let Y=Q.join(`
|
|
50
|
-
`),W=new S(q);W.set("FormType",1),W.setIfName("Subtype","Form"),W.setIfName("Type","XObject"),W.set("BBox",R),W.set("Length",Y.length);let $=new o8(Y);return $.dict=W,$}static async createNewAppearanceStream(Z,q,X){if(Z.oldAnnotation)return null;if(Z.isSignature)return this.#q(Z,q);let{rotation:z}=Z,{imageRef:R,width:G,height:P}=X.image,Q=new S(q),Y=new S(q);Q.set("XObject",Y),Y.set("Im0",R);let W=`q ${G} 0 0 ${P} 0 0 cm /Im0 Do Q`,$=new S(q);if($.set("FormType",1),$.setIfName("Subtype","Form"),$.setIfName("Type","XObject"),$.set("BBox",[0,0,G,P]),$.set("Resources",Q),z){let J=M3(z,G,P);$.set("Matrix",J)}let _=new o8(W);return _.dict=$,_}};lU=class lU extends z0{constructor(Z){super(Z);let{dict:q,xref:X}=Z,z=new F3(q.get("FS"),X);this.data.annotationType=N8.FILEATTACHMENT,this.data.hasOwnCanvas=this.data.noRotate,this.data.noHTML=!1,this.data.file=z.serializable;let R=q.get("Name");this.data.name=R instanceof t?E1(R.name):"PushPin";let G=q.get("ca");this.data.fillAlpha=typeof G=="number"&&G>=0&&G<=1?G:null}};pV={get r(){return X1(this,"r",new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]))},get k(){return X1(this,"k",new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]))}};oU=class oU extends Z2{constructor(Z){super(Z),this.node=null}onEndElement(Z){let q=super.onEndElement(Z);if(q&&Z==="xfa:datasets")throw this.node=q,Error("Aborting DatasetXMLParser.")}};DV={get k(){return X1(this,"k",[new G1(1116352408,3609767458),new G1(1899447441,602891725),new G1(3049323471,3964484399),new G1(3921009573,2173295548),new G1(961987163,4081628472),new G1(1508970993,3053834265),new G1(2453635748,2937671579),new G1(2870763221,3664609560),new G1(3624381080,2734883394),new G1(310598401,1164996542),new G1(607225278,1323610764),new G1(1426881987,3590304994),new G1(1925078388,4068182383),new G1(2162078206,991336113),new G1(2614888103,633803317),new G1(3248222580,3479774868),new G1(3835390401,2666613458),new G1(4022224774,944711139),new G1(264347078,2341262773),new G1(604807628,2007800933),new G1(770255983,1495990901),new G1(1249150122,1856431235),new G1(1555081692,3175218132),new G1(1996064986,2198950837),new G1(2554220882,3999719339),new G1(2821834349,766784016),new G1(2952996808,2566594879),new G1(3210313671,3203337956),new G1(3336571891,1034457026),new G1(3584528711,2466948901),new G1(113926993,3758326383),new G1(338241895,168717936),new G1(666307205,1188179964),new G1(773529912,1546045734),new G1(1294757372,1522805485),new G1(1396182291,2643833823),new G1(1695183700,2343527390),new G1(1986661051,1014477480),new G1(2177026350,1206759142),new G1(2456956037,344077627),new G1(2730485921,1290863460),new G1(2820302411,3158454273),new G1(3259730800,3505952657),new G1(3345764771,106217008),new G1(3516065817,3606008344),new G1(3600352804,1432725776),new G1(4094571909,1467031594),new G1(275423344,851169720),new G1(430227734,3100823752),new G1(506948616,1363258195),new G1(659060556,3750685593),new G1(883997877,3785050280),new G1(958139571,3318307427),new G1(1322822218,3812723403),new G1(1537002063,2003034995),new G1(1747873779,3602036899),new G1(1955562222,1575990012),new G1(2024104815,1125592928),new G1(2227730452,2716904306),new G1(2361852424,442776044),new G1(2428436474,593698344),new G1(2756734187,3733110249),new G1(3204031479,2999351573),new G1(3329325298,3815920427),new G1(3391569614,3928383900),new G1(3515267271,566280711),new G1(3940187606,3454069534),new G1(4118630271,4000239992),new G1(116418474,1914138554),new G1(174292421,2731055270),new G1(289380356,3203993006),new G1(460393269,320620315),new G1(685471733,587496836),new G1(852142971,1086792851),new G1(1017036298,365543100),new G1(1126000580,2618297676),new G1(1288033470,3409855158),new G1(1501505948,4234509866),new G1(1607167915,987167468),new G1(1816402316,1246189591)])}};sV={get k(){return X1(this,"k",[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])}};eU=class eU extends a8{constructor(Z,q,X){super(q),this.str=Z,this.dict=Z.dict,this.decrypt=X,this.nextChunk=null,this.initialized=!1}readBlock(){let Z;if(this.initialized?Z=this.nextChunk:(Z=this.str.getBytes(512),this.initialized=!0),!Z?.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512);let q=this.nextChunk?.length>0;Z=(0,this.decrypt)(Z,!q);let X=this.bufferLength,z=X+Z.length;this.ensureBuffer(z).set(Z,X),this.bufferLength=z}};Zz=class Zz extends T9{_rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]);constructor(Z){super(),this._cyclesOfRepetition=10,this._keySize=160,this._key=this._expandKey(Z)}_expandKey(Z){let q=this._s,X=this._rcon,z=new Uint8Array(176);z.set(Z);for(let R=16,G=1;R<176;++G){let P=z[R-3],Q=z[R-2],Y=z[R-1],W=z[R-4];P=q[P],Q=q[Q],Y=q[Y],W=q[W],P^=X[G];for(let $=0;$<4;++$)z[R]=P^=z[R-16],R++,z[R]=Q^=z[R-16],R++,z[R]=Y^=z[R-16],R++,z[R]=W^=z[R-16],R++}return z}};r3=class r3 extends T9{constructor(Z){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(Z)}_expandKey(Z){let q=this._s,X=new Uint8Array(240);X.set(Z);let z,R,G,P,Q=1;for(let Y=32,W=1;Y<240;++W){Y%32==16?(z=q[z],R=q[R],G=q[G],P=q[P]):Y%32==0&&(z=X[Y-3],R=X[Y-2],G=X[Y-1],P=X[Y-4],z=q[z],R=q[R],G=q[G],P=q[P],z^=Q,(Q<<=1)>=256&&(Q=255&(27^Q)));for(let $=0;$<4;++$)X[Y]=z^=X[Y-32],Y++,X[Y]=R^=X[Y-32],Y++,X[Y]=G^=X[Y-32],Y++,X[Y]=P^=X[Y-32],Y++}return X}};qf=class qf extends qz{_hash(Z,q,X){return vq(q,0,q.length)}};Xf=class Xf extends qz{_hash(Z,q,X){let z=vq(q,0,q.length).subarray(0,32),R=[0],G=0;for(;G<64||R.at(-1)>G-32;){let P=Z.length+z.length+X.length,Q=new Uint8Array(P),Y=0;Q.set(Z,Y),Y+=Z.length,Q.set(z,Y),Y+=z.length,Q.set(X,Y);let W=new Uint8Array(64*P);for(let _=0,J=0;_<64;_++,J+=P)W.set(Q,J);R=new Zz(z.subarray(0,16)).encrypt(W,z.subarray(16,32));let $=Math.sumPrecise(R.slice(0,16))%3;$===0?z=vq(R,0,R.length):$===1?z=hV(R,0,R.length):$===2&&(z=tU(R,0,R.length)),G++}return z.subarray(0,32)}};tV=[0,0,612,792];QG=new Uint8Array([37,80,68,70,45]),YG=new Uint8Array([115,116,97,114,116,120,114,101,102]),eV=new Uint8Array([101,110,100,111,98,106]);mq=class mq extends zz{constructor(Z){super(Z);let q=new W8(Z.source);this.pdfDocument=new Xz(this,q),this._loadedStreamPromise=Promise.resolve(q)}async ensure(Z,q,X){let z=Z[q];return typeof z=="function"?z.apply(Z,X):z}requestRange(Z,q){return Promise.resolve()}requestLoadedStream(Z=!1){return this._loadedStreamPromise}terminate(Z){}};Rf=class Rf extends zz{constructor(Z){super(Z),this.streamManager=new wP(Z.source,{msgHandler:Z.handler,length:Z.length,disableAutoFetch:Z.disableAutoFetch,rangeChunkSize:Z.rangeChunkSize}),this.pdfDocument=new Xz(this,this.streamManager.getStream())}async ensure(Z,q,X){try{let z=Z[q];return typeof z=="function"?z.apply(Z,X):z}catch(z){if(!(z instanceof X8))throw z;return await this.requestRange(z.begin,z.end),this.ensure(Z,q,X)}}requestRange(Z,q){return this.streamManager.requestRange(Z,q)}requestLoadedStream(Z=!1){return this.streamManager.requestAllChunks(Z)}sendProgressiveData(Z){this.streamManager.onReceiveData({chunk:Z})}terminate(Z){this.streamManager.abort(Z)}};Jf=class Jf{static{typeof window>"u"&&!XB&&typeof self<"u"&&typeof self.postMessage=="function"&&"onmessage"in self&&this.initializeFromPort(self)}static setup(Z,q){let X=!1;Z.on("test",(z)=>{X||(X=!0,Z.send("test",z instanceof Uint8Array))}),Z.on("configure",(z)=>{var R;R=z.verbosity,Number.isInteger(R)&&(I3=R)}),Z.on("GetDocRequest",(z)=>this.createDocumentHandler(z,q))}static createDocumentHandler(Z,q){let X,z=!1,R=null,G=new Set,P=I3,{docId:Q,apiVersion:Y}=Z,W="5.4.296";if(Y!==W)throw Error(`The API version "${Y}" does not match the Worker version "${W}".`);let $=(j,V)=>`The \`${j}.prototype\` contains unexpected enumerable property "${V}", thus breaking e.g. \`for...in\` iteration of ${j}s.`;for(let j in{})throw Error($("Object",j));for(let j in[])throw Error($("Array",j));let _=Q+"_worker",J=new IG(_,Q,q);function U(){if(z)throw Error("Worker was terminated")}function f(j){G.add(j)}function K(j){j.finish(),G.delete(j)}async function I(j){await X.ensureDoc("checkHeader"),await X.ensureDoc("parseStartXRef"),await X.ensureDoc("parse",[j]),await X.ensureDoc("checkFirstPage",[j]),await X.ensureDoc("checkLastPage",[j]);let V=await X.ensureDoc("isPureXfa");if(V){let H=new W4("loadXfaResources");f(H),await X.ensureDoc("loadXfaResources",[J,H]),K(H)}let[x,M]=await Promise.all([X.ensureDoc("numPages"),X.ensureDoc("fingerprints")]);return{numPages:x,fingerprints:M,htmlForXfa:V?await X.ensureDoc("htmlForXfa"):null}}function B(j){function V(H){U(),J.send("GetDoc",{pdfInfo:H})}function x(H){if(U(),H instanceof L7){let A=new W4(`PasswordException: response ${H.code}`);f(A),J.sendWithPromise("PasswordRequest",H).then(function({password:T}){K(A),X.updatePassword(T),M()}).catch(function(){K(A),J.send("DocException",H)})}else J.send("DocException",K0(H))}function M(){U(),I(!1).then(V,function(H){U(),H instanceof L5?X.requestLoadedStream().then(function(){U(),I(!0).then(V,x)}):x(H)})}U(),async function({data:H,password:A,disableAutoFetch:T,rangeChunkSize:k,length:y,docBaseUrl:O,enableXfa:D,evaluatorOptions:n}){let b={source:null,disableAutoFetch:T,docBaseUrl:O,docId:Q,enableXfa:D,evaluatorOptions:n,handler:J,length:y,password:A,rangeChunkSize:k};if(H)return b.source=H,new mq(b);let l=new Wf(J),N=l.getFullReader(),L=Promise.withResolvers(),m,d=[],e=0;return N.headersReady.then(function(){if(N.isRangeSupported){b.source=l,b.length=N.contentLength,b.disableAutoFetch||=N.isStreamingSupported,m=new Rf(b);for(let E of d)m.sendProgressiveData(E);d=[],L.resolve(m),R=null}}).catch(function(E){L.reject(E),R=null}),new Promise(function(E,p){let F=function({value:s,done:w}){try{if(U(),w){if(!m){let c=MP(d);d=[],y&&c.length!==y&&v("reported HTTP length is different from actual"),b.source=c,m=new mq(b),L.resolve(m)}return void(R=null)}e+=s.byteLength,N.isStreamingSupported||J.send("DocProgress",{loaded:e,total:Math.max(e,N.contentLength||0)}),m?m.sendProgressiveData(s):d.push(s),N.read().then(F,p)}catch(c){p(c)}};N.read().then(F,p)}).catch(function(E){L.reject(E),R=null}),R=(E)=>{l.cancelAllRequests(E)},L.promise}(j).then(function(H){if(z)throw H.terminate(new p8("Worker was terminated.")),Error("Worker was terminated");X=H,X.requestLoadedStream(!0).then((A)=>{J.send("DataLoaded",{length:A.bytes.byteLength})})}).then(M,x)}return J.on("GetPage",function(j){return X.getPage(j.pageIndex).then(function(V){return Promise.all([X.ensure(V,"rotate"),X.ensure(V,"ref"),X.ensure(V,"userUnit"),X.ensure(V,"view")]).then(function([x,M,H,A]){return{rotate:x,ref:M,refStr:M?.toString()??null,userUnit:H,view:A}})})}),J.on("GetPageIndex",function(j){let V=P1.get(j.num,j.gen);return X.ensureCatalog("getPageIndex",[V])}),J.on("GetDestinations",function(j){return X.ensureCatalog("destinations")}),J.on("GetDestination",function(j){return X.ensureCatalog("getDestination",[j.id])}),J.on("GetPageLabels",function(j){return X.ensureCatalog("pageLabels")}),J.on("GetPageLayout",function(j){return X.ensureCatalog("pageLayout")}),J.on("GetPageMode",function(j){return X.ensureCatalog("pageMode")}),J.on("GetViewerPreferences",function(j){return X.ensureCatalog("viewerPreferences")}),J.on("GetOpenAction",function(j){return X.ensureCatalog("openAction")}),J.on("GetAttachments",function(j){return X.ensureCatalog("attachments")}),J.on("GetDocJSActions",function(j){return X.ensureCatalog("jsActions")}),J.on("GetPageJSActions",function({pageIndex:j}){return X.getPage(j).then((V)=>X.ensure(V,"jsActions"))}),J.on("GetAnnotationsByType",async function({types:j,pageIndexesToSkip:V}){let[x,M]=await Promise.all([X.ensureDoc("numPages"),X.ensureDoc("annotationGlobals")]);if(!M)return null;let H=[],A=[],T=null;try{for(let k=0,y=x;k<y;k++)V?.has(k)||(T||(T=new W4("GetAnnotationsByType"),f(T)),H.push(X.getPage(k).then(async(O)=>O&&O.collectAnnotationsByType(J,T,j,A,M)||[])));return await Promise.all(H),(await Promise.all(A)).filter((k)=>!!k)}finally{T&&K(T)}}),J.on("GetOutline",function(j){return X.ensureCatalog("documentOutline")}),J.on("GetOptionalContentConfig",function(j){return X.ensureCatalog("optionalContentConfig")}),J.on("GetPermissions",function(j){return X.ensureCatalog("permissions")}),J.on("GetMetadata",function(j){return Promise.all([X.ensureDoc("documentInfo"),X.ensureCatalog("metadata")])}),J.on("GetMarkInfo",function(j){return X.ensureCatalog("markInfo")}),J.on("GetData",function(j){return X.requestLoadedStream().then((V)=>V.bytes)}),J.on("GetAnnotations",function({pageIndex:j,intent:V}){return X.getPage(j).then(function(x){let M=new W4(`GetAnnotations: page ${j}`);return f(M),x.getAnnotationsData(J,M,V).then((H)=>(K(M),H),(H)=>{throw K(M),H})})}),J.on("GetFieldObjects",function(j){return X.ensureDoc("fieldObjects").then((V)=>V?.allFields||null)}),J.on("HasJSActions",function(j){return X.ensureDoc("hasJSActions")}),J.on("GetCalculationOrderIds",function(j){return X.ensureDoc("calculationOrderIds")}),J.on("SaveDocument",async function({isPureXfa:j,numPages:V,annotationStorage:x,filename:M}){let H=[X.requestLoadedStream(),X.ensureCatalog("acroForm"),X.ensureCatalog("acroFormRef"),X.ensureDoc("startXRef"),X.ensureDoc("xref"),X.ensureCatalog("structTreeRoot")],A=new t8,T=[],k=j?null:kP(x),[y,O,D,n,b,l]=await Promise.all(H),N=b.trailer.getRaw("Root")||null,L;if(k){l?await l.canUpdateStructTree({pdfManager:X,newAnnotationsByPage:k})&&(L=l):await c4.canCreateStructureTree({catalogRef:N,pdfManager:X,newAnnotationsByPage:k})&&(L=null);let w=Z4.generateImages(x.values(),b,X.evaluatorOptions.isOffscreenCanvasSupported),c=L===void 0?T:[];for(let[o,Q1]of k)c.push(X.getPage(o).then((r)=>{let q1=new W4(`Save (editor): page ${o}`);return f(q1),r.saveNewAnnotations(J,q1,Q1,w,A).finally(function(){K(q1)})}));L===null?T.push(Promise.all(c).then(async()=>{await c4.createStructureTree({newAnnotationsByPage:k,xref:b,catalogRef:N,pdfManager:X,changes:A})})):L&&T.push(Promise.all(c).then(async()=>{await L.updateStructureTree({newAnnotationsByPage:k,pdfManager:X,changes:A})}))}if(j)T.push(X.ensureDoc("serializeXfaData",[x]));else for(let w=0;w<V;w++)T.push(X.getPage(w).then(function(c){let o=new W4(`Save: page ${w}`);return f(o),c.save(J,o,x,A).finally(function(){K(o)})}));let m=await Promise.all(T),d=null;if(j){if(d=m[0],!d)return y.bytes}else if(A.size===0)return y.bytes;let e=D&&O instanceof S&&A.values().some((w)=>w.needAppearances),E=O instanceof S&&O.get("XFA")||null,p=null,F=!1;if(Array.isArray(E)){for(let w=0,c=E.length;w<c;w+=2)E[w]==="datasets"&&(p=E[w+1],F=!0);p===null&&(p=b.getNewTemporaryRef())}else E&&v("Unsupported XFA type.");let s=Object.create(null);if(b.trailer){let w=new Map,c=b.trailer.get("Info")||null;if(c instanceof S)for(let[o,Q1]of c)typeof Q1=="string"&&w.set(o,E1(Q1));s={rootRef:N,encryptRef:b.trailer.getRaw("Encrypt")||null,newRef:b.getNewTemporaryRef(),infoRef:b.trailer.getRaw("Info")||null,infoMap:w,fileIds:b.trailer.get("ID")||null,startXRef:n,filename:M}}return qH({originalData:y.bytes,xrefInfo:s,changes:A,xref:b,hasXfa:!!E,xfaDatasetsRef:p,hasXfaDatasetsEntry:F,needAppearances:e,acroFormRef:D,acroForm:O,xfaData:d,useXrefStream:HP(b.topDict,"XRef")}).finally(()=>{b.resetNewTemporaryRef()})}),J.on("GetOperatorList",function(j,V){let x=j.pageIndex;X.getPage(x).then(function(M){let H=new W4(`GetOperatorList: page ${x}`);f(H);let A=P>=kZ?Date.now():0;M.getOperatorList({handler:J,sink:V,task:H,intent:j.intent,cacheKey:j.cacheKey,annotationStorage:j.annotationStorage,modifiedIds:j.modifiedIds}).then(function(T){K(H),A&&v1(`page=${x+1} - getOperatorList: time=${Date.now()-A}ms, len=${T.length}`),V.close()},function(T){K(H),H.terminated||V.error(T)})})}),J.on("GetTextContent",function(j,V){let{pageIndex:x,includeMarkedContent:M,disableNormalization:H}=j;X.getPage(x).then(function(A){let T=new W4("GetTextContent: page "+x);f(T);let k=P>=kZ?Date.now():0;A.extractTextContent({handler:J,task:T,sink:V,includeMarkedContent:M,disableNormalization:H}).then(function(){K(T),k&&v1(`page=${x+1} - getTextContent: time=`+(Date.now()-k)+"ms"),V.close()},function(y){K(T),T.terminated||V.error(y)})})}),J.on("GetStructTree",function(j){return X.getPage(j.pageIndex).then((V)=>X.ensure(V,"getStructTree"))}),J.on("FontFallback",function(j){return X.fontFallback(j.id,J)}),J.on("Cleanup",function(j){return X.cleanup(!0)}),J.on("Terminate",function(j){z=!0;let V=[];if(X){X.terminate(new p8("Worker was terminated."));let x=X.cleanup();V.push(x),X=null}else LX();R?.(new p8("Worker was terminated."));for(let x of G)V.push(x.finished),x.terminate();return Promise.all(V).then(function(){J.destroy(),J=null})}),J.on("Ready",function(j){B(Z),Z=null}),_}static initializeFromPort(Z){let q=new IG("worker","main",Z);this.setup(q,Z),q.send("ready",null)}};globalThis.pdfjsWorker={WorkerMessageHandler:Jf};R0=!(typeof process!="object"||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type!=="browser"),Oq=[0.001,0,0,0.001,0,0],j4={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},m1={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},s1={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_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},Uf={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},H7={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},V8={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},G2={ERRORS:0,WARNINGS:1,INFOS:5},T6={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,rawFillPath:94},Kf={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},C9=G2.WARNINGS;u5=function(){function Z(q,X){this.message=q,this.name=X}return Z.prototype=Error(),Z.constructor=Z,Z}();yq=class yq extends u5{constructor(Z,q){super(Z,"PasswordException"),this.code=q}};Z3=class Z3 extends u5{constructor(Z,q){super(Z,"UnknownErrorException"),this.details=q}};s7=class s7 extends u5{constructor(Z){super(Z,"InvalidPDFException")}};N6=class N6 extends u5{constructor(Z,q,X){super(Z,"ResponseException"),this.status=q,this.missing=X}};Bf=class Bf extends u5{constructor(Z){super(Z,"FormatError")}};P4=class P4 extends u5{constructor(Z){super(Z,"AbortException")}};IZ=Array.from(Array(256).keys(),(Z)=>Z.toString(16).padStart(2,"0"));typeof Promise.try!="function"&&(Promise.try=function(Z,...q){return new Promise((X)=>{X(Z(...q))})}),typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(Z){return Z.reduce((q,X)=>q+X,0)});n4=class n4{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF};Y2=class Y2 extends u5{constructor(Z,q=0){super(Z,"RenderingCancelledException"),this.extraDelay=q}};o3=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];NG=new Map;Jz=class Jz{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){let Z=new Map([["CanvasText",null],["Canvas",null]]);return function(q){let X=document.createElement("span");X.style.visibility="hidden",X.style.colorScheme="only light",document.body.append(X);for(let z of q.keys()){X.style.color=z;let R=window.getComputedStyle(X).color;q.set(z,C6(R))}X.remove()}(Z),D1(this,"_colors",Z)}convert(Z){let q=C6(Z);if(!window.matchMedia("(forced-colors: active)").matches)return q;for(let[X,z]of this._colors)if(z.every((R,G)=>R===q[G]))return Jz._colorsMapping.get(X);return q}getHexCode(Z){let q=this._colors.get(Z);return q?j1.makeHexColor(...q):Z}};k1=class k1{#Z=null;#q=null;#z=null;#X=null;#R=null;#G=!1;#Q=null;#P="";#Y=null;#W=null;#J=null;#_=null;#U=null;#B="";#K=!1;#$=null;#f=!1;#I=!1;#V=!1;#j=null;#k=0;#A=0;#H=null;#N=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#M=!1;#L=k1._zIndex++;static _borderLineWidth=-1;static _colorManager=new Jz;static _zIndex=1;static _telemetryTimeout=1000;static get _resizerKeyboardManager(){let Z=k1.prototype._resizeWithKeyboard,q=C4.TRANSLATE_SMALL,X=C4.TRANSLATE_BIG;return D1(this,"_resizerKeyboardManager",new p6([[["ArrowLeft","mac+ArrowLeft"],Z,{args:[-q,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Z,{args:[-X,0]}],[["ArrowRight","mac+ArrowRight"],Z,{args:[q,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Z,{args:[X,0]}],[["ArrowUp","mac+ArrowUp"],Z,{args:[0,-q]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Z,{args:[0,-X]}],[["ArrowDown","mac+ArrowDown"],Z,{args:[0,q]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Z,{args:[0,X]}],[["Escape","mac+Escape"],k1.prototype._stopResizingWithKeyboard]]))}constructor(Z){this.parent=Z.parent,this.id=Z.id,this.width=this.height=null,this.pageIndex=Z.parent.pageIndex,this.name=Z.name,this.div=null,this._uiManager=Z.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=Z.isCentered,this._structTreeParentId=null,this.annotationElementId=Z.annotationElementId||null,this.creationDate=Z.creationDate||new Date,this.modificationDate=Z.modificationDate||null;let{rotation:q,rawDims:{pageWidth:X,pageHeight:z,pageX:R,pageY:G}}=this.parent.viewport;this.rotation=q,this.pageRotation=(360+q-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[X,z],this.pageTranslation=[R,G];let[P,Q]=this.parentDimensions;this.x=Z.x/P,this.y=Z.y/Q,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return D1(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(Z){let q=new vf({id:Z.parent.getNextId(),parent:Z.parent,uiManager:Z._uiManager});q.annotationElementId=Z.annotationElementId,q.deleted=!0,q._uiManager.addToAnnotationStorage(q)}static initialize(Z,q){if(k1._l10n??=Z,k1._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"}),k1._borderLineWidth!==-1)return;let X=getComputedStyle(document.documentElement);k1._borderLineWidth=parseFloat(X.getPropertyValue("--outline-width"))||0}static updateDefaultParams(Z,q){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(Z){return!1}static paste(Z,q){z8("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#M}set _isDraggable(Z){this.#M=Z,this.div?.classList.toggle("draggable",Z)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){let[Z,q]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*q/(2*Z),this.y+=this.width*Z/(2*q);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*q/(2*Z),this.y-=this.width*Z/(2*q);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(Z){this._uiManager.addCommands(Z)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#L}setParent(Z){Z!==null?(this.pageIndex=Z.pageIndex,this.pageDimensions=Z.pageDimensions):(this.#p(),this.#_?.remove(),this.#_=null),this.parent=Z}focusin(Z){this._focusEventsAllowed&&(this.#K?this.#K=!1:this.parent.setSelected(this))}focusout(Z){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;Z.relatedTarget?.closest(`#${this.id}`)||(Z.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(Z,q,X,z){let[R,G]=this.parentDimensions;[X,z]=this.screenToPageTranslation(X,z),this.x=(Z+X)/R,this.y=(q+z)/G,this.fixAndSetPosition()}_moveAfterPaste(Z,q){let[X,z]=this.parentDimensions;this.setAt(Z*X,q*z,this.width*X,this.height*z),this._onTranslated()}#v([Z,q],X,z){[X,z]=this.screenToPageTranslation(X,z),this.x+=X/Z,this.y+=z/q,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(Z,q){this.#v(this.parentDimensions,Z,q)}translateInPage(Z,q){this.#$||=[this.x,this.y,this.width,this.height],this.#v(this.pageDimensions,Z,q),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(Z,q){this.#$||=[this.x,this.y,this.width,this.height];let{div:X,parentDimensions:[z,R]}=this;if(this.x+=Z/z,this.y+=q/R,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:$,y:_}=this.div.getBoundingClientRect();this.parent.findNewParent(this,$,_)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:G,y:P}=this,[Q,Y]=this.getBaseTranslation();G+=Q,P+=Y;let{style:W}=X;W.left=`${(100*G).toFixed(2)}%`,W.top=`${(100*P).toFixed(2)}%`,this._onTranslating(G,P),X.scrollIntoView({block:"nearest"})}_onTranslating(Z,q){}_onTranslated(Z,q){}get _hasBeenMoved(){return!!this.#$&&(this.#$[0]!==this.x||this.#$[1]!==this.y)}get _hasBeenResized(){return!!this.#$&&(this.#$[2]!==this.width||this.#$[3]!==this.height)}getBaseTranslation(){let[Z,q]=this.parentDimensions,{_borderLineWidth:X}=k1,z=X/Z,R=X/q;switch(this.rotation){case 90:return[-z,R];case 180:return[z,R];case 270:return[z,-R];default:return[-z,-R]}}get _mustFixPosition(){return!0}fixAndSetPosition(Z=this.rotation){let{div:{style:q},pageDimensions:[X,z]}=this,{x:R,y:G,width:P,height:Q}=this;if(P*=X,Q*=z,R*=X,G*=z,this._mustFixPosition)switch(Z){case 0:R=l8(R,0,X-P),G=l8(G,0,z-Q);break;case 90:R=l8(R,0,X-Q),G=l8(G,P,z);break;case 180:R=l8(R,P,X),G=l8(G,Q,z);break;case 270:R=l8(R,Q,X),G=l8(G,0,z-P)}this.x=R/=X,this.y=G/=z;let[Y,W]=this.getBaseTranslation();R+=Y,G+=W,q.left=`${(100*R).toFixed(2)}%`,q.top=`${(100*G).toFixed(2)}%`,this.moveInDOM()}static#C(Z,q,X){switch(X){case 90:return[q,-Z];case 180:return[-Z,-q];case 270:return[-q,Z];default:return[Z,q]}}screenToPageTranslation(Z,q){return k1.#C(Z,q,this.parentRotation)}pageTranslationToScreen(Z,q){return k1.#C(Z,q,360-this.parentRotation)}#F(Z){switch(Z){case 90:{let[q,X]=this.pageDimensions;return[0,-q/X,X/q,0]}case 180:return[-1,0,0,-1];case 270:{let[q,X]=this.pageDimensions;return[0,q/X,-X/q,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){let{parentScale:Z,pageDimensions:[q,X]}=this;return[q*Z,X*Z]}setDims(){let{div:{style:Z},width:q,height:X}=this;Z.width=`${(100*q).toFixed(2)}%`,Z.height=`${(100*X).toFixed(2)}%`}getInitialTranslation(){return[0,0]}#D(){if(this.#Y)return;this.#Y=document.createElement("div"),this.#Y.classList.add("resizers");let Z=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],q=this._uiManager._signal;for(let X of Z){let z=document.createElement("div");this.#Y.append(z),z.classList.add("resizer",X),z.setAttribute("data-resizer-name",X),z.addEventListener("pointerdown",this.#S.bind(this,X),{signal:q}),z.addEventListener("contextmenu",A0,{signal:q}),z.tabIndex=-1}this.div.prepend(this.#Y)}#S(Z,q){q.preventDefault();let{isMac:X}=T8.platform;if(q.button!==0||q.ctrlKey&&X)return;this.#z?.toggle(!1);let z=this._isDraggable;this._isDraggable=!1,this.#W=[q.screenX,q.screenY];let R=new AbortController,G=this._uiManager.combinedSignal(R);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#y.bind(this,Z),{passive:!0,capture:!0,signal:G}),window.addEventListener("touchmove",J8,{passive:!1,signal:G}),window.addEventListener("contextmenu",A0,{signal:G}),this.#J={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let P=this.parent.div.style.cursor,Q=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(q.target).cursor;let Y=()=>{R.abort(),this.parent.togglePointerEvents(!0),this.#z?.toggle(!0),this._isDraggable=z,this.parent.div.style.cursor=P,this.div.style.cursor=Q,this.#w()};window.addEventListener("pointerup",Y,{signal:G}),window.addEventListener("blur",Y,{signal:G})}#O(Z,q,X,z){this.width=X,this.height=z,this.x=Z,this.y=q,this.setDims(),this.fixAndSetPosition(),this._onResized()}_onResized(){}#w(){if(!this.#J)return;let{savedX:Z,savedY:q,savedWidth:X,savedHeight:z}=this.#J;this.#J=null;let R=this.x,G=this.y,P=this.width,Q=this.height;R===Z&&G===q&&P===X&&Q===z||this.addCommands({cmd:this.#O.bind(this,R,G,P,Q),undo:this.#O.bind(this,Z,q,X,z),mustExec:!0})}static _round(Z){return Math.round(1e4*Z)/1e4}#y(Z,q){let[X,z]=this.parentDimensions,R=this.x,G=this.y,P=this.width,Q=this.height,Y=k1.MIN_SIZE/X,W=k1.MIN_SIZE/z,$=this.#F(this.rotation),_=(N,L)=>[$[0]*N+$[2]*L,$[1]*N+$[3]*L],J=this.#F(360-this.rotation),U,f,K=!1,I=!1;switch(Z){case"topLeft":K=!0,U=(N,L)=>[0,0],f=(N,L)=>[N,L];break;case"topMiddle":U=(N,L)=>[N/2,0],f=(N,L)=>[N/2,L];break;case"topRight":K=!0,U=(N,L)=>[N,0],f=(N,L)=>[0,L];break;case"middleRight":I=!0,U=(N,L)=>[N,L/2],f=(N,L)=>[0,L/2];break;case"bottomRight":K=!0,U=(N,L)=>[N,L],f=(N,L)=>[0,0];break;case"bottomMiddle":U=(N,L)=>[N/2,L],f=(N,L)=>[N/2,0];break;case"bottomLeft":K=!0,U=(N,L)=>[0,L],f=(N,L)=>[N,0];break;case"middleLeft":I=!0,U=(N,L)=>[0,L/2],f=(N,L)=>[N,L/2]}let B=U(P,Q),j=f(P,Q),V=_(...j),x=k1._round(R+V[0]),M=k1._round(G+V[1]),H,A,T=1,k=1;if(q.fromKeyboard)({deltaX:H,deltaY:A}=q);else{let{screenX:N,screenY:L}=q,[m,d]=this.#W;[H,A]=this.screenToPageTranslation(N-m,L-d),this.#W[0]=N,this.#W[1]=L}var y,O;if([H,A]=(y=H/X,O=A/z,[J[0]*y+J[2]*O,J[1]*y+J[3]*O]),K){let N=Math.hypot(P,Q);T=k=Math.max(Math.min(Math.hypot(j[0]-B[0]-H,j[1]-B[1]-A)/N,1/P,1/Q),Y/P,W/Q)}else I?T=l8(Math.abs(j[0]-B[0]-H),Y,1)/P:k=l8(Math.abs(j[1]-B[1]-A),W,1)/Q;let D=k1._round(P*T),n=k1._round(Q*k);V=_(...f(D,n));let b=x-V[0],l=M-V[1];this.#$||=[this.x,this.y,this.width,this.height],this.width=D,this.height=n,this.x=b,this.y=l,this.setDims(),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#z?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#I)return this._editToolbar;this._editToolbar=new x7(this),this.div.append(this._editToolbar.render());let{toolbarButtons:Z}=this;if(Z)for(let[q,X]of Z)await this._editToolbar.addButton(q,X);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){this._editToolbar?.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){this._editToolbar?.removeButton("comment")}removeEditToolbar(){this._editToolbar?.remove(),this._editToolbar=null,this.#z?.destroy()}addContainer(Z){let q=this._editToolbar?.div;q?q.before(Z):this.div.append(Z)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#z||(o0.initialize(k1._l10n),this.#z=new o0(this),this.#Z&&(this.#z.data=this.#Z,this.#Z=null)),this.#z}get altTextData(){return this.#z?.data}set altTextData(Z){this.#z&&(this.#z.data=Z)}get guessedAltText(){return this.#z?.guessedText}async setGuessedAltText(Z){await this.#z?.setGuessedText(Z)}serializeAltText(Z){return this.#z?.serialize(Z)}hasAltText(){return!!this.#z&&!this.#z.isEmpty()}hasAltTextData(){return this.#z?.hasData()??!1}focusCommentButton(){this.#X?.focusButton()}addCommentButton(){return this.#X||=new Y7(this)}addStandaloneCommentButton(){this.#R?this._uiManager.isEditingMode()&&this.#R.classList.remove("hidden"):this.hasComment&&(this.#R=this.#X.renderForStandalone(),this.div.append(this.#R))}removeStandaloneCommentButton(){this.#X.removeStandaloneCommentButton(),this.#R=null}hideStandaloneCommentButton(){this.#R?.classList.add("hidden")}get comment(){let{data:{richText:Z,text:q,date:X,deleted:z}}=this.#X;return{text:q,richText:Z,date:X,deleted:z,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(Z){this.#X||=new Y7(this),this.#X.data=Z,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:Z,popupRef:q,richText:X}){if(!q)return;if(this.#X||=new Y7(this),this.#X.setInitialText(Z,X),!this.annotationElementId)return;let z=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);z&&this.updateFromAnnotationLayer(z)}get hasEditedComment(){return this.#X?.hasBeenEdited()}get hasDeletedComment(){return this.#X?.isDeleted()}get hasComment(){return!!this.#X&&!this.#X.isEmpty()&&!this.#X.isDeleted()}async editComment(Z){this.#X||=new Y7(this),this.#X.edit(Z)}toggleComment(Z,q=void 0){this.hasComment&&this._uiManager.toggleComment(this,Z,q)}setSelectedCommentButton(Z){this.#X.setSelectedButton(Z)}addComment(Z){if(this.hasEditedComment){let[,,,z]=Z.rect,[R]=this.pageDimensions,[G]=this.pageTranslation,P=G+R+1,Q=z-100,Y=P+180;Z.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[P,Q,Y,z]}}}updateFromAnnotationLayer({popup:{contents:Z,deleted:q}}){this.#X.data=q?null:Z}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){let Z=this.div=document.createElement("div");Z.setAttribute("data-editor-rotation",(360-this.rotation)%360),Z.className=this.name,Z.setAttribute("id",this.id),Z.tabIndex=this.#G?-1:0,Z.setAttribute("role","application"),this.defaultL10nId&&Z.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||Z.classList.add("hidden"),this.setInForeground(),this.#g();let[q,X]=this.parentDimensions;this.parentRotation%180!=0&&(Z.style.maxWidth=`${(100*X/q).toFixed(2)}%`,Z.style.maxHeight=`${(100*q/X).toFixed(2)}%`);let[z,R]=this.getInitialTranslation();return this.translate(z,R),Nf(this,Z,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#N||=new $2({container:Z,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#h.bind(this),onPinching:this.#T.bind(this),onPinchEnd:this.#x.bind(this),signal:this._uiManager._signal})),this.addStandaloneCommentButton(),this._uiManager._editorUndoBar?.hide(),Z}#h(){this.#J={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#z?.toggle(!1),this.parent.togglePointerEvents(!1)}#T(Z,q,X){let z=X/q*0.7+1-0.7;if(z===1)return;let R=this.#F(this.rotation),G=(x,M)=>[R[0]*x+R[2]*M,R[1]*x+R[3]*M],[P,Q]=this.parentDimensions,Y=this.x,W=this.y,$=this.width,_=this.height,J=k1.MIN_SIZE/P,U=k1.MIN_SIZE/Q;z=Math.max(Math.min(z,1/$,1/_),J/$,U/_);let f=k1._round($*z),K=k1._round(_*z);if(f===$&&K===_)return;this.#$||=[Y,W,$,_];let I=G($/2,_/2),B=k1._round(Y+I[0]),j=k1._round(W+I[1]),V=G(f/2,K/2);this.x=B-V[0],this.y=j-V[1],this.width=f,this.height=K,this.setDims(),this.fixAndSetPosition(),this._onResizing()}#x(){this.#z?.toggle(!0),this.parent.togglePointerEvents(!0),this.#w()}pointerdown(Z){let{isMac:q}=T8.platform;Z.button!==0||Z.ctrlKey&&q?Z.preventDefault():(this.#K=!0,this._isDraggable?this.#E(Z):this.#m(Z))}#m(Z){let{isMac:q}=T8.platform;Z.ctrlKey&&!q||Z.shiftKey||Z.metaKey&&q?this.parent.toggleSelected(this):this.parent.setSelected(this)}#E(Z){let{isSelected:q}=this;this._uiManager.setUpDragSession();let X=!1,z=new AbortController,R=this._uiManager.combinedSignal(z),G={capture:!0,passive:!1,signal:R},P=(Y)=>{z.abort(),this.#Q=null,this.#K=!1,this._uiManager.endDragSession()||this.#m(Y),X&&this._onStopDragging()};q&&(this.#k=Z.clientX,this.#A=Z.clientY,this.#Q=Z.pointerId,this.#P=Z.pointerType,window.addEventListener("pointermove",(Y)=>{X||(X=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());let{clientX:W,clientY:$,pointerId:_}=Y;if(_!==this.#Q)return void J8(Y);let[J,U]=this.screenToPageTranslation(W-this.#k,$-this.#A);this.#k=W,this.#A=$,this._uiManager.dragSelectedEditors(J,U)},G),window.addEventListener("touchmove",J8,G),window.addEventListener("pointerdown",(Y)=>{Y.pointerType===this.#P&&(this.#N||Y.isPrimary)&&P(Y),J8(Y)},G));let Q=(Y)=>{this.#Q&&this.#Q!==Y.pointerId?J8(Y):P(Y)};window.addEventListener("pointerup",Q,{signal:R}),window.addEventListener("blur",Q,{signal:R})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#j&&clearTimeout(this.#j),this.#j=setTimeout(()=>{this.#j=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(Z,q,X){Z.changeParent(this),this.x=q,this.y=X,this.fixAndSetPosition(),this._onTranslated()}getRect(Z,q,X=this.rotation){let z=this.parentScale,[R,G]=this.pageDimensions,[P,Q]=this.pageTranslation,Y=Z/z,W=q/z,$=this.x*R,_=this.y*G,J=this.width*R,U=this.height*G;switch(X){case 0:return[$+Y+P,G-_-W-U+Q,$+Y+J+P,G-_-W+Q];case 90:return[$+W+P,G-_+Y+Q,$+W+U+P,G-_+Y+J+Q];case 180:return[$-Y-J+P,G-_+W+Q,$-Y+P,G-_+W+U+Q];case 270:return[$-W-U+P,G-_-Y-J+Q,$-W+P,G-_-Y+Q];default:throw Error("Invalid rotation")}}getRectInCurrentCoords(Z,q){let[X,z,R,G]=Z,P=R-X,Q=G-z;switch(this.rotation){case 0:return[X,q-G,P,Q];case 90:return[X,q-z,Q,P];case 180:return[R,q-z,P,Q];case 270:return[R,q-G,Q,P];default:throw Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&k1._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){this.#X?.onUpdatedColor()}getData(){let{comment:{text:Z,color:q,date:X,opacity:z,deleted:R,richText:G},uid:P,pageIndex:Q,creationDate:Y,modificationDate:W}=this;return{id:P,pageIndex:Q,rect:this.getPDFRect(),richText:G,contentsObj:{str:Z},creationDate:Y,modificationDate:X||W,popupRef:!R,color:q,opacity:z}}onceAdded(Z){}isEmpty(){return!1}enableEditMode(){return!this.isInEditMode()&&(this.parent.setEditingState(!1),this.#I=!0,!0)}disableEditMode(){return!!this.isInEditMode()&&(this.parent.setEditingState(!0),this.#I=!1,!0)}isInEditMode(){return this.#I}shouldGetKeyboardEvents(){return this.#V}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){let{top:Z,left:q,bottom:X,right:z}=this.getClientDimensions(),{innerHeight:R,innerWidth:G}=window;return q<G&&z>0&&Z<R&&X>0}#g(){if(this.#U||!this.div)return;this.#U=new AbortController;let Z=this._uiManager.combinedSignal(this.#U);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:Z}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:Z})}rebuild(){this.#g()}rotate(Z){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(Z=!1,q=null){return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:this._initialData?.popupRef||""}}static async deserialize(Z,q,X){let z=new this.prototype.constructor({parent:q,id:q.getNextId(),uiManager:X,annotationElementId:Z.annotationElementId,creationDate:Z.creationDate,modificationDate:Z.modificationDate});z.rotation=Z.rotation,z.#Z=Z.accessibilityData,z._isCopy=Z.isCopy||!1;let[R,G]=z.pageDimensions,[P,Q,Y,W]=z.getRectInCurrentCoords(Z.rect,G);return z.x=P/R,z.y=Q/G,z.width=Y/R,z.height=W/G,z}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#U?.abort(),this.#U=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#j&&(clearTimeout(this.#j),this.#j=null),this.#p(),this.removeEditToolbar(),this.#H){for(let Z of this.#H.values())clearTimeout(Z);this.#H=null}this.parent=null,this.#N?.destroy(),this.#N=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#D(),this.#Y.classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){let{commentButtonPosition:[Z,q]}=this,[X,z,R,G]=this.getPDFRect();return[k1._round(X+(R-X)*Z),k1._round(z+(G-z)*(1-q))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return this.#X.commentPopupPositionInLayer}set commentPopupPosition(Z){this.#X.commentPopupPositionInLayer=Z}hasDefaultPopupPosition(){return this.#X.hasDefaultPopupPosition()}get commentButtonWidth(){return this.#X.commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(Z){this.#X.setCommentButtonStates(Z)}keydown(Z){if(!this.isResizable||Z.target!==this.div||Z.key!=="Enter")return;this._uiManager.setSelected(this),this.#J={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let q=this.#Y.children;if(!this.#q){this.#q=Array.from(q);let G=this.#l.bind(this),P=this.#r.bind(this),Q=this._uiManager._signal;for(let Y of this.#q){let W=Y.getAttribute("data-resizer-name");Y.setAttribute("role","spinbutton"),Y.addEventListener("keydown",G,{signal:Q}),Y.addEventListener("blur",P,{signal:Q}),Y.addEventListener("focus",this.#o.bind(this,W),{signal:Q}),Y.setAttribute("data-l10n-id",k1._l10nResizer[W])}}let X=this.#q[0],z=0;for(let G of q){if(G===X)break;z++}let R=(360-this.rotation+this.parentRotation)%360/90*(this.#q.length/4);if(R!==z){if(R<z)for(let P=0;P<z-R;P++)this.#Y.append(this.#Y.firstChild);else if(R>z)for(let P=0;P<R-z;P++)this.#Y.firstChild.before(this.#Y.lastChild);let G=0;for(let P of q){let Q=this.#q[G++].getAttribute("data-resizer-name");P.setAttribute("data-l10n-id",k1._l10nResizer[Q])}}this.#d(0),this.#V=!0,this.#Y.firstChild.focus({focusVisible:!0}),Z.preventDefault(),Z.stopImmediatePropagation()}#l(Z){k1._resizerKeyboardManager.exec(this,Z)}#r(Z){this.#V&&Z.relatedTarget?.parentNode!==this.#Y&&this.#p()}#o(Z){this.#B=this.#V?Z:""}#d(Z){if(this.#q)for(let q of this.#q)q.tabIndex=Z}_resizeWithKeyboard(Z,q){this.#V&&this.#y(this.#B,{deltaX:Z,deltaY:q,fromKeyboard:!0})}#p(){this.#V=!1,this.#d(-1),this.#w()}_stopResizingWithKeyboard(){this.#p(),this.div.focus()}select(){this.isSelected&&this._editToolbar?this._editToolbar.show():(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),this._editToolbar?(this._editToolbar?.show(),this.#z?.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()}))}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>this.div?.focus({preventScroll:!0}),0)}unselect(){this.isSelected&&(this.isSelected=!1,this.#Y?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#z?.toggleAltTextBadge(!0),this.hasComment&&this._uiManager.toggleComment(this,!1,!1))}updateParams(Z,q){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(Z){Z.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#f}set isEditing(Z){this.#f=Z,this.parent&&(Z?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(Z,q=!1){if(q){this.#H||=new Map;let{action:X}=Z,z=this.#H.get(X);return z&&clearTimeout(z),z=setTimeout(()=>{this._reportTelemetry(Z),this.#H.delete(X),this.#H.size===0&&(this.#H=null)},k1._telemetryTimeout),void this.#H.set(X,z)}Z.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:Z}})}show(Z=this._isVisible){this.div.classList.toggle("hidden",!Z),this._isVisible=Z}enable(){this.div&&(this.div.tabIndex=0),this.#G=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#G=!0}updateFakeAnnotationElement(Z){if(this.#_||this.deleted)return this.deleted?(this.#_.remove(),void(this.#_=null)):void((this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&this.#_.updateEdited({rect:this.getPDFRect(),popup:this.comment}));this.#_=Z.addFakeAnnotation(this)}renderAnnotationElement(Z){if(this.deleted)return Z.hide(),null;let q=Z.container.querySelector(".annotationContent");if(q){if(q.nodeName==="CANVAS"){let X=q;q=document.createElement("div"),q.classList.add("annotationContent",this.editorType),X.before(q)}}else q=document.createElement("div"),q.classList.add("annotationContent",this.editorType),Z.container.prepend(q);return q}resetAnnotationElement(Z){let{firstChild:q}=Z.container;q?.nodeName==="DIV"&&q.classList.contains("annotationContent")&&q.remove()}};vf=class vf extends k1{constructor(Z){super(Z),this.annotationElementId=Z.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}};wq=Object.freeze({map:null,hash:"",transfer:void 0});S9=class S9{#Z=!1;#q=null;#z=null;#X=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(Z,q){let X=this.#X.get(Z);return X===void 0?q:Object.assign(q,X)}getRawValue(Z){return this.#X.get(Z)}remove(Z){let q=this.#X.get(Z);if(q!==void 0&&(q instanceof k1&&this.#z.delete(q.annotationElementId),this.#X.delete(Z),this.#X.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function")){for(let X of this.#X.values())if(X instanceof k1)return;this.onAnnotationEditor(null)}}setValue(Z,q){let X=this.#X.get(Z),z=!1;if(X!==void 0)for(let[R,G]of Object.entries(q))X[R]!==G&&(z=!0,X[R]=G);else z=!0,this.#X.set(Z,q);z&&this.#R(),q instanceof k1&&((this.#z||=new Map).set(q.annotationElementId,q),typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(q.constructor._type))}has(Z){return this.#X.has(Z)}get size(){return this.#X.size}#R(){this.#Z||(this.#Z=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#Z&&(this.#Z=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new fz(this)}get serializable(){if(this.#X.size===0)return wq;let Z=new Map,q=new Uz,X=[],z=Object.create(null),R=!1;for(let[G,P]of this.#X){let Q=P instanceof k1?P.serialize(!1,z):P;Q&&(Z.set(G,Q),q.update(`${G}:${JSON.stringify(Q)}`),R||=!!Q.bitmap)}if(R)for(let G of Z.values())G.bitmap&&X.push(G.bitmap);return Z.size>0?{map:Z,hash:q.hexdigest(),transfer:X}:wq}get editorStats(){let Z=null,q=new Map,X=0,z=0;for(let R of this.#X.values()){if(!(R instanceof k1)){R.popup&&(R.popup.deleted?z+=1:X+=1);continue}R.isCommentDeleted?z+=1:R.hasEditedComment&&(X+=1);let G=R.telemetryFinalData;if(!G)continue;let{type:P}=G;q.has(P)||q.set(P,Object.getPrototypeOf(R).constructor),Z||=Object.create(null);let Q=Z[P]||=new Map;for(let[Y,W]of Object.entries(G)){if(Y==="type")continue;let $=Q.get(Y);$||($=new Map,Q.set(Y,$));let _=$.get(W)??0;$.set(W,_+1)}}if((z>0||X>0)&&(Z||=Object.create(null),Z.comments={deleted:z,edited:X}),!Z)return null;for(let[R,G]of q)Z[R]=G.computeTelemetryFinalData(Z[R]);return Z}resetModifiedIds(){this.#q=null}updateEditor(Z,q){let X=this.#z?.get(Z);return!!X&&(X.updateFromAnnotationLayer(q),!0)}getEditor(Z){return this.#z?.get(Z)||null}get modifiedIds(){if(this.#q)return this.#q;let Z=[];if(this.#z)for(let q of this.#z.values())q.serialize()&&Z.push(q.annotationElementId);return this.#q={ids:new Set(Z),hash:Z.join(",")}}[Symbol.iterator](){return this.#X.entries()}};fz=class fz extends S9{#Z;constructor(Z){super();let{map:q,hash:X,transfer:z}=Z.serializable,R=structuredClone(q,z?{transfer:z}:null);this.#Z={map:R,hash:X,transfer:z}}get print(){z8("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#Z}get modifiedIds(){return D1(this,"modifiedIds",{ids:new Set,hash:""})}};mf=function(Z,q,X){if(!Array.isArray(X)||X.length<2)return!1;let[z,R,...G]=X;if(!Z(z)&&!Number.isInteger(z))return!1;if(!q(R))return!1;let P=G.length,Q=!0;switch(R.name){case"XYZ":if(P<2||P>3)return!1;break;case"Fit":case"FitB":return P===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(P>1)return!1;break;case"FitR":if(P!==4)return!1;Q=!1;break;default:return!1}for(let Y of G)if(!(typeof Y=="number"||Q&&Y===null))return!1;return!0}.bind(null,Eq,(Z)=>typeof Z=="object"&&typeof Z?.name=="string");yf=class yf extends Kz{constructor({ownerDocument:Z=globalThis.document,enableHWA:q=!1}){super({enableHWA:q}),this._document=Z}_createCanvas(Z,q){let X=this._document.createElement("canvas");return X.width=Z,X.height=q,X}};uq=class uq extends Bz{async _fetch(Z){let q=await y6(Z,this.isCompressed?"arraybuffer":"text");return q instanceof ArrayBuffer?new Uint8Array(q):P2(q)}};pf=class pf extends Iz{#Z;#q;#z;#X;#R;#G;#Q=0;constructor({docId:Z,ownerDocument:q=globalThis.document}){super(),this.#X=Z,this.#R=q}get#P(){return this.#q||=new Map}get#Y(){return this.#G||=new Map}get#W(){if(!this.#z){let Z=this.#R.createElement("div"),{style:q}=Z;q.visibility="hidden",q.contain="strict",q.width=q.height=0,q.position="absolute",q.top=q.left=0,q.zIndex=-1;let X=this.#R.createElementNS($4,"svg");X.setAttribute("width",0),X.setAttribute("height",0),this.#z=this.#R.createElementNS($4,"defs"),Z.append(X),X.append(this.#z),this.#R.body.append(Z)}return this.#z}#J(Z){if(Z.length===1){let Q=Z[0],Y=Array(256);for(let $=0;$<256;$++)Y[$]=Q[$]/255;let W=Y.join(",");return[W,W,W]}let[q,X,z]=Z,R=Array(256),G=Array(256),P=Array(256);for(let Q=0;Q<256;Q++)R[Q]=q[Q]/255,G[Q]=X[Q]/255,P[Q]=z[Q]/255;return[R.join(","),G.join(","),P.join(",")]}#_(Z){if(this.#Z===void 0){this.#Z="";let q=this.#R.URL;q!==this.#R.baseURI&&(W2(q)?p1('#createUrl: ignore "data:"-URL for performance reasons.'):this.#Z=Pz(q,""))}return`url(${this.#Z}#${Z})`}addFilter(Z){if(!Z)return"none";let q=this.#P.get(Z);if(q)return q;let[X,z,R]=this.#J(Z),G=Z.length===1?X:`${X}${z}${R}`;if(q=this.#P.get(G),q)return this.#P.set(Z,q),q;let P=`g_${this.#X}_transfer_map_${this.#Q++}`,Q=this.#_(P);this.#P.set(Z,Q),this.#P.set(G,Q);let Y=this.#K(P);return this.#f(X,z,R,Y),Q}addHCMFilter(Z,q){let X=`${Z}-${q}`,R=this.#Y.get("base");if(R?.key===X)return R.url;if(R?(R.filter?.remove(),R.key=X,R.url="none",R.filter=null):(R={key:X,url:"none",filter:null},this.#Y.set("base",R)),!Z||!q)return R.url;let G=this.#V(Z);Z=j1.makeHexColor(...G);let P=this.#V(q);if(q=j1.makeHexColor(...P),this.#W.style.color="",Z==="#000000"&&q==="#ffffff"||Z===q)return R.url;let Q=Array(256);for(let J=0;J<=255;J++){let U=J/255;Q[J]=U<=0.03928?U/12.92:((U+0.055)/1.055)**2.4}let Y=Q.join(","),W=`g_${this.#X}_hcm_filter`,$=R.filter=this.#K(W);this.#f(Y,Y,Y,$),this.#B($);let _=(J,U)=>{let f=G[J]/255,K=P[J]/255,I=Array(U+1);for(let B=0;B<=U;B++)I[B]=f+B/U*(K-f);return I.join(",")};return this.#f(_(0,5),_(1,5),_(2,5),$),R.url=this.#_(W),R.url}addAlphaFilter(Z){let q=this.#P.get(Z);if(q)return q;let[X]=this.#J([Z]),z=`alpha_${X}`;if(q=this.#P.get(z),q)return this.#P.set(Z,q),q;let R=`g_${this.#X}_alpha_map_${this.#Q++}`,G=this.#_(R);this.#P.set(Z,G),this.#P.set(z,G);let P=this.#K(R);return this.#I(X,P),G}addLuminosityFilter(Z){let q,X,z=this.#P.get(Z||"luminosity");if(z)return z;if(Z?([q]=this.#J([Z]),X=`luminosity_${q}`):X="luminosity",z=this.#P.get(X),z)return this.#P.set(Z,z),z;let R=`g_${this.#X}_luminosity_map_${this.#Q++}`,G=this.#_(R);this.#P.set(Z,G),this.#P.set(X,G);let P=this.#K(R);return this.#U(P),Z&&this.#I(q,P),G}addHighlightHCMFilter(Z,q,X,z,R){let G=`${q}-${X}-${z}-${R}`,P=this.#Y.get(Z);if(P?.key===G)return P.url;if(P?(P.filter?.remove(),P.key=G,P.url="none",P.filter=null):(P={key:G,url:"none",filter:null},this.#Y.set(Z,P)),!q||!X)return P.url;let[Q,Y]=[q,X].map(this.#V.bind(this)),W=Math.round(0.2126*Q[0]+0.7152*Q[1]+0.0722*Q[2]),$=Math.round(0.2126*Y[0]+0.7152*Y[1]+0.0722*Y[2]),[_,J]=[z,R].map(this.#V.bind(this));$<W&&([W,$,_,J]=[$,W,J,_]),this.#W.style.color="";let U=(I,B,j)=>{let V=Array(256),x=($-W)/j,M=I/255,H=(B-I)/(255*j),A=0;for(let T=0;T<=j;T++){let k=Math.round(W+T*x),y=M+T*H;for(let O=A;O<=k;O++)V[O]=y;A=k+1}for(let T=A;T<256;T++)V[T]=V[A-1];return V.join(",")},f=`g_${this.#X}_hcm_${Z}_filter`,K=P.filter=this.#K(f);return this.#B(K),this.#f(U(_[0],J[0],5),U(_[1],J[1],5),U(_[2],J[2],5),K),P.url=this.#_(f),P.url}destroy(Z=!1){Z&&this.#G?.size||(this.#z?.parentNode.parentNode.remove(),this.#z=null,this.#q?.clear(),this.#q=null,this.#G?.clear(),this.#G=null,this.#Q=0)}#U(Z){let q=this.#R.createElementNS($4,"feColorMatrix");q.setAttribute("type","matrix"),q.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"),Z.append(q)}#B(Z){let q=this.#R.createElementNS($4,"feColorMatrix");q.setAttribute("type","matrix"),q.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"),Z.append(q)}#K(Z){let q=this.#R.createElementNS($4,"filter");return q.setAttribute("color-interpolation-filters","sRGB"),q.setAttribute("id",Z),this.#W.append(q),q}#$(Z,q,X){let z=this.#R.createElementNS($4,q);z.setAttribute("type","discrete"),z.setAttribute("tableValues",X),Z.append(z)}#f(Z,q,X,z){let R=this.#R.createElementNS($4,"feComponentTransfer");z.append(R),this.#$(R,"feFuncR",Z),this.#$(R,"feFuncG",q),this.#$(R,"feFuncB",X)}#I(Z,q){let X=this.#R.createElementNS($4,"feComponentTransfer");q.append(X),this.#$(X,"feFuncA",Z)}#V(Z){return this.#W.style.color=Z,C6(getComputedStyle(this.#W).getPropertyValue("color"))}};gq=class gq extends jz{async _fetch(Z){let q=await y6(Z,"arraybuffer");return new Uint8Array(q)}};dq=class dq extends Vz{async _fetch(Z){let q=await y6(Z,"arraybuffer");return new Uint8Array(q)}};Df=class Df extends Iz{};wf=class wf extends Kz{_createCanvas(Z,q){return process.getBuiltinModule("module").createRequire(import.meta.url),new Proxy({},{get:(X,z)=>()=>{throw Error("@napi-rs/canvas is not available in this environment")}}).createCanvas(Z,q)}};Ef=class Ef extends Bz{async _fetch(Z){return Hz(Z)}};uf=class uf extends jz{async _fetch(Z){return Hz(Z)}};gf=class gf extends Vz{async _fetch(Z){return Hz(Z)}};({floor:DG,ceil:wG}=Math);cq=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];EG=["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],xZ=["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],VH=["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],HH=["filter","fillColor","fillAlpha"],xH=["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],MH=["transform"],MZ=["transform","fillColor"];hf=class hf extends m9{constructor(Z){super(),this._type=Z[1],this._bbox=Z[2],this._colorStops=Z[3],this._p0=Z[4],this._p1=Z[5],this._r0=Z[6],this._r1=Z[7],this.matrix=null}_createGradient(Z){let q;this._type==="axial"?q=Z.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(q=Z.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let X of this._colorStops)q.addColorStop(X[0],X[1]);return q}getPattern(Z,q,X,z){let R;if(z===M7||z===V5){let G=q.current.getClippedPathBoundingBox(z,_8(Z))||[0,0,0,0],P=Math.ceil(G[2]-G[0])||1,Q=Math.ceil(G[3]-G[1])||1,Y=q.cachedCanvases.getCanvas("pattern",P,Q),W=Y.context;W.clearRect(0,0,W.canvas.width,W.canvas.height),W.beginPath(),W.rect(0,0,W.canvas.width,W.canvas.height),W.translate(-G[0],-G[1]),X=j1.transform(X,[1,0,0,1,G[0],G[1]]),W.transform(...q.baseTransform),this.matrix&&W.transform(...this.matrix),hq(W,this._bbox),W.fillStyle=this._createGradient(W),W.fill(),R=Z.createPattern(Y.canvas,"no-repeat");let $=new DOMMatrix(X);R.setTransform($)}else hq(Z,this._bbox),R=this._createGradient(Z);return R}};sf=class sf extends m9{constructor(Z){super(),this._coords=Z[2],this._colors=Z[3],this._figures=Z[4],this._bounds=Z[5],this._bbox=Z[6],this._background=Z[7],this.matrix=null}_createMeshCanvas(Z,q,X){let z=Math.floor(this._bounds[0]),R=Math.floor(this._bounds[1]),G=Math.ceil(this._bounds[2])-z,P=Math.ceil(this._bounds[3])-R,Q=Math.min(Math.ceil(Math.abs(G*Z[0]*1.1)),3000),Y=Math.min(Math.ceil(Math.abs(P*Z[1]*1.1)),3000),W=G/Q,$=P/Y,_={coords:this._coords,colors:this._colors,offsetX:-z,offsetY:-R,scaleX:1/W,scaleY:1/$},J=Q+4,U=Y+4,f=X.getCanvas("mesh",J,U),K=f.context,I=K.createImageData(Q,Y);if(q){let B=I.data;for(let j=0,V=B.length;j<V;j+=4)B[j]=q[0],B[j+1]=q[1],B[j+2]=q[2],B[j+3]=255}for(let B of this._figures)AH(I,B,_);return K.putImageData(I,2,2),{canvas:f.canvas,offsetX:z-2*W,offsetY:R-2*$,scaleX:W,scaleY:$}}isModifyingCurrentTransform(){return!0}getPattern(Z,q,X,z){hq(Z,this._bbox);let R=new Float32Array(2);if(z===A7)j1.singularValueDecompose2dScale(_8(Z),R);else if(this.matrix){j1.singularValueDecompose2dScale(this.matrix,R);let[P,Q]=R;j1.singularValueDecompose2dScale(q.baseTransform,R),R[0]*=P,R[1]*=Q}else j1.singularValueDecompose2dScale(q.baseTransform,R);let G=this._createMeshCanvas(R,z===A7?null:this._background,q.cachedCanvases);return z!==A7&&(Z.setTransform(...q.baseTransform),this.matrix&&Z.transform(...this.matrix)),Z.translate(G.offsetX,G.offsetY),Z.scale(G.scaleX,G.scaleY),Z.createPattern(G.canvas,"no-repeat")}};rf=class rf extends m9{getPattern(){return"hotpink"}};LZ=new DOMMatrix,V0=new Float32Array(2),Q6=new Float32Array([1/0,1/0,-1/0,-1/0]);NH=["butt","round","square"],CH=["miter","round","bevel"],FH={},cG={};for(let Z in T6)U6.prototype[Z]!==void 0&&(U6.prototype[T6[Z]]=U6.prototype[Z]);f6=class f6{#Z;#q;#z;static strings=["fontFamily","fontWeight","italicAngle"];static write(Z){let q=new TextEncoder,X={},z=0;for(let Y of f6.strings){let W=q.encode(Z[Y]);X[Y]=W,z+=4+W.length}let R=new ArrayBuffer(z),G=new Uint8Array(R),P=new DataView(R),Q=0;for(let Y of f6.strings){let W=X[Y],$=W.length;P.setUint32(Q,$),G.set(W,Q+4),Q+=4+$}return o1(Q===R.byteLength,"CssFontInfo.write: Buffer overflow"),R}constructor(Z){this.#Z=Z,this.#q=new DataView(this.#Z),this.#z=new TextDecoder}#X(Z){o1(Z<f6.strings.length,"Invalid string index");let q=0;for(let z=0;z<Z;z++)q+=this.#q.getUint32(q)+4;let X=this.#q.getUint32(q);return this.#z.decode(new Uint8Array(this.#Z,q+4,X))}get fontFamily(){return this.#X(0)}get fontWeight(){return this.#X(1)}get italicAngle(){return this.#X(2)}};K6=class K6{#Z;#q;#z;static strings=["css","loadedName","baseFontName","src"];static write(Z){let q=new TextEncoder,X={},z=0;for(let _ of K6.strings){let J=q.encode(Z[_]);X[_]=J,z+=4+J.length}z+=4;let R,G,P=1+z;Z.style&&(R=q.encode(Z.style.style),G=q.encode(Z.style.weight),P+=4+R.length+4+G.length);let Q=new ArrayBuffer(P),Y=new Uint8Array(Q),W=new DataView(Q),$=0;W.setUint8($++,Z.guessFallback?1:0),W.setUint32($,0),$+=4,z=0;for(let _ of K6.strings){let J=X[_],U=J.length;z+=4+U,W.setUint32($,U),Y.set(J,$+4),$+=4+U}return W.setUint32($-z-4,z),Z.style&&(W.setUint32($,R.length),Y.set(R,$+4),$+=4+R.length,W.setUint32($,G.length),Y.set(G,$+4),$+=4+G.length),o1($<=Q.byteLength,"SubstitionInfo.write: Buffer overflow"),Q.transferToFixedLength($)}constructor(Z){this.#Z=Z,this.#q=new DataView(this.#Z),this.#z=new TextDecoder}get guessFallback(){return this.#q.getUint8(0)!==0}#X(Z){o1(Z<K6.strings.length,"Invalid string index");let q=5;for(let z=0;z<Z;z++)q+=this.#q.getUint32(q)+4;let X=this.#q.getUint32(q);return this.#z.decode(new Uint8Array(this.#Z,q+4,X))}get css(){return this.#X(0)}get loadedName(){return this.#X(1)}get baseFontName(){return this.#X(2)}get src(){return this.#X(3)}get style(){let Z=1;Z+=4+this.#q.getUint32(Z);let q=this.#q.getUint32(Z),X=this.#z.decode(new Uint8Array(this.#Z,Z+4,q));Z+=4+q;let z=this.#q.getUint32(Z);return{style:X,weight:this.#z.decode(new Uint8Array(this.#Z,Z+4,z))}}};q8=class q8{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#Z=Math.ceil(2*this.bools.length/8);static#q=this.#Z+8*this.numbers.length;static#z=this.#q+1+8;static#X=this.#z+1+48;static#R=this.#X+1+6;#G;#Q;#P;constructor({data:Z,extra:q}){this.#G=Z,this.#Q=new TextDecoder,this.#P=new DataView(this.#G),q&&Object.assign(this,q)}#Y(Z){o1(Z<q8.bools.length,"Invalid boolean index");let q=Math.floor(Z/4),X=2*Z%8,z=this.#P.getUint8(q)>>X&3;return z===0?void 0:z===2}get black(){return this.#Y(0)}get bold(){return this.#Y(1)}get disableFontFace(){return this.#Y(2)}get fontExtraProperties(){return this.#Y(3)}get isInvalidPDFjsFont(){return this.#Y(4)}get isType3Font(){return this.#Y(5)}get italic(){return this.#Y(6)}get missingFile(){return this.#Y(7)}get remeasure(){return this.#Y(8)}get vertical(){return this.#Y(9)}#W(Z){return o1(Z<q8.numbers.length,"Invalid number index"),this.#P.getFloat64(q8.#Z+8*Z)}get ascent(){return this.#W(0)}get defaultWidth(){return this.#W(1)}get descent(){return this.#W(2)}get bbox(){let Z=q8.#q;if(this.#P.getUint8(Z)===0)return;Z+=1;let q=[];for(let X=0;X<4;X++)q.push(this.#P.getInt16(Z,!0)),Z+=2;return q}get fontMatrix(){let Z=q8.#z;if(this.#P.getUint8(Z)===0)return;Z+=1;let q=[];for(let X=0;X<6;X++)q.push(this.#P.getFloat64(Z,!0)),Z+=8;return q}get defaultVMetrics(){let Z=q8.#X;if(this.#P.getUint8(Z)===0)return;Z+=1;let q=[];for(let X=0;X<3;X++)q.push(this.#P.getInt16(Z,!0)),Z+=2;return q}#J(Z){o1(Z<q8.strings.length,"Invalid string index");let q=q8.#R+4;for(let R=0;R<Z;R++)q+=this.#P.getUint32(q)+4;let X=this.#P.getUint32(q),z=new Uint8Array(X);return z.set(new Uint8Array(this.#G,q+4,X)),this.#Q.decode(z)}get fallbackName(){return this.#J(0)}get loadedName(){return this.#J(1)}get mimetype(){return this.#J(2)}get name(){return this.#J(3)}get data(){let Z=q8.#R;Z+=4+this.#P.getUint32(Z),Z+=4+this.#P.getUint32(Z),Z+=4+this.#P.getUint32(Z);let q=this.#P.getUint32(Z);if(q!==0)return new Uint8Array(this.#G,Z+4,q)}clearData(){let Z=q8.#R;Z+=4+this.#P.getUint32(Z),Z+=4+this.#P.getUint32(Z),Z+=4+this.#P.getUint32(Z);let q=this.#P.getUint32(Z);new Uint8Array(this.#G,Z+4,q).fill(0),this.#P.setUint32(Z,0)}get cssFontInfo(){let Z=q8.#R;Z+=4+this.#P.getUint32(Z),Z+=4+this.#P.getUint32(Z);let q=this.#P.getUint32(Z);if(q===0)return null;let X=new Uint8Array(q);return X.set(new Uint8Array(this.#G,Z+4,q)),new f6(X.buffer)}get systemFontInfo(){let Z=q8.#R;Z+=4+this.#P.getUint32(Z);let q=this.#P.getUint32(Z);if(q===0)return null;let X=new Uint8Array(q);return X.set(new Uint8Array(this.#G,Z+4,q)),new K6(X.buffer)}static write(Z){let q=Z.systemFontInfo?K6.write(Z.systemFontInfo):null,X=Z.cssFontInfo?f6.write(Z.cssFontInfo):null,z=new TextEncoder,R={},G=0;for(let f of q8.strings)R[f]=z.encode(Z[f]),G+=4+R[f].length;let P=q8.#R+4+G+4+(q?q.byteLength:0)+4+(X?X.byteLength:0)+4+(Z.data?Z.data.length:0),Q=new ArrayBuffer(P),Y=new Uint8Array(Q),W=new DataView(Q),$=0,_=q8.bools.length,J=0,U=0;for(let f=0;f<_;f++){let K=Z[q8.bools[f]];J|=(K===void 0?0:K?2:1)<<U,U+=2,U!==8&&f!==_-1||(W.setUint8($++,J),J=0,U=0)}o1($===q8.#Z,"FontInfo.write: Boolean properties offset mismatch");for(let f of q8.numbers)W.setFloat64($,Z[f]),$+=8;if(o1($===q8.#q,"FontInfo.write: Number properties offset mismatch"),Z.bbox){W.setUint8($++,4);for(let f of Z.bbox)W.setInt16($,f,!0),$+=2}else W.setUint8($++,0),$+=8;if(o1($===q8.#z,"FontInfo.write: BBox properties offset mismatch"),Z.fontMatrix){W.setUint8($++,6);for(let f of Z.fontMatrix)W.setFloat64($,f,!0),$+=8}else W.setUint8($++,0),$+=48;if(o1($===q8.#X,"FontInfo.write: FontMatrix properties offset mismatch"),Z.defaultVMetrics){W.setUint8($++,1);for(let f of Z.defaultVMetrics)W.setInt16($,f,!0),$+=2}else W.setUint8($++,0),$+=6;o1($===q8.#R,"FontInfo.write: DefaultVMetrics properties offset mismatch"),W.setUint32(q8.#R,0),$+=4;for(let f of q8.strings){let K=R[f],I=K.length;W.setUint32($,I),Y.set(K,$+4),$+=4+I}if(W.setUint32(q8.#R,$-q8.#R-4),q){let f=q.byteLength;W.setUint32($,f),o1($+4+f<=Q.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo"),Y.set(new Uint8Array(q),$+4),$+=4+f}else W.setUint32($,0),$+=4;if(X){let f=X.byteLength;W.setUint32($,f),o1($+4+f<=Q.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo"),Y.set(new Uint8Array(X),$+4),$+=4+f}else W.setUint32($,0),$+=4;return Z.data===void 0?(W.setUint32($,0),$+=4):(W.setUint32($,Z.data.length),Y.set(Z.data,$+4),$+=4+Z.data.length),o1($<=Q.byteLength,"FontInfo.write: Buffer overflow"),Q.transferToFixedLength($)}};of=class of{#Z;#q;constructor({parsedData:Z,rawData:q}){this.#Z=Z,this.#q=q}getRaw(){return this.#q}get(Z){return this.#Z.get(Z)??null}[Symbol.iterator](){return this.#Z.entries()}};t5=Symbol("INTERNAL");nf=class nf{#Z=null;#q=new Map;#z=null;#X=null;constructor(Z,q=Rz){if(this.renderingIntent=q,this.name=null,this.creator=null,Z!==null){this.name=Z.name,this.creator=Z.creator,this.#X=Z.order;for(let X of Z.groups)this.#q.set(X.id,new af(q,X));if(Z.baseState==="OFF")for(let X of this.#q.values())X._setVisible(t5,!1);for(let X of Z.on)this.#q.get(X)._setVisible(t5,!0);for(let X of Z.off)this.#q.get(X)._setVisible(t5,!1);this.#z=this.getHash()}}#R(Z){let q=Z.length;if(q<2)return!0;let X=Z[0];for(let z=1;z<q;z++){let R=Z[z],G;if(Array.isArray(R))G=this.#R(R);else{if(!this.#q.has(R))return p1(`Optional content group not found: ${R}`),!0;G=this.#q.get(R).visible}switch(X){case"And":if(!G)return!1;break;case"Or":if(G)return!0;break;case"Not":return!G;default:return!0}}return X==="And"}isVisible(Z){if(this.#q.size===0)return!0;if(!Z)return F9("Optional content group not defined."),!0;if(Z.type==="OCG")return this.#q.has(Z.id)?this.#q.get(Z.id).visible:(p1(`Optional content group not found: ${Z.id}`),!0);if(Z.type==="OCMD"){if(Z.expression)return this.#R(Z.expression);if(!Z.policy||Z.policy==="AnyOn"){for(let q of Z.ids){if(!this.#q.has(q))return p1(`Optional content group not found: ${q}`),!0;if(this.#q.get(q).visible)return!0}return!1}if(Z.policy==="AllOn"){for(let q of Z.ids){if(!this.#q.has(q))return p1(`Optional content group not found: ${q}`),!0;if(!this.#q.get(q).visible)return!1}return!0}if(Z.policy==="AnyOff"){for(let q of Z.ids){if(!this.#q.has(q))return p1(`Optional content group not found: ${q}`),!0;if(!this.#q.get(q).visible)return!0}return!1}if(Z.policy==="AllOff"){for(let q of Z.ids){if(!this.#q.has(q))return p1(`Optional content group not found: ${q}`),!0;if(this.#q.get(q).visible)return!1}return!0}return p1(`Unknown optional content policy ${Z.policy}.`),!0}return p1(`Unknown group type ${Z.type}.`),!0}setVisibility(Z,q=!0,X=!0){let z=this.#q.get(Z);if(z){if(X&&q&&z.rbGroups.length)for(let R of z.rbGroups)for(let G of R)G!==Z&&this.#q.get(G)?._setVisible(t5,!1,!0);z._setVisible(t5,!!q,!0),this.#Z=null}else p1(`Optional content group not found: ${Z}`)}setOCGState({state:Z,preserveRB:q}){let X;for(let z of Z){switch(z){case"ON":case"OFF":case"Toggle":X=z;continue}let R=this.#q.get(z);if(R)switch(X){case"ON":this.setVisibility(z,!0,q);break;case"OFF":this.setVisibility(z,!1,q);break;case"Toggle":this.setVisibility(z,!R.visible,q)}}this.#Z=null}get hasInitialVisibility(){return this.#z===null||this.getHash()===this.#z}getOrder(){return this.#q.size?this.#X?this.#X.slice():[...this.#q.keys()]:null}getGroup(Z){return this.#q.get(Z)||null}getHash(){if(this.#Z!==null)return this.#Z;let Z=new Uz;for(let[q,X]of this.#q)Z.update(`${q}:${X.visible}`);return this.#Z=Z.hexdigest()}[Symbol.iterator](){return this.#q.entries()}};vH=/^[a-z][a-z0-9\-+.]+:/i;t6=Symbol("INITIAL_DATA");Mz=class Mz{#Z=Object.create(null);#q(Z){return this.#Z[Z]||={...Promise.withResolvers(),data:t6}}get(Z,q=null){if(q){let z=this.#q(Z);return z.promise.then(()=>q(z.data)),null}let X=this.#Z[Z];if(!X||X.data===t6)throw Error(`Requesting object that isn't resolved yet ${Z}.`);return X.data}has(Z){let q=this.#Z[Z];return!!q&&q.data!==t6}delete(Z){let q=this.#Z[Z];return!(!q||q.data===t6)&&(delete this.#Z[Z],!0)}resolve(Z,q=null){let X=this.#q(Z);X.data=q,X.resolve()}clear(){for(let Z in this.#Z){let{data:q}=this.#Z[Z];q?.bitmap?.close()}this.#Z=Object.create(null)}*[Symbol.iterator](){for(let Z in this.#Z){let{data:q}=this.#Z[Z];q!==t6&&(yield[Z,q])}}};h8=class h8{#Z=Promise.withResolvers();#q=null;#z=!1;#X=!!globalThis.FontInspector?.enabled;#R=null;#G=null;#Q=0;#P=0;#Y=null;#W=null;#J=0;#_=0;#U=Object.create(null);#B=[];#K=null;#$=[];#f=new WeakMap;#I=null;static#V=new Map;static#j=new Map;static#k=new WeakMap;static#A=null;static#H=new Set;constructor({textContentSource:Z,container:q,viewport:X}){if(Z instanceof ReadableStream)this.#K=Z;else{if(typeof Z!="object")throw Error('No "textContentSource" parameter specified.');this.#K=new ReadableStream({start(Q){Q.enqueue(Z),Q.close()}})}this.#q=this.#W=q,this.#_=X.scale*u0.pixelRatio,this.#J=X.rotation,this.#G={div:null,properties:null,ctx:null};let{pageWidth:z,pageHeight:R,pageX:G,pageY:P}=X.rawDims;this.#I=[1,0,0,-1,-G,P+R],this.#P=z,this.#Q=R,h8.#F(),i4(q,X),this.#Z.promise.finally(()=>{h8.#H.delete(this),this.#G=null,this.#U=null}).catch(()=>{})}static get fontFamilyMap(){let{isWindows:Z,isFirefox:q}=T8.platform;return D1(this,"fontFamilyMap",new Map([["sans-serif",(Z&&q?"Calibri, ":"")+"sans-serif"],["monospace",(Z&&q?"Lucida Console, ":"")+"monospace"]]))}render(){let Z=()=>{this.#Y.read().then(({value:q,done:X})=>{X?this.#Z.resolve():(this.#R??=q.lang,Object.assign(this.#U,q.styles),this.#N(q.items),Z())},this.#Z.reject)};return this.#Y=this.#K.getReader(),h8.#H.add(this),Z(),this.#Z.promise}update({viewport:Z,onBefore:q=null}){let X=Z.scale*u0.pixelRatio,z=Z.rotation;if(z!==this.#J&&(q?.(),this.#J=z,i4(this.#W,{rotation:z})),X!==this.#_){q?.(),this.#_=X;let R={div:null,properties:null,ctx:h8.#v(this.#R)};for(let G of this.#$)R.properties=this.#f.get(G),R.div=G,this.#L(R)}}cancel(){let Z=new P4("TextLayer task cancelled.");this.#Y?.cancel(Z).catch(()=>{}),this.#Y=null,this.#Z.reject(Z)}get textDivs(){return this.#$}get textContentItemsStr(){return this.#B}#N(Z){if(this.#z)return;this.#G.ctx??=h8.#v(this.#R);let q=this.#$,X=this.#B;for(let z of Z){if(q.length>1e5)return p1("Ignoring additional textDivs for performance reasons."),void(this.#z=!0);if(z.str!==void 0)X.push(z.str),this.#M(z);else if(z.type==="beginMarkedContentProps"||z.type==="beginMarkedContent"){let R=this.#q;this.#q=document.createElement("span"),this.#q.classList.add("markedContent"),z.id&&this.#q.setAttribute("id",`${z.id}`),R.append(this.#q)}else z.type==="endMarkedContent"&&(this.#q=this.#q.parentNode)}}#M(Z){let q=document.createElement("span"),X={angle:0,canvasWidth:0,hasText:Z.str!=="",hasEOL:Z.hasEOL,fontSize:0};this.#$.push(q);let z=j1.transform(this.#I,Z.transform),R=Math.atan2(z[1],z[0]),G=this.#U[Z.fontName];G.vertical&&(R+=Math.PI/2);let P=this.#X&&G.fontSubstitution||G.fontFamily;P=h8.fontFamilyMap.get(P)||P;let Q=Math.hypot(z[2],z[3]),Y=Q*h8.#D(P,G,this.#R),W,$;R===0?(W=z[4],$=z[5]-Y):(W=z[4]+Y*Math.sin(R),$=z[5]-Y*Math.cos(R));let _="calc(var(--total-scale-factor) *",J=q.style;this.#q===this.#W?(J.left=`${(100*W/this.#P).toFixed(2)}%`,J.top=`${(100*$/this.#Q).toFixed(2)}%`):(J.left=`${_}${W.toFixed(2)}px)`,J.top=`${_}${$.toFixed(2)}px)`),J.fontSize=`${_}${(h8.#A*Q).toFixed(2)}px)`,J.fontFamily=P,X.fontSize=Q,q.setAttribute("role","presentation"),q.textContent=Z.str,q.dir=Z.dir,this.#X&&(q.dataset.fontName=G.fontSubstitutionLoadedName||Z.fontName),R!==0&&(X.angle=R*(180/Math.PI));let U=!1;if(Z.str.length>1)U=!0;else if(Z.str!==" "&&Z.transform[0]!==Z.transform[3]){let f=Math.abs(Z.transform[0]),K=Math.abs(Z.transform[3]);f!==K&&Math.max(f,K)/Math.min(f,K)>1.5&&(U=!0)}if(U&&(X.canvasWidth=G.vertical?Z.height:Z.width),this.#f.set(q,X),this.#G.div=q,this.#G.properties=X,this.#L(this.#G),X.hasText&&this.#q.append(q),X.hasEOL){let f=document.createElement("br");f.setAttribute("role","presentation"),this.#q.append(f)}}#L(Z){let{div:q,properties:X,ctx:z}=Z,{style:R}=q,G="";if(h8.#A>1&&(G=`scale(${1/h8.#A})`),X.canvasWidth!==0&&X.hasText){let{fontFamily:P}=R,{canvasWidth:Q,fontSize:Y}=X;h8.#C(z,Y*this.#_,P);let{width:W}=z.measureText(q.textContent);W>0&&(G=`scaleX(${Q*this.#_/W}) ${G}`)}X.angle!==0&&(G=`rotate(${X.angle}deg) ${G}`),G.length>0&&(R.transform=G)}static cleanup(){if(!(this.#H.size>0)){this.#V.clear();for(let{canvas:Z}of this.#j.values())Z.remove();this.#j.clear()}}static#v(Z=null){let q=this.#j.get(Z||="");if(!q){let X=document.createElement("canvas");X.className="hiddenCanvasElement",X.lang=Z,document.body.append(X),q=X.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#j.set(Z,q),this.#k.set(q,{size:0,family:""})}return q}static#C(Z,q,X){let z=this.#k.get(Z);q===z.size&&X===z.family||(Z.font=`${q}px ${X}`,z.size=q,z.family=X)}static#F(){if(this.#A!==null)return;let Z=document.createElement("div");Z.style.opacity=0,Z.style.lineHeight=1,Z.style.fontSize="1px",Z.style.position="absolute",Z.textContent="X",document.body.append(Z),this.#A=Z.getBoundingClientRect().height,Z.remove()}static#D(Z,q,X){let z=this.#V.get(Z);if(z)return z;let R=this.#v(X);R.canvas.width=R.canvas.height=30,this.#C(R,30,Z);let G=R.measureText(""),P=G.fontBoundingBoxAscent,Q=Math.abs(G.fontBoundingBoxDescent);R.canvas.width=R.canvas.height=0;let Y=0.8;return P?Y=P/(P+Q):(T8.platform.isFirefox&&p1("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),q.ascent?Y=q.ascent:q.descent&&(Y=1+q.descent)),this.#V.set(Z,Y),Y}};v8=class v8{#Z=Promise.withResolvers();#q=null;#z=null;#X=null;static#R=0;static#G=!0;static#Q=new WeakMap;static{R0&&(this.#G=!0,b5.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(Z,q)=>{let X=URL.parse(Z);if(!X?.origin||X.origin==="null")return!1;let z=new URL(q,X);return X.origin===z.origin},this._createCDNWrapper=(Z)=>{let q=`await import("${Z}");`;return URL.createObjectURL(new Blob([q],{type:"text/javascript"}))},this.fromPort=(Z)=>{var q;if(q="`PDFWorker.fromPort` - please use `PDFWorker.create` instead.",console.log("Deprecated API usage: "+q),!Z?.port)throw Error("PDFWorker.fromPort - invalid method signature.");return this.create(Z)}}constructor({name:Z=null,port:q=null,verbosity:X=jH()}={}){if(this.name=Z,this.destroyed=!1,this.verbosity=X,q){if(v8.#Q.has(q))throw Error("Cannot use more than one PDFWorker per port.");v8.#Q.set(q,this),this.#Y(q)}else this.#W()}get promise(){return this.#Z.promise}#P(){this.#Z.resolve(),this.#q.send("configure",{verbosity:this.verbosity})}get port(){return this.#z}get messageHandler(){return this.#q}#Y(Z){this.#z=Z,this.#q=new P6("main","worker",Z),this.#q.on("ready",()=>{}),this.#P()}#W(){if(v8.#G||v8.#_)return void this.#J();let{workerSrc:Z}=v8;try{v8._isSameOrigin(window.location,Z)||(Z=v8._createCDNWrapper(new URL(Z,window.location).href));let q=new Worker(Z,{type:"module"}),X=new P6("main","worker",q),z=()=>{R.abort(),X.destroy(),q.terminate(),this.destroyed?this.#Z.reject(Error("Worker was destroyed")):this.#J()},R=new AbortController;q.addEventListener("error",()=>{this.#X||z()},{signal:R.signal}),X.on("test",(P)=>{R.abort(),!this.destroyed&&P?(this.#q=X,this.#z=q,this.#X=q,this.#P()):z()}),X.on("ready",(P)=>{if(R.abort(),this.destroyed)z();else try{G()}catch{this.#J()}});let G=()=>{let P=new Uint8Array;X.send("test",P,[P.buffer])};return void G()}catch{F9("The worker has been disabled.")}this.#J()}#J(){v8.#G||(p1("Setting up fake worker."),v8.#G=!0),v8._setupFakeWorkerGlobal.then((Z)=>{if(this.destroyed)return void this.#Z.reject(Error("Worker was destroyed"));let q=new Of;this.#z=q;let X="fake"+v8.#R++,z=new P6(X+"_worker",X,q);Z.setup(z,q),this.#q=new P6(X,X+"_worker",q),this.#P()}).catch((Z)=>{this.#Z.reject(Error(`Setting up fake worker failed: "${Z.message}".`))})}destroy(){this.destroyed=!0,this.#X?.terminate(),this.#X=null,v8.#Q.delete(this.#z),this.#z=null,this.#q?.destroy(),this.#q=null}static create(Z){let q=this.#Q.get(Z?.port);if(q){if(q._pendingDestroy)throw Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return q}return new v8(Z)}static get workerSrc(){if(b5.workerSrc)return b5.workerSrc;throw Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#_(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return D1(this,"_setupFakeWorkerGlobal",(async()=>{if(this.#_)return this.#_;return(await import(this.workerSrc)).WorkerMessageHandler})())}};Y6=class Y6{#Z=null;static#q=new WeakSet;constructor({callback:Z,params:q,objs:X,commonObjs:z,annotationCanvasMap:R,operatorList:G,pageIndex:P,canvasFactory:Q,filterFactory:Y,useRequestAnimationFrame:W=!1,pdfBug:$=!1,pageColors:_=null,enableHWA:J=!1,operationsFilter:U=null}){this.callback=Z,this.params=q,this.objs=X,this.commonObjs=z,this.annotationCanvasMap=R,this.operatorListIdx=null,this.operatorList=G,this._pageIndex=P,this.canvasFactory=Q,this.filterFactory=Y,this._pdfBug=$,this.pageColors=_,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=W===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new xK(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=q.canvas,this._canvasContext=q.canvas?null:q.canvasContext,this._enableHWA=J,this._dependencyTracker=q.dependencyTracker,this._operationsFilter=U}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:Z=!1,optionalContentConfig:q}){if(this.cancelled)return;if(this._canvas){if(Y6.#q.has(this._canvas))throw Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Y6.#q.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());let{viewport:X,transform:z,background:R,dependencyTracker:G}=this.params,P=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new U6(P,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:q},this.annotationCanvasMap,this.pageColors,G),this.gfx.beginDrawing({transform:z,viewport:X,transparency:Z,background:R}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(Z=null,q=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#Z&&(window.cancelAnimationFrame(this.#Z),this.#Z=null),Y6.#q.delete(this._canvas),Z||=new Y2(`Rendering cancelled, page ${this._pageIndex+1}`,q),this.callback(Z),this.task.onError?.(Z)}operatorListChanged(){this.graphicsReady?(this.gfx.dependencyTracker?.growOperationsCount(this.operatorList.fnArray.length),this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#Z=window.requestAnimationFrame(()=>{this.#Z=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Y6.#q.delete(this._canvas),this.callback())))}};F6=class F6 extends LK{_createSVG(Z){return document.createElementNS($4,Z)}};D5=new WeakSet,bH=60*new Date().getTimezoneOffset()*1000;kK=class kK extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0}),this.editor=Z.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){let{editor:Z}=this;Z.hasComment&&(this._createPopup(Z.comment),this.extraPopupElement.popup.renderCommentButton())}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(Z){this.editor.comment=Z,Z||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.container.remove(),this.container=null,this.removePopup()}};p9=class p9 extends f8{constructor(Z,q=null){super(Z,{isRenderable:!0,ignoreBorder:!!q?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=Z.data.isTooltipOnly}render(){let{data:Z,linkService:q}=this,X=document.createElement("a");X.setAttribute("data-element-id",Z.id);let z=!1;return Z.url?(q.addLinkAttributes(X,Z.url,Z.newWindow),z=!0):Z.action?(this._bindNamedAction(X,Z.action,Z.overlaidText),z=!0):Z.attachment?(this.#q(X,Z.attachment,Z.overlaidText,Z.attachmentDest),z=!0):Z.setOCGState?(this.#z(X,Z.setOCGState,Z.overlaidText),z=!0):Z.dest?(this._bindLink(X,Z.dest,Z.overlaidText),z=!0):(Z.actions&&(Z.actions.Action||Z.actions["Mouse Up"]||Z.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(X,Z),z=!0),Z.resetForm?(this._bindResetFormAction(X,Z.resetForm),z=!0):this.isTooltipOnly&&!z&&(this._bindLink(X,""),z=!0)),this.container.classList.add("linkAnnotation"),z&&this.container.append(X),this.container}#Z(){this.container.setAttribute("data-internal-link","")}_bindLink(Z,q,X=""){Z.href=this.linkService.getDestinationHash(q),Z.onclick=()=>(q&&this.linkService.goToDestination(q),!1),(q||q==="")&&this.#Z(),X&&(Z.title=X)}_bindNamedAction(Z,q,X=""){Z.href=this.linkService.getAnchorUrl(""),Z.onclick=()=>(this.linkService.executeNamedAction(q),!1),X&&(Z.title=X),this.#Z()}#q(Z,q,X="",z=null){Z.href=this.linkService.getAnchorUrl(""),q.description?Z.title=q.description:X&&(Z.title=X),Z.onclick=()=>(this.downloadManager?.openOrDownloadData(q.content,q.filename,z),!1),this.#Z()}#z(Z,q,X=""){Z.href=this.linkService.getAnchorUrl(""),Z.onclick=()=>(this.linkService.executeSetOCGState(q),!1),X&&(Z.title=X),this.#Z()}_bindJSAction(Z,q){Z.href=this.linkService.getAnchorUrl("");let X=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let z of Object.keys(q.actions)){let R=X.get(z);R&&(Z[R]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:q.id,name:z}}),!1))}q.overlaidText&&(Z.title=q.overlaidText),Z.onclick||(Z.onclick=()=>!1),this.#Z()}_bindResetFormAction(Z,q){let X=Z.onclick;if(X||(Z.href=this.linkService.getAnchorUrl("")),this.#Z(),!this._fieldObjects)return p1('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(X||(Z.onclick=()=>!1));Z.onclick=()=>{X?.();let{fields:z,refs:R,include:G}=q,P=[];if(z.length!==0||R.length!==0){let W=new Set(R);for(let $ of z){let _=this._fieldObjects[$]||[];for(let{id:J}of _)W.add(J)}for(let $ of Object.values(this._fieldObjects))for(let _ of $)W.has(_.id)===G&&P.push(_)}else for(let W of Object.values(this._fieldObjects))P.push(...W);let Q=this.annotationStorage,Y=[];for(let W of P){let{id:$}=W;switch(Y.push($),W.type){case"text":{let J=W.defaultValue||"";Q.setValue($,{value:J});break}case"checkbox":case"radiobutton":{let J=W.defaultValue===W.exportValues;Q.setValue($,{value:J});break}case"combobox":case"listbox":{let J=W.defaultValue||"";Q.setValue($,{value:J});break}default:continue}let _=document.querySelector(`[data-element-id="${$}"]`);_&&(D5.has(_)?_.dispatchEvent(new Event("resetform")):p1(`_bindResetFormAction - element not allowed: ${$}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Y,name:"ResetForm"}}),!1}}};TK=class TK extends f8{constructor(Z){super(Z,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");let Z=document.createElement("img");return Z.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",Z.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),Z.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(Z),this.container}};Z5=class Z5 extends f8{render(){return this.container}showElementAndHideCanvas(Z){this.data.hasOwnCanvas&&(Z.previousSibling?.nodeName==="CANVAS"&&(Z.previousSibling.hidden=!0),Z.hidden=!1)}_getKeyModifier(Z){return T8.platform.isMac?Z.metaKey:Z.ctrlKey}_setEventListener(Z,q,X,z,R){X.includes("mouse")?Z.addEventListener(X,(G)=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:z,value:R(G),shift:G.shiftKey,modifier:this._getKeyModifier(G)}})}):Z.addEventListener(X,(G)=>{if(X==="blur"){if(!q.focused||!G.relatedTarget)return;q.focused=!1}else if(X==="focus"){if(q.focused)return;q.focused=!0}R&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:z,value:R(G)}})})}_setEventListeners(Z,q,X,z){for(let[R,G]of X)(G==="Action"||this.data.actions?.[G])&&(G!=="Focus"&&G!=="Blur"||(q||={focused:!1}),this._setEventListener(Z,q,R,G,z),G!=="Focus"||this.data.actions?.Blur?G!=="Blur"||this.data.actions?.Focus||this._setEventListener(Z,q,"focus","Focus",null):this._setEventListener(Z,q,"blur","Blur",null))}_setBackgroundColor(Z){let q=this.data.backgroundColor||null;Z.style.backgroundColor=q===null?"transparent":j1.makeHexColor(q[0],q[1],q[2])}_setTextStyle(Z){let q=["left","center","right"],{fontColor:X}=this.data.defaultAppearanceData,z=this.data.defaultAppearanceData.fontSize||9,R=Z.style,G,P=(Q)=>Math.round(10*Q)/10;if(this.data.multiLine){let Q=Math.abs(this.data.rect[3]-this.data.rect[1]-2),Y=Q/(Math.round(Q/(KZ*z))||1);G=Math.min(z,P(Y/KZ))}else{let Q=Math.abs(this.data.rect[3]-this.data.rect[1]-2);G=Math.min(z,P(Q/KZ))}R.fontSize=`calc(${G}px * var(--total-scale-factor))`,R.color=j1.makeHexColor(X[0],X[1],X[2]),this.data.textAlignment!==null&&(R.textAlign=q[this.data.textAlignment])}_setRequired(Z,q){q?Z.setAttribute("required",!0):Z.removeAttribute("required"),Z.setAttribute("aria-required",q)}};NK=class NK extends Z5{constructor(Z){super(Z,{isRenderable:Z.renderForms||Z.data.hasOwnCanvas||!Z.data.hasAppearance&&!!Z.data.fieldValue})}setPropertyOnSiblings(Z,q,X,z){let R=this.annotationStorage;for(let G of this._getElementsByName(Z.name,Z.id))G.domElement&&(G.domElement[q]=X),R.setValue(G.id,{[z]:X})}render(){let Z=this.annotationStorage,q=this.data.id;this.container.classList.add("textWidgetAnnotation");let X=null;if(this.renderForms){let z=Z.getValue(q,{value:this.data.fieldValue}),R=z.value||"",G=Z.getValue(q,{charLimit:this.data.maxLen}).charLimit;G&&R.length>G&&(R=R.slice(0,G));let P=z.formattedValue||this.data.textContent?.join(`
|
|
51
|
-
`)||null;P&&this.data.comb&&(P=P.replaceAll(/\s+/g,""));let Q={userValue:R,formattedValue:P,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(X=document.createElement("textarea"),X.textContent=P??R,this.data.doNotScroll&&(X.style.overflowY="hidden")):(X=document.createElement("input"),X.type=this.data.password?"password":"text",X.setAttribute("value",P??R),this.data.doNotScroll&&(X.style.overflowX="hidden")),this.data.hasOwnCanvas&&(X.hidden=!0),D5.add(X),X.setAttribute("data-element-id",q),X.disabled=this.data.readOnly,X.name=this.data.fieldName,X.tabIndex=0;let{datetimeFormat:Y,datetimeType:W,timeStep:$}=this.data,_=!!W&&this.enableScripting;Y&&(X.title=Y),this._setRequired(X,this.data.required),G&&(X.maxLength=G),X.addEventListener("input",(U)=>{Z.setValue(q,{value:U.target.value}),this.setPropertyOnSiblings(X,"value",U.target.value,"value"),Q.formattedValue=null}),X.addEventListener("resetform",(U)=>{let f=this.data.defaultFieldValue??"";X.value=Q.userValue=f,Q.formattedValue=null});let J=(U)=>{let{formattedValue:f}=Q;f!=null&&(U.target.value=f),U.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){X.addEventListener("focus",(f)=>{if(Q.focused)return;let{target:K}=f;if(_&&(K.type=W,$&&(K.step=$)),Q.userValue){let I=Q.userValue;if(_)if(W==="time"){let B=new Date(I),j=[B.getHours(),B.getMinutes(),B.getSeconds()];K.value=j.map((V)=>V.toString().padStart(2,"0")).join(":")}else K.value=new Date(I-bH).toISOString().split(W==="date"?"T":".",1)[0];else K.value=I}Q.lastCommittedValue=K.value,Q.commitKey=1,this.data.actions?.Focus||(Q.focused=!0)}),X.addEventListener("updatefromsandbox",(f)=>{this.showElementAndHideCanvas(f.target);let K={value(I){Q.userValue=I.detail.value??"",_||Z.setValue(q,{value:Q.userValue.toString()}),I.target.value=Q.userValue},formattedValue(I){let{formattedValue:B}=I.detail;Q.formattedValue=B,B!=null&&I.target!==document.activeElement&&(I.target.value=B);let j={formattedValue:B};_&&(j.value=B),Z.setValue(q,j)},selRange(I){I.target.setSelectionRange(...I.detail.selRange)},charLimit:(I)=>{let{charLimit:B}=I.detail,{target:j}=I;if(B===0)return void j.removeAttribute("maxLength");j.setAttribute("maxLength",B);let V=Q.userValue;!V||V.length<=B||(V=V.slice(0,B),j.value=Q.userValue=V,Z.setValue(q,{value:V}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:q,name:"Keystroke",value:V,willCommit:!0,commitKey:1,selStart:j.selectionStart,selEnd:j.selectionEnd}}))}};this._dispatchEventFromSandbox(K,f)}),X.addEventListener("keydown",(f)=>{Q.commitKey=1;let K=-1;if(f.key==="Escape"?K=0:f.key!=="Enter"||this.data.multiLine?f.key==="Tab"&&(Q.commitKey=3):K=2,K===-1)return;let{value:I}=f.target;Q.lastCommittedValue!==I&&(Q.lastCommittedValue=I,Q.userValue=I,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:q,name:"Keystroke",value:I,willCommit:!0,commitKey:K,selStart:f.target.selectionStart,selEnd:f.target.selectionEnd}}))});let U=J;J=null,X.addEventListener("blur",(f)=>{if(!Q.focused||!f.relatedTarget)return;this.data.actions?.Blur||(Q.focused=!1);let{target:K}=f,{value:I}=K;if(_){if(I&&W==="time"){let B=I.split(":").map((j)=>parseInt(j,10));I=new Date(2000,0,1,B[0],B[1],B[2]||0).valueOf(),K.step=""}else I.includes("T")||(I=`${I}T00:00`),I=new Date(I).valueOf();K.type="text"}Q.userValue=I,Q.lastCommittedValue!==I&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:q,name:"Keystroke",value:I,willCommit:!0,commitKey:Q.commitKey,selStart:f.target.selectionStart,selEnd:f.target.selectionEnd}}),U(f)}),this.data.actions?.Keystroke&&X.addEventListener("beforeinput",(f)=>{Q.lastCommittedValue=null;let{data:K,target:I}=f,{value:B,selectionStart:j,selectionEnd:V}=I,x=j,M=V;switch(f.inputType){case"deleteWordBackward":{let H=B.substring(0,j).match(/\w*[^\w]*$/);H&&(x-=H[0].length);break}case"deleteWordForward":{let H=B.substring(j).match(/^[^\w]*\w*/);H&&(M+=H[0].length);break}case"deleteContentBackward":j===V&&(x-=1);break;case"deleteContentForward":j===V&&(M+=1)}f.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:q,name:"Keystroke",value:B,change:K||"",willCommit:!1,selStart:x,selEnd:M}})}),this._setEventListeners(X,Q,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(f)=>f.target.value)}if(J&&X.addEventListener("blur",J),this.data.comb){let U=(this.data.rect[2]-this.data.rect[0])/G;X.classList.add("comb"),X.style.letterSpacing=`calc(${U}px * var(--total-scale-factor) - 1ch)`}}else X=document.createElement("div"),X.textContent=this.data.fieldValue,X.style.verticalAlign="middle",X.style.display="table-cell",this.data.hasOwnCanvas&&(X.hidden=!0);return this._setTextStyle(X),this._setBackgroundColor(X),this._setDefaultPropertiesFromJS(X),this.container.append(X),this.container}};CK=class CK extends Z5{constructor(Z){super(Z,{isRenderable:!!Z.data.hasOwnCanvas})}};FK=class FK extends Z5{constructor(Z){super(Z,{isRenderable:Z.renderForms})}render(){let Z=this.annotationStorage,q=this.data,X=q.id,z=Z.getValue(X,{value:q.exportValue===q.fieldValue}).value;typeof z=="string"&&(z=z!=="Off",Z.setValue(X,{value:z})),this.container.classList.add("buttonWidgetAnnotation","checkBox");let R=document.createElement("input");return D5.add(R),R.setAttribute("data-element-id",X),R.disabled=q.readOnly,this._setRequired(R,this.data.required),R.type="checkbox",R.name=q.fieldName,z&&R.setAttribute("checked",!0),R.setAttribute("exportValue",q.exportValue),R.tabIndex=0,R.addEventListener("change",(G)=>{let{name:P,checked:Q}=G.target;for(let Y of this._getElementsByName(P,X)){let W=Q&&Y.exportValue===q.exportValue;Y.domElement&&(Y.domElement.checked=W),Z.setValue(Y.id,{value:W})}Z.setValue(X,{value:Q})}),R.addEventListener("resetform",(G)=>{let P=q.defaultFieldValue||"Off";G.target.checked=P===q.exportValue}),this.enableScripting&&this.hasJSActions&&(R.addEventListener("updatefromsandbox",(G)=>{let P={value(Q){Q.target.checked=Q.detail.value!=="Off",Z.setValue(X,{value:Q.target.checked})}};this._dispatchEventFromSandbox(P,G)}),this._setEventListeners(R,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(G)=>G.target.checked)),this._setBackgroundColor(R),this._setDefaultPropertiesFromJS(R),this.container.append(R),this.container}};Lz=class Lz extends Z5{constructor(Z){super(Z,{isRenderable:Z.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let Z=this.annotationStorage,q=this.data,X=q.id,z=Z.getValue(X,{value:q.fieldValue===q.buttonValue}).value;if(typeof z=="string"&&(z=z!==q.buttonValue,Z.setValue(X,{value:z})),z)for(let G of this._getElementsByName(q.fieldName,X))Z.setValue(G.id,{value:!1});let R=document.createElement("input");if(D5.add(R),R.setAttribute("data-element-id",X),R.disabled=q.readOnly,this._setRequired(R,this.data.required),R.type="radio",R.name=q.fieldName,z&&R.setAttribute("checked",!0),R.tabIndex=0,R.addEventListener("change",(G)=>{let{name:P,checked:Q}=G.target;for(let Y of this._getElementsByName(P,X))Z.setValue(Y.id,{value:!1});Z.setValue(X,{value:Q})}),R.addEventListener("resetform",(G)=>{let P=q.defaultFieldValue;G.target.checked=P!=null&&P===q.buttonValue}),this.enableScripting&&this.hasJSActions){let G=q.buttonValue;R.addEventListener("updatefromsandbox",(P)=>{let Q={value:(Y)=>{let W=G===Y.detail.value;for(let $ of this._getElementsByName(Y.target.name)){let _=W&&$.id===X;$.domElement&&($.domElement.checked=_),Z.setValue($.id,{value:_})}}};this._dispatchEventFromSandbox(Q,P)}),this._setEventListeners(R,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(P)=>P.target.checked)}return this._setBackgroundColor(R),this._setDefaultPropertiesFromJS(R),this.container.append(R),this.container}};vK=class vK extends p9{constructor(Z){super(Z,{ignoreBorder:Z.data.hasAppearance})}render(){let Z=super.render();Z.classList.add("buttonWidgetAnnotation","pushButton");let q=Z.lastChild;return this.enableScripting&&this.hasJSActions&&q&&(this._setDefaultPropertiesFromJS(q),q.addEventListener("updatefromsandbox",(X)=>{this._dispatchEventFromSandbox({},X)})),Z}};bK=class bK extends Z5{constructor(Z){super(Z,{isRenderable:Z.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let Z=this.annotationStorage,q=this.data.id,X=Z.getValue(q,{value:this.data.fieldValue}),z=document.createElement("select");D5.add(z),z.setAttribute("data-element-id",q),z.disabled=this.data.readOnly,this._setRequired(z,this.data.required),z.name=this.data.fieldName,z.tabIndex=0;let R=this.data.combo&&this.data.options.length>0;this.data.combo||(z.size=this.data.options.length,this.data.multiSelect&&(z.multiple=!0)),z.addEventListener("resetform",(W)=>{let $=this.data.defaultFieldValue;for(let _ of z.options)_.selected=_.value===$});for(let W of this.data.options){let $=document.createElement("option");$.textContent=W.displayValue,$.value=W.exportValue,X.value.includes(W.exportValue)&&($.setAttribute("selected",!0),R=!1),z.append($)}let G=null;if(R){let W=document.createElement("option");W.value=" ",W.setAttribute("hidden",!0),W.setAttribute("selected",!0),z.prepend(W),G=()=>{W.remove(),z.removeEventListener("input",G),G=null},z.addEventListener("input",G)}let P=(W)=>{let $=W?"value":"textContent",{options:_,multiple:J}=z;return J?Array.prototype.filter.call(_,(U)=>U.selected).map((U)=>U[$]):_.selectedIndex===-1?null:_[_.selectedIndex][$]},Q=P(!1),Y=(W)=>{let $=W.target.options;return Array.prototype.map.call($,(_)=>({displayValue:_.textContent,exportValue:_.value}))};return this.enableScripting&&this.hasJSActions?(z.addEventListener("updatefromsandbox",(W)=>{let $={value(_){G?.();let J=_.detail.value,U=new Set(Array.isArray(J)?J:[J]);for(let f of z.options)f.selected=U.has(f.value);Z.setValue(q,{value:P(!0)}),Q=P(!1)},multipleSelection(_){z.multiple=!0},remove(_){let J=z.options,U=_.detail.remove;if(J[U].selected=!1,z.remove(U),J.length>0)Array.prototype.findIndex.call(J,(f)=>f.selected)===-1&&(J[0].selected=!0);Z.setValue(q,{value:P(!0),items:Y(_)}),Q=P(!1)},clear(_){for(;z.length!==0;)z.remove(0);Z.setValue(q,{value:null,items:[]}),Q=P(!1)},insert(_){let{index:J,displayValue:U,exportValue:f}=_.detail.insert,K=z.children[J],I=document.createElement("option");I.textContent=U,I.value=f,K?K.before(I):z.append(I),Z.setValue(q,{value:P(!0),items:Y(_)}),Q=P(!1)},items(_){let{items:J}=_.detail;for(;z.length!==0;)z.remove(0);for(let U of J){let{displayValue:f,exportValue:K}=U,I=document.createElement("option");I.textContent=f,I.value=K,z.append(I)}z.options.length>0&&(z.options[0].selected=!0),Z.setValue(q,{value:P(!0),items:Y(_)}),Q=P(!1)},indices(_){let J=new Set(_.detail.indices);for(let U of _.target.options)U.selected=J.has(U.index);Z.setValue(q,{value:P(!0)}),Q=P(!1)},editable(_){_.target.disabled=!_.detail.editable}};this._dispatchEventFromSandbox($,W)}),z.addEventListener("input",(W)=>{let $=P(!0),_=P(!1);Z.setValue(q,{value:$}),W.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:q,name:"Keystroke",value:Q,change:_,changeEx:$,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(z,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(W)=>W.target.value)):z.addEventListener("input",function(W){Z.setValue(q,{value:P(!0)})}),this.data.combo&&this._setTextStyle(z),this._setBackgroundColor(z),this._setDefaultPropertiesFromJS(z),this.container.append(z),this.container}};n3=class n3 extends f8{constructor(Z){let{data:q,elements:X,parent:z}=Z,R=!!z._commentManager;if(super(Z,{isRenderable:!R&&f8._hasPopupData(q)}),this.elements=X,R&&f8._hasPopupData(q)){let G=this.popup=this.#Z();for(let P of X)P.popup=G}else this.popup=null}#Z(){return new SK({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,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,commentManager:this.parent._commentManager})}render(){let{container:Z}=this;Z.classList.add("popupAnnotation"),Z.role="comment";let q=this.popup=this.#Z(),X=[];for(let z of this.elements)z.popup=q,z.container.ariaHasPopup="dialog",X.push(z.data.id),z.addHighlightArea();return this.container.setAttribute("aria-controls",X.map((z)=>`${Yz}${z}`).join(",")),this.container}};kz=class kz extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0}),this.textContent=Z.data.textContent,this.textPosition=Z.data.textPosition,this.annotationEditorType=m1.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){let Z=document.createElement("div");Z.classList.add("annotationTextContent"),Z.setAttribute("role","comment");for(let q of this.textContent){let X=document.createElement("span");X.textContent=q,Z.append(X)}this.container.append(Z)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}};mK=class mK extends f8{#Z=null;constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");let{data:Z,width:q,height:X}=this,z=this.svgFactory.create(q,X,!0),R=this.#Z=this.svgFactory.createElement("svg:line");return R.setAttribute("x1",Z.rect[2]-Z.lineCoordinates[0]),R.setAttribute("y1",Z.rect[3]-Z.lineCoordinates[1]),R.setAttribute("x2",Z.rect[2]-Z.lineCoordinates[2]),R.setAttribute("y2",Z.rect[3]-Z.lineCoordinates[3]),R.setAttribute("stroke-width",Z.borderStyle.width||1),R.setAttribute("stroke","transparent"),R.setAttribute("fill","transparent"),z.append(R),this.container.append(z),!Z.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Z}addHighlightArea(){this.container.classList.add("highlightArea")}};OK=class OK extends f8{#Z=null;constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");let{data:Z,width:q,height:X}=this,z=this.svgFactory.create(q,X,!0),R=Z.borderStyle.width,G=this.#Z=this.svgFactory.createElement("svg:rect");return G.setAttribute("x",R/2),G.setAttribute("y",R/2),G.setAttribute("width",q-R),G.setAttribute("height",X-R),G.setAttribute("stroke-width",R||1),G.setAttribute("stroke","transparent"),G.setAttribute("fill","transparent"),z.append(G),this.container.append(z),!Z.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Z}addHighlightArea(){this.container.classList.add("highlightArea")}};yK=class yK extends f8{#Z=null;constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");let{data:Z,width:q,height:X}=this,z=this.svgFactory.create(q,X,!0),R=Z.borderStyle.width,G=this.#Z=this.svgFactory.createElement("svg:ellipse");return G.setAttribute("cx",q/2),G.setAttribute("cy",X/2),G.setAttribute("rx",q/2-R/2),G.setAttribute("ry",X/2-R/2),G.setAttribute("stroke-width",R||1),G.setAttribute("stroke","transparent"),G.setAttribute("fill","transparent"),z.append(G),this.container.append(z),!Z.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Z}addHighlightArea(){this.container.classList.add("highlightArea")}};Tz=class Tz extends f8{#Z=null;constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);let{data:{rect:Z,vertices:q,borderStyle:X,popupRef:z},width:R,height:G}=this;if(!q)return this.container;let P=this.svgFactory.create(R,G,!0),Q=[];for(let W=0,$=q.length;W<$;W+=2){let _=q[W]-Z[0],J=Z[3]-q[W+1];Q.push(`${_},${J}`)}Q=Q.join(" ");let Y=this.#Z=this.svgFactory.createElement(this.svgElementName);return Y.setAttribute("points",Q),Y.setAttribute("stroke-width",X.width||1),Y.setAttribute("stroke","transparent"),Y.setAttribute("fill","transparent"),P.append(Y),this.container.append(P),!z&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Z}addHighlightArea(){this.container.classList.add("highlightArea")}};pK=class pK extends Tz{constructor(Z){super(Z),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}};DK=class DK extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}};D9=class D9 extends f8{#Z=null;#q=[];constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?m1.HIGHLIGHT:m1.INK}#z(Z,q){switch(Z){case 90:return{transform:`rotate(90) translate(${-q[0]},${q[1]}) scale(1,-1)`,width:q[3]-q[1],height:q[2]-q[0]};case 180:return{transform:`rotate(180) translate(${-q[2]},${q[1]}) scale(1,-1)`,width:q[2]-q[0],height:q[3]-q[1]};case 270:return{transform:`rotate(270) translate(${-q[2]},${q[3]}) scale(1,-1)`,width:q[3]-q[1],height:q[2]-q[0]};default:return{transform:`translate(${-q[0]},${q[3]}) scale(1,-1)`,width:q[2]-q[0],height:q[3]-q[1]}}}render(){this.container.classList.add(this.containerClassName);let{data:{rect:Z,rotation:q,inkLists:X,borderStyle:z,popupRef:R}}=this,{transform:G,width:P,height:Q}=this.#z(q,Z),Y=this.svgFactory.create(P,Q,!0),W=this.#Z=this.svgFactory.createElement("svg:g");Y.append(W),W.setAttribute("stroke-width",z.width||1),W.setAttribute("stroke-linecap","round"),W.setAttribute("stroke-linejoin","round"),W.setAttribute("stroke-miterlimit",10),W.setAttribute("stroke","transparent"),W.setAttribute("fill","transparent"),W.setAttribute("transform",G);for(let $=0,_=X.length;$<_;$++){let J=this.svgFactory.createElement(this.svgElementName);this.#q.push(J),J.setAttribute("points",X[$].join(",")),W.append(J)}return!R&&this.hasPopupData&&this._createPopup(),this.container.append(Y),this._editOnDoubleClick(),this.container}updateEdited(Z){super.updateEdited(Z);let{thickness:q,points:X,rect:z}=Z,R=this.#Z;if(q>=0&&R.setAttribute("stroke-width",q||1),X)for(let G=0,P=this.#q.length;G<P;G++)this.#q[G].setAttribute("points",X[G].join(","));if(z){let{transform:G,width:P,height:Q}=this.#z(this.data.rotation,z);R.parentElement.setAttribute("viewBox",`0 0 ${P} ${Q}`),R.setAttribute("transform",G)}}getElementsToTriggerPopup(){return this.#q}addHighlightArea(){this.container.classList.add("highlightArea")}};Nz=class Nz extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=m1.HIGHLIGHT}render(){let{data:{overlaidText:Z,popupRef:q}}=this;if(!q&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),Z){let X=document.createElement("mark");X.classList.add("overlaidText"),X.textContent=Z,this.container.append(X)}return this.container}};wK=class wK extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:Z,popupRef:q}}=this;if(!q&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),Z){let X=document.createElement("u");X.classList.add("overlaidText"),X.textContent=Z,this.container.append(X)}return this.container}};EK=class EK extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:Z,popupRef:q}}=this;if(!q&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),Z){let X=document.createElement("u");X.classList.add("overlaidText"),X.textContent=Z,this.container.append(X)}return this.container}};uK=class uK extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:Z,popupRef:q}}=this;if(!q&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),Z){let X=document.createElement("s");X.classList.add("overlaidText"),X.textContent=Z,this.container.append(X)}return this.container}};Cz=class Cz extends f8{constructor(Z){super(Z,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=m1.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}};gK=class gK extends f8{#Z=null;constructor(Z){super(Z,{isRenderable:!0});let{file:q}=this.data;this.filename=q.filename,this.content=q.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...q})}render(){this.container.classList.add("fileAttachmentAnnotation");let{container:Z,data:q}=this,X;q.hasAppearance||q.fillAlpha===0?X=document.createElement("div"):(X=document.createElement("img"),X.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(q.name)?"paperclip":"pushpin"}.svg`,q.fillAlpha&&q.fillAlpha<1&&(X.style=`filter: opacity(${Math.round(100*q.fillAlpha)}%);`)),X.addEventListener("dblclick",this.#q.bind(this)),this.#Z=X;let{isMac:z}=T8.platform;return Z.addEventListener("keydown",(R)=>{R.key==="Enter"&&(z?R.metaKey:R.ctrlKey)&&this.#q()}),!q.popupRef&&this.hasPopupData?this._createPopup():X.classList.add("popupTriggerArea"),Z.append(X),Z}getElementsToTriggerPopup(){return this.#Z}addHighlightArea(){this.container.classList.add("highlightArea")}#q(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}};E2=/\r\n?|\n/g;C8=class C8 extends k1{#Z="";#q=`${this.id}-editor`;#z=null;#X;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){let Z=C8.prototype,q=(R)=>R.isEmpty(),X=C4.TRANSLATE_SMALL,z=C4.TRANSLATE_BIG;return D1(this,"_keyboardManager",new p6([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],Z.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],Z.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],Z._translateEmpty,{args:[-X,0],checker:q}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Z._translateEmpty,{args:[-z,0],checker:q}],[["ArrowRight","mac+ArrowRight"],Z._translateEmpty,{args:[X,0],checker:q}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Z._translateEmpty,{args:[z,0],checker:q}],[["ArrowUp","mac+ArrowUp"],Z._translateEmpty,{args:[0,-X],checker:q}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Z._translateEmpty,{args:[0,-z],checker:q}],[["ArrowDown","mac+ArrowDown"],Z._translateEmpty,{args:[0,X],checker:q}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Z._translateEmpty,{args:[0,z],checker:q}]]))}static _type="freetext";static _editorType=m1.FREETEXT;constructor(Z){super({...Z,name:"freeTextEditor"}),this.color=Z.color||C8._defaultColor||k1._defaultLineColor,this.#X=Z.fontSize||C8._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(Z,q){k1.initialize(Z,q);let X=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(X.getPropertyValue("--freetext-padding"))}static updateDefaultParams(Z,q){switch(Z){case s1.FREETEXT_SIZE:C8._defaultFontSize=q;break;case s1.FREETEXT_COLOR:C8._defaultColor=q}}updateParams(Z,q){switch(Z){case s1.FREETEXT_SIZE:this.#R(q);break;case s1.FREETEXT_COLOR:this.#G(q)}}static get defaultPropertiesToUpdate(){return[[s1.FREETEXT_SIZE,C8._defaultFontSize],[s1.FREETEXT_COLOR,C8._defaultColor||k1._defaultLineColor]]}get propertiesToUpdate(){return[[s1.FREETEXT_SIZE,this.#X],[s1.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||=new o7(this),[["colorPicker",this._colorPicker]]}get colorType(){return s1.FREETEXT_COLOR}#R(Z){let q=(z)=>{this.editorDiv.style.fontSize=`calc(${z}px * var(--total-scale-factor))`,this.translate(0,-(z-this.#X)*this.parentScale),this.#X=z,this.#P()},X=this.#X;this.addCommands({cmd:q.bind(this,Z),undo:q.bind(this,X),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:s1.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}onUpdatedColor(){this.editorDiv.style.color=this.color,this._colorPicker?.update(this.color),super.onUpdatedColor()}#G(Z){let q=(z)=>{this.color=z,this.onUpdatedColor()},X=this.color;this.addCommands({cmd:q.bind(this,Z),undo:q.bind(this,X),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:s1.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(Z,q){this._uiManager.translateSelectedEditors(Z,q,!0)}getInitialTranslation(){let Z=this.parentScale;return[-C8._internalPadding*Z,-(C8._internalPadding+this.#X)*Z]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#z=new AbortController;let Z=this._uiManager.combinedSignal(this.#z);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:Z}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:Z}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:Z}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:Z}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:Z}),!0}disableEditMode(){return!!super.disableEditMode()&&(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#q),this._isDraggable=!0,this.#z?.abort(),this.#z=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0)}focusin(Z){this._focusEventsAllowed&&(super.focusin(Z),Z.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(Z){this.width||(this.enableEditMode(),Z&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#Q(){let Z=[];this.editorDiv.normalize();let q=null;for(let X of this.editorDiv.childNodes)q?.nodeType===Node.TEXT_NODE&&X.nodeName==="BR"||(Z.push(C8.#Y(X)),q=X);return Z.join(`
|
|
52
|
-
`)}#P(){let[Z,q]=this.parentDimensions,X;if(this.isAttachedToDOM)X=this.div.getBoundingClientRect();else{let{currentLayer:z,div:R}=this,G=R.style.display,P=R.classList.contains("hidden");R.classList.remove("hidden"),R.style.display="hidden",z.div.append(this.div),X=R.getBoundingClientRect(),R.remove(),R.style.display=G,R.classList.toggle("hidden",P)}this.rotation%180==this.parentRotation%180?(this.width=X.width/Z,this.height=X.height/q):(this.width=X.height/Z,this.height=X.width/q),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let Z=this.#Z,q=this.#Z=this.#Q().trimEnd();if(Z===q)return;let X=(z)=>{this.#Z=z,z?(this.#W(),this._uiManager.rebuild(this),this.#P()):this.remove()};this.addCommands({cmd:()=>{X(q)},undo:()=>{X(Z)},mustExec:!1}),this.#P()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(Z){Z.target===this.div&&Z.key==="Enter"&&(this.enterInEditMode(),Z.preventDefault())}editorDivKeydown(Z){C8._keyboardManager.exec(this,Z)}editorDivFocus(Z){this.isEditing=!0}editorDivBlur(Z){this.isEditing=!1}editorDivInput(Z){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let Z,q;(this._isCopy||this.annotationElementId)&&(Z=this.x,q=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#q),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:X}=this.editorDiv;if(X.fontSize=`calc(${this.#X}px * var(--total-scale-factor))`,X.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){let[z,R]=this.parentDimensions;if(this.annotationElementId){let{position:G}=this._initialData,[P,Q]=this.getInitialTranslation();[P,Q]=this.pageTranslationToScreen(P,Q);let[Y,W]=this.pageDimensions,[$,_]=this.pageTranslation,J,U;switch(this.rotation){case 0:J=Z+(G[0]-$)/Y,U=q+this.height-(G[1]-_)/W;break;case 90:J=Z+(G[0]-$)/Y,U=q-(G[1]-_)/W,[P,Q]=[Q,-P];break;case 180:J=Z-this.width+(G[0]-$)/Y,U=q-(G[1]-_)/W,[P,Q]=[-P,-Q];break;case 270:J=Z+(G[0]-$-this.height*W)/Y,U=q+(G[1]-_-this.width*Y)/W,[P,Q]=[-Q,P]}this.setAt(J*z,U*R,P,Q)}else this._moveAfterPaste(Z,q);this.#W(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#Y(Z){return(Z.nodeType===Node.TEXT_NODE?Z.nodeValue:Z.innerText).replaceAll(E2,"")}editorDivPaste(Z){let q=Z.clipboardData||window.clipboardData,{types:X}=q;if(X.length===1&&X[0]==="text/plain")return;Z.preventDefault();let z=C8.#_(q.getData("text")||"").replaceAll(E2,`
|
|
53
|
-
`);if(!z)return;let R=window.getSelection();if(!R.rangeCount)return;this.editorDiv.normalize(),R.deleteFromDocument();let G=R.getRangeAt(0);if(!z.includes(`
|
|
54
|
-
`))return G.insertNode(document.createTextNode(z)),this.editorDiv.normalize(),void R.collapseToStart();let{startContainer:P,startOffset:Q}=G,Y=[],W=[];if(P.nodeType===Node.TEXT_NODE){let J=P.parentElement;if(W.push(P.nodeValue.slice(Q).replaceAll(E2,"")),J!==this.editorDiv){let U=Y;for(let f of this.editorDiv.childNodes)f!==J?U.push(C8.#Y(f)):U=W}Y.push(P.nodeValue.slice(0,Q).replaceAll(E2,""))}else if(P===this.editorDiv){let J=Y,U=0;for(let f of this.editorDiv.childNodes)U++===Q&&(J=W),J.push(C8.#Y(f))}this.#Z=`${Y.join(`
|
|
55
|
-
`)}${z}${W.join(`
|
|
56
|
-
`)}`,this.#W();let $=new Range,_=Math.sumPrecise(Y.map((J)=>J.length));for(let{firstChild:J}of this.editorDiv.childNodes)if(J.nodeType===Node.TEXT_NODE){let U=J.nodeValue.length;if(_<=U){$.setStart(J,_),$.setEnd(J,_);break}_-=U}R.removeAllRanges(),R.addRange($)}#W(){if(this.editorDiv.replaceChildren(),this.#Z)for(let Z of this.#Z.split(`
|
|
57
|
-
`)){let q=document.createElement("div");q.append(Z?document.createTextNode(Z):document.createElement("br")),this.editorDiv.append(q)}}#J(){return this.#Z.replaceAll(" "," ")}static#_(Z){return Z.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}getPDFRect(){let Z=C8._internalPadding*this.parentScale;return this.getRect(Z,Z)}static async deserialize(Z,q,X){let z=null;if(Z instanceof kz){let{data:{defaultAppearanceData:{fontSize:G,fontColor:P},rect:Q,rotation:Y,id:W,popupRef:$,richText:_,contentsObj:J,creationDate:U,modificationDate:f},textContent:K,textPosition:I,parent:{page:{pageNumber:B}}}=Z;if(!K||K.length===0)return null;z=Z={annotationType:m1.FREETEXT,color:Array.from(P),fontSize:G,value:K.join(`
|
|
58
|
-
`),position:I,pageIndex:B-1,rect:Q.slice(0),rotation:Y,annotationElementId:W,id:W,deleted:!1,popupRef:$,comment:J?.str||null,richText:_,creationDate:U,modificationDate:f}}let R=await super.deserialize(Z,q,X);return R.#X=Z.fontSize,R.color=j1.makeHexColor(...Z.color),R.#Z=C8.#_(Z.value),R._initialData=z,Z.comment&&R.setCommentData(Z),R}serialize(Z=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let q=k1._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),X=Object.assign(super.serialize(Z),{color:q,fontSize:this.#X,value:this.#J()});return this.addComment(X),Z?(X.isCopy=!0,X):this.annotationElementId&&!this.#U(X)?null:(X.id=this.annotationElementId,X)}#U(Z){let{value:q,fontSize:X,color:z,pageIndex:R}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||Z.value!==q||Z.fontSize!==X||Z.color.some((G,P)=>G!==z[P])||Z.pageIndex!==R}renderAnnotationElement(Z){let q=super.renderAnnotationElement(Z);if(!q)return null;let{style:X}=q;X.fontSize=`calc(${this.#X}px * var(--total-scale-factor))`,X.color=this.color,q.replaceChildren();for(let z of this.#Z.split(`
|
|
59
|
-
`)){let R=document.createElement("div");R.append(z?document.createTextNode(z):document.createElement("br")),q.append(R)}return Z.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:this.#Z}}),q}resetAnnotationElement(Z){super.resetAnnotationElement(Z),Z.resetEdited()}};H5=class H5{#Z;#q=[];#z;#X;#R=[];#G=new Float32Array(18);#Q;#P;#Y;#W;#J;#_;#U=[];static#B=8;static#K=2;static#$=H5.#B+H5.#K;constructor({x:Z,y:q},X,z,R,G,P=0){this.#Z=X,this.#_=R*z,this.#X=G,this.#G.set([NaN,NaN,NaN,NaN,Z,q],6),this.#z=P,this.#W=H5.#B*z,this.#Y=H5.#$*z,this.#J=z,this.#U.push(Z,q)}isEmpty(){return isNaN(this.#G[8])}#f(){let Z=this.#G.subarray(4,6),q=this.#G.subarray(16,18),[X,z,R,G]=this.#Z;return[(this.#Q+(Z[0]-q[0])/2-X)/R,(this.#P+(Z[1]-q[1])/2-z)/G,(this.#Q+(q[0]-Z[0])/2-X)/R,(this.#P+(q[1]-Z[1])/2-z)/G]}add({x:Z,y:q}){this.#Q=Z,this.#P=q;let[X,z,R,G]=this.#Z,[P,Q,Y,W]=this.#G.subarray(8,12),$=Z-Y,_=q-W,J=Math.hypot($,_);if(J<this.#Y)return!1;let U=J-this.#W,f=U/J,K=f*$,I=f*_,B=P,j=Q;P=Y,Q=W,Y+=K,W+=I,this.#U?.push(Z,q);let V=K/U,x=-I/U*this.#_,M=V*this.#_;if(this.#G.set(this.#G.subarray(2,8),0),this.#G.set([Y+x,W+M],4),this.#G.set(this.#G.subarray(14,18),12),this.#G.set([Y-x,W-M],16),isNaN(this.#G[6]))return this.#R.length===0&&(this.#G.set([P+x,Q+M],2),this.#R.push(NaN,NaN,NaN,NaN,(P+x-X)/R,(Q+M-z)/G),this.#G.set([P-x,Q-M],14),this.#q.push(NaN,NaN,NaN,NaN,(P-x-X)/R,(Q-M-z)/G)),this.#G.set([B,j,P,Q,Y,W],6),!this.isEmpty();return this.#G.set([B,j,P,Q,Y,W],6),Math.abs(Math.atan2(j-Q,B-P)-Math.atan2(I,K))<Math.PI/2?([P,Q,Y,W]=this.#G.subarray(2,6),this.#R.push(NaN,NaN,NaN,NaN,((P+Y)/2-X)/R,((Q+W)/2-z)/G),[P,Q,B,j]=this.#G.subarray(14,18),this.#q.push(NaN,NaN,NaN,NaN,((B+P)/2-X)/R,((j+Q)/2-z)/G),!0):([B,j,P,Q,Y,W]=this.#G.subarray(0,6),this.#R.push(((B+5*P)/6-X)/R,((j+5*Q)/6-z)/G,((5*P+Y)/6-X)/R,((5*Q+W)/6-z)/G,((P+Y)/2-X)/R,((Q+W)/2-z)/G),[Y,W,P,Q,B,j]=this.#G.subarray(12,18),this.#q.push(((B+5*P)/6-X)/R,((j+5*Q)/6-z)/G,((5*P+Y)/6-X)/R,((5*Q+W)/6-z)/G,((P+Y)/2-X)/R,((Q+W)/2-z)/G),!0)}toSVGPath(){if(this.isEmpty())return"";let Z=this.#R,q=this.#q;if(isNaN(this.#G[6])&&!this.isEmpty())return this.#I();let X=[];X.push(`M${Z[4]} ${Z[5]}`);for(let z=6;z<Z.length;z+=6)isNaN(Z[z])?X.push(`L${Z[z+4]} ${Z[z+5]}`):X.push(`C${Z[z]} ${Z[z+1]} ${Z[z+2]} ${Z[z+3]} ${Z[z+4]} ${Z[z+5]}`);this.#j(X);for(let z=q.length-6;z>=6;z-=6)isNaN(q[z])?X.push(`L${q[z+4]} ${q[z+5]}`):X.push(`C${q[z]} ${q[z+1]} ${q[z+2]} ${q[z+3]} ${q[z+4]} ${q[z+5]}`);return this.#V(X),X.join(" ")}#I(){let[Z,q,X,z]=this.#Z,[R,G,P,Q]=this.#f();return`M${(this.#G[2]-Z)/X} ${(this.#G[3]-q)/z} L${(this.#G[4]-Z)/X} ${(this.#G[5]-q)/z} L${R} ${G} L${P} ${Q} L${(this.#G[16]-Z)/X} ${(this.#G[17]-q)/z} L${(this.#G[14]-Z)/X} ${(this.#G[15]-q)/z} Z`}#V(Z){let q=this.#q;Z.push(`L${q[4]} ${q[5]} Z`)}#j(Z){let[q,X,z,R]=this.#Z,G=this.#G.subarray(4,6),P=this.#G.subarray(16,18),[Q,Y,W,$]=this.#f();Z.push(`L${(G[0]-q)/z} ${(G[1]-X)/R} L${Q} ${Y} L${W} ${$} L${(P[0]-q)/z} ${(P[1]-X)/R}`)}newFreeDrawOutline(Z,q,X,z,R,G){return new Fz(Z,q,X,z,R,G)}getOutlines(){let Z=this.#R,q=this.#q,X=this.#G,[z,R,G,P]=this.#Z,Q=new Float32Array((this.#U?.length??0)+2);for(let $=0,_=Q.length-2;$<_;$+=2)Q[$]=(this.#U[$]-z)/G,Q[$+1]=(this.#U[$+1]-R)/P;if(Q[Q.length-2]=(this.#Q-z)/G,Q[Q.length-1]=(this.#P-R)/P,isNaN(X[6])&&!this.isEmpty())return this.#k(Q);let Y=new Float32Array(this.#R.length+24+this.#q.length),W=Z.length;for(let $=0;$<W;$+=2)isNaN(Z[$])?Y[$]=Y[$+1]=NaN:(Y[$]=Z[$],Y[$+1]=Z[$+1]);W=this.#H(Y,W);for(let $=q.length-6;$>=6;$-=6)for(let _=0;_<6;_+=2)isNaN(q[$+_])?(Y[W]=Y[W+1]=NaN,W+=2):(Y[W]=q[$+_],Y[W+1]=q[$+_+1],W+=2);return this.#A(Y,W),this.newFreeDrawOutline(Y,Q,this.#Z,this.#J,this.#z,this.#X)}#k(Z){let q=this.#G,[X,z,R,G]=this.#Z,[P,Q,Y,W]=this.#f(),$=new Float32Array(36);return $.set([NaN,NaN,NaN,NaN,(q[2]-X)/R,(q[3]-z)/G,NaN,NaN,NaN,NaN,(q[4]-X)/R,(q[5]-z)/G,NaN,NaN,NaN,NaN,P,Q,NaN,NaN,NaN,NaN,Y,W,NaN,NaN,NaN,NaN,(q[16]-X)/R,(q[17]-z)/G,NaN,NaN,NaN,NaN,(q[14]-X)/R,(q[15]-z)/G],0),this.newFreeDrawOutline($,Z,this.#Z,this.#J,this.#z,this.#X)}#A(Z,q){let X=this.#q;return Z.set([NaN,NaN,NaN,NaN,X[4],X[5]],q),q+6}#H(Z,q){let X=this.#G.subarray(4,6),z=this.#G.subarray(16,18),[R,G,P,Q]=this.#Z,[Y,W,$,_]=this.#f();return Z.set([NaN,NaN,NaN,NaN,(X[0]-R)/P,(X[1]-G)/Q,NaN,NaN,NaN,NaN,Y,W,NaN,NaN,NaN,NaN,$,_,NaN,NaN,NaN,NaN,(z[0]-R)/P,(z[1]-G)/Q],q),q+24}};Fz=class Fz extends I1{#Z;#q=new Float32Array(4);#z;#X;#R;#G;#Q;constructor(Z,q,X,z,R,G){super(),this.#Q=Z,this.#R=q,this.#Z=X,this.#G=z,this.#z=R,this.#X=G,this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],this.#P(G);let[P,Q,Y,W]=this.#q;for(let $=0,_=Z.length;$<_;$+=2)Z[$]=(Z[$]-P)/Y,Z[$+1]=(Z[$+1]-Q)/W;for(let $=0,_=q.length;$<_;$+=2)q[$]=(q[$]-P)/Y,q[$+1]=(q[$+1]-Q)/W}toSVGPath(){let Z=[`M${this.#Q[4]} ${this.#Q[5]}`];for(let q=6,X=this.#Q.length;q<X;q+=6)isNaN(this.#Q[q])?Z.push(`L${this.#Q[q+4]} ${this.#Q[q+5]}`):Z.push(`C${this.#Q[q]} ${this.#Q[q+1]} ${this.#Q[q+2]} ${this.#Q[q+3]} ${this.#Q[q+4]} ${this.#Q[q+5]}`);return Z.push("Z"),Z.join(" ")}serialize([Z,q,X,z],R){let G=X-Z,P=z-q,Q,Y;switch(R){case 0:Q=I1._rescale(this.#Q,Z,z,G,-P),Y=I1._rescale(this.#R,Z,z,G,-P);break;case 90:Q=I1._rescaleAndSwap(this.#Q,Z,q,G,P),Y=I1._rescaleAndSwap(this.#R,Z,q,G,P);break;case 180:Q=I1._rescale(this.#Q,X,q,-G,P),Y=I1._rescale(this.#R,X,q,-G,P);break;case 270:Q=I1._rescaleAndSwap(this.#Q,X,z,-G,-P),Y=I1._rescaleAndSwap(this.#R,X,z,-G,-P)}return{outline:Array.from(Q),points:[Array.from(Y)]}}#P(Z){let q=this.#Q,X=q[4],z=q[5],R=[X,z,X,z],G=X,P=z,Q=X,Y=z,W=Z?Math.max:Math.min,$=new Float32Array(4);for(let J=6,U=q.length;J<U;J+=6){let f=q[J+4],K=q[J+5];isNaN(q[J])?(j1.pointBoundingBox(f,K,R),P>K?(G=f,P=K):P===K&&(G=W(G,f)),Y<K?(Q=f,Y=K):Y===K&&(Q=W(Q,f))):($[0]=$[1]=1/0,$[2]=$[3]=-1/0,j1.bezierBoundingBox(X,z,...q.slice(J,J+6),$),j1.rectBoundingBox($[0],$[1],$[2],$[3],R),P>$[1]?(G=$[0],P=$[1]):P===$[1]&&(G=W(G,$[0])),Y<$[3]?(Q=$[2],Y=$[3]):Y===$[3]&&(Q=W(Q,$[2]))),X=f,z=K}let _=this.#q;_[0]=R[0]-this.#z,_[1]=R[1]-this.#z,_[2]=R[2]-R[0]+2*this.#z,_[3]=R[3]-R[1]+2*this.#z,this.firstPoint=[G,P],this.lastPoint=[Q,Y]}get box(){return this.#q}newOutliner(Z,q,X,z,R,G=0){return new H5(Z,q,X,z,R,G)}getNewOutline(Z,q){let[X,z,R,G]=this.#q,[P,Q,Y,W]=this.#Z,$=R*Y,_=G*W,J=X*Y+P,U=z*W+Q,f=this.newOutliner({x:this.#R[0]*$+J,y:this.#R[1]*_+U},this.#Z,this.#G,Z,this.#X,q??this.#z);for(let K=2;K<this.#R.length;K+=2)f.add({x:this.#R[K]*$+J,y:this.#R[K+1]*_+U});return f.getOutlines()}};dK=class dK extends I1{#Z;#q;constructor(Z,q,X,z){super(),this.#q=Z,this.#Z=q,this.firstPoint=X,this.lastPoint=z}toSVGPath(){let Z=[];for(let q of this.#q){let[X,z]=q;Z.push(`M${X} ${z}`);for(let R=2;R<q.length;R+=2){let G=q[R],P=q[R+1];G===X?(Z.push(`V${P}`),z=P):P===z&&(Z.push(`H${G}`),X=G)}Z.push("Z")}return Z.join(" ")}serialize([Z,q,X,z],R){let G=[],P=X-Z,Q=z-q;for(let Y of this.#q){let W=Array(Y.length);for(let $=0;$<Y.length;$+=2)W[$]=Z+Y[$]*P,W[$+1]=z-Y[$+1]*Q;G.push(W)}return G}get box(){return this.#Z}get classNamesForOutlining(){return["highlightOutline"]}};t3=class t3 extends H5{newFreeDrawOutline(Z,q,X,z,R,G){return new cK(Z,q,X,z,R,G)}};cK=class cK extends Fz{newOutliner(Z,q,X,z,R,G=0){return new t3(Z,q,X,z,R,G)}};H8=class H8 extends k1{#Z=null;#q=0;#z;#X=null;#R=null;#G=null;#Q=null;#P=0;#Y=null;#W=null;#J=null;#_=!1;#U=null;#B=null;#K=null;#$="";#f;#I="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=m1.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){let Z=H8.prototype;return D1(this,"_keyboardManager",new p6([[["ArrowLeft","mac+ArrowLeft"],Z._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],Z._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],Z._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],Z._moveCaret,{args:[3]}]]))}constructor(Z){super({...Z,name:"highlightEditor"}),this.color=Z.color||H8._defaultColor,this.#f=Z.thickness||H8._defaultThickness,this.opacity=Z.opacity||H8._defaultOpacity,this.#z=Z.boxes||null,this.#I=Z.methodOfCreation||"",this.#$=Z.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",Z.highlightId>-1?(this.#_=!0,this.#j(Z),this.#M()):this.#z&&(this.#Z=Z.anchorNode,this.#q=Z.anchorOffset,this.#Q=Z.focusNode,this.#P=Z.focusOffset,this.#V(),this.#M(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#_?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#f,methodOfCreation:this.#I}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(Z){return{numberOfColors:Z.get("color").size}}#V(){let Z=new i3(this.#z,0.001);this.#W=Z.getOutlines(),[this.x,this.y,this.width,this.height]=this.#W.box;let q=new i3(this.#z,0.0025,0.001,this._uiManager.direction==="ltr");this.#G=q.getOutlines();let{firstPoint:X}=this.#W;this.#U=[(X[0]-this.x)/this.width,(X[1]-this.y)/this.height];let{lastPoint:z}=this.#G;this.#B=[(z[0]-this.x)/this.width,(z[1]-this.y)/this.height]}#j({highlightOutlines:Z,highlightId:q,clipPathId:X}){if(this.#W=Z,this.#G=Z.getNewOutline(this.#f/2+1.5,0.0025),q>=0)this.#J=q,this.#X=X,this.parent.drawLayer.finalizeDraw(q,{bbox:Z.box,path:{d:Z.toSVGPath()}}),this.#K=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#G.box,path:{d:this.#G.toSVGPath()}},!0);else if(this.parent){let W=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#J,{bbox:H8.#L(this.#W.box,(W-this.rotation+360)%360),path:{d:Z.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#K,{bbox:H8.#L(this.#G.box,W),path:{d:this.#G.toSVGPath()}})}let[z,R,G,P]=Z.box;switch(this.rotation){case 0:this.x=z,this.y=R,this.width=G,this.height=P;break;case 90:{let[W,$]=this.parentDimensions;this.x=R,this.y=1-z,this.width=G*$/W,this.height=P*W/$;break}case 180:this.x=1-z,this.y=1-R,this.width=G,this.height=P;break;case 270:{let[W,$]=this.parentDimensions;this.x=1-R,this.y=z,this.width=G*$/W,this.height=P*W/$;break}}let{firstPoint:Q}=Z;this.#U=[(Q[0]-z)/G,(Q[1]-R)/P];let{lastPoint:Y}=this.#G;this.#B=[(Y[0]-z)/G,(Y[1]-R)/P]}static initialize(Z,q){k1.initialize(Z,q),H8._defaultColor||=q.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(Z,q){switch(Z){case s1.HIGHLIGHT_COLOR:H8._defaultColor=q;break;case s1.HIGHLIGHT_THICKNESS:H8._defaultThickness=q}}translateInPage(Z,q){}get toolbarPosition(){return this.#B}get commentButtonPosition(){return this.#U}updateParams(Z,q){switch(Z){case s1.HIGHLIGHT_COLOR:this.#k(q);break;case s1.HIGHLIGHT_THICKNESS:this.#A(q)}}static get defaultPropertiesToUpdate(){return[[s1.HIGHLIGHT_COLOR,H8._defaultColor],[s1.HIGHLIGHT_THICKNESS,H8._defaultThickness]]}get propertiesToUpdate(){return[[s1.HIGHLIGHT_COLOR,this.color||H8._defaultColor],[s1.HIGHLIGHT_THICKNESS,this.#f||H8._defaultThickness],[s1.HIGHLIGHT_FREE,this.#_]]}onUpdatedColor(){this.parent?.drawLayer.updateProperties(this.#J,{root:{fill:this.color,"fill-opacity":this.opacity}}),this.#R?.updateColor(this.color),super.onUpdatedColor()}#k(Z){let q=(R,G)=>{this.color=R,this.opacity=G,this.onUpdatedColor()},X=this.color,z=this.opacity;this.addCommands({cmd:q.bind(this,Z,H8._defaultOpacity),undo:q.bind(this,X,z),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:s1.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(Z)},!0)}#A(Z){let q=this.#f,X=(z)=>{this.#f=z,this.#H(z)};this.addCommands({cmd:X.bind(this,Z),undo:X.bind(this,q),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:s1.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:Z},!0)}get toolbarButtons(){if(this._uiManager.highlightColors)return[["colorPicker",this.#R=new B0({editor:this})]];return super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#F())}getBaseTranslation(){return[0,0]}getRect(Z,q){return super.getRect(Z,q,this.#F())}onceAdded(Z){this.annotationElementId||this.parent.addUndoableEditor(this),Z&&this.div.focus()}remove(){this.#N(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#M(),this.isAttachedToDOM||this.parent.add(this)))}setParent(Z){let q=!1;this.parent&&!Z?this.#N():Z&&(this.#M(Z),q=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(Z),this.show(this._isVisible),q&&this.select()}#H(Z){this.#_&&(this.#j({highlightOutlines:this.#W.getNewOutline(Z/2)}),this.fixAndSetPosition(),this.setDims(this.width,this.height))}#N(){this.#J!==null&&this.parent&&(this.parent.drawLayer.remove(this.#J),this.#J=null,this.parent.drawLayer.remove(this.#K),this.#K=null)}#M(Z=this.parent){this.#J===null&&({id:this.#J,clipPathId:this.#X}=Z.drawLayer.draw({bbox:this.#W.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:this.#_},path:{d:this.#W.toSVGPath()}},!1,!0),this.#K=Z.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#_},bbox:this.#G.box,path:{d:this.#G.toSVGPath()}},this.#_),this.#Y&&(this.#Y.style.clipPath=this.#X))}static#L([Z,q,X,z],R){switch(R){case 90:return[1-q-z,Z,z,X];case 180:return[1-Z-X,1-q-z,X,z];case 270:return[q,1-Z-X,z,X]}return[Z,q,X,z]}rotate(Z){let{drawLayer:q}=this.parent,X;this.#_?(Z=(Z-this.rotation+360)%360,X=H8.#L(this.#W.box,Z)):X=H8.#L([this.x,this.y,this.width,this.height],Z),q.updateProperties(this.#J,{bbox:X,root:{"data-main-rotation":Z}}),q.updateProperties(this.#K,{bbox:H8.#L(this.#G.box,Z),root:{"data-main-rotation":Z}})}render(){if(this.div)return this.div;let Z=super.render();this.#$&&(Z.setAttribute("aria-label",this.#$),Z.setAttribute("role","mark")),this.#_?Z.classList.add("free"):this.div.addEventListener("keydown",this.#v.bind(this),{signal:this._uiManager._signal});let q=this.#Y=document.createElement("div");return Z.append(q),q.setAttribute("aria-hidden","true"),q.className="internal",q.style.clipPath=this.#X,this.setDims(this.width,this.height),Nf(this,this.#Y,["pointerover","pointerleave"]),this.enableEditing(),Z}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{hovered:!1}})}#v(Z){H8._keyboardManager.exec(this,Z)}_moveCaret(Z){switch(this.parent.unselect(this),Z){case 0:case 2:this.#C(!0);break;case 1:case 3:this.#C(!1)}}#C(Z){if(!this.#Z)return;let q=window.getSelection();Z?q.setPosition(this.#Z,this.#q):q.setPosition(this.#Q,this.#P)}select(){super.select(),this.#K&&this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#K&&(this.parent?.drawLayer.updateProperties(this.#K,{rootClass:{selected:!1}}),this.#_||this.#C(!1))}get _mustFixPosition(){return!this.#_}show(Z=this._isVisible){super.show(Z),this.parent&&(this.parent.drawLayer.updateProperties(this.#J,{rootClass:{hidden:!Z}}),this.parent.drawLayer.updateProperties(this.#K,{rootClass:{hidden:!Z}}))}#F(){return this.#_?this.rotation:0}#D(){if(this.#_)return null;let[Z,q]=this.pageDimensions,[X,z]=this.pageTranslation,R=this.#z,G=new Float32Array(8*R.length),P=0;for(let{x:Q,y:Y,width:W,height:$}of R){let _=Q*Z+X,J=(1-Y)*q+z;G[P]=G[P+4]=_,G[P+1]=G[P+3]=J,G[P+2]=G[P+6]=_+W*Z,G[P+5]=G[P+7]=J-$*q,P+=8}return G}#S(Z){return this.#W.serialize(Z,this.#F())}static startHighlighting(Z,q,{target:X,x:z,y:R}){let{x:G,y:P,width:Q,height:Y}=X.getBoundingClientRect(),W=new AbortController,$=Z.combinedSignal(W),_=(J)=>{W.abort(),this.#w(Z,J)};window.addEventListener("blur",_,{signal:$}),window.addEventListener("pointerup",_,{signal:$}),window.addEventListener("pointerdown",J8,{capture:!0,passive:!1,signal:$}),window.addEventListener("contextmenu",A0,{signal:$}),X.addEventListener("pointermove",this.#O.bind(this,Z),{signal:$}),this._freeHighlight=new t3({x:z,y:R},[G,P,Q,Y],Z.scale,this._defaultThickness/2,q,0.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=Z.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#O(Z,q){this._freeHighlight.add(q)&&Z.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#w(Z,q){this._freeHighlight.isEmpty()?Z.drawLayer.remove(this._freeHighlightId):Z.createAndAddNewEditor(q,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(Z,q,X){let z=null;if(Z instanceof Nz){let{data:{quadPoints:U,rect:f,rotation:K,id:I,color:B,opacity:j,popupRef:V,richText:x,contentsObj:M,creationDate:H,modificationDate:A},parent:{page:{pageNumber:T}}}=Z;z=Z={annotationType:m1.HIGHLIGHT,color:Array.from(B),opacity:j,quadPoints:U,boxes:null,pageIndex:T-1,rect:f.slice(0),rotation:K,annotationElementId:I,id:I,deleted:!1,popupRef:V,richText:x,comment:M?.str||null,creationDate:H,modificationDate:A}}else if(Z instanceof D9){let{data:{inkLists:U,rect:f,rotation:K,id:I,color:B,borderStyle:{rawWidth:j},popupRef:V,richText:x,contentsObj:M,creationDate:H,modificationDate:A},parent:{page:{pageNumber:T}}}=Z;z=Z={annotationType:m1.HIGHLIGHT,color:Array.from(B),thickness:j,inkLists:U,boxes:null,pageIndex:T-1,rect:f.slice(0),rotation:K,annotationElementId:I,id:I,deleted:!1,popupRef:V,richText:x,comment:M?.str||null,creationDate:H,modificationDate:A}}let{color:R,quadPoints:G,inkLists:P,opacity:Q}=Z,Y=await super.deserialize(Z,q,X);Y.color=j1.makeHexColor(...R),Y.opacity=Q||1,P&&(Y.#f=Z.thickness),Y._initialData=z,Z.comment&&Y.setCommentData(Z);let[W,$]=Y.pageDimensions,[_,J]=Y.pageTranslation;if(G){let U=Y.#z=[];for(let f=0;f<G.length;f+=8)U.push({x:(G[f]-_)/W,y:1-(G[f+1]-J)/$,width:(G[f+2]-G[f])/W,height:(G[f+1]-G[f+5])/$});Y.#V(),Y.#M(),Y.rotate(Y.rotation)}else if(P){Y.#_=!0;let U=P[0],f={x:U[0]-_,y:$-(U[1]-J)},K=new t3(f,[0,0,W,$],1,Y.#f/2,!0,0.001);for(let j=0,V=U.length;j<V;j+=2)f.x=U[j]-_,f.y=$-(U[j+1]-J),K.add(f);let{id:I,clipPathId:B}=q.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:Y.color,"fill-opacity":Y._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:K.toSVGPath()}},!0,!0);Y.#j({highlightOutlines:K.getOutlines(),highlightId:I,clipPathId:B}),Y.#M(),Y.rotate(Y.parentRotation)}return Y}serialize(Z=!1){if(this.isEmpty()||Z)return null;if(this.deleted)return this.serializeDeleted();let q=k1._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),X=super.serialize(Z);return Object.assign(X,{color:q,opacity:this.opacity,thickness:this.#f,quadPoints:this.#D(),outlines:this.#S(X.rect)}),this.addComment(X),this.annotationElementId&&!this.#y(X)?null:(X.id=this.annotationElementId,X)}#y(Z){let{color:q}=this._initialData;return this.hasEditedComment||Z.color.some((X,z)=>X!==q[z])}renderAnnotationElement(Z){return this.deleted?(Z.hide(),null):(Z.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}};N1=class N1 extends k1{#Z=null;#q;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#z=null;static#X=null;static#R=null;static#G=NaN;static#Q=null;static#P=null;static#Y=NaN;static _INNER_MARGIN=3;constructor(Z){super(Z),this.#q=Z.mustBeCommitted||!1,this._addOutlines(Z)}onUpdatedColor(){this._colorPicker?.update(this.color),super.onUpdatedColor()}_addOutlines(Z){Z.drawOutlines&&(this.#W(Z),this.#U())}#W({drawOutlines:Z,drawId:q,drawingOptions:X}){this.#Z=Z,this._drawingOptions||=X,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),q>=0?(this._drawId=q,this.parent.drawLayer.finalizeDraw(q,Z.defaultProperties)):this._drawId=this.#J(Z,this.parent),this.#$(Z.box)}#J(Z,q){let{id:X}=q.drawLayer.draw(N1._mergeSVGProperties(this._drawingOptions.toSVGProperties(),Z.defaultSVGProperties),!1,!1);return X}static _mergeSVGProperties(Z,q){let X=new Set(Object.keys(Z));for(let[z,R]of Object.entries(q))X.has(z)?Object.assign(Z[z],R):Z[z]=R;return Z}static getDefaultDrawingOptions(Z){z8("Not implemented")}static get typesMap(){z8("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(Z,q){let X=this.typesMap.get(Z);X&&this._defaultDrawingOptions.updateProperty(X,q),this._currentParent&&(N1.#z.updateProperty(X,q),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(Z,q){let X=this.constructor.typesMap.get(Z);X&&this._updateProperty(Z,X,q)}static get defaultPropertiesToUpdate(){let Z=[],q=this._defaultDrawingOptions;for(let[X,z]of this.typesMap)Z.push([X,q[z]]);return Z}get propertiesToUpdate(){let Z=[],{_drawingOptions:q}=this;for(let[X,z]of this.constructor.typesMap)Z.push([X,q[z]]);return Z}_updateProperty(Z,q,X){let z=this._drawingOptions,R=z[q],G=(P)=>{z.updateProperty(q,P);let Q=this.#Z.updateProperty(q,P);Q&&this.#$(Q),this.parent?.drawLayer.updateProperties(this._drawId,z.toSVGProperties()),Z===this.colorType&&this.onUpdatedColor()};this.addCommands({cmd:G.bind(this,X),undo:G.bind(this,R),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:Z,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,N1._mergeSVGProperties(this.#Z.getPathResizingSVGProperties(this.#K()),{bbox:this.#f()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,N1._mergeSVGProperties(this.#Z.getPathResizedSVGProperties(this.#K()),{bbox:this.#f()}))}_onTranslating(Z,q){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#f()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,N1._mergeSVGProperties(this.#Z.getPathTranslatedSVGProperties(this.#K(),this.parentDimensions),{bbox:this.#f()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(Z){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#q&&(this.#q=!1,this.commit(),this.parent.setSelected(this),Z&&this.isOnScreen&&this.div.focus())}remove(){this.#_(),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#U(),this.#$(this.#Z.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(Z){let q=!1;this.parent&&!Z?(this._uiManager.removeShouldRescale(this),this.#_()):Z&&(this._uiManager.addShouldRescale(this),this.#U(Z),q=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(Z),q&&this.select()}#_(){this._drawId!==null&&this.parent&&(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#U(Z=this.parent){this._drawId!==null&&this.parent===Z||(this._drawId===null?(this._drawingOptions.updateAll(),this._drawId=this.#J(this.#Z,Z)):this.parent.drawLayer.updateParent(this._drawId,Z.drawLayer))}#B([Z,q,X,z]){let{parentDimensions:[R,G],rotation:P}=this;switch(P){case 90:return[q,1-Z,X*(G/R),z*(R/G)];case 180:return[1-Z,1-q,X,z];case 270:return[1-q,Z,X*(G/R),z*(R/G)];default:return[Z,q,X,z]}}#K(){let{x:Z,y:q,width:X,height:z,parentDimensions:[R,G],rotation:P}=this;switch(P){case 90:return[1-q,Z,X*(R/G),z*(G/R)];case 180:return[1-Z,1-q,X,z];case 270:return[q,1-Z,X*(R/G),z*(G/R)];default:return[Z,q,X,z]}}#$(Z){[this.x,this.y,this.width,this.height]=this.#B(Z),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()}#f(){let{x:Z,y:q,width:X,height:z,rotation:R,parentRotation:G,parentDimensions:[P,Q]}=this;switch((4*R+G)/90){case 1:return[1-q-z,Z,z,X];case 2:return[1-Z-X,1-q-z,X,z];case 3:return[q,1-Z-X,z,X];case 4:return[Z,q-X*(P/Q),z*(Q/P),X*(P/Q)];case 5:return[1-q,Z,X*(P/Q),z*(Q/P)];case 6:return[1-Z-z*(Q/P),1-q,z*(Q/P),X*(P/Q)];case 7:return[q-X*(P/Q),1-Z-z*(Q/P),X*(P/Q),z*(Q/P)];case 8:return[Z-X,q-z,X,z];case 9:return[1-q,Z-X,z,X];case 10:return[1-Z,1-q,X,z];case 11:return[q-z,1-Z,z,X];case 12:return[Z-z*(Q/P),q,z*(Q/P),X*(P/Q)];case 13:return[1-q-X*(P/Q),Z-z*(Q/P),X*(P/Q),z*(Q/P)];case 14:return[1-Z,1-q-X*(P/Q),z*(Q/P),X*(P/Q)];case 15:return[q,1-Z,X*(P/Q),z*(Q/P)];default:return[Z,q,X,z]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,N1._mergeSVGProperties({bbox:this.#f()},this.#Z.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#$(this.#Z.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let Z,q;this._isCopy&&(Z=this.x,q=this.y);let X=super.render();X.classList.add("draw");let z=document.createElement("div");return X.append(z),z.setAttribute("aria-hidden","true"),z.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(Z,q),X}static createDrawerInstance(Z,q,X,z,R){z8("Not implemented")}static startDrawing(Z,q,X,z){let{target:R,offsetX:G,offsetY:P,pointerId:Q,pointerType:Y}=z;if(N1.#Q&&N1.#Q!==Y)return;let{viewport:{rotation:W}}=Z,{width:$,height:_}=R.getBoundingClientRect(),J=N1.#X=new AbortController,U=Z.combinedSignal(J);N1.#G||=Q,N1.#Q??=Y,window.addEventListener("pointerup",(f)=>{N1.#G===f.pointerId?this._endDraw(f):N1.#P?.delete(f.pointerId)},{signal:U}),window.addEventListener("pointercancel",(f)=>{N1.#G===f.pointerId?this._currentParent.endDrawingSession():N1.#P?.delete(f.pointerId)},{signal:U}),window.addEventListener("pointerdown",(f)=>{N1.#Q===f.pointerType&&((N1.#P||=new Set).add(f.pointerId),N1.#z.isCancellable()&&(N1.#z.removeLastElement(),N1.#z.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:U}),window.addEventListener("contextmenu",A0,{signal:U}),R.addEventListener("pointermove",this._drawMove.bind(this),{signal:U}),R.addEventListener("touchmove",(f)=>{f.timeStamp===N1.#Y&&J8(f)},{signal:U}),Z.toggleDrawing(),q._editorUndoBar?.hide(),N1.#z?Z.drawLayer.updateProperties(this._currentDrawId,N1.#z.startNew(G,P,$,_,W)):(q.updateUIForDefaultProperties(this),N1.#z=this.createDrawerInstance(G,P,$,_,W),N1.#R=this.getDefaultDrawingOptions(),this._currentParent=Z,{id:this._currentDrawId}=Z.drawLayer.draw(this._mergeSVGProperties(N1.#R.toSVGProperties(),N1.#z.defaultSVGProperties),!0,!1))}static _drawMove(Z){if(N1.#Y=-1,!N1.#z)return;let{offsetX:q,offsetY:X,pointerId:z}=Z;N1.#G===z&&(N1.#P?.size>=1?this._endDraw(Z):(this._currentParent.drawLayer.updateProperties(this._currentDrawId,N1.#z.add(q,X)),N1.#Y=Z.timeStamp,J8(Z)))}static _cleanup(Z){Z&&(this._currentDrawId=-1,this._currentParent=null,N1.#z=null,N1.#R=null,N1.#Q=null,N1.#Y=NaN),N1.#X&&(N1.#X.abort(),N1.#X=null,N1.#G=NaN,N1.#P=null)}static _endDraw(Z){let q=this._currentParent;if(q){if(q.toggleDrawing(!0),this._cleanup(!1),Z?.target===q.div&&q.drawLayer.updateProperties(this._currentDrawId,N1.#z.end(Z.offsetX,Z.offsetY)),this.supportMultipleDrawings){let X=N1.#z,z=this._currentDrawId,R=X.getLastElement();return void q.addCommands({cmd:()=>{q.drawLayer.updateProperties(z,X.setLastElement(R))},undo:()=>{q.drawLayer.updateProperties(z,X.removeLastElement())},mustExec:!1,type:s1.DRAW_STEP})}this.endDrawing(!1)}}static endDrawing(Z){let q=this._currentParent;if(!q)return null;if(q.toggleDrawing(!0),q.cleanUndoStack(s1.DRAW_STEP),!N1.#z.isEmpty()){let{pageDimensions:[X,z],scale:R}=q,G=q.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:N1.#z.getOutlines(X*R,z*R,R,this._INNER_MARGIN),drawingOptions:N1.#R,mustBeCommitted:!Z});return this._cleanup(!0),G}return q.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(Z){}static deserializeDraw(Z,q,X,z,R,G){z8("Not implemented")}static async deserialize(Z,q,X){let{rawDims:{pageWidth:z,pageHeight:R,pageX:G,pageY:P}}=q.viewport,Q=this.deserializeDraw(G,P,z,R,this._INNER_MARGIN,Z),Y=await super.deserialize(Z,q,X);return Y.createDrawingOptions(Z),Y.#W({drawOutlines:Q}),Y.#U(),Y.onScaleChanging(),Y.rotate(),Y}serializeDraw(Z){let[q,X]=this.pageTranslation,[z,R]=this.pageDimensions;return this.#Z.serialize([q,X,z,R],Z)}renderAnnotationElement(Z){return Z.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}};D6=class D6 extends I1{#Z;#q=0;#z;#X;#R;#G;#Q;#P;#Y;build(Z,q,X,z,R,G,P){this.#R=q,this.#G=X,this.#Q=z,this.#P=R,this.#Y=G,this.#z=P??0,this.#X=Z,this.#_()}get thickness(){return this.#Y}setLastElement(Z){return this.#X.push(Z),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#X.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){let Z=[];for(let{line:q}of this.#X)if(Z.push(`M${I1.svgRound(q[4])} ${I1.svgRound(q[5])}`),q.length!==6)if(q.length===12&&isNaN(q[6]))Z.push(`L${I1.svgRound(q[10])} ${I1.svgRound(q[11])}`);else for(let X=6,z=q.length;X<z;X+=6){let[R,G,P,Q,Y,W]=q.subarray(X,X+6).map(I1.svgRound);Z.push(`C${R} ${G} ${P} ${Q} ${Y} ${W}`)}else Z.push("Z");return Z.join("")}serialize([Z,q,X,z],R){let G=[],P=[],[Q,Y,W,$]=this.#J(),_,J,U,f,K,I,B,j,V;switch(this.#P){case 0:V=I1._rescale,_=Z,J=q+z,U=X,f=-z,K=Z+Q*X,I=q+(1-Y-$)*z,B=Z+(Q+W)*X,j=q+(1-Y)*z;break;case 90:V=I1._rescaleAndSwap,_=Z,J=q,U=X,f=z,K=Z+Y*X,I=q+Q*z,B=Z+(Y+$)*X,j=q+(Q+W)*z;break;case 180:V=I1._rescale,_=Z+X,J=q,U=-X,f=z,K=Z+(1-Q-W)*X,I=q+Y*z,B=Z+(1-Q)*X,j=q+(Y+$)*z;break;case 270:V=I1._rescaleAndSwap,_=Z+X,J=q+z,U=-X,f=-z,K=Z+(1-Y-$)*X,I=q+(1-Q-W)*z,B=Z+(1-Y)*X,j=q+(1-Q)*z}for(let{line:x,points:M}of this.#X)G.push(V(x,_,J,U,f,R?Array(x.length):null)),P.push(V(M,_,J,U,f,R?Array(M.length):null));return{lines:G,points:P,rect:[K,I,B,j]}}static deserialize(Z,q,X,z,R,{paths:{lines:G,points:P},rotation:Q,thickness:Y}){let W=[],$,_,J,U,f;switch(Q){case 0:f=I1._rescale,$=-Z/X,_=q/z+1,J=1/X,U=-1/z;break;case 90:f=I1._rescaleAndSwap,$=-q/z,_=-Z/X,J=1/z,U=1/X;break;case 180:f=I1._rescale,$=Z/X+1,_=-q/z,J=-1/X,U=1/z;break;case 270:f=I1._rescaleAndSwap,$=q/z+1,_=Z/X+1,J=-1/z,U=-1/X}if(!G){G=[];for(let I of P){let B=I.length;if(B===2){G.push(new Float32Array([NaN,NaN,NaN,NaN,I[0],I[1]]));continue}if(B===4){G.push(new Float32Array([NaN,NaN,NaN,NaN,I[0],I[1],NaN,NaN,NaN,NaN,I[2],I[3]]));continue}let j=new Float32Array(3*(B-2));G.push(j);let[V,x,M,H]=I.subarray(0,4);j.set([NaN,NaN,NaN,NaN,V,x],0);for(let A=4;A<B;A+=2){let T=I[A],k=I[A+1];j.set(I1.createBezierPoints(V,x,M,H,T,k),3*(A-2)),[V,x,M,H]=[M,H,T,k]}}}for(let I=0,B=G.length;I<B;I++)W.push({line:f(G[I].map((j)=>j??NaN),$,_,J,U),points:f(P[I].map((j)=>j??NaN),$,_,J,U)});let K=new this.prototype.constructor;return K.build(W,X,z,1,Q,Y,R),K}#W(Z=this.#Y){let q=this.#z+Z/2*this.#Q;return this.#P%180==0?[q/this.#R,q/this.#G]:[q/this.#G,q/this.#R]}#J(){let[Z,q,X,z]=this.#Z,[R,G]=this.#W(0);return[Z+R,q+G,X-2*R,z-2*G]}#_(){let Z=this.#Z=new Float32Array([1/0,1/0,-1/0,-1/0]);for(let{line:z}of this.#X){if(z.length<=12){for(let P=4,Q=z.length;P<Q;P+=6)j1.pointBoundingBox(z[P],z[P+1],Z);continue}let R=z[4],G=z[5];for(let P=6,Q=z.length;P<Q;P+=6){let[Y,W,$,_,J,U]=z.subarray(P,P+6);j1.bezierBoundingBox(R,G,Y,W,$,_,J,U,Z),R=J,G=U}}let[q,X]=this.#W();Z[0]=l8(Z[0]-q,0,1),Z[1]=l8(Z[1]-X,0,1),Z[2]=l8(Z[2]+q,0,1),Z[3]=l8(Z[3]+X,0,1),Z[2]-=Z[0],Z[3]-=Z[1]}get box(){return this.#Z}updateProperty(Z,q){return Z==="stroke-width"?this.#U(q):null}#U(Z){let[q,X]=this.#W();this.#Y=Z;let[z,R]=this.#W(),[G,P]=[z-q,R-X],Q=this.#Z;return Q[0]-=G,Q[1]-=P,Q[2]+=2*G,Q[3]+=2*P,Q}updateParentDimensions([Z,q],X){let[z,R]=this.#W();this.#R=Z,this.#G=q,this.#Q=X;let[G,P]=this.#W(),Q=G-z,Y=P-R,W=this.#Z;return W[0]-=Q,W[1]-=Y,W[2]+=2*Q,W[3]+=2*Y,W}updateRotation(Z){return this.#q=Z,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#Z.map(I1.svgRound).join(" ")}get defaultProperties(){let[Z,q]=this.#Z;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${I1.svgRound(Z)} ${I1.svgRound(q)}`}}}get rotationTransform(){let[,,Z,q]=this.#Z,X=0,z=0,R=0,G=0,P=0,Q=0;switch(this.#q){case 90:z=q/Z,R=-Z/q,P=Z;break;case 180:X=-1,G=-1,P=Z,Q=q;break;case 270:z=-q/Z,R=Z/q,Q=q;break;default:return""}return`matrix(${X} ${z} ${R} ${G} ${I1.svgRound(P)} ${I1.svgRound(Q)})`}getPathResizingSVGProperties([Z,q,X,z]){let[R,G]=this.#W(),[P,Q,Y,W]=this.#Z;if(Math.abs(Y-R)<=I1.PRECISION||Math.abs(W-G)<=I1.PRECISION){let f=Z+X/2-(P+Y/2),K=q+z/2-(Q+W/2);return{path:{"transform-origin":`${I1.svgRound(Z)} ${I1.svgRound(q)}`,transform:`${this.rotationTransform} translate(${f} ${K})`}}}let $=(X-2*R)/(Y-2*R),_=(z-2*G)/(W-2*G),J=Y/X,U=W/z;return{path:{"transform-origin":`${I1.svgRound(P)} ${I1.svgRound(Q)}`,transform:`${this.rotationTransform} scale(${J} ${U}) translate(${I1.svgRound(R)} ${I1.svgRound(G)}) scale(${$} ${_}) translate(${I1.svgRound(-R)} ${I1.svgRound(-G)})`}}}getPathResizedSVGProperties([Z,q,X,z]){let[R,G]=this.#W(),P=this.#Z,[Q,Y,W,$]=P;if(P[0]=Z,P[1]=q,P[2]=X,P[3]=z,Math.abs(W-R)<=I1.PRECISION||Math.abs($-G)<=I1.PRECISION){let K=Z+X/2-(Q+W/2),I=q+z/2-(Y+$/2);for(let{line:B,points:j}of this.#X)I1._translate(B,K,I,B),I1._translate(j,K,I,j);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${I1.svgRound(Z)} ${I1.svgRound(q)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}let _=(X-2*R)/(W-2*R),J=(z-2*G)/($-2*G),U=-_*(Q+R)+Z+R,f=-J*(Y+G)+q+G;if(_!==1||J!==1||U!==0||f!==0)for(let{line:K,points:I}of this.#X)I1._rescale(K,U,f,_,J,K),I1._rescale(I,U,f,_,J,I);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${I1.svgRound(Z)} ${I1.svgRound(q)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([Z,q],X){let[z,R]=X,G=this.#Z,P=Z-G[0],Q=q-G[1];if(this.#R===z&&this.#G===R)for(let{line:Y,points:W}of this.#X)I1._translate(Y,P,Q,Y),I1._translate(W,P,Q,W);else{let Y=this.#R/z,W=this.#G/R;this.#R=z,this.#G=R;for(let{line:$,points:_}of this.#X)I1._rescale($,P,Q,Y,W,$),I1._rescale(_,P,Q,Y,W,_);G[2]*=Y,G[3]*=W}return G[0]=Z,G[1]=q,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${I1.svgRound(Z)} ${I1.svgRound(q)}`}}}get defaultSVGProperties(){let Z=this.#Z;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${I1.svgRound(Z[0])} ${I1.svgRound(Z[1])}`,transform:this.rotationTransform||null},bbox:Z}}};E9=class E9 extends vz{constructor(Z){super(),this._viewParameters=Z,super.updateProperties({fill:"none",stroke:k1._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(Z,q){Z==="stroke-width"&&(q??=this["stroke-width"],q*=this._viewParameters.realScale),super.updateSVGProperty(Z,q)}clone(){let Z=new E9(this._viewParameters);return Z.updateAll(this),Z}};bz=class bz extends N1{static _type="ink";static _editorType=m1.INK;static _defaultDrawingOptions=null;constructor(Z){super({...Z,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(Z,q){k1.initialize(Z,q),this._defaultDrawingOptions=new E9(q.viewParameters)}static getDefaultDrawingOptions(Z){let q=this._defaultDrawingOptions.clone();return q.updateProperties(Z),q}static get supportMultipleDrawings(){return!0}static get typesMap(){return D1(this,"typesMap",new Map([[s1.INK_THICKNESS,"stroke-width"],[s1.INK_COLOR,"stroke"],[s1.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(Z,q,X,z,R){return new hK(Z,q,X,z,R,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(Z,q,X,z,R,G){return D6.deserialize(Z,q,X,z,R,G)}static async deserialize(Z,q,X){let z=null;if(Z instanceof D9){let{data:{inkLists:G,rect:P,rotation:Q,id:Y,color:W,opacity:$,borderStyle:{rawWidth:_},popupRef:J,richText:U,contentsObj:f,creationDate:K,modificationDate:I},parent:{page:{pageNumber:B}}}=Z;z=Z={annotationType:m1.INK,color:Array.from(W),thickness:_,opacity:$,paths:{points:G},boxes:null,pageIndex:B-1,rect:P.slice(0),rotation:Q,annotationElementId:Y,id:Y,deleted:!1,popupRef:J,richText:U,comment:f?.str||null,creationDate:K,modificationDate:I}}let R=await super.deserialize(Z,q,X);return R._initialData=z,Z.comment&&R.setCommentData(Z),R}get toolbarButtons(){return this._colorPicker||=new o7(this),[["colorPicker",this._colorPicker]]}get colorType(){return s1.INK_COLOR}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();let{_drawId:Z,_drawingOptions:q,parent:X}=this;q.updateSVGProperty("stroke-width"),X.drawLayer.updateProperties(Z,q.toSVGProperties())}static onScaleChangingWhenDrawing(){let Z=this._currentParent;Z&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),Z.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:Z,thickness:q,opacity:X}){this._drawingOptions=bz.getDefaultDrawingOptions({stroke:j1.makeHexColor(...Z),"stroke-width":q,"stroke-opacity":X})}serialize(Z=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let{lines:q,points:X}=this.serializeDraw(Z),{_drawingOptions:{stroke:z,"stroke-opacity":R,"stroke-width":G}}=this,P=Object.assign(super.serialize(Z),{color:k1._colorManager.convert(z),opacity:R,thickness:G,paths:{lines:q,points:X}});return this.addComment(P),Z?(P.isCopy=!0,P):this.annotationElementId&&!this.#Z(P)?null:(P.id=this.annotationElementId,P)}#Z(Z){let{color:q,thickness:X,opacity:z,pageIndex:R}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||Z.color.some((G,P)=>G!==q[P])||Z.thickness!==X||Z.opacity!==z||Z.pageIndex!==R}renderAnnotationElement(Z){if(this.deleted)return Z.hide(),null;let{points:q,rect:X}=this.serializeDraw(!1);return Z.updateEdited({rect:X,thickness:this._drawingOptions["stroke-width"],points:q,popup:this.comment}),null}};e3=class e3 extends D6{toSVGPath(){let Z=super.toSVGPath();return Z.endsWith("Z")||(Z+="Z"),Z}};u4=class u4{static#Z={maxDim:512,sigmaSFactor:0.02,sigmaR:25,kernelSize:16};static#q(Z,q,X,z){return z-=q,(X-=Z)===0?z>0?0:4:X===1?z+6:2-z}static#z=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#X(Z,q,X,z,R,G,P){let Q=this.#q(X,z,R,G);for(let Y=0;Y<8;Y++){let W=(-Y+Q-P+16)%8;if(Z[(X+this.#z[2*W])*q+(z+this.#z[2*W+1])]!==0)return W}return-1}static#R(Z,q,X,z,R,G,P){let Q=this.#q(X,z,R,G);for(let Y=0;Y<8;Y++){let W=(Y+Q+P+16)%8;if(Z[(X+this.#z[2*W])*q+(z+this.#z[2*W+1])]!==0)return W}return-1}static#G(Z,q,X,z){let R=Z.length,G=new Int32Array(R);for(let W=0;W<R;W++)G[W]=Z[W]<=z?1:0;for(let W=1;W<X-1;W++)G[W*q]=G[W*q+q-1]=0;for(let W=0;W<q;W++)G[W]=G[q*X-1-W]=0;let P,Q=1,Y=[];for(let W=1;W<X-1;W++){P=1;for(let $=1;$<q-1;$++){let _=W*q+$,J=G[_];if(J===0)continue;let U=W,f=$;if(J===1&&G[_-1]===0)Q+=1,f-=1;else{if(!(J>=1&&G[_+1]===0)){J!==1&&(P=Math.abs(J));continue}Q+=1,f+=1,J>1&&(P=J)}let K=[$,W],I=f===$+1,B={isHole:I,points:K,id:Q,parent:0},j;Y.push(B);for(let y of Y)if(y.id===P){j=y;break}j?j.isHole?B.parent=I?j.parent:P:B.parent=I?P:j.parent:B.parent=I?P:0;let V=this.#X(G,q,W,$,U,f,0);if(V===-1){G[_]=-Q,G[_]!==1&&(P=Math.abs(G[_]));continue}let x=this.#z[2*V],M=this.#z[2*V+1],H=W+x,A=$+M;U=H,f=A;let T=W,k=$;for(;;){let y=this.#R(G,q,T,k,U,f,1);x=this.#z[2*y],M=this.#z[2*y+1];let O=T+x,D=k+M;K.push(D,O);let n=T*q+k;if(G[n+1]===0?G[n]=-Q:G[n]===1&&(G[n]=Q),O===W&&D===$&&T===H&&k===A){G[_]!==1&&(P=Math.abs(G[_]));break}U=T,f=k,T=O,k=D}}}return Y}static#Q(Z,q,X,z){if(X-q<=4){for(let H=q;H<X-2;H+=2)z.push(Z[H],Z[H+1]);return}let R=Z[q],G=Z[q+1],P=Z[X-4]-R,Q=Z[X-3]-G,Y=Math.hypot(P,Q),W=P/Y,$=Q/Y,_=W*G-$*R,J=Q/P,U=1/Y,f=Math.atan(J),K=Math.cos(f),I=Math.sin(f),B=U*(Math.abs(K)+Math.abs(I)),j=U*(1-B+B**2),V=Math.max(Math.atan(Math.abs(I+K)*j),Math.atan(Math.abs(I-K)*j)),x=0,M=q;for(let H=q+2;H<X-2;H+=2){let A=Math.abs(_-W*Z[H+1]+$*Z[H]);A>x&&(M=H,x=A)}x>(Y*V)**2?(this.#Q(Z,q,M+2,z),this.#Q(Z,M,X,z)):z.push(R,G)}static#P(Z){let q=[],X=Z.length;return this.#Q(Z,0,X,q),q.push(Z[X-2],Z[X-1]),q.length<=4?null:q}static#Y(Z,q,X,z,R,G){let P=new Float32Array(G**2),Q=-2*z**2,Y=G>>1;for(let f=0;f<G;f++){let K=(f-Y)**2;for(let I=0;I<G;I++)P[f*G+I]=Math.exp((K+(I-Y)**2)/Q)}let W=new Float32Array(256),$=-2*R**2;for(let f=0;f<256;f++)W[f]=Math.exp(f**2/$);let _=Z.length,J=new Uint8Array(_),U=new Uint32Array(256);for(let f=0;f<X;f++)for(let K=0;K<q;K++){let I=f*q+K,B=Z[I],j=0,V=0;for(let x=0;x<G;x++){let M=f+x-Y;if(!(M<0||M>=X))for(let H=0;H<G;H++){let A=K+H-Y;if(A<0||A>=q)continue;let T=Z[M*q+A],k=P[x*G+H]*W[Math.abs(T-B)];j+=T*k,V+=k}}U[J[I]=Math.round(j/V)]++}return[J,U]}static#W(Z){let q=new Uint32Array(256);for(let X of Z)q[X]++;return q}static#J(Z){let q=Z.length,X=new Uint8ClampedArray(q>>2),z=-1/0,R=1/0;for(let P=0,Q=X.length;P<Q;P++){let Y=X[P]=Z[P<<2];z=Math.max(z,Y),R=Math.min(R,Y)}let G=255/(z-R);for(let P=0,Q=X.length;P<Q;P++)X[P]=(X[P]-R)*G;return X}static#_(Z){let q,X=-1/0,z=-1/0,R=Z.findIndex((Q)=>Q!==0),G=R,P=R;for(q=R;q<256;q++){let Q=Z[q];Q>X&&(q-G>z&&(z=q-G,P=q-1),X=Q,G=q)}for(q=P-1;q>=0&&!(Z[q]>Z[q+1]);q--);return q}static#U(Z){let q=Z,{width:X,height:z}=Z,{maxDim:R}=this.#Z,G=X,P=z;if(X>R||z>R){let W=X,$=z,_=Math.log2(Math.max(X,z)/R),J=Math.floor(_);_=_===J?J-1:J;for(let f=0;f<_;f++){G=Math.ceil(W/2),P=Math.ceil($/2);let K=new OffscreenCanvas(G,P);K.getContext("2d").drawImage(Z,0,0,W,$,0,0,G,P),W=G,$=P,Z!==q&&Z.close(),Z=K.transferToImageBitmap()}let U=Math.min(R/G,R/P);G=Math.round(G*U),P=Math.round(P*U)}let Q=new OffscreenCanvas(G,P).getContext("2d",{willReadFrequently:!0});Q.fillStyle="white",Q.fillRect(0,0,G,P),Q.filter="grayscale(1)",Q.drawImage(Z,0,0,Z.width,Z.height,0,0,G,P);let Y=Q.getImageData(0,0,G,P).data;return[this.#J(Y),G,P]}static extractContoursFromText(Z,{fontFamily:q,fontStyle:X,fontWeight:z},R,G,P,Q){let Y=new OffscreenCanvas(1,1),W=Y.getContext("2d",{alpha:!1}),$=W.font=`${X} ${z} 200px ${q}`,{actualBoundingBoxLeft:_,actualBoundingBoxRight:J,actualBoundingBoxAscent:U,actualBoundingBoxDescent:f,fontBoundingBoxAscent:K,fontBoundingBoxDescent:I,width:B}=W.measureText(Z),j=1.5,V=Math.ceil(Math.max(Math.abs(_)+Math.abs(J)||0,B)*j),x=Math.ceil(Math.max(Math.abs(U)+Math.abs(f)||200,Math.abs(K)+Math.abs(I)||200)*j);Y=new OffscreenCanvas(V,x),W=Y.getContext("2d",{alpha:!0,willReadFrequently:!0}),W.font=$,W.filter="grayscale(1)",W.fillStyle="white",W.fillRect(0,0,V,x),W.fillStyle="black",W.fillText(Z,0.5*V/2,1.5*x/2);let M=this.#J(W.getImageData(0,0,V,x).data),H=this.#W(M),A=this.#_(H),T=this.#G(M,V,x,A);return this.processDrawnLines({lines:{curves:T,width:V,height:x},pageWidth:R,pageHeight:G,rotation:P,innerMargin:Q,mustSmooth:!0,areContours:!0})}static process(Z,q,X,z,R){let[G,P,Q]=this.#U(Z),[Y,W]=this.#Y(G,P,Q,Math.hypot(P,Q)*this.#Z.sigmaSFactor,this.#Z.sigmaR,this.#Z.kernelSize),$=this.#_(W),_=this.#G(Y,P,Q,$);return this.processDrawnLines({lines:{curves:_,width:P,height:Q},pageWidth:q,pageHeight:X,rotation:z,innerMargin:R,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:Z,pageWidth:q,pageHeight:X,rotation:z,innerMargin:R,mustSmooth:G,areContours:P}){z%180!=0&&([q,X]=[X,q]);let{curves:Q,width:Y,height:W}=Z,$=Z.thickness??0,_=[],J=Math.min(q/Y,X/W),U=J/q,f=J/X,K=[];for(let{points:B}of Q){let j=G?this.#P(B):B;if(!j)continue;K.push(j);let V=j.length,x=new Float32Array(V),M=new Float32Array(3*(V===2?2:V-2));if(_.push({line:M,points:x}),V===2){x[0]=j[0]*U,x[1]=j[1]*f,M.set([NaN,NaN,NaN,NaN,x[0],x[1]],0);continue}let[H,A,T,k]=j;H*=U,A*=f,T*=U,k*=f,x.set([H,A,T,k],0),M.set([NaN,NaN,NaN,NaN,H,A],0);for(let y=4;y<V;y+=2){let O=x[y]=j[y]*U,D=x[y+1]=j[y+1]*f;M.set(I1.createBezierPoints(H,A,T,k,O,D),3*(y-2)),[H,A,T,k]=[T,k,O,D]}}if(_.length===0)return null;let I=P?new e3:new D6;return I.build(_,q,X,1,z,P?0:$,R),{outline:I,newCurves:K,areContours:P,thickness:$,width:Y,height:W}}static async compressSignature({outlines:Z,areContours:q,thickness:X,width:z,height:R}){let G,P=1/0,Q=-1/0,Y=0;for(let B of Z){Y+=B.length;for(let j=2,V=B.length;j<V;j++){let x=B[j]-B[j-2];P=Math.min(P,x),Q=Math.max(Q,x)}}G=P>=-128&&Q<=127?Int8Array:P>=-32768&&Q<=32767?Int16Array:Int32Array;let W=Z.length,$=8+3*W,_=new Uint32Array($),J=0;_[J++]=$*Uint32Array.BYTES_PER_ELEMENT+(Y-2*W)*G.BYTES_PER_ELEMENT,_[J++]=0,_[J++]=z,_[J++]=R,_[J++]=q?0:1,_[J++]=Math.max(0,Math.floor(X??0)),_[J++]=W,_[J++]=G.BYTES_PER_ELEMENT;for(let B of Z)_[J++]=B.length-2,_[J++]=B[0],_[J++]=B[1];let U=new CompressionStream("deflate-raw"),f=U.writable.getWriter();await f.ready,f.write(_);let K=G.prototype.constructor;for(let B of Z){let j=new K(B.length-2);for(let V=2,x=B.length;V<x;V++)j[V-2]=B[V]-B[V-2];f.write(j)}f.close();let I=await new Response(U.readable).arrayBuffer();return Vf(new Uint8Array(I))}static async decompressSignature(Z){try{let X=(q=Z,Uint8Array.fromBase64?Uint8Array.fromBase64(q):P2(atob(q))),{readable:z,writable:R}=new DecompressionStream("deflate-raw"),G=R.getWriter();await G.ready,G.write(X).then(async()=>{await G.ready,await G.close()}).catch(()=>{});let P=null,Q=0;for await(let V of z)P||=new Uint8Array(new Uint32Array(V.buffer,0,4)[0]),P.set(V,Q),Q+=V.length;let Y=new Uint32Array(P.buffer,0,P.length>>2),W=Y[1];if(W!==0)throw Error(`Invalid version: ${W}`);let $=Y[2],_=Y[3],J=Y[4]===0,U=Y[5],f=Y[6],K=Y[7],I=[],B=(8+3*f)*Uint32Array.BYTES_PER_ELEMENT,j;switch(K){case Int8Array.BYTES_PER_ELEMENT:j=new Int8Array(P.buffer,B);break;case Int16Array.BYTES_PER_ELEMENT:j=new Int16Array(P.buffer,B);break;case Int32Array.BYTES_PER_ELEMENT:j=new Int32Array(P.buffer,B)}Q=0;for(let V=0;V<f;V++){let x=Y[3*V+8],M=new Float32Array(x+2);I.push(M);for(let H=0;H<2;H++)M[H]=Y[3*V+8+H+1];for(let H=0;H<x;H++)M[H+2]=M[H]+j[Q++]}return{areContours:J,thickness:U,outlines:I,width:$,height:_}}catch(X){return p1(`decompressSignature: ${X}`),null}var q}};Sz=class Sz extends vz{constructor(){super(),super.updateProperties({fill:k1._defaultLineColor,"stroke-width":0})}clone(){let Z=new Sz;return Z.updateAll(this),Z}};mz=class mz extends E9{constructor(Z){super(Z),super.updateProperties({stroke:k1._defaultLineColor,"stroke-width":1})}clone(){let Z=new mz(this._viewParameters);return Z.updateAll(this),Z}};r0=class r0 extends N1{#Z=!1;#q=null;#z=null;#X=null;static _type="signature";static _editorType=m1.SIGNATURE;static _defaultDrawingOptions=null;constructor(Z){super({...Z,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#z=Z.signatureData||null,this.#q=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(Z,q){k1.initialize(Z,q),this._defaultDrawingOptions=new Sz,this._defaultDrawnSignatureOptions=new mz(q.viewParameters)}static getDefaultDrawingOptions(Z){let q=this._defaultDrawingOptions.clone();return q.updateProperties(Z),q}static get supportMultipleDrawings(){return!1}static get typesMap(){return D1(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#q}}static computeTelemetryFinalData(Z){let q=Z.get("hasDescription");return{hasAltText:q.get(!0)??0,hasNoAltText:q.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let Z,q,{_isCopy:X}=this;if(X&&(this._isCopy=!1,Z=this.x,q=this.y),super.render(),this._drawId===null)if(this.#z){let{lines:z,mustSmooth:R,areContours:G,description:P,uuid:Q,heightInPage:Y}=this.#z,{rawDims:{pageWidth:W,pageHeight:$},rotation:_}=this.parent.viewport,J=u4.processDrawnLines({lines:z,pageWidth:W,pageHeight:$,rotation:_,innerMargin:r0._INNER_MARGIN,mustSmooth:R,areContours:G});this.addSignature(J,Y,P,Q)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#q||""}));return X&&(this._isCopy=!0,this._moveAfterPaste(Z,q)),this.div}setUuid(Z){this.#X=Z,this.addEditToolbar()}getUuid(){return this.#X}get description(){return this.#q}set description(Z){this.#q=Z,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:Z})),super.addEditToolbar().then((q)=>{q?.updateEditSignatureButton(Z)}))}getSignaturePreview(){let{newCurves:Z,areContours:q,thickness:X,width:z,height:R}=this.#z,G=Math.max(z,R);return{areContours:q,outline:u4.processDrawnLines({lines:{curves:Z.map((P)=>({points:P})),thickness:X,width:z,height:R},pageWidth:G,pageHeight:G,rotation:0,innerMargin:0,mustSmooth:!1,areContours:q}).outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(Z,q,X,z){let{x:R,y:G}=this,{outline:P}=this.#z=Z,Q;this.#Z=P instanceof e3,this.description=X,this.#Z?Q=r0.getDefaultDrawingOptions():(Q=r0._defaultDrawnSignatureOptions.clone(),Q.updateProperties({"stroke-width":P.thickness})),this._addOutlines({drawOutlines:P,drawingOptions:Q});let[,Y]=this.pageDimensions,W=q/Y;W=W>=1?0.5:W,this.width*=W/this.height,this.width>=1&&(W*=0.9/this.width,this.width=0.9),this.height=W,this.setDims(),this.x=R,this.y=G,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(z),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!z,hasDescription:!!X}}),this.div.hidden=!1}getFromImage(Z){let{rawDims:{pageWidth:q,pageHeight:X},rotation:z}=this.parent.viewport;return u4.process(Z,q,X,z,r0._INNER_MARGIN)}getFromText(Z,q){let{rawDims:{pageWidth:X,pageHeight:z},rotation:R}=this.parent.viewport;return u4.extractContoursFromText(Z,q,X,z,R,r0._INNER_MARGIN)}getDrawnSignature(Z){let{rawDims:{pageWidth:q,pageHeight:X},rotation:z}=this.parent.viewport;return u4.processDrawnLines({lines:Z,pageWidth:q,pageHeight:X,rotation:z,innerMargin:r0._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:Z,thickness:q}){Z?this._drawingOptions=r0.getDefaultDrawingOptions():(this._drawingOptions=r0._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":q}))}serialize(Z=!1){if(this.isEmpty())return null;let{lines:q,points:X}=this.serializeDraw(Z),{_drawingOptions:{"stroke-width":z}}=this,R=Object.assign(super.serialize(Z),{isSignature:!0,areContours:this.#Z,color:[0,0,0],thickness:this.#Z?0:z});return this.addComment(R),Z?(R.paths={lines:q,points:X},R.uuid=this.#X,R.isCopy=!0):R.lines=q,this.#q&&(R.accessibilityData={type:"Figure",alt:this.#q}),R}static deserializeDraw(Z,q,X,z,R,G){return G.areContours?e3.deserialize(Z,q,X,z,R,G):D6.deserialize(Z,q,X,z,R,G)}static async deserialize(Z,q,X){let z=await super.deserialize(Z,q,X);return z.#Z=Z.areContours,z.description=Z.accessibilityData?.alt||"",z.#X=Z.uuid,z}};sK=class sK extends k1{#Z=null;#q=null;#z=null;#X=null;#R=null;#G="";#Q=null;#P=!1;#Y=null;#W=!1;#J=!1;static _type="stamp";static _editorType=m1.STAMP;constructor(Z){super({...Z,name:"stampEditor"}),this.#X=Z.bitmapUrl,this.#R=Z.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(Z,q){k1.initialize(Z,q)}static isHandlingMimeForPasting(Z){return o3.includes(Z)}static paste(Z,q){q.pasteEditor({mode:m1.STAMP},{bitmapFile:Z.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(Z){let q=Z.get("hasAltText");return{hasAltText:q.get(!0)??0,hasNoAltText:q.get(!1)??0}}#_(Z,q=!1){Z?(this.#Z=Z.bitmap,q||(this.#q=Z.id,this.#W=Z.isSvg),Z.file&&(this.#G=Z.file.name),this.#K()):this.remove()}#U(){if(this.#z=null,this._uiManager.enableWaiting(!1),this.#Q)if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#Z)this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});else{if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#Z){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(Z=null,q=!0){if(this.hasAltTextData())return null;let{mlManager:X}=this._uiManager;if(!X)throw Error("No ML.");if(!await X.isEnabledFor("altText"))throw Error("ML isn't enabled for alt text.");let{data:z,width:R,height:G}=Z||this.copyCanvas(null,null,!0).imageData,P=await X.guess({name:"altText",request:{data:z,width:R,height:G,channels:z.length/(R*G)}});if(!P)throw Error("No response from the AI service.");if(P.error)throw Error("Error from the AI service.");if(P.cancel)return null;if(!P.output)throw Error("No valid response from the AI service.");let Q=P.output;return await this.setGuessedAltText(Q),q&&!this.hasAltTextData()&&(this.altTextData={alt:Q,decorative:!1}),Q}#B(){if(this.#q)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#q).then((X)=>this.#_(X,!0)).finally(()=>this.#U());if(this.#X){let X=this.#X;return this.#X=null,this._uiManager.enableWaiting(!0),void(this.#z=this._uiManager.imageManager.getFromUrl(X).then((z)=>this.#_(z)).finally(()=>this.#U()))}if(this.#R){let X=this.#R;return this.#R=null,this._uiManager.enableWaiting(!0),void(this.#z=this._uiManager.imageManager.getFromFile(X).then((z)=>this.#_(z)).finally(()=>this.#U()))}let Z=document.createElement("input");Z.type="file",Z.accept=o3.join(",");let q=this._uiManager._signal;this.#z=new Promise((X)=>{Z.addEventListener("change",async()=>{if(Z.files&&Z.files.length!==0){this._uiManager.enableWaiting(!0);let z=await this._uiManager.imageManager.getFromFile(Z.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#_(z)}else this.remove();X()},{signal:q}),Z.addEventListener("cancel",()=>{this.remove(),X()},{signal:q})}).finally(()=>this.#U()),Z.click()}remove(){this.#q&&(this.#Z=null,this._uiManager.imageManager.deleteId(this.#q),this.#Q?.remove(),this.#Q=null,this.#Y&&(clearTimeout(this.#Y),this.#Y=null)),super.remove()}rebuild(){this.parent?(super.rebuild(),this.div!==null&&(this.#q&&this.#Q===null&&this.#B(),this.isAttachedToDOM||this.parent.add(this))):this.#q&&this.#B()}onceAdded(Z){this._isDraggable=!0,Z&&this.div.focus()}isEmpty(){return!(this.#z||this.#Z||this.#X||this.#R||this.#q||this.#P)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let Z,q;return this._isCopy&&(Z=this.x,q=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#P||(this.#Z?this.#K():this.#B()),this._isCopy&&this._moveAfterPaste(Z,q),this._uiManager.addShouldRescale(this),this.div}setCanvas(Z,q){let{id:X,bitmap:z}=this._uiManager.imageManager.getFromCanvas(Z,q);q.remove(),X&&this._uiManager.imageManager.isValidId(X)&&(this.#q=X,z&&(this.#Z=z),this.#P=!1,this.#K())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#Y!==null&&clearTimeout(this.#Y),this.#Y=setTimeout(()=>{this.#Y=null,this.#f()},200)}#K(){let{div:Z}=this,{width:q,height:X}=this.#Z,[z,R]=this.pageDimensions,G=0.75;if(this.width)q=this.width*z,X=this.height*R;else if(q>0.75*z||X>0.75*R){let Q=Math.min(0.75*z/q,0.75*R/X);q*=Q,X*=Q}this._uiManager.enableWaiting(!1);let P=this.#Q=document.createElement("canvas");P.setAttribute("role","img"),this.addContainer(P),this.width=q/z,this.height=X/R,this.setDims(),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(Z.hidden=!1),this.#f(),this.#J||(this.parent.addUndoableEditor(this),this.#J=!0),this._reportTelemetry({action:"inserted_image"}),this.#G&&this.div.setAttribute("aria-description",this.#G),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(Z,q,X=!1){Z||(Z=224);let{width:z,height:R}=this.#Z,G=new u0,P=this.#Z,Q=z,Y=R,W=null;if(q){if(z>q||R>q){let M=Math.min(q/z,q/R);Q=Math.floor(z*M),Y=Math.floor(R*M)}W=document.createElement("canvas");let _=W.width=Math.ceil(Q*G.sx),J=W.height=Math.ceil(Y*G.sy);this.#W||(P=this.#$(_,J));let U=W.getContext("2d");U.filter=this._uiManager.hcmFilter;let f="white",K="#cfcfd8";this._uiManager.hcmFilter!=="none"?K="black":Af.isDarkMode&&(f="#8f8f9d",K="#42414d");let I=15,B=I*G.sx,j=I*G.sy,V=new OffscreenCanvas(2*B,2*j),x=V.getContext("2d");x.fillStyle=f,x.fillRect(0,0,2*B,2*j),x.fillStyle=K,x.fillRect(0,0,B,j),x.fillRect(B,j,B,j),U.fillStyle=U.createPattern(V,"repeat"),U.fillRect(0,0,_,J),U.drawImage(P,0,0,P.width,P.height,0,0,_,J)}let $=null;if(X){let _,J;if(G.symmetric&&P.width<Z&&P.height<Z)_=P.width,J=P.height;else if(P=this.#Z,z>Z||R>Z){let f=Math.min(Z/z,Z/R);_=Math.floor(z*f),J=Math.floor(R*f),this.#W||(P=this.#$(_,J))}let U=new OffscreenCanvas(_,J).getContext("2d",{willReadFrequently:!0});U.drawImage(P,0,0,P.width,P.height,0,0,_,J),$={width:_,height:J,data:U.getImageData(0,0,_,J).data}}return{canvas:W,width:Q,height:Y,imageData:$}}#$(Z,q){let{width:X,height:z}=this.#Z,R=X,G=z,P=this.#Z;for(;R>2*Z||G>2*q;){let Q=R,Y=G;R>2*Z&&(R=R>=16384?Math.floor(R/2)-1:Math.ceil(R/2)),G>2*q&&(G=G>=16384?Math.floor(G/2)-1:Math.ceil(G/2));let W=new OffscreenCanvas(R,G);W.getContext("2d").drawImage(P,0,0,Q,Y,0,0,R,G),P=W.transferToImageBitmap()}return P}#f(){let[Z,q]=this.parentDimensions,{width:X,height:z}=this,R=new u0,G=Math.ceil(X*Z*R.sx),P=Math.ceil(z*q*R.sy),Q=this.#Q;if(!Q||Q.width===G&&Q.height===P)return;Q.width=G,Q.height=P;let Y=this.#W?this.#Z:this.#$(G,P),W=Q.getContext("2d");W.filter=this._uiManager.hcmFilter,W.drawImage(Y,0,0,Y.width,Y.height,0,0,G,P)}#I(Z){if(Z){if(this.#W){let X=this._uiManager.imageManager.getSvgUrl(this.#q);if(X)return X}let q=document.createElement("canvas");return{width:q.width,height:q.height}=this.#Z,q.getContext("2d").drawImage(this.#Z,0,0),q.toDataURL()}if(this.#W){let[q,X]=this.pageDimensions,z=Math.round(this.width*q*n4.PDF_TO_CSS_UNITS),R=Math.round(this.height*X*n4.PDF_TO_CSS_UNITS),G=new OffscreenCanvas(z,R);return G.getContext("2d").drawImage(this.#Z,0,0,this.#Z.width,this.#Z.height,0,0,z,R),G.transferToImageBitmap()}return structuredClone(this.#Z)}static async deserialize(Z,q,X){let z=null,R=!1;if(Z instanceof Cz){let{data:{rect:f,rotation:K,id:I,structParent:B,popupRef:j,richText:V,contentsObj:x,creationDate:M,modificationDate:H},container:A,parent:{page:{pageNumber:T}},canvas:k}=Z,y,O;k?(delete Z.canvas,{id:y,bitmap:O}=X.imageManager.getFromCanvas(A.id,k),k.remove()):(R=!0,Z._hasNoCanvas=!0);let D=(await q._structTree.getAriaAttributes(`${Yz}${I}`))?.get("aria-label")||"";z=Z={annotationType:m1.STAMP,bitmapId:y,bitmap:O,pageIndex:T-1,rect:f.slice(0),rotation:K,annotationElementId:I,id:I,deleted:!1,accessibilityData:{decorative:!1,altText:D},isSvg:!1,structParent:B,popupRef:j,richText:V,comment:x?.str||null,creationDate:M,modificationDate:H}}let G=await super.deserialize(Z,q,X),{rect:P,bitmap:Q,bitmapUrl:Y,bitmapId:W,isSvg:$,accessibilityData:_}=Z;R?(X.addMissingCanvas(Z.id,G),G.#P=!0):W&&X.imageManager.isValidId(W)?(G.#q=W,Q&&(G.#Z=Q)):G.#X=Y,G.#W=$;let[J,U]=G.pageDimensions;return G.width=(P[2]-P[0])/J,G.height=(P[3]-P[1])/U,_&&(G.altTextData=_),G._initialData=z,Z.comment&&G.setCommentData(Z),G.#J=!!z,G}serialize(Z=!1,q=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let X=Object.assign(super.serialize(Z),{bitmapId:this.#q,isSvg:this.#W});if(this.addComment(X),Z)return X.bitmapUrl=this.#I(!0),X.accessibilityData=this.serializeAltText(!0),X.isCopy=!0,X;let{decorative:z,altText:R}=this.serializeAltText(!1);if(!z&&R&&(X.accessibilityData={type:"Figure",alt:R}),this.annotationElementId){let P=this.#V(X);return P.isSame?null:(P.isSameAltText?delete X.accessibilityData:X.accessibilityData.structParent=this._initialData.structParent??-1,X.id=this.annotationElementId,delete X.bitmapId,X)}if(q===null)return X;q.stamps||=new Map;let G=this.#W?(X.rect[2]-X.rect[0])*(X.rect[3]-X.rect[1]):null;if(q.stamps.has(this.#q)){if(this.#W){let P=q.stamps.get(this.#q);G>P.area&&(P.area=G,P.serialized.bitmap.close(),P.serialized.bitmap=this.#I(!1))}}else q.stamps.set(this.#q,{area:G,serialized:X}),X.bitmap=this.#I(!1);return X}#V(Z){let{pageIndex:q,accessibilityData:{altText:X}}=this._initialData,z=Z.pageIndex===q,R=(Z.accessibilityData?.alt||"")===X;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&z&&R,isSameAltText:R}}renderAnnotationElement(Z){return this.deleted?(Z.hide(),null):(Z.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}};a0=class a0{#Z;#q=!1;#z=null;#X=null;#R=null;#G=new Map;#Q=!1;#P=!1;#Y=!1;#W=null;#J=null;#_=null;#U=null;#B=null;#K=-1;#$;static _initialized=!1;static#f=new Map([C8,bz,sK,H8,r0].map((Z)=>[Z._editorType,Z]));constructor({uiManager:Z,pageIndex:q,div:X,structTreeLayer:z,accessibilityManager:R,annotationLayer:G,drawLayer:P,textLayer:Q,viewport:Y,l10n:W}){let $=[...a0.#f.values()];if(!a0._initialized){a0._initialized=!0;for(let _ of $)_.initialize(W,Z)}Z.registerEditorTypes($),this.#$=Z,this.pageIndex=q,this.div=X,this.#Z=R,this.#z=G,this.viewport=Y,this.#_=Q,this.drawLayer=P,this._structTree=z,this.#$.addLayer(this)}get isEmpty(){return this.#G.size===0}get isInvisible(){return this.isEmpty&&this.#$.getMode()===m1.NONE}updateToolbar(Z){this.#$.updateToolbar(Z)}updateMode(Z=this.#$.getMode()){switch(this.#H(),Z){case m1.NONE:return this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case m1.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case m1.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:q}=this.div;if(q.toggle("nonEditing",!1),Z===m1.POPUP)q.toggle("commentEditing",!0);else{q.toggle("commentEditing",!1);for(let X of a0.#f.values())q.toggle(`${X._type}Editing`,Z===X._editorType)}this.div.hidden=!1}hasTextLayer(Z){return Z===this.#_?.div}setEditingState(Z){this.#$.setEditingState(Z)}addCommands(Z){this.#$.addCommands(Z)}cleanUndoStack(Z){this.#$.cleanUndoStack(Z)}toggleDrawing(Z=!1){this.div.classList.toggle("drawing",!Z)}togglePointerEvents(Z=!1){this.div.classList.toggle("disabled",!Z)}toggleAnnotationLayerPointerEvents(Z=!1){this.#z?.div.classList.toggle("disabled",!Z)}get#I(){return this.#G.size!==0?this.#G.values():this.#$.getEditors(this.pageIndex)}async enable(){this.#Y=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),this.#B?.abort(),this.#B=null;let Z=new Set;for(let X of this.#I)X.enableEditing(),X.show(!0),X.annotationElementId&&(this.#$.removeChangedExistingAnnotation(X),Z.add(X.annotationElementId));let q=this.#z;if(q)for(let X of q.getEditableAnnotations()){if(X.hide(),this.#$.isDeletedAnnotationElement(X.data.id))continue;if(Z.has(X.data.id))continue;let z=await this.deserialize(X);z&&(this.addOrRebuild(z),z.enableEditing())}this.#Y=!1,this.#$._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){if(this.#P=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),this.#_&&!this.#B){this.#B=new AbortController;let X=this.#$.combinedSignal(this.#B);this.#_.div.addEventListener("pointerdown",(z)=>{let{clientX:R,clientY:G,timeStamp:P}=z;if(P-this.#K>500)return void(this.#K=P);this.#K=-1;let{classList:Q}=this.div;Q.toggle("getElements",!0);let Y=document.elementsFromPoint(R,G);if(Q.toggle("getElements",!1),!this.div.contains(Y[0]))return;let W,$=new RegExp(`^${h7}[0-9]+$`);for(let J of Y)if($.test(J.id)){W=J.id;break}if(!W)return;let _=this.#G.get(W);_?.annotationElementId===null&&(z.stopPropagation(),z.preventDefault(),_.dblclick(z))},{signal:X,capture:!0})}let Z=this.#z;if(Z){let X=new Map,z=new Map;for(let G of this.#I)G.disableEditing(),G.annotationElementId?G.serialize()===null?(z.set(G.annotationElementId,G),this.getEditableAnnotation(G.annotationElementId)?.show(),G.remove()):X.set(G.annotationElementId,G):G.updateFakeAnnotationElement(Z);let R=Z.getEditableAnnotations();for(let G of R){let{id:P}=G.data;if(this.#$.isDeletedAnnotationElement(P)){G.updateEdited({deleted:!0});continue}let Q=z.get(P);Q?(Q.resetAnnotationElement(G),Q.show(!1),G.show()):(Q=X.get(P),Q&&(this.#$.addChangedExistingAnnotation(Q),Q.renderAnnotationElement(G)&&Q.show(!1)),G.show())}}this.#H(),this.isEmpty&&(this.div.hidden=!0);let{classList:q}=this.div;for(let X of a0.#f.values())q.remove(`${X._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#P=!1}getEditableAnnotation(Z){return this.#z?.getEditableAnnotation(Z)||null}setActiveEditor(Z){this.#$.getActive()!==Z&&this.#$.setActiveEditor(Z)}enableTextSelection(){if(this.div.tabIndex=-1,this.#_?.div&&!this.#U){this.#U=new AbortController;let Z=this.#$.combinedSignal(this.#U);this.#_.div.addEventListener("pointerdown",this.#V.bind(this),{signal:Z}),this.#_.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#_?.div&&this.#U&&(this.#U.abort(),this.#U=null,this.#_.div.classList.remove("highlighting"))}#V(Z){this.#$.unselectAll();let{target:q}=Z;if(q===this.#_.div||(q.getAttribute("role")==="img"||q.classList.contains("endOfContent"))&&this.#_.div.contains(q)){let{isMac:X}=T8.platform;if(Z.button!==0||Z.ctrlKey&&X)return;this.#$.showAllEditors("highlight",!0,!0),this.#_.div.classList.add("free"),this.toggleDrawing(),H8.startHighlighting(this,this.#$.direction==="ltr",{target:this.#_.div,x:Z.x,y:Z.y}),this.#_.div.addEventListener("pointerup",()=>{this.#_.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#$._signal}),Z.preventDefault()}}enableClick(){if(this.#X)return;this.#X=new AbortController;let Z=this.#$.combinedSignal(this.#X);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:Z});let q=this.pointerup.bind(this);this.div.addEventListener("pointerup",q,{signal:Z}),this.div.addEventListener("pointercancel",q,{signal:Z})}disableClick(){this.#X?.abort(),this.#X=null}attach(Z){this.#G.set(Z.id,Z);let{annotationElementId:q}=Z;q&&this.#$.isDeletedAnnotationElement(q)&&this.#$.removeDeletedAnnotationElement(Z)}detach(Z){this.#G.delete(Z.id),this.#Z?.removePointerInTextLayer(Z.contentDiv),!this.#P&&Z.annotationElementId&&this.#$.addDeletedAnnotationElement(Z)}remove(Z){this.detach(Z),this.#$.removeEditor(Z),Z.div.remove(),Z.isAttachedToDOM=!1}changeParent(Z){Z.parent!==this&&(Z.parent&&Z.annotationElementId&&(this.#$.addDeletedAnnotationElement(Z.annotationElementId),k1.deleteAnnotationElement(Z),Z.annotationElementId=null),this.attach(Z),Z.parent?.detach(Z),Z.setParent(this),Z.div&&Z.isAttachedToDOM&&(Z.div.remove(),this.div.append(Z.div)))}add(Z){if(Z.parent!==this||!Z.isAttachedToDOM){if(this.changeParent(Z),this.#$.addEditor(Z),this.attach(Z),!Z.isAttachedToDOM){let q=Z.render();this.div.append(q),Z.isAttachedToDOM=!0}Z.fixAndSetPosition(),Z.onceAdded(!this.#Y),this.#$.addToAnnotationStorage(Z),Z._reportTelemetry(Z.telemetryInitialData)}}moveEditorInDOM(Z){if(!Z.isAttachedToDOM)return;let{activeElement:q}=document;Z.div.contains(q)&&!this.#R&&(Z._focusEventsAllowed=!1,this.#R=setTimeout(()=>{this.#R=null,Z.div.contains(document.activeElement)?Z._focusEventsAllowed=!0:(Z.div.addEventListener("focusin",()=>{Z._focusEventsAllowed=!0},{once:!0,signal:this.#$._signal}),q.focus())},0)),Z._structTreeParentId=this.#Z?.moveElementInDOM(this.div,Z.div,Z.contentDiv,!0)}addOrRebuild(Z){Z.needsToBeRebuilt()?(Z.parent||=this,Z.rebuild(),Z.show()):this.add(Z)}addUndoableEditor(Z){this.addCommands({cmd:()=>Z._uiManager.rebuild(Z),undo:()=>{Z.remove()},mustExec:!1})}getEditorByUID(Z){for(let q of this.#G.values())if(q.uid===Z)return q;return null}getNextId(){return this.#$.getId()}get#j(){return a0.#f.get(this.#$.getMode())}combinedSignal(Z){return this.#$.combinedSignal(Z)}#k(Z){let q=this.#j;return q?new q.prototype.constructor(Z):null}canCreateNewEmptyEditor(){return this.#j?.canCreateNewEmptyEditor()}async pasteEditor(Z,q){this.updateToolbar(Z),await this.#$.updateMode(Z.mode);let{offsetX:X,offsetY:z}=this.#A(),R=this.getNextId(),G=this.#k({parent:this,id:R,x:X,y:z,uiManager:this.#$,isCentered:!0,...q});G&&this.add(G)}async deserialize(Z){return await a0.#f.get(Z.annotationType??Z.annotationEditorType)?.deserialize(Z,this,this.#$)||null}createAndAddNewEditor(Z,q,X={}){let z=this.getNextId(),R=this.#k({parent:this,id:z,x:Z.offsetX,y:Z.offsetY,uiManager:this.#$,isCentered:q,...X});return R&&this.add(R),R}get boundingClientRect(){return this.div.getBoundingClientRect()}#A(){let{x:Z,y:q,width:X,height:z}=this.boundingClientRect,R=Math.max(0,Z),G=Math.max(0,q),P=(R+Math.min(window.innerWidth,Z+X))/2-Z,Q=(G+Math.min(window.innerHeight,q+z))/2-q,[Y,W]=this.viewport.rotation%180==0?[P,Q]:[Q,P];return{offsetX:Y,offsetY:W}}addNewEditor(Z={}){this.createAndAddNewEditor(this.#A(),!0,Z)}setSelected(Z){this.#$.setSelected(Z)}toggleSelected(Z){this.#$.toggleSelected(Z)}unselect(Z){this.#$.unselect(Z)}pointerup(Z){let{isMac:q}=T8.platform;if(Z.button!==0||Z.ctrlKey&&q)return;if(Z.target!==this.div)return;if(!this.#Q)return;if(this.#Q=!1,this.#j?.isDrawer&&this.#j.supportMultipleDrawings)return;if(!this.#q)return void(this.#q=!0);let X=this.#$.getMode();X!==m1.STAMP&&X!==m1.SIGNATURE?this.createAndAddNewEditor(Z,!1):this.#$.unselectAll()}pointerdown(Z){if(this.#$.getMode()===m1.HIGHLIGHT&&this.enableTextSelection(),this.#Q)return void(this.#Q=!1);let{isMac:q}=T8.platform;if(Z.button!==0||Z.ctrlKey&&q)return;if(Z.target!==this.div)return;if(this.#Q=!0,this.#j?.isDrawer)return void this.startDrawingSession(Z);let X=this.#$.getActive();this.#q=!X||X.isEmpty()}startDrawingSession(Z){if(this.div.focus({preventScroll:!0}),this.#W)return void this.#j.startDrawing(this,this.#$,!1,Z);this.#$.setCurrentDrawingSession(this),this.#W=new AbortController;let q=this.#$.combinedSignal(this.#W);this.div.addEventListener("blur",({relatedTarget:X})=>{X&&!this.div.contains(X)&&(this.#J=null,this.commitOrRemove())},{signal:q}),this.#j.startDrawing(this,this.#$,!1,Z)}pause(Z){if(Z){let{activeElement:q}=document;return void(this.div.contains(q)&&(this.#J=q))}this.#J&&setTimeout(()=>{this.#J?.focus(),this.#J=null},0)}endDrawingSession(Z=!1){return this.#W?(this.#$.setCurrentDrawingSession(null),this.#W.abort(),this.#W=null,this.#J=null,this.#j.endDrawing(Z)):null}findNewParent(Z,q,X){let z=this.#$.findParent(q,X);return z!==null&&z!==this&&(z.changeParent(Z),!0)}commitOrRemove(){return!!this.#W&&(this.endDrawingSession(),!0)}onScaleChanging(){this.#W&&this.#j.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#$.getActive()?.parent===this&&(this.#$.commitOrRemove(),this.#$.setActiveEditor(null)),this.#R&&(clearTimeout(this.#R),this.#R=null);for(let Z of this.#G.values())this.#Z?.removePointerInTextLayer(Z.contentDiv),Z.setParent(null),Z.isAttachedToDOM=!1,Z.div.remove();this.div=null,this.#G.clear(),this.#$.removeLayer(this)}#H(){for(let Z of this.#G.values())Z.isEmpty()&&Z.remove()}render({viewport:Z}){this.viewport=Z,i4(this.div,Z);for(let q of this.#$.getEditors(this.pageIndex))this.add(q),q.rebuild();this.updateMode()}update({viewport:Z}){this.#$.commitOrRemove(),this.#H();let q=this.viewport.rotation,X=Z.rotation;if(this.viewport=Z,i4(this.div,{rotation:X}),q!==X)for(let z of this.#G.values())z.rotate(X)}get pageDimensions(){let{pageWidth:Z,pageHeight:q}=this.viewport.rawDims;return[Z,q]}get scale(){return this.#$.viewParameters.realScale}};globalThis._pdfjsTestingUtils={HighlightOutliner:i3},globalThis.pdfjsLib={AbortException:P4,AnnotationEditorLayer:a0,AnnotationEditorParamsType:s1,AnnotationEditorType:m1,AnnotationEditorUIManager:C4,AnnotationLayer:w9,AnnotationMode:j4,AnnotationType:V8,applyOpacity:Lf,build:AK,ColorPicker:B0,createValidAbsoluteUrl:Gz,CSSConstants:Wz,DOMSVGFactory:F6,DrawLayer:F8,FeatureTest:T8,fetchData:y6,findContrastColor:kf,getDocument:IK,getFilenameFromUrl:Hf,getPdfFilenameFromUrl:xf,getRGB:C6,getUuid:Qz,getXfaPageViewport:Mf,GlobalWorkerOptions:b5,ImageKind:H7,InvalidPDFException:s7,isDataScheme:W2,isPdfFile:b9,isValidExplicitDest:mf,MathClamp:l8,noContextMenu:A0,normalizeUnicode:jf,OPS:T6,OutputScale:u0,PasswordResponses:Kf,PDFDataRangeTransport:y9,PDFDateString:l7,PDFWorker:v8,PermissionFlag:Uf,PixelsPerInch:n4,RenderingCancelledException:Y2,renderRichText:$z,ResponseException:N6,setLayerDimensions:i4,shadow:D1,SignatureExtractor:u4,stopEvent:J8,SupportedImageMimeTypes:o3,TextLayer:h8,TouchManager:$2,updateUrlHash:Pz,Util:j1,VerbosityLevel:G2,version:MK,XfaLayer:v9}});import{logger as oK,Service as pH,ServiceType as aK}from"@elizaos/core";var J2,Xx=globalThis.process?.release?.name==="node";async function u9(Z,q={}){let{getDocument:X}=await SH();return await X({data:Z,isEvalSupported:!1,useSystemFonts:!0,...q}).promise}async function SH(){if(!J2)await mH();return J2}async function mH(Z,{reload:q=!1}={}){if(J2&&!q)return;if(Z)try{J2=await OH(Z());return}catch(X){throw Error(`PDF.js could not be resolved: ${X}`)}try{J2=await Promise.resolve().then(() => (lK(),rK))}catch(X){throw Error(`Serverless PDF.js bundle could not be resolved: ${X}`)}}async function OH(Z){let q=await Z;return q.default||q}class yH{#Z=!1;constructor({enableHWA:Z=!1}={}){this.#Z=Z}create(Z,q){let X=this._createCanvas(Z,q);return{canvas:X,context:X.getContext("2d",{willReadFrequently:!this.#Z})}}reset({canvas:Z},q,X){if(!Z)throw Error("Canvas is not specified");Z.width=q,Z.height=X}destroy(Z){if(!Z.canvas)throw Error("Canvas is not specified");Z.canvas.width=0,Z.canvas.height=0,Z.canvas=void 0,Z.context=void 0}_createCanvas(Z,q){throw Error("Not implemented")}}function Oz(Z){return"str"in Z}class U2 extends pH{static serviceType=aK.PDF;capabilityDescription="The agent is able to convert PDF files to text";static async start(Z){return new U2(Z)}static async stop(Z){let q=Z.getService(aK.PDF);if(q)await q.stop()}async stop(){}async convertPdfToText(Z){try{let q=new Uint8Array(Z),X=await u9(q),z=X.numPages,R=[];for(let P=1;P<=z;P++){let W=(await(await X.getPage(P)).getTextContent()).items.filter(Oz).map(($)=>$.str).join(" ");R.push(W)}let G=R.join(`
|
|
60
|
-
`);return this.cleanUpContent(G)}catch(q){throw oK.error(`PdfService: Failed to convert PDF to text - error: ${q}, bufferSize: ${Z.length}`),q}}async convertPdfToTextWithOptions(Z,q={}){try{let X=new Uint8Array(Z),z=await u9(X),R=z.numPages,G=Math.max(1,q.startPage||1),P=Math.min(R,q.endPage||R),Q=[];for(let W=G;W<=P;W++){let J=(await(await z.getPage(W)).getTextContent()).items.filter(Oz).map((U)=>U.str).join(q.preserveWhitespace?"":" ");Q.push(J)}let Y=Q.join(`
|
|
61
|
-
`);if(q.cleanContent!==!1)Y=this.cleanUpContent(Y);return{success:!0,text:Y,pageCount:R}}catch(X){return{success:!1,error:X instanceof Error?X.message:String(X)}}}async getDocumentInfo(Z){let q=new Uint8Array(Z),X=await u9(q),z=X.numPages,G=(await X.getMetadata()).info,P={title:G.Title,author:G.Author,subject:G.Subject,keywords:G.Keywords,creator:G.Creator,producer:G.Producer,creationDate:G.CreationDate?new Date(G.CreationDate):void 0,modificationDate:G.ModDate?new Date(G.ModDate):void 0},Q=[],Y=[];for(let W=1;W<=z;W++){let $=await X.getPage(W),_=$.getViewport({scale:1}),U=(await $.getTextContent()).items.filter(Oz).map((f)=>f.str).join(" ");Q.push({pageNumber:W,width:_.width,height:_.height,text:this.cleanUpContent(U)}),Y.push(U)}return{pageCount:z,metadata:P,text:this.cleanUpContent(Y.join(`
|
|
62
|
-
`)),pages:Q}}cleanUpContent(Z){try{return Z.split("").filter((z)=>{let R=z.charCodeAt(0);return!(R===0||R>=1&&R<=8||R>=11&&R<=12||R>=14&&R<=31||R===127)}).join("").replace(/[^\S\r\n]+/g," ").replace(/[ \t]+(\r?\n)/g,"$1").trim()}catch(q){return oK.error(`PdfService: Failed to clean up content - error: ${q}, contentLength: ${Z.length}`),Z}}}var DH={name:"pdf",description:"Plugin for PDF reading and text extraction",services:[U2],actions:[]},wH=DH;export{DH as pdfPlugin,wH as default,U2 as PdfService};
|
|
1
|
+
import{logger as y,Service as C,ServiceType as w}from"@elizaos/core";import{getDocumentProxy as P}from"unpdf";var D=104857600,m=[37,80,68,70,45],S=1024;function A(t){return typeof t==="object"&&t!==null&&"str"in t&&typeof t.str==="string"}function l(t){let e=[];for(let n of t)if(A(n))e.push(n.str);return e}function E(t){let e=Math.min(t.length,S);for(let n=0;n<=e-m.length;n++){let o=!0;for(let r=0;r<m.length;r++)if(t[n+r]!==m[r]){o=!1;break}if(o)return!0}return!1}function x(t){if(!(t instanceof Uint8Array))throw TypeError("PDF input must be a Buffer or Uint8Array");if(t.length===0)throw RangeError("PDF input is empty");if(t.byteLength>D)throw RangeError(`PDF input exceeds maximum size of ${D} bytes`);if(!E(t))throw TypeError("PDF input is not a supported PDF document");return t}function T(t,e){if(t===void 0)return;if(typeof t!=="number"||!Number.isFinite(t)||!Number.isInteger(t)||t<1)throw RangeError(`${e} must be a positive finite integer`);return t}function F(t,e){let n=T(t.startPage,"startPage")??1,o=T(t.endPage,"endPage")??e;if(o<n)throw RangeError("endPage must be greater than or equal to startPage");return{startPage:Math.min(n,e),endPage:Math.min(o,e)}}function b(t){if(t===void 0)return;let e=t instanceof Date?t:new Date(t);return Number.isNaN(e.getTime())?void 0:e}class d extends C{static serviceType=w.PDF;capabilityDescription="The agent is able to convert PDF files to text";static async start(t){return new d(t)}static async stop(t){let e=t.getService(w.PDF);if(e)await e.stop()}async stop(){}async convertPdfToText(t){try{let e=x(t),n=await P(e),o=n.numPages,r=[];for(let c=1;c<=o;c++){let s=await(await n.getPage(c)).getTextContent(),a=l(s.items).join(" ");r.push(a)}let i=r.join(`
|
|
2
|
+
`);return this.cleanUpContent(i)}catch(e){let n=t instanceof Uint8Array?t.length:"unknown";throw y.error(`PdfService: Failed to convert PDF to text - error: ${e}, bufferSize: ${n}`),e}}async convertPdfToTextWithOptions(t,e={}){try{let n=x(t),o=await P(n),r=o.numPages,{startPage:i,endPage:c}=F(e,r),f=[];for(let a=i;a<=c;a++){let u=await(await o.getPage(a)).getTextContent(),p=l(u.items).join(e.preserveWhitespace?"":" ");f.push(p)}let s=f.join(`
|
|
3
|
+
`);if(e.cleanContent!==!1)s=this.cleanUpContent(s);return{success:!0,text:s,pageCount:r}}catch(n){return{success:!1,error:n instanceof Error?n.message:String(n)}}}async getDocumentInfo(t){let e=x(t),n=await P(e),o=n.numPages,i=(await n.getMetadata()).info,c={title:i.Title,author:i.Author,subject:i.Subject,keywords:i.Keywords,creator:i.Creator,producer:i.Producer,creationDate:b(i.CreationDate),modificationDate:b(i.ModDate)},f=[],s=[];for(let a=1;a<=o;a++){let g=await n.getPage(a),u=g.getViewport({scale:1}),p=await g.getTextContent(),h=l(p.items).join(" ");f.push({pageNumber:a,width:u.width,height:u.height,text:this.cleanUpContent(h)}),s.push(h)}return{pageCount:o,metadata:c,text:this.cleanUpContent(s.join(`
|
|
4
|
+
`)),pages:f}}cleanUpContent(t){try{return t.split("").filter((o)=>{let r=o.charCodeAt(0);return!(r===0||r>=1&&r<=8||r>=11&&r<=12||r>=14&&r<=31||r===127)}).join("").replace(/[^\S\r\n]+/g," ").replace(/[ \t]+(\r?\n)/g,"$1").trim()}catch(e){return y.error(`PdfService: Failed to clean up content - error: ${e}, contentLength: ${t.length}`),t}}}var v={name:"pdf",description:"Plugin for PDF reading and text extraction",services:[d],actions:[],async dispose(t){await t.getService(d.serviceType)?.stop()}};var R=v,O=R;export{v as pdfPlugin,O as default,d as PdfService};
|
|
63
5
|
|
|
64
|
-
//# debugId=
|
|
6
|
+
//# debugId=EF1937D530F1110664756E2164756E21
|