>>0}function expectString(e){if(\\\"string\\\"!=typeof e)throw new r.FormatError(\\\"Malformed CMap: expected string.\\\")}function expectInt(e){if(!Number.isInteger(e))throw new r.FormatError(\\\"Malformed CMap: expected int.\\\")}function parseBfChar(e,t){for(;;){let a=t.getObj();if(a===n.EOF)break;if((0,n.isCmd)(a,\\\"endbfchar\\\"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=a;e.mapOne(r,i)}}function parseBfRange(e,t){for(;;){let a=t.getObj();if(a===n.EOF)break;if((0,n.isCmd)(a,\\\"endbfrange\\\"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=strToInt(a);a=t.getObj();if(Number.isInteger(a)||\\\"string\\\"==typeof a){const t=Number.isInteger(a)?String.fromCharCode(a):a;e.mapBfRange(r,i,t)}else{if(!(0,n.isCmd)(a,\\\"[\\\"))break;{a=t.getObj();const s=[];for(;!(0,n.isCmd)(a,\\\"]\\\")&&a!==n.EOF;){s.push(a);a=t.getObj()}e.mapBfRangeToArray(r,i,s)}}}throw new r.FormatError(\\\"Invalid bf range.\\\")}function parseCidChar(e,t){for(;;){let a=t.getObj();if(a===n.EOF)break;if((0,n.isCmd)(a,\\\"endcidchar\\\"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectInt(a);const i=a;e.mapOne(r,i)}}function parseCidRange(e,t){for(;;){let a=t.getObj();if(a===n.EOF)break;if((0,n.isCmd)(a,\\\"endcidrange\\\"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=strToInt(a);a=t.getObj();expectInt(a);const s=a;e.mapCidRange(r,i,s)}}function parseCodespaceRange(e,t){for(;;){let a=t.getObj();if(a===n.EOF)break;if((0,n.isCmd)(a,\\\"endcodespacerange\\\"))return;if(\\\"string\\\"!=typeof a)break;const r=strToInt(a);a=t.getObj();if(\\\"string\\\"!=typeof a)break;const i=strToInt(a);e.addCodespaceRange(a.length,r,i)}throw new r.FormatError(\\\"Invalid codespace range.\\\")}function parseWMode(e,t){const a=t.getObj();Number.isInteger(a)&&(e.vertical=!!a)}function parseCMapName(e,t){const a=t.getObj();a instanceof n.Name&&(e.name=a.name)}async function parseCMap(e,t,a,i){let s,c;e:for(;;)try{const a=t.getObj();if(a===n.EOF)break;if(a instanceof n.Name){\\\"WMode\\\"===a.name?parseWMode(e,t):\\\"CMapName\\\"===a.name&&parseCMapName(e,t);s=a}else if(a instanceof n.Cmd)switch(a.cmd){case\\\"endcmap\\\":break e;case\\\"usecmap\\\":s instanceof n.Name&&(c=s.name);break;case\\\"begincodespacerange\\\":parseCodespaceRange(e,t);break;case\\\"beginbfchar\\\":parseBfChar(e,t);break;case\\\"begincidchar\\\":parseCidChar(e,t);break;case\\\"beginbfrange\\\":parseBfRange(e,t);break;case\\\"begincidrange\\\":parseCidRange(e,t)}}catch(e){if(e instanceof o.MissingDataException)throw e;(0,r.warn)(\\\"Invalid cMap data: \\\"+e);continue}!i&&c&&(i=c);return i?extendCMap(e,a,i):e}async function extendCMap(e,t,a){e.useCMap=await createBuiltInCMap(a,t);if(0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let a=0;a r)return!0;const n=r-e;for(let e=n;e>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&c));this.a=c;e[t]=r<<1|n;return o}}},(e,t,a)=>{Object.defineProperty(t,\\\"__esModule\\\",{value:!0});t.JpegStream=void 0;var r=a(29),n=a(5),i=a(38),s=a(2);class JpegStream extends r.DecodeStream{constructor(e,t,a){let r;for(;-1!==(r=e.getByte());)if(255===r){e.skip(-1);break}super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=a}get bytes(){return(0,s.shadow)(this,\\\"bytes\\\",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray(\\\"D\\\",\\\"Decode\\\");if(this.forceRGB&&Array.isArray(t)){const a=this.dict.get(\\\"BPC\\\",\\\"BitsPerComponent\\\")||8,r=t.length,n=new Int32Array(r);let i=!1;const s=(1<{Object.defineProperty(t,\\\"__esModule\\\",{value:!0});t.JpegImage=void 0;var r=a(2),n=a(8);class JpegError extends r.BaseException{constructor(e){super(`JPEG error: ${e}`,\\\"JpegError\\\")}}class DNLMarkerError extends r.BaseException{constructor(e,t){super(e,\\\"DNLMarkerError\\\");this.scanLines=t}}class EOIMarkerError extends r.BaseException{constructor(e){super(e,\\\"EOIMarkerError\\\")}}const i=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]),s=4017,o=799,c=3406,l=2276,h=1567,u=3784,d=5793,f=2896;function buildHuffmanTable(e,t){let a,r,n=0,i=16;for(;i>0&&!e[i-1];)i--;const s=[{children:[],index:0}];let o,c=s[0];for(a=0;a0;)c=s.pop();c.index++;s.push(c);for(;s.length<=a;){s.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}n++}if(a+10){b--;return m>>b&1}m=e[t++];if(255===m){const r=e[t++];if(r){if(220===r&&d){t+=2;const r=(0,n.readUint16)(e,t);t+=2;if(r>0&&r!==a.scanLines)throw new DNLMarkerError(\\\"Found DNL marker (0xFFDC) while parsing scan data\\\",r)}else if(217===r){if(d){const e=x*(8===a.precision?8:0);if(e>0&&Math.round(a.scanLines/e)>=10)throw new DNLMarkerError(\\\"Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter\\\",e)}throw new EOIMarkerError(\\\"Found EOI marker (0xFFD9) while parsing scan data\\\")}throw new JpegError(`unexpected marker ${(m<<8|r).toString(16)}`)}}b=7;return m>>>7}function decodeHuffman(e){let t=e;for(;;){t=t[readBit()];switch(typeof t){case\\\"number\\\":return t;case\\\"object\\\":continue}throw new JpegError(\\\"invalid huffman sequence\\\")}}function receive(e){let t=0;for(;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;const t=receive(e);return t>=1<>4;if(0===n)if(o<15){y=receive(o)+(1<0?Math.min(r.xcb,n.PPx-1):Math.min(r.xcb,n.PPx);n.ycb_=a>0?Math.min(r.ycb,n.PPy-1):Math.min(r.ycb,n.PPy);return n}function buildPrecincts(e,t,a){const r=1<=0;t--){d[t]=o[a];a=l[a]}}else d[f++]=d[0]}if(n){l[s]=u;c[s]=c[u]+1;o[s]=d[0];s++;h=s+i&s+i-1?h:0|Math.min(Math.log(s+i)/.6931471805599453+1,12)}u=e;g+=f;if(r0){S+=\\\"ÿÿ\\\";w+=\\\"ÿÿ\\\";x+=\\\"\\\\0\\u0001\\\";k+=\\\"\\\\0\\\\0\\\"}const F=\\\"\\\\0\\\\0\\\"+string16(2*d)+string16(f.range)+string16(f.entry)+string16(f.rangeShift)+S+\\\"\\\\0\\\\0\\\"+w+x+k+C;let O=\\\"\\\",T=\\\"\\\";if(n>1){l+=\\\"\\\\0\\u0003\\\\0\\\\n\\\"+(0,r.string32)(4+8*n+4+F.length);O=\\\"\\\";for(i=0,s=a.length;ie||!l)&&(l=e);hi)continue;t.pos=n;const s=e.name;if(e.encoding){let a=\\\"\\\";for(let r=0,n=e.length;r>8&255,255&s]);else{i=new Uint8Array(1+2*s);i[0]=0;let t=0;const n=e.charset.length;let o=!1;for(let s=1;s=n){o+=a;for(;o