/** * @licstart The following is the entire license notice for the * JavaScript code in this page * * Copyright 2024 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @licend The above is the entire license notice for the * JavaScript code in this page */ /** * pdfjsVersion = 5.7.284 * pdfjsBuild = 7e5b36c2d */var t={9306(t,e,r){var n=r(4901),o=r(6823),a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(o(t)+" is not a function")}},3506(t,e,r){var n=r(3925),o=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a("Can't set "+o(t)+" as a prototype")}},7080(t,e,r){var n=r(4402).has;t.exports=function(t){n(t);return t}},3463(t){var e=TypeError;t.exports=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")}},6469(t,e,r){var n=r(8227),o=r(2360),a=r(4913).f,i=n("unscopables"),s=Array.prototype;void 0===s[i]&&a(s,i,{configurable:!0,value:o(null)});t.exports=function(t){s[i][t]=!0}},679(t,e,r){var n=r(1625),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new o("Incorrect invocation")}},3972(t,e,r){var n=r(34),o=String,a=TypeError;t.exports=function(t){if(void 0===t||n(t))return t;throw new a(o(t)+" is not an object or undefined")}},8551(t,e,r){var n=r(34),o=String,a=TypeError;t.exports=function(t){if(n(t))return t;throw new a(o(t)+" is not an object")}},4154(t,e,r){var n=r(6955),o=TypeError;t.exports=function(t){if("Uint8Array"===n(t))return t;throw new o("Argument is not an Uint8Array")}},7811(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7394(t,e,r){var n=r(4576),o=r(6706),a=r(2195),i=n.ArrayBuffer,s=n.TypeError;t.exports=i&&o(i.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==a(t))throw new s("ArrayBuffer expected");return t.byteLength}},3238(t,e,r){var n=r(4576),o=r(7811),a=r(7394),i=n.DataView;t.exports=function(t){if(!o||0!==a(t))return!1;try{new i(t);return!1}catch(t){return!0}}},5169(t,e,r){var n=r(3238),o=TypeError;t.exports=function(t){if(n(t))throw new o("ArrayBuffer is detached");return t}},5636(t,e,r){var n=r(4576),o=r(9504),a=r(6706),i=r(7696),s=r(5169),c=r(7394),u=r(4483),f=r(1548),l=n.structuredClone,h=n.ArrayBuffer,p=n.DataView,m=Math.max,g=Math.min,d=h.prototype,y=p.prototype,b=o(d.slice),w=a(d,"resizable","get"),v=a(d,"maxByteLength","get"),_=o(y.getInt8),x=o(y.setInt8);t.exports=(f||u)&&function(t,e,r){var n,o=c(t),a=void 0===e?o:i(e),d=!w||!w(t);s(t);if(f){t=l(t,{transfer:[t]});if(o===a&&(r||d))return t}if(o>=a&&(!r||d))n=b(t,0,a);else{var y=r&&!d&&v?{maxByteLength:m(a,v(t))}:void 0;n=new h(a,y);for(var C=new p(t),A=new p(n),S=g(a,o),R=0;Rf;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4527(t,e,r){var n=r(3724),o=r(4376),a=TypeError,i=Object.getOwnPropertyDescriptor,s=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!i(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},2804(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",n=e+"-_",inverse=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:inverse(r),i2cUrl:n,c2iUrl:inverse(n)}},6319(t,e,r){var n=r(8551),o=r(9539);t.exports=function(t,e,r,a){try{return a?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},2195(t,e,r){var n=r(9504),o=n({}.toString),a=n("".slice);t.exports=function(t){return a(o(t),8,-1)}},6955(t,e,r){var n=r(2140),o=r(4901),a=r(2195),i=r(8227)("toStringTag"),s=Object,c="Arguments"===a(function(){return arguments}());t.exports=n?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),i))?r:c?a(e):"Object"===(n=a(e))&&o(e.callee)?"Arguments":n}},7740(t,e,r){var n=r(9297),o=r(5031),a=r(7347),i=r(4913);t.exports=function(t,e,r){for(var s=o(e),c=i.f,u=a.f,f=0;f9007199254740991)throw new e("Maximum allowed index exceeded");return t}},8727(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193(t,e,r){var n=r(4215);t.exports="NODE"===n},2839(t,e,r){var n=r(4576).navigator,o=n&&n.userAgent;t.exports=o?String(o):""},9519(t,e,r){var n,o,a=r(4576),i=r(2839),s=a.process,c=a.Deno,u=s&&s.versions||c&&c.version,f=u&&u.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1]));!o&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(o=+n[1]);t.exports=o},4215(t,e,r){var n=r(4576),o=r(2839),a=r(2195),userAgentStartsWith=function(t){return o.slice(0,t.length)===t};t.exports=userAgentStartsWith("Bun/")?"BUN":userAgentStartsWith("Cloudflare-Workers")?"CLOUDFLARE":userAgentStartsWith("Deno/")?"DENO":userAgentStartsWith("Node.js/")?"NODE":n.Bun&&"string"==typeof Bun.version?"BUN":n.Deno&&"object"==typeof Deno.version?"DENO":"process"===a(n.process)?"NODE":n.window&&n.document?"BROWSER":"REST"},6518(t,e,r){var n=r(4576),o=r(7347).f,a=r(6699),i=r(6840),s=r(9433),c=r(7740),u=r(2796);t.exports=function(t,e){var r,f,l,h,p,m=t.target,g=t.global,d=t.stat;if(r=g?n:d?n[m]||s(m,{}):n[m]&&n[m].prototype)for(f in e){h=e[f];l=t.dontCallGetSet?(p=o(r,f))&&p.value:r[f];if(!u(g?f:m+(d?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&a(h,"sham",!0);i(r,f,h,t)}}},9039(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},6080(t,e,r){var n=r(7476),o=r(9306),a=r(616),i=n(n.bind);t.exports=function(t,e){o(t);return void 0===e?t:a?i(t,e):function(){return t.apply(e,arguments)}}},616(t,e,r){var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565(t,e,r){var n=r(616),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},350(t,e,r){var n=r(3724),o=r(9297),a=Function.prototype,i=n&&Object.getOwnPropertyDescriptor,s=o(a,"name"),c=s&&"something"===function something(){}.name,u=s&&(!n||n&&i(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},6706(t,e,r){var n=r(9504),o=r(9306);t.exports=function(t,e,r){try{return n(o(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476(t,e,r){var n=r(2195),o=r(9504);t.exports=function(t){if("Function"===n(t))return o(t)}},9504(t,e,r){var n=r(616),o=Function.prototype,a=o.call,i=n&&o.bind.bind(a,a);t.exports=n?i:function(t){return function(){return a.apply(t,arguments)}}},944(t){var e=TypeError;t.exports=function(t){var r=t&&t.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new e("Incorrect `alphabet` option")}},9429(t,e,r){var n=r(4576),o=r(6193);t.exports=function(t){if(o){try{return n.process.getBuiltinModule(t)}catch(t){}try{return Function('return require("'+t+'")')()}catch(t){}}}},7751(t,e,r){var n=r(4576),o=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},1767(t){t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},851(t,e,r){var n=r(6955),o=r(5966),a=r(4117),i=r(6269),s=r(8227)("iterator");t.exports=function(t){if(!a(t))return o(t,s)||o(t,"@@iterator")||i[n(t)]}},81(t,e,r){var n=r(9565),o=r(9306),a=r(8551),i=r(6823),s=r(851),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(o(r))return a(n(r,t));throw new c(i(t)+" is not iterable")}},5966(t,e,r){var n=r(9306),o=r(4117);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},3789(t,e,r){var n=r(9306),o=r(8551),a=r(9565),i=r(1291),s=r(1767),c="Invalid size",u=RangeError,f=TypeError,l=Math.max,SetRecord=function(t,e){this.set=t;this.size=l(e,0);this.has=n(t.has);this.keys=n(t.keys)};SetRecord.prototype={getIterator:function(){return s(o(a(this.keys,this.set)))},includes:function(t){return a(this.has,this.set,t)}};t.exports=function(t){o(t);var e=+t.size;if(e!=e)throw new f(c);var r=i(e);if(r<0)throw new u(c);return new SetRecord(t,r)}},4576(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297(t,e,r){var n=r(9504),o=r(8981),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,e){return a(o(t),e)}},421(t){t.exports={}},397(t,e,r){var n=r(7751);t.exports=n("document","documentElement")},5917(t,e,r){var n=r(3724),o=r(9039),a=r(4055);t.exports=!n&&!o(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},7055(t,e,r){var n=r(9504),o=r(9039),a=r(2195),i=Object,s=n("".split);t.exports=o(function(){return!i("z").propertyIsEnumerable(0)})?function(t){return"String"===a(t)?s(t,""):i(t)}:i},3706(t,e,r){var n=r(9504),o=r(4901),a=r(7629),i=n(Function.toString);o(a.inspectSource)||(a.inspectSource=function(t){return i(t)});t.exports=a.inspectSource},1181(t,e,r){var n,o,a,i=r(8622),s=r(4576),c=r(34),u=r(6699),f=r(9297),l=r(7629),h=r(6119),p=r(421),m="Object already initialized",g=s.TypeError,d=s.WeakMap;if(i||l.state){var y=l.state||(l.state=new d);y.get=y.get;y.has=y.has;y.set=y.set;n=function(t,e){if(y.has(t))throw new g(m);e.facade=t;y.set(t,e);return e};o=function(t){return y.get(t)||{}};a=function(t){return y.has(t)}}else{var b=h("state");p[b]=!0;n=function(t,e){if(f(t,b))throw new g(m);e.facade=t;u(t,b,e);return e};o=function(t){return f(t,b)?t[b]:{}};a=function(t){return f(t,b)}}t.exports={set:n,get:o,has:a,enforce:function(t){return a(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return r}}}},4209(t,e,r){var n=r(8227),o=r(6269),a=n("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||i[a]===t)}},4376(t,e,r){var n=r(2195);t.exports=Array.isArray||function isArray(t){return"Array"===n(t)}},1108(t,e,r){var n=r(6955);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},4901(t){var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2796(t,e,r){var n=r(9039),o=r(4901),a=/#|\.prototype\./,isForced=function(t,e){var r=s[i(t)];return r===u||r!==c&&(o(e)?n(e):!!e)},i=isForced.normalize=function(t){return String(t).replace(a,".").toLowerCase()},s=isForced.data={},c=isForced.NATIVE="N",u=isForced.POLYFILL="P";t.exports=isForced},4117(t){t.exports=function(t){return null==t}},34(t,e,r){var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925(t,e,r){var n=r(34);t.exports=function(t){return n(t)||null===t}},6395(t){t.exports=!1},757(t,e,r){var n=r(7751),o=r(4901),a=r(1625),i=r(7040),s=Object;t.exports=i?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&a(e.prototype,s(t))}},507(t,e,r){var n=r(9565);t.exports=function(t,e,r){for(var o,a,i=r?t:t.iterator,s=t.next;!(o=n(s,i)).done;)if(void 0!==(a=e(o.value)))return a}},2652(t,e,r){var n=r(6080),o=r(9565),a=r(8551),i=r(6823),s=r(4209),c=r(6198),u=r(1625),f=r(81),l=r(851),h=r(9539),p=TypeError,Result=function(t,e){this.stopped=t;this.result=e},m=Result.prototype;t.exports=function(t,e,r){var g,d,y,b,w,v,_,x=r&&r.that,C=!(!r||!r.AS_ENTRIES),A=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),R=!(!r||!r.INTERRUPTED),B=n(e,x),stop=function(t){var e=g;g=void 0;e&&h(e,"normal");return new Result(!0,t)},callFn=function(t){if(C){a(t);return R?B(t[0],t[1],stop):B(t[0],t[1])}return R?B(t,stop):B(t)};if(A)g=t.iterator;else if(S)g=t;else{if(!(d=l(t)))throw new p(i(t)+" is not iterable");if(s(d)){for(y=0,b=c(t);b>y;y++)if((w=callFn(t[y]))&&u(m,w))return w;return new Result(!1)}g=f(t,d)}v=A?t.next:g.next;for(;!(_=o(v,g)).done;){var I=_.value;try{w=callFn(I)}catch(t){if(!g)throw t;h(g,"throw",t)}if("object"==typeof w&&w&&u(m,w))return w}return new Result(!1)}},1385(t,e,r){var n=r(9539);t.exports=function(t,e,r){for(var o=t.length-1;o>=0;o--)if(void 0!==t[o])try{r=n(t[o].iterator,e,r)}catch(t){e="throw";r=t}if("throw"===e)throw r;return r}},9539(t,e,r){var n=r(9565),o=r(8551),a=r(5966);t.exports=function(t,e,r){var i,s;o(t);try{if(!(i=a(t,"return"))){if("throw"===e)throw r;return r}i=n(i,t)}catch(t){s=!0;i=t}if("throw"===e)throw r;if(s)throw i;o(i);return r}},9462(t,e,r){var n=r(9565),o=r(2360),a=r(6699),i=r(6279),s=r(8227),c=r(1181),u=r(5966),f=r(7657).IteratorPrototype,l=r(2529),h=r(9539),p=r(1385),m=s("toStringTag"),g="IteratorHelper",d="WrapForValidIterator",y="normal",b="throw",w=c.set,createIteratorProxyPrototype=function(t){var e=c.getterFor(t?d:g);return i(o(f),{next:function next(){var r=e(this);if(t)return r.nextHandler();if(r.done)return l(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:l(n,r.done)}catch(t){r.done=!0;throw t}},return:function(){var r=e(this),o=r.iterator,a=r.done;r.done=!0;if(t){var i=u(o,"return");return i?n(i,o):l(void 0,!0)}if(a)return l(void 0,!0);if(r.inner)try{h(r.inner.iterator,y)}catch(t){return h(o,b,t)}if(r.openIters)try{p(r.openIters,y)}catch(t){if(o)return h(o,b,t);throw t}o&&h(o,y);return l(void 0,!0)}})},v=createIteratorProxyPrototype(!0),_=createIteratorProxyPrototype(!1);a(_,m,"Iterator Helper");t.exports=function(t,e,r){var n=function Iterator(n,o){if(o){o.iterator=n.iterator;o.next=n.next}else o=n;o.type=e?d:g;o.returnHandlerResult=!!r;o.nextHandler=t;o.counter=0;o.done=!1;w(this,o)};n.prototype=e?v:_;return n}},684(t){t.exports=function(t,e){var r="function"==typeof Iterator&&Iterator.prototype[t];if(r)try{r.call({next:null},e).next()}catch(t){return!0}}},4549(t,e,r){var n=r(4576);t.exports=function(t,e){var r=n.Iterator,o=r&&r.prototype,a=o&&o[t],i=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){i=!0}},-1)}catch(t){t instanceof e||(i=!1)}if(!i)return a}},7657(t,e,r){var n,o,a,i=r(9039),s=r(4901),c=r(34),u=r(2360),f=r(2787),l=r(6840),h=r(8227),p=r(6395),m=h("iterator"),g=!1;[].keys&&("next"in(a=[].keys())?(o=f(f(a)))!==Object.prototype&&(n=o):g=!0);!c(n)||i(function(){var t={};return n[m].call(t)!==t})?n={}:p&&(n=u(n));s(n[m])||l(n,m,function(){return this});t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},6269(t){t.exports={}},6198(t,e,r){var n=r(8014);t.exports=function(t){return n(t.length)}},283(t,e,r){var n=r(9504),o=r(9039),a=r(4901),i=r(9297),s=r(3724),c=r(350).CONFIGURABLE,u=r(3706),f=r(1181),l=f.enforce,h=f.get,p=String,m=Object.defineProperty,g=n("".slice),d=n("".replace),y=n([].join),b=s&&!o(function(){return 8!==m(function(){},"length",{value:8}).length}),w=String(String).split("String"),v=t.exports=function(t,e,r){"Symbol("===g(p(e),0,7)&&(e="["+d(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]");r&&r.getter&&(e="get "+e);r&&r.setter&&(e="set "+e);(!i(t,"name")||c&&t.name!==e)&&(s?m(t,"name",{value:e,configurable:!0}):t.name=e);b&&r&&i(r,"arity")&&t.length!==r.arity&&m(t,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?s&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);i(n,"source")||(n.source=y(w,"string"==typeof e?e:""));return t};Function.prototype.toString=v(function toString(){return a(this)&&h(this).source||u(this)},"toString")},2248(t,e,r){var n=r(9504),o=Map.prototype;t.exports={Map,set:n(o.set),get:n(o.get),has:n(o.has),remove:n(o.delete),proto:o}},741(t){var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function trunc(t){var n=+t;return(n>0?r:e)(n)}},6043(t,e,r){var n=r(9306),o=TypeError,PromiseCapability=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new o("Bad Promise constructor");e=t;r=n});this.resolve=n(e);this.reject=n(r)};t.exports.f=function(t){return new PromiseCapability(t)}},2360(t,e,r){var n,o=r(8551),a=r(6801),i=r(8727),s=r(421),c=r(397),u=r(4055),f=r(6119),l="prototype",h="script",p=f("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+h+">"+t+""},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var e=t.parentWindow.Object;t=null;return e},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):function(){var t,e=u("iframe"),r="java"+h+":";e.style.display="none";c.appendChild(e);e.src=String(r);(t=e.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(n);for(var t=i.length;t--;)delete NullProtoObject[l][i[t]];return NullProtoObject()};s[p]=!0;t.exports=Object.create||function create(t,e){var r;if(null!==t){EmptyConstructor[l]=o(t);r=new EmptyConstructor;EmptyConstructor[l]=null;r[p]=t}else r=NullProtoObject();return void 0===e?r:a.f(r,e)}},6801(t,e,r){var n=r(3724),o=r(8686),a=r(4913),i=r(8551),s=r(5397),c=r(1072);e.f=n&&!o?Object.defineProperties:function defineProperties(t,e){i(t);for(var r,n=s(e),o=c(e),u=o.length,f=0;u>f;)a.f(t,r=o[f++],n[r]);return t}},4913(t,e,r){var n=r(3724),o=r(5917),a=r(8686),i=r(8551),s=r(6969),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",p="writable";e.f=n?a?function defineProperty(t,e,r){i(t);e=s(e);i(r);if("function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=f(t,e);if(n&&n[p]){t[e]=r.value;r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1}}}return u(t,e,r)}:u:function defineProperty(t,e,r){i(t);e=s(e);i(r);if(o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new c("Accessors not supported");"value"in r&&(t[e]=r.value);return t}},7347(t,e,r){var n=r(3724),o=r(9565),a=r(8773),i=r(6980),s=r(5397),c=r(6969),u=r(9297),f=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function getOwnPropertyDescriptor(t,e){t=s(t);e=c(e);if(f)try{return l(t,e)}catch(t){}if(u(t,e))return i(!o(a.f,t,e),t[e])}},8480(t,e,r){var n=r(1828),o=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return n(t,o)}},3717(t,e){e.f=Object.getOwnPropertySymbols},2787(t,e,r){var n=r(9297),o=r(4901),a=r(8981),i=r(6119),s=r(2211),c=i("IE_PROTO"),u=Object,f=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=a(t);if(n(e,c))return e[c];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof u?f:null}},1625(t,e,r){var n=r(9504);t.exports=n({}.isPrototypeOf)},1828(t,e,r){var n=r(9504),o=r(9297),a=r(5397),i=r(9617).indexOf,s=r(421),c=n([].push);t.exports=function(t,e){var r,n=a(t),u=0,f=[];for(r in n)!o(s,r)&&o(n,r)&&c(f,r);for(;e.length>u;)o(n,r=e[u++])&&(~i(f,r)||c(f,r));return f}},1072(t,e,r){var n=r(1828),o=r(8727);t.exports=Object.keys||function keys(t){return n(t,o)}},8773(t,e){var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function propertyIsEnumerable(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967(t,e,r){var n=r(6706),o=r(34),a=r(7750),i=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]);e=r instanceof Array}catch(t){}return function setPrototypeOf(r,n){a(r);i(n);if(!o(r))return r;e?t(r,n):r.__proto__=n;return r}}():void 0)},4270(t,e,r){var n=r(9565),o=r(4901),a=r(34),i=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!a(s=n(r,t)))return s;if(o(r=t.valueOf)&&!a(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!a(s=n(r,t)))return s;throw new i("Can't convert object to primitive value")}},5031(t,e,r){var n=r(7751),o=r(9504),a=r(8480),i=r(3717),s=r(8551),c=o([].concat);t.exports=n("Reflect","ownKeys")||function ownKeys(t){var e=a.f(s(t)),r=i.f;return r?c(e,r(t)):e}},7750(t,e,r){var n=r(4117),o=TypeError;t.exports=function(t){if(n(t))throw new o("Can't call method on "+t);return t}},9286(t,e,r){var n=r(4402),o=r(8469),a=n.Set,i=n.add;t.exports=function(t){var e=new a;o(t,function(t){i(e,t)});return e}},3440(t,e,r){var n=r(7080),o=r(4402),a=r(9286),i=r(5170),s=r(3789),c=r(8469),u=r(507),f=o.has,l=o.remove;t.exports=function difference(t){var e=n(this),r=s(t),o=a(e);i(o)<=r.size?c(o,function(t){r.includes(t)&&l(o,t)}):u(r.getIterator(),function(t){f(o,t)&&l(o,t)});return o}},4402(t,e,r){var n=r(9504),o=Set.prototype;t.exports={Set,add:n(o.add),has:n(o.has),remove:n(o.delete),proto:o}},8750(t,e,r){var n=r(7080),o=r(4402),a=r(5170),i=r(3789),s=r(8469),c=r(507),u=o.Set,f=o.add,l=o.has;t.exports=function intersection(t){var e=n(this),r=i(t),o=new u;a(e)>r.size?c(r.getIterator(),function(t){l(e,t)&&f(o,t)}):s(e,function(t){r.includes(t)&&f(o,t)});return o}},4449(t,e,r){var n=r(7080),o=r(4402).has,a=r(5170),i=r(3789),s=r(8469),c=r(507),u=r(9539);t.exports=function isDisjointFrom(t){var e=n(this),r=i(t);if(a(e)<=r.size)return!1!==s(e,function(t){if(r.includes(t))return!1},!0);var f=r.getIterator();return!1!==c(f,function(t){if(o(e,t))return u(f.iterator,"normal",!1)})}},3838(t,e,r){var n=r(7080),o=r(5170),a=r(8469),i=r(3789);t.exports=function isSubsetOf(t){var e=n(this),r=i(t);return!(o(e)>r.size)&&!1!==a(e,function(t){if(!r.includes(t))return!1},!0)}},8527(t,e,r){var n=r(7080),o=r(4402).has,a=r(5170),i=r(3789),s=r(507),c=r(9539);t.exports=function isSupersetOf(t){var e=n(this),r=i(t);if(a(e)92||"NODE"===i&&a>94||"BROWSER"===i&&a>97)return!1;var t=new ArrayBuffer(8),e=s(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength})},4495(t,e,r){var n=r(9519),o=r(9039),a=r(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!o(function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},5610(t,e,r){var n=r(1291),o=Math.max,a=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):a(r,e)}},5854(t,e,r){var n=r(2777),o=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw new o("Can't convert number to bigint");return BigInt(e)}},7696(t,e,r){var n=r(1291),o=r(8014),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=o(e);if(e!==r)throw new a("Wrong length or index");return r}},5397(t,e,r){var n=r(7055),o=r(7750);t.exports=function(t){return n(o(t))}},1291(t,e,r){var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014(t,e,r){var n=r(1291),o=Math.min;t.exports=function(t){var e=n(t);return e>0?o(e,9007199254740991):0}},8981(t,e,r){var n=r(7750),o=Object;t.exports=function(t){return o(n(t))}},2777(t,e,r){var n=r(9565),o=r(34),a=r(757),i=r(5966),s=r(4270),c=r(8227),u=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||a(t))return t;var r,c=i(t,f);if(c){void 0===e&&(e="default");r=n(c,t,e);if(!o(r)||a(r))return r;throw new u("Can't convert object to primitive value")}void 0===e&&(e="number");return s(t,e)}},6969(t,e,r){var n=r(2777),o=r(757);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},2140(t,e,r){var n={};n[r(8227)("toStringTag")]="z";t.exports="[object z]"===String(n)},655(t,e,r){var n=r(6955),o=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392(t,e,r){var n=r(9504),o=0,a=Math.random(),i=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+i(++o+a,36)}},9143(t,e,r){var n=r(4576),o=r(9504),a=r(3972),i=r(3463),s=r(9297),c=r(2804),u=r(944),f=r(5169),l=c.c2i,h=c.c2iUrl,p=n.SyntaxError,m=n.TypeError,g=o("".charAt),skipAsciiWhitespace=function(t,e){for(var r=t.length;e>16&255,o>>8&255,255&o];if(2===n){if(r&&0!==a[1])throw new p("Extra bits");return[a[0]]}if(3===n){if(r&&0!==a[2])throw new p("Extra bits");return[a[0],a[1]]}return a},writeBytes=function(t,e,r){for(var n=e.length,o=0;o0){if("stop-before-partial"===c)break;if("loose"!==c)throw new p("Missing padding");if(1===v.length)throw new p("Malformed padding: exactly one additional character");b=writeBytes(y,decodeBase64Chunk(v,o,!1),b)}w=d;break}var x=g(t,_);++_;if("="===x){if(v.length<2)throw new p("Padding is too early");_=skipAsciiWhitespace(t,_);if(2===v.length){if(_===d){if("stop-before-partial"===c)break;throw new p("Malformed padding: only one =")}if("="===g(t,_)){++_;_=skipAsciiWhitespace(t,_)}}if(_>4}return{bytes:o,read:f<<1}}},7416(t,e,r){var n=r(9039),o=r(8227),a=r(3724),i=r(6395),s=o("iterator");t.exports=!n(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";t.pathname="c%20d";e.forEach(function(t,r){e.delete("b");n+=r+t});r.delete("a",2);r.delete("b",void 0);return i&&(!t.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!e.size&&(i||!a)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host})},7040(t,e,r){var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686(t,e,r){var n=r(3724),o=r(9039);t.exports=n&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812(t){var e=TypeError;t.exports=function(t,r){if(t1?arguments[1]:void 0)}});i("includes")},4114(t,e,r){var n=r(6518),o=r(8981),a=r(6198),i=r(4527),s=r(6837);n({target:"Array",proto:!0,arity:1,forced:r(9039)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var e=o(this),r=a(e),n=arguments.length;s(r+n);for(var c=0;c1;e.has(1)&&e.clear();return{done:r,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size})},{difference:o})},8004(t,e,r){var n=r(6518),o=r(9039),a=r(8750);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||o(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:a})},3853(t,e,r){var n=r(6518),o=r(4449);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("isDisjointFrom",function(t){return!t})},{isDisjointFrom:o})},5876(t,e,r){var n=r(6518),o=r(3838);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("isSubsetOf",function(t){return t})},{isSubsetOf:o})},2475(t,e,r){var n=r(6518),o=r(8527);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("isSupersetOf",function(t){return!t})},{isSupersetOf:o})},5024(t,e,r){var n=r(6518),o=r(3650),a=r(9835);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("symmetricDifference")||!a("symmetricDifference")},{symmetricDifference:o})},1698(t,e,r){var n=r(6518),o=r(4204),a=r(9835);n({target:"Set",proto:!0,real:!0,forced:!r(4916)("union")||!a("union")},{union:o})},9577(t,e,r){var n=r(4644),o=r(1108),a=r(6198),i=r(1291),s=r(5854),c=n.aTypedArray,u=n.getTypedArrayConstructor,f=n.exportTypedArrayMethod,l=RangeError,h=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),p=h&&function(){try{new Int8Array(1).with(-.5,1)}catch(t){return!0}}();f("with",{with:function(t,e){var r=c(this),n=a(r),f=i(t),h=f<0?n+f:f,p=o(r)?s(e):+e;if(h>=n||h<0)throw new l("Incorrect index");for(var m=new(u(r))(n),g=0;g1?arguments[1]:void 0,this,this.length);return{read:e.read,written:e.written}}})},4226(t,e,r){var n=r(6518),o=r(4576),a=r(3463),i=r(4154),s=r(5169),c=r(2303);o.Uint8Array&&n({target:"Uint8Array",proto:!0,forced:function throwsOnLengthTrackingView(){try{var t=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(t).setFromHex("cafed00d")}catch(t){return!0}}()},{setFromHex:function setFromHex(t){i(this);a(t);s(this.buffer);var e=c(t,this).read;return{read:e,written:e/2}}})},9486(t,e,r){var n=r(6518),o=r(4576),a=r(9504),i=r(3972),s=r(4154),c=r(5169),u=r(2804),f=r(944),l=u.i2c,h=u.i2cUrl,p=a("".charAt),m=o.Uint8Array,g=!m||!m.prototype.toBase64||!function(){try{(new m).toBase64(null)}catch(t){return!0}}();m&&n({target:"Uint8Array",proto:!0,forced:g},{toBase64:function toBase64(){var t=s(this),e=arguments.length?i(arguments[0]):void 0,r="base64"===f(e)?l:h,n=!!e&&!!e.omitPadding;c(this.buffer);for(var o,a="",u=0,m=t.length,at=function(t){return p(r,o>>6*t&63)};u+2{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})};__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);__webpack_require__(4423),__webpack_require__(4114),__webpack_require__(6573),__webpack_require__(8100),__webpack_require__(7936),__webpack_require__(5367),__webpack_require__(2731),__webpack_require__(9577),__webpack_require__(6632),__webpack_require__(4226),__webpack_require__(9486),__webpack_require__(456),__webpack_require__(5781);"object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type;const r=[1/0,1/0,-1/0,-1/0],n=(new Float32Array(r),{ERRORS:0,WARNINGS:1,INFOS:5});let o=n.WARNINGS;function setVerbosityLevel(t){Number.isInteger(t)&&(o=t)}function getVerbosityLevel(){return o}function info(t){o>=n.INFOS&&console.info(`Info: ${t}`)}function warn(t){o>=n.WARNINGS&&console.warn(`Warning: ${t}`)}function unreachable(t){throw new Error(t)}function shadow(t,e,r,n=!1){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!0,writable:!1});return r}const a=function BaseExceptionClosure(){function BaseException(t,e){this.message=t;this.name=e}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class FormatError extends a{constructor(t){super(t,"FormatError")}}function bytesToString(t){"object"==typeof t&&void 0!==t?.length||unreachable("Invalid argument for bytesToString");const e=t.length,r=8192;if(e{if("undefined"==typeof document)return!1;const t=document.createElement("input");t.type="color";t.setAttribute("alpha","");t.value="#ff000080";return"#ff0000"!==t.value})())}}class Util{static get hexNums(){return shadow(this,"hexNums",Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")))}static makeHexColor(t,e,r){return`#${this.hexNums[t]}${this.hexNums[e]}${this.hexNums[r]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let r;if(t[0]){if(t[0]<0){r=e[0];e[0]=e[2];e[2]=r}e[0]*=t[0];e[2]*=t[0];if(t[3]<0){r=e[1];e[1]=e[3];e[3]=r}e[1]*=t[3];e[3]*=t[3]}else{r=e[0];e[0]=e[1];e[1]=r;r=e[2];e[2]=e[3];e[3]=r;if(t[1]<0){r=e[1];e[1]=e[3];e[3]=r}e[1]*=t[1];e[3]*=t[1];if(t[2]<0){r=e[0];e[0]=e[2];e[2]=r}e[0]*=t[2];e[2]*=t[2]}e[0]+=t[4];e[1]+=t[5];e[2]+=t[4];e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e,r=0){const n=t[r],o=t[r+1];t[r]=n*e[0]+o*e[2]+e[4];t[r+1]=n*e[1]+o*e[3]+e[5]}static applyTransformToBezier(t,e,r=0){const n=e[0],o=e[1],a=e[2],i=e[3],s=e[4],c=e[5];for(let e=0;e<6;e+=2){const u=t[r+e],f=t[r+e+1];t[r+e]=u*n+f*a+s;t[r+e+1]=u*o+f*i+c}}static applyInverseTransform(t,e){const r=t[0],n=t[1],o=e[0]*e[3]-e[1]*e[2];t[0]=(r*e[3]-n*e[2]+e[2]*e[5]-e[4]*e[3])/o;t[1]=(-r*e[1]+n*e[0]+e[4]*e[1]-e[5]*e[0])/o}static axialAlignedBoundingBox(t,e,r){const n=e[0],o=e[1],a=e[2],i=e[3],s=e[4],c=e[5],u=t[0],f=t[1],l=t[2],h=t[3];let p=n*u+s,m=p,g=n*l+s,d=g,y=i*f+c,b=y,w=i*h+c,v=w;if(0!==o||0!==a){const t=o*u,e=o*l,r=a*f,n=a*h;p+=r;d+=r;g+=n;m+=n;y+=t;v+=t;w+=e;b+=e}r[0]=Math.min(r[0],p,g,m,d);r[1]=Math.min(r[1],y,w,b,v);r[2]=Math.max(r[2],p,g,m,d);r[3]=Math.max(r[3],y,w,b,v)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const r=t[0],n=t[1],o=t[2],a=t[3],i=r**2+n**2,s=r*o+n*a,c=o**2+a**2,u=(i+c)/2,f=Math.sqrt(u**2-(i*c-s**2));e[0]=Math.sqrt(u+f||1);e[1]=Math.sqrt(u-f||1)}static normalizeRect(t){const e=t.slice(0);if(t[0]>t[2]){e[0]=t[2];e[2]=t[0]}if(t[1]>t[3]){e[1]=t[3];e[3]=t[1]}return e}static intersect(t,e){const r=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),n=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(r>n)return null;const o=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),a=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return o>a?null:[r,o,n,a]}static pointBoundingBox(t,e,r){r[0]=Math.min(r[0],t);r[1]=Math.min(r[1],e);r[2]=Math.max(r[2],t);r[3]=Math.max(r[3],e)}static rectBoundingBox(t,e,r,n,o){o[0]=Math.min(o[0],t,r);o[1]=Math.min(o[1],e,n);o[2]=Math.max(o[2],t,r);o[3]=Math.max(o[3],e,n)}static#t(t,e,r,n,o,a,i,s,c,u){if(c<=0||c>=1)return;const f=1-c,l=c*c,h=l*c,p=f*(f*(f*t+3*c*e)+3*l*r)+h*n,m=f*(f*(f*o+3*c*a)+3*l*i)+h*s;u[0]=Math.min(u[0],p);u[1]=Math.min(u[1],m);u[2]=Math.max(u[2],p);u[3]=Math.max(u[3],m)}static#e(t,e,r,n,o,a,i,s,c,u,f,l){if(Math.abs(c)<1e-12){Math.abs(u)>=1e-12&&this.#t(t,e,r,n,o,a,i,s,-f/u,l);return}const h=u**2-4*f*c;if(h<0)return;const p=Math.sqrt(h),m=2*c;this.#t(t,e,r,n,o,a,i,s,(-u+p)/m,l);this.#t(t,e,r,n,o,a,i,s,(-u-p)/m,l)}static bezierBoundingBox(t,e,r,n,o,a,i,s,c){c[0]=Math.min(c[0],t,i);c[1]=Math.min(c[1],e,s);c[2]=Math.max(c[2],t,i);c[3]=Math.max(c[3],e,s);this.#e(t,r,o,i,e,n,a,s,3*(3*(r-o)-t+i),6*(t-2*r+o),3*(r-t),c);this.#e(t,r,o,i,e,n,a,s,3*(3*(n-a)-e+s),6*(e-2*n+a),3*(n-e),c)}}"function"!=typeof Blob.prototype.bytes&&(Blob.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())});"function"!=typeof Response.prototype.bytes&&(Response.prototype.bytes=async function(){return new Uint8Array(await this.arrayBuffer())});"function"!=typeof AbortSignal.any&&(AbortSignal.any=function(t){const e=new AbortController,{signal:r}=e;for(const n of t)if(n.aborted){e.abort(n.reason);return r}for(const n of t)n.addEventListener("abort",()=>{e.abort(n.reason)},{signal:r});return r});__webpack_require__(4628),__webpack_require__(8111),__webpack_require__(1148),__webpack_require__(1701),__webpack_require__(7642),__webpack_require__(8004),__webpack_require__(3853),__webpack_require__(5876),__webpack_require__(2475),__webpack_require__(5024),__webpack_require__(1698);Symbol("CIRCULAR_REF"),Symbol("EOF");Object.create(null);let i=Object.create(null),s=Object.create(null);class Name{constructor(t){this.name=t}static get(t){return i[t]||=new Name(t)}}const c=function nonSerializableClosure(){return c};class Dict{__nonSerializable__=c;#r=new Map;objId=null;suppressEncryption=!1;xref;constructor(t=null){this.xref=t}assignXref(t){this.xref=t}get size(){return this.#r.size}#n(t,e,r,n){let o=this.#r.get(e);if(void 0===o&&void 0!==r){o=this.#r.get(r);void 0===o&&void 0!==n&&(o=this.#r.get(n))}return o instanceof Ref&&this.xref?t?this.xref.fetchAsync(o,this.suppressEncryption):this.xref.fetch(o,this.suppressEncryption):o}get(t,e,r){return this.#n(!1,t,e,r)}async getAsync(t,e,r){return this.#n(!0,t,e,r)}getArray(t,e,r){let n=this.#n(!1,t,e,r);if(Array.isArray(n)){n=n.slice();for(let t=0,e=n.length;t{unreachable("Should not call `set` on the empty dictionary.")};return shadow(this,"empty",t)}static merge({xref:t,dictArray:e,mergeSubDicts:r=!1}){const n=new Dict(t),o=new Map;for(const t of e)if(t instanceof Dict)for(const[e,n]of t.getRawEntries()){let t=o.get(e);if(void 0===t){t=[];o.set(e,t)}else if(!(r&&n instanceof Dict))continue;t.push(n)}for(const[e,r]of o){if(1===r.length||!(r[0]instanceof Dict)){n.set(e,r[0]);continue}const o=new Dict(t);for(const t of r)for(const[e,r]of t.getRawEntries())o.setIfNotExists(e,r);o.size>0&&n.set(e,o)}o.clear();return n.size>0?n:Dict.empty}clone(){const t=new Dict(this.xref);for(const[e,r]of this.#r)t.set(e,r);return t}delete(t){this.#r.delete(t)}}class Ref{constructor(t,e){this.num=t;this.gen=e}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(t){const e=s[t];if(e)return e;const r=/^(\d+)R(\d*)$/.exec(t);return r&&"0"!==r[1]?s[t]=new Ref(parseInt(r[1],10),r[2]?parseInt(r[2],10):0):null}static get(t,e){const r=0===e?`${t}R`:`${t}R${e}`;return s[r]||=new Ref(t,e)}}Symbol.iterator;Symbol.iterator;class BaseStream{get length(){unreachable("Abstract getter `length` accessed")}get isEmpty(){unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return shadow(this,"isDataLoaded",!0)}getByte(){unreachable("Abstract method `getByte` called")}getBytes(t){unreachable("Abstract method `getBytes` called")}async getImageData(t,e){return this.getBytes(t,e)}async asyncGetBytes(){unreachable("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get isAsyncDecoder(){return!1}get isImageStream(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const t=this.getByte();-1!==t&&this.pos--;return t}peekBytes(t){const e=this.getBytes(t);this.pos-=e.length;return e}getUint16(){const t=this.getByte(),e=this.getByte();return-1===t||-1===e?-1:(t<<8)+e}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(t,e){unreachable("Abstract method `getByteRange` called")}getString(t){return bytesToString(this.getBytes(t))}skip(t){this.pos+=t||1}reset(){unreachable("Abstract method `reset` called")}moveStart(){unreachable("Abstract method `moveStart` called")}makeSubStream(t,e,r=null){unreachable("Abstract method `makeSubStream` called")}getBaseStreams(){return null}getOriginalStream(){return this.stream?.getOriginalStream()||this}}class MissingDataException extends a{constructor(t,e){super(`Missing data [${t}, ${e})`,"MissingDataException");this.begin=t;this.end=e}}async function fetchBinaryData(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch file "${t}" with "${e.statusText}".`);return e.bytes()}__webpack_require__(4603),__webpack_require__(7566),__webpack_require__(8721);const u=async function JBig2(t={}){var e=t,quit_=(t,e)=>{throw e},r=import.meta.url;try{new URL(".",r).href}catch{}0;console.log.bind(console);var n,o,a,i,s,c=console.error.bind(console),u=!1,f=!1;function updateMemoryViews(){var t=h.buffer;i=new Int8Array(t);new Int16Array(t);s=new Uint8Array(t);new Uint16Array(t);new Int32Array(t);new Uint32Array(t);new Float32Array(t);new Float64Array(t);new BigInt64Array(t);new BigUint64Array(t)}class ExitStatus{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`;this.status=t}}var l,h,callRuntimeCallbacks=t=>{for(;t.length>0;)t.shift()(e)},p=[],addOnPostRun=t=>p.push(t),m=[],addOnPreRun=t=>m.push(t),g=!0,d=0,y={},handleException=t=>{if(t instanceof ExitStatus||"unwind"==t)return n;quit_(0,t)},keepRuntimeAlive=()=>g||d>0,_proc_exit=t=>{n=t;if(!keepRuntimeAlive()){e.onExit?.(t);u=!0}quit_(0,new ExitStatus(t))},_exit=(t,e)=>{n=t;_proc_exit(t)},callUserCallback=t=>{if(!u)try{return t()}catch(t){handleException(t)}finally{(()=>{if(!keepRuntimeAlive())try{_exit(n)}catch(t){handleException(t)}})()}},alignMemory=(t,e)=>Math.ceil(t/e)*e,growMemory=t=>{var e=(t-h.buffer.byteLength+65535)/65536|0;try{h.grow(e);updateMemoryViews();return 1}catch(t){}};e.noExitRuntime&&(g=e.noExitRuntime);e.print&&e.print;e.printErr&&(c=e.printErr);e.wasmBinary&&e.wasmBinary;e.arguments&&e.arguments;e.thisProgram&&e.thisProgram;if(e.preInit){"function"==typeof e.preInit&&(e.preInit=[e.preInit]);for(;e.preInit.length>0;)e.preInit.shift()()}e.writeArrayToMemory=(t,e)=>{i.set(t,e)};var b,w={e:()=>function abort(t){e.onAbort?.(t);c(t="Aborted("+t+")");u=!0;t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);a?.(r);throw r}(""),b:()=>{g=!1;d=0},c:(t,e)=>{if(y[t]){clearTimeout(y[t].id);delete y[t]}if(!e)return 0;var r=setTimeout(()=>{delete y[t];callUserCallback(()=>l(t,performance.now()))},e);y[t]={id:r,timeout_ms:e};return 0},g:function _createImageData(t){e.imageData=new Uint8Array(t)},d:t=>{var e=s.length,r=2147483648;if((t>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,t+100663296);var a=Math.min(r,alignMemory(Math.max(t,o),65536));if(growMemory(a))return!0}return!1},a:_proc_exit,h:function _setImageData(t,r,n,o){if(n===r){e.imageData=new Uint8ClampedArray(s.subarray(t,t+n*o));return}const a=r*o,i=e.imageData=new Uint8ClampedArray(a);for(let e=t,o=0;o{e.instantiateWasm(t,(t,e)=>{r(receiveInstance(t))})})}();!function run(){!function preRun(){if(e.preRun){"function"==typeof e.preRun&&(e.preRun=[e.preRun]);for(;e.preRun.length;)addOnPreRun(e.preRun.shift())}callRuntimeCallbacks(m)}();function doRun(){e.calledRun=!0;if(!u){!function initRuntime(){f=!0;b.j()}();o?.(e);e.onRuntimeInitialized?.();!function postRun(){if(e.postRun){"function"==typeof e.postRun&&(e.postRun=[e.postRun]);for(;e.postRun.length;)addOnPostRun(e.postRun.shift())}callRuntimeCallbacks(p)}()}}if(e.setStatus){e.setStatus("Running...");setTimeout(()=>{setTimeout(()=>e.setStatus(""),1);doRun()},1)}else doRun()}();return f?e:new Promise((t,e)=>{o=t;a=e})};class Jbig2Error extends a{constructor(t){super(t,"Jbig2Error")}}class JBig2CCITTFaxImage{static#o=null;static#a=null;static#i=null;static#s=!0;static#c=!0;static#u=null;static setOptions({handler:t,useWasm:e,useWorkerFetch:r,wasmUrl:n}){this.#s=e;this.#c=r;this.#u=n;r||(this.#a=t)}static async#f(t){const e=`${this.#u}jbig2_nowasm_fallback.js`;let r=null;try{r=(await import( /*webpackIgnore: true*/ /*@vite-ignore*/ e)).default()}catch(t){warn(`JBig2CCITTFaxImage#getJsModule: ${t}`)}t(r)}static async#l(t,e,r){const n="jbig2.wasm";try{this.#o||(this.#c?this.#o=await fetchBinaryData(`${this.#u}${n}`):this.#o=await this.#a.sendWithPromise("FetchBinaryData",{kind:"wasmUrl",filename:n}));return r((await WebAssembly.instantiate(this.#o,e)).instance)}catch(e){warn(`JBig2CCITTFaxImage#instantiateWasm: ${e}`);this.#f(t);return null}finally{this.#a=null}}static async decode(t,e,r,n,o){if(!this.#i){const{promise:t,resolve:e}=Promise.withResolvers(),r=[t];this.#s?r.push(u({warn,instantiateWasm:this.#l.bind(this,e)})):this.#f(e);this.#i=Promise.race(r)}const a=await this.#i;if(!a)throw new Jbig2Error("JBig2 failed to initialize");let i,s;try{const c=t.length;i=a._malloc(c);a.writeArrayToMemory(t,i);if(o)a._ccitt_decode(i,c,e,r,o.K,o.EndOfLine?1:0,o.EncodedByteAlign?1:0,o.BlackIs1?1:0,o.Columns,o.Rows);else{const t=n?n.length:0;if(t>0){s=a._malloc(t);a.writeArrayToMemory(n,s)}a._jbig2_decode(i,c,e,r,s,t)}if(!a.imageData)throw new Jbig2Error("Unknown error");const{imageData:u}=a;a.imageData=null;return u}finally{i&&a._free(i);s&&a._free(s)}}static cleanup(){this.#i=null}}function MathClamp(t,e,r){return Math.min(Math.max(t,e),r)}function isDefaultDecodeHelper(t,e){if(!Array.isArray(t))return!0;const r=t.length;if(re){info("Truncating too long decode map.");t.length=e}return!1}class ColorSpace{static#h=new Uint8ClampedArray(3);constructor(t,e){this.name=t;this.numComps=e}getRgb(t,e,r=new Uint8ClampedArray(3)){this.getRgbItem(t,e,r,0);return r}getRgbHex(t,e){const r=this.getRgb(t,e,ColorSpace.#h);return Util.makeHexColor(r[0],r[1],r[2])}getRgbItem(t,e,r,n){unreachable("Should not call ColorSpace.getRgbItem")}getRgbBuffer(t,e,r,n,o,a,i){unreachable("Should not call ColorSpace.getRgbBuffer")}getOutputLength(t,e){unreachable("Should not call ColorSpace.getOutputLength")}isPassthrough(t){return!1}isDefaultDecode(t,e){return ColorSpace.isDefaultDecode(t,this.numComps)}fillRgb(t,e,r,n,o,a,i,s,c){const u=e*r;let f=null;const l=1<l&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const e=i<=8?new Uint8Array(l):new Uint16Array(l);for(let t=0;t=.99554525?1:MathClamp(1.055*t**(1/2.4)-.055,0,1)}#R(t){return t<0?-this.#R(-t):t>8?((t+16)/116)**3:t*CalRGBCS.#_}#B(t,e,r){if(0===t[0]&&0===t[1]&&0===t[2]){r[0]=e[0];r[1]=e[1];r[2]=e[2];return}const n=this.#R(0),o=(1-n)/(1-this.#R(t[0])),a=1-o,i=(1-n)/(1-this.#R(t[1])),s=1-i,c=(1-n)/(1-this.#R(t[2])),u=1-c;r[0]=e[0]*o+a;r[1]=e[1]*i+s;r[2]=e[2]*c+u}#I(t,e,r){if(1===t[0]&&1===t[2]){r[0]=e[0];r[1]=e[1];r[2]=e[2];return}const n=r;this.#x(CalRGBCS.#m,e,n);const o=CalRGBCS.#b;this.#C(t,n,o);this.#x(CalRGBCS.#g,o,r)}#k(t,e,r){const n=r;this.#x(CalRGBCS.#m,e,n);const o=CalRGBCS.#b;this.#A(t,n,o);this.#x(CalRGBCS.#g,o,r)}#p(t,e,r,n,o){const a=MathClamp(t[e]*o,0,1),i=MathClamp(t[e+1]*o,0,1),s=MathClamp(t[e+2]*o,0,1),c=1===a?1:a**this.GR,u=1===i?1:i**this.GG,f=1===s?1:s**this.GB,l=this.MXA*c+this.MXB*u+this.MXC*f,h=this.MYA*c+this.MYB*u+this.MYC*f,p=this.MZA*c+this.MZB*u+this.MZC*f,m=CalRGBCS.#w;m[0]=l;m[1]=h;m[2]=p;const g=CalRGBCS.#v;this.#I(this.whitePoint,m,g);const d=CalRGBCS.#w;this.#B(this.blackPoint,g,d);const y=CalRGBCS.#v;this.#k(CalRGBCS.#y,d,y);const b=CalRGBCS.#w;this.#x(CalRGBCS.#d,y,b);r[n]=255*this.#S(b[0]);r[n+1]=255*this.#S(b[1]);r[n+2]=255*this.#S(b[2])}getRgbItem(t,e,r,n){this.#p(t,e,r,n,1)}getRgbBuffer(t,e,r,n,o,a,i){const s=1/((1<this.amax||this.bmin>this.bmax){info("Invalid Range, falling back to defaults");this.amin=-100;this.amax=100;this.bmin=-100;this.bmax=100}}#E(t){return t>=6/29?t**3:108/841*(t-4/29)}#M(t,e,r,n){return r+t*(n-r)/e}#p(t,e,r,n,o){let a=t[e],i=t[e+1],s=t[e+2];if(!1!==r){a=this.#M(a,r,0,100);i=this.#M(i,r,this.amin,this.amax);s=this.#M(s,r,this.bmin,this.bmax)}i>this.amax?i=this.amax:ithis.bmax?s=this.bmax:s=m){p=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();g=e}return p.decode(getUint8ArrayMemory0().subarray(t,t+e))}(t>>>=0,e)}(t,e))},__wbg_copy_result_0d15f3bf9d9012ae:function(t,e){!function copy_result(t,e){const{_mustAddAlpha:r,_destBuffer:n,_destOffset:o,_destLength:a,_memoryArray:i}=QCMS;if(e!==a)if(r)for(let r=t,a=t+e,s=o;r>>0,e>>>0)},__wbg_copy_rgb_0106d9d9464fce43:function(t){!function copy_rgb(t){const{_destBuffer:e,_destOffset:r,_memoryArray:n}=QCMS;e[r]=n[t];e[r+1]=n[t+1];e[r+2]=n[t+2]}(t>>>0)},__wbg_make_cssRGB_8e24b34f71f5363e:function(t){!function make_cssRGB(t){const{_memoryArray:e}=QCMS;QCMS._cssColor=QCMS._makeHexColor(e[t],e[t+1],e[t+2])}(t>>>0)},__wbindgen_init_externref_table:function(){const t=y.__wbindgen_externrefs,e=t.grow(4);t.set(0,void 0);t.set(e+0,void 0);t.set(e+1,null);t.set(e+2,!0);t.set(e+3,!1)}}}}let h=null;function getUint8ArrayMemory0(){null!==h&&0!==h.byteLength||(h=new Uint8Array(y.memory.buffer));return h}function passArray8ToWasm0(t,e){const r=e(1*t.length,1)>>>0;getUint8ArrayMemory0().set(t,r/1);b=t.length;return r}let p=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});p.decode();const m=2146435072;let g=0;let d,y,b=0;function __wbg_finalize_init(t,e){y=t.exports;d=e;h=null;y.__wbindgen_start();return y}function fetchSync(t){const e=new XMLHttpRequest;e.open("GET",t,!1);e.responseType="arraybuffer";e.send(null);return e.response}class IccColorSpace extends ColorSpace{#T;#O;static#s=!0;static#u=null;static#P=null;constructor(t,e,r){if(!IccColorSpace.isUsable)throw new Error("No ICC color space support");super(e,r);let n;switch(r){case 1:n=f.Gray8;this.#O=(t,e,r)=>function qcms_convert_one(t,e,r){y.qcms_convert_one(t,e,r)}(this.#T,255*t[e],r);break;case 3:n=f.RGB8;this.#O=(t,e,r)=>function qcms_convert_three(t,e,r,n,o){y.qcms_convert_three(t,e,r,n,o)}(this.#T,255*t[e],255*t[e+1],255*t[e+2],r);break;case 4:n=f.CMYK;this.#O=(t,e,r)=>function qcms_convert_four(t,e,r,n,o,a){y.qcms_convert_four(t,e,r,n,o,a)}(this.#T,255*t[e],255*t[e+1],255*t[e+2],255*t[e+3],r);break;default:throw new Error(`Unsupported number of components: ${r}`)}this.#T=function qcms_transformer_from_memory(t,e,r){const n=passArray8ToWasm0(t,y.__wbindgen_malloc),o=b;return y.qcms_transformer_from_memory(n,o,e,r)>>>0}(t,n,l.Perceptual);if(!this.#T)throw new Error("Failed to create ICC color space");IccColorSpace.#P||=new FinalizationRegistry(t=>{!function qcms_drop_transformer(t){y.qcms_drop_transformer(t)}(t)});IccColorSpace.#P.register(this,this.#T)}getRgbHex(t,e){this.#O(t,e,!0);return QCMS._cssColor}getRgbItem(t,e,r,n){QCMS._destBuffer=r;QCMS._destOffset=n;QCMS._destLength=3;this.#O(t,e,!1);QCMS._destBuffer=null}getRgbBuffer(t,e,r,n,o,a,i){t=t.subarray(e,e+r*this.numComps);if(8!==a){const e=255/((1<0&&!t[a-1];)a--;const i=[{children:[],index:0}];let s,c=i[0];for(r=0;r0;)c=i.pop();c.index++;i.push(c);for(;i.length<=r;){i.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}o++}if(r+10){g--;return m>>g&1}m=t[r++];if(255===m){const o=t[r++];if(o){if(220===o&&f){r+=2;const t=e.getUint16(r);r+=2;if(t>0&&t!==n.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",t)}else if(217===o){if(f){const t=v*(8===n.precision?8:0);if(t>0&&Math.round(n.scanLines/t)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",t)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(m<<8|o).toString(16)}`)}}g=7;return m>>>7}function decodeHuffman(t){let e=t;for(;;){e=e[readBit()];switch(typeof e){case"number":return e;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(t){let e=0;for(;t>0;){e=e<<1|readBit();t--}return e}function receiveAndExtend(t){if(1===t)return 1===readBit()?1:-1;const e=receive(t);return e>=1<0){d--;return}let r=i;const n=s;for(;r<=n;){const n=decodeHuffman(t.huffmanTableAC),o=15&n,a=n>>4;if(0===o){if(a<15){d=receive(a)+(1<>4;if(0===o)if(c<15){d=receive(c)+(1<>4;if(0===n){if(a<15)break;o+=16;continue}o+=a;const i=w[o];t.blockData[e+i]=receiveAndExtend(n);o++}};let I,k=0;const E=1===_?o[0].blocksPerLine*o[0].blocksPerColumn:l*n.mcusPerColumn;let M,D;for(;k<=E;){const n=a?Math.min(E-k,a):E;if(n>0){for(C=0;C<_;C++)o[C].pred=0;d=0;if(1===_){x=o[0];for(R=0;R0?"unexpected":"excessive"} MCU data, current marker is: ${I.invalid}`);r=I.offset}if(!(I.marker>=65488&&I.marker<=65495))break;r+=2}return r-p}function quantizeAndInverse(t,e,r){const n=t.quantizationTable,o=t.blockData;let a,i,s,c,u,f,l,h,p,m,g,d,y,b,w,I,k;if(!n)throw new JpegError("missing required Quantization Table.");for(let t=0;t<64;t+=8){p=o[e+t];m=o[e+t+1];g=o[e+t+2];d=o[e+t+3];y=o[e+t+4];b=o[e+t+5];w=o[e+t+6];I=o[e+t+7];p*=n[t];if(0!==(m|g|d|y|b|w|I)){m*=n[t+1];g*=n[t+2];d*=n[t+3];y*=n[t+4];b*=n[t+5];w*=n[t+6];I*=n[t+7];a=R*p+128>>8;i=R*y+128>>8;s=g;c=w;u=B*(m-I)+128>>8;h=B*(m+I)+128>>8;f=d<<4;l=b<<4;a=a+i+1>>1;i=a-i;k=s*S+c*A+128>>8;s=s*A-c*S+128>>8;c=k;u=u+l+1>>1;l=u-l;h=h+f+1>>1;f=h-f;a=a+c+1>>1;c=a-c;i=i+s+1>>1;s=i-s;k=u*C+h*x+2048>>12;u=u*x-h*C+2048>>12;h=k;k=f*_+l*v+2048>>12;f=f*v-l*_+2048>>12;l=k;r[t]=a+h;r[t+7]=a-h;r[t+1]=i+l;r[t+6]=i-l;r[t+2]=s+f;r[t+5]=s-f;r[t+3]=c+u;r[t+4]=c-u}else{k=R*p+512>>10;r[t]=k;r[t+1]=k;r[t+2]=k;r[t+3]=k;r[t+4]=k;r[t+5]=k;r[t+6]=k;r[t+7]=k}}for(let t=0;t<8;++t){p=r[t];m=r[t+8];g=r[t+16];d=r[t+24];y=r[t+32];b=r[t+40];w=r[t+48];I=r[t+56];if(0!==(m|g|d|y|b|w|I)){a=R*p+2048>>12;i=R*y+2048>>12;s=g;c=w;u=B*(m-I)+2048>>12;h=B*(m+I)+2048>>12;f=d;l=b;a=4112+(a+i+1>>1);i=a-i;k=s*S+c*A+2048>>12;s=s*A-c*S+2048>>12;c=k;u=u+l+1>>1;l=u-l;h=h+f+1>>1;f=h-f;a=a+c+1>>1;c=a-c;i=i+s+1>>1;s=i-s;k=u*C+h*x+2048>>12;u=u*x-h*C+2048>>12;h=k;k=f*_+l*v+2048>>12;f=f*v-l*_+2048>>12;l=k;p=a+h;I=a-h;m=i+l;w=i-l;g=s+f;b=s-f;d=c+u;y=c-u;p<16?p=0:p>=4080?p=255:p>>=4;m<16?m=0:m>=4080?m=255:m>>=4;g<16?g=0:g>=4080?g=255:g>>=4;d<16?d=0:d>=4080?d=255:d>>=4;y<16?y=0:y>=4080?y=255:y>>=4;b<16?b=0:b>=4080?b=255:b>>=4;w<16?w=0:w>=4080?w=255:w>>=4;I<16?I=0:I>=4080?I=255:I>>=4;o[e+t]=p;o[e+t+8]=m;o[e+t+16]=g;o[e+t+24]=d;o[e+t+32]=y;o[e+t+40]=b;o[e+t+48]=w;o[e+t+56]=I}else{k=R*p+8192>>14;k=k<-2040?0:k>=2024?255:k+2056>>4;o[e+t]=k;o[e+t+8]=k;o[e+t+16]=k;o[e+t+24]=k;o[e+t+32]=k;o[e+t+40]=k;o[e+t+48]=k;o[e+t+56]=k}}}function buildComponentData(t,e){const r=e.blocksPerLine,n=e.blocksPerColumn,o=new Int16Array(64);for(let t=0;t=o)return null;const i=e.getUint16(r);if(i>=65472&&i<=65534)return{invalid:null,marker:i,offset:r};let s=e.getUint16(a);for(;!(s>=65472&&s<=65534);){if(++a>=o)return null;s=e.getUint16(a)}return{invalid:i.toString(16),marker:s,offset:a}}function prepareComponents(t){const e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV);for(const n of t.components){const o=Math.ceil(Math.ceil(t.samplesPerLine/8)*n.h/t.maxH),a=Math.ceil(Math.ceil(t.scanLines/8)*n.v/t.maxV),i=e*n.h,s=64*(r*n.v)*(i+1);n.blockData=new Int16Array(s);n.blocksPerLine=o;n.blocksPerColumn=a}t.mcusPerLine=e;t.mcusPerColumn=r}function readDataBlock(t,e,r){const n=e.getUint16(r);let o=(r+=2)+n-2;const a=findNextFileMarker(t,e,o,r);if(a?.invalid){warn("readDataBlock - incorrect length, current marker is: "+a.invalid);o=a.offset}const i=t.subarray(r,o);return{appData:i,oldOffset:r,newOffset:r+i.length}}function skipData(t,e,r){const n=e.getUint16(r),o=(r+=2)+n-2,a=findNextFileMarker(t,e,o,r);return a?.invalid?a.offset:o}class JpegImage{constructor({decodeTransform:t=null,colorTransform:e=-1}={}){this._decodeTransform=t;this._colorTransform=e}static canUseImageDecoder(t,e=-1){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);let n=null,o=0,a=null,i=r.getUint16(o);o+=2;if(65496!==i)throw new JpegError("SOI not found");i=r.getUint16(o);o+=2;t:for(;65497!==i;){switch(i){case 65505:const{appData:e,oldOffset:s,newOffset:c}=readDataBlock(t,r,o);o=c;if(69===e[0]&&120===e[1]&&105===e[2]&&102===e[3]&&0===e[4]&&0===e[5]){if(n)throw new JpegError("Duplicate EXIF-blocks found.");n={exifStart:s+6,exifEnd:c}}i=r.getUint16(o);o+=2;continue;case 65472:case 65473:case 65474:a=t[o+7];break t;case 65535:255!==t[o]&&o--}o=skipData(t,r,o);i=r.getUint16(o);o+=2}return 4===a||3===a&&0===e?null:n||{}}parse(t,{dnlScanLines:e=null}={}){const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=t.length-1;let o,a,i=0,s=null,c=null,u=0;const f=[],l=[],h=[];let p=r.getUint16(i);i+=2;if(65496!==p)throw new JpegError("SOI not found");p=r.getUint16(i);i+=2;t:for(;65497!==p;){let m,g,d;switch(p){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:const{appData:y,newOffset:b}=readDataBlock(t,r,i);i=b;65504===p&&74===y[0]&&70===y[1]&&73===y[2]&&70===y[3]&&0===y[4]&&(s={version:{major:y[5],minor:y[6]},densityUnits:y[7],xDensity:y[8]<<8|y[9],yDensity:y[10]<<8|y[11],thumbWidth:y[12],thumbHeight:y[13],thumbData:y.subarray(14,14+3*y[12]*y[13])});65518===p&&65===y[0]&&100===y[1]&&111===y[2]&&98===y[3]&&101===y[4]&&(c={version:y[5]<<8|y[6],flags0:y[7]<<8|y[8],flags1:y[9]<<8|y[10],transformCode:y[11]});break;case 65499:const v=r.getUint16(i);i+=2;const _=v+i-2;let x;for(;i<_;){const e=t[i++],n=new Uint16Array(64);if(e>>4){if(e>>4!=1)throw new JpegError("DQT - invalid table spec");for(g=0;g<64;g++){x=w[g];n[x]=r.getUint16(i);i+=2}}else for(g=0;g<64;g++){x=w[g];n[x]=t[i++]}f[15&e]=n}break;case 65472:case 65473:case 65474:if(o)throw new JpegError("Only single frame JPEGs supported");i+=2;o={};o.extended=65473===p;o.progressive=65474===p;o.precision=t[i++];const C=r.getUint16(i);i+=2;o.scanLines=e||C;o.samplesPerLine=r.getUint16(i);i+=2;o.components=[];o.componentIds={};const A=t[i++];let S=0,R=0;for(m=0;m>4,n=15&t[i+1];S>4?l:h)[15&e]=buildHuffmanTable(r,o)}break;case 65501:i+=2;a=r.getUint16(i);i+=2;break;case 65498:const I=1===++u&&!e;i+=2;const k=t[i++],E=[];for(m=0;m>4];n.huffmanTableAC=l[15&a];E.push(n)}const M=t[i++],D=t[i++],T=t[i++];try{i+=decodeScan(t,r,i,o,E,a,M,D,T>>4,15&T,I)}catch(e){if(e instanceof DNLMarkerError){warn(`${e.message} -- attempting to re-parse the JPEG image.`);return this.parse(t,{dnlScanLines:e.scanLines})}if(e instanceof EOIMarkerError){warn(`${e.message} -- ignoring the rest of the image data.`);break t}throw e}break;case 65500:i+=4;break;case 65535:255!==t[i]&&i--;break;default:const O=findNextFileMarker(t,r,i-2,i-3);if(O?.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+O.invalid);i=O.offset;break}if(!O||i>=n){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break t}throw new JpegError("JpegImage.parse - unknown marker: "+p.toString(16))}if(i>8)+C[p+1];return w}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(t){let e,r,n;for(let o=0,a=t.length;o4)throw new JpegError("Unsupported color mode");const a=this._getLinearizedBlockData(t,e,o);if(1===this.numComponents&&(r||n)){const t=a.length*(r?4:3),e=new Uint8ClampedArray(t);let n=0;if(r)!function grayToRGBA(t,e){if(FeatureTest.isLittleEndian)for(let r=0,n=t.length;r{throw e},n=import.meta.url;try{new URL(".",n).href}catch{}0;var o,a,i,s,c,u,f,l=console.log.bind(console),h=console.error.bind(console),p=!1,m=!1;function updateMemoryViews(){var t=d.buffer;c=new Int8Array(t);new Int16Array(t);f=new Uint8Array(t);new Uint16Array(t);s=new Int32Array(t);u=new Uint32Array(t);new Float32Array(t);new Float64Array(t);new BigInt64Array(t);new BigUint64Array(t)}class ExitStatus{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`;this.status=t}}var g,d,callRuntimeCallbacks=t=>{for(;t.length>0;)t.shift()(e)},y=[],addOnPostRun=t=>y.push(t),b=[],addOnPreRun=t=>b.push(t),w=!0,v=0,_={},handleException=t=>{if(t instanceof ExitStatus||"unwind"==t)return o;quit_(0,t)},keepRuntimeAlive=()=>w||v>0,_proc_exit=t=>{o=t;if(!keepRuntimeAlive()){e.onExit?.(t);p=!0}quit_(0,new ExitStatus(t))},_exit=(t,e)=>{o=t;_proc_exit(t)},callUserCallback=t=>{if(!p)try{return t()}catch(t){handleException(t)}finally{(()=>{if(!keepRuntimeAlive())try{_exit(o)}catch(t){handleException(t)}})()}},alignMemory=(t,e)=>Math.ceil(t/e)*e,growMemory=t=>{var e=(t-d.buffer.byteLength+65535)/65536|0;try{d.grow(e);updateMemoryViews();return 1}catch(t){}},x={},getEnvStrings=()=>{if(!getEnvStrings.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:r||"./this.program"};for(var e in x)void 0===x[e]?delete t[e]:t[e]=x[e];var n=[];for(var e in t)n.push(`${e}=${t[e]}`);getEnvStrings.strings=n}return getEnvStrings.strings},stringToUTF8=(t,e,r)=>((t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,a=r+n-1,i=0;i=a)break;e[r++]=s}else if(s<=2047){if(r+1>=a)break;e[r++]=192|s>>6;e[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;e[r++]=224|s>>12;e[r++]=128|s>>6&63;e[r++]=128|63&s}else{if(r+3>=a)break;e[r++]=240|s>>18;e[r++]=128|s>>12&63;e[r++]=128|s>>6&63;e[r++]=128|63&s;i++}}e[r]=0;return r-o})(t,f,e,r),lengthBytesUTF8=t=>{for(var e=0,r=0;r=55296&&n<=57343){e+=4;++r}else e+=3}return e},C=[null,[],[]],A=globalThis.TextDecoder&&new TextDecoder,UTF8ArrayToString=(t,e=0,r,n)=>{var o=((t,e,r,n)=>{var o=e+r;if(n)return o;for(;t[e]&&!(e>=o);)++e;return e})(t,e,r,n);if(o-e>16&&t.buffer&&A)return A.decode(t.subarray(e,o));for(var a="";e>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},printChar=(t,e)=>{var r=C[t];if(0===e||10===e){(1===t?l:h)(UTF8ArrayToString(r));r.length=0}else r.push(e)},UTF8ToString=(t,e,r)=>t?UTF8ArrayToString(f,t,e,r):"";e.noExitRuntime&&(w=e.noExitRuntime);e.print&&(l=e.print);e.printErr&&(h=e.printErr);e.wasmBinary&&e.wasmBinary;e.arguments&&e.arguments;e.thisProgram&&(r=e.thisProgram);if(e.preInit){"function"==typeof e.preInit&&(e.preInit=[e.preInit]);for(;e.preInit.length>0;)e.preInit.shift()()}e.writeArrayToMemory=(t,e)=>{c.set(t,e)};var S,R={m:()=>function abort(t){e.onAbort?.(t);h(t=`Aborted(${t})`);p=!0;t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);i?.(r);throw r}(""),l:()=>{w=!1;v=0},i:(t,e)=>{if(_[t]){clearTimeout(_[t].id);delete _[t]}if(!e)return 0;var r=setTimeout(()=>{delete _[t];callUserCallback(()=>g(t,performance.now()))},e);_[t]={id:r,timeout_ms:e};return 0},f:function _copy_pixels_1(t,r){t>>=2;const n=e.imageData=new Uint8ClampedArray(r),o=s.subarray(t,t+r);n.set(o)},e:function _copy_pixels_3(t,r,n,o){t>>=2;r>>=2;n>>=2;const a=e.imageData=new Uint8ClampedArray(3*o),i=s.subarray(t,t+o),c=s.subarray(r,r+o),u=s.subarray(n,n+o);for(let t=0;t>=2;r>>=2;n>>=2;o>>=2;const i=e.imageData=new Uint8ClampedArray(4*a),c=s.subarray(t,t+a),u=s.subarray(r,r+a),f=s.subarray(n,n+a),l=s.subarray(o,o+a);for(let t=0;t{var e=f.length,r=2147483648;if((t>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,t+100663296);var a=Math.min(r,alignMemory(Math.max(t,o),65536));if(growMemory(a))return!0}return!1},o:(t,e)=>{var r=0,n=0;for(var o of getEnvStrings()){var a=e+r;u[t+n>>2]=a;r+=stringToUTF8(o,a,1/0)+1;n+=4}return 0},p:(t,e)=>{var r=getEnvStrings();u[t>>2]=r.length;var n=0;for(var o of r)n+=lengthBytesUTF8(o)+1;u[e>>2]=n;return 0},n:function _fd_seek(t,e,r,n){e=(o=e)<-9007199254740992||o>9007199254740992?NaN:Number(o);var o;return 70},b:(t,e,r,n)=>{for(var o=0,a=0;a>2],s=u[e+4>>2];e+=8;for(var c=0;c>2]=o;return 0},q:function _gray_to_rgba(t,r){t>>=2;const n=e.imageData=new Uint8ClampedArray(4*r),o=s.subarray(t,t+r);for(let t=0;t>=2;r>>=2;const o=e.imageData=new Uint8ClampedArray(4*n),a=s.subarray(t,t+n),i=s.subarray(r,r+n);for(let t=0;t>=2;r>>=2;n>>=2;const a=e.imageData=new Uint8ClampedArray(4*o),i=s.subarray(t,t+o),c=s.subarray(r,r+o),u=s.subarray(n,n+o);for(let t=0;t{e.instantiateWasm(t,(t,e)=>{r(receiveInstance(t))})})}();!function run(){!function preRun(){if(e.preRun){"function"==typeof e.preRun&&(e.preRun=[e.preRun]);for(;e.preRun.length;)addOnPreRun(e.preRun.shift())}callRuntimeCallbacks(b)}();function doRun(){e.calledRun=!0;if(!p){!function initRuntime(){m=!0;S.s()}();a?.(e);e.onRuntimeInitialized?.();!function postRun(){if(e.postRun){"function"==typeof e.postRun&&(e.postRun=[e.postRun]);for(;e.postRun.length;)addOnPostRun(e.postRun.shift())}callRuntimeCallbacks(y)}()}}if(e.setStatus){e.setStatus("Running...");setTimeout(()=>{setTimeout(()=>e.setStatus(""),1);doRun()},1)}else doRun()}();return m?e:new Promise((t,e)=>{a=t;i=e})};class Stream extends BaseStream{constructor(t,e,r,n){super();this.bytes=t instanceof Uint8Array?t:new Uint8Array(t);this.start=e||0;this.pos=this.start;this.end=e+r||this.bytes.length;this.dict=n}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(t){const e=this.bytes,r=this.pos,n=this.end;if(!t){this.pos=n;return e.subarray(r,n)}let o=r+t;o>n&&(o=n);this.pos=o;return e.subarray(r,o)}getByteRange(t,e){t<0&&(t=0);e>this.end&&(e=this.end);return this.bytes.subarray(t,e)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(t,e,r=null){return new Stream(this.bytes.buffer,t,e,r)}clone(){return new Stream(this.bytes.buffer,this.start,this.end-this.start,this.dict.clone())}}class JpxError extends a{constructor(t){super(t,"JpxError")}}class JpxImage{static#o=null;static#a=null;static#i=null;static#s=!0;static#c=!0;static#u=null;static setOptions({handler:t,useWasm:e,useWorkerFetch:r,wasmUrl:n}){this.#s=e;this.#c=r;this.#u=n;r||(this.#a=t)}static async#f(t){const e=`${this.#u}openjpeg_nowasm_fallback.js`;let r=null;try{r=(await import( /*webpackIgnore: true*/ /*@vite-ignore*/ e)).default()}catch(t){warn(`JpxImage#getJsModule: ${t}`)}t(r)}static async#l(t,e,r){const n="openjpeg.wasm";try{this.#o||(this.#c?this.#o=await fetchBinaryData(`${this.#u}${n}`):this.#o=await this.#a.sendWithPromise("FetchBinaryData",{kind:"wasmUrl",filename:n}));return r((await WebAssembly.instantiate(this.#o,e)).instance)}catch(e){warn(`JpxImage#instantiateWasm: ${e}`);this.#f(t);return null}finally{this.#a=null}}static async decode(t,{numComponents:e=4,isIndexedColormap:r=!1,smaskInData:n=!1,reducePower:o=0}={}){if(!this.#i){const{promise:t,resolve:e}=Promise.withResolvers(),r=[t];this.#s?r.push(I({warn,instantiateWasm:this.#l.bind(this,e)})):this.#f(e);this.#i=Promise.race(r)}const a=await this.#i;if(!a)throw new JpxError("OpenJPEG failed to initialize");let i;try{const s=t.length;i=a._malloc(s);a.writeArrayToMemory(t,i);if(a._jp2_decode(i,s,e>0?e:0,!!r,!!n,o)){const{errorMessages:t}=a;if(t){delete a.errorMessages;throw new JpxError(t)}throw new JpxError("Unknown error")}const{imageData:c}=a;a.imageData=null;return c}finally{i&&a._free(i)}}static cleanup(){this.#i=null}static parseImageProperties(t){if(!(t instanceof ArrayBuffer||ArrayBuffer.isView(t)))throw new JpxError("Invalid data format, must be a TypedArray.");let e=(t=new Stream(t)).getByte();for(;e>=0;){const r=e;e=t.getByte();if(65361===(r<<8|e)){t.skip(4);const e=t.getInt32()>>>0,r=t.getInt32()>>>0,n=t.getInt32()>>>0,o=t.getInt32()>>>0;t.skip(16);return{width:e-n,height:r-o,bitsPerComponent:8,componentsCount:t.getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}globalThis.pdfjsImageDecoders={getVerbosityLevel,Jbig2Error,Jbig2Image:JBig2CCITTFaxImage,JpegError,JpegImage,JpxError,JpxImage,setVerbosityLevel,VerbosityLevel:n};export{Jbig2Error,JBig2CCITTFaxImage as Jbig2Image,JpegError,JpegImage,JpxError,JpxImage,n as VerbosityLevel,getVerbosityLevel,setVerbosityLevel};