pdfjs-dist
Version:
Generic build of Mozilla's PDF.js library.
27 lines • 101 kB
JavaScript
/**
* @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 = 6.5.438
* pdfjsBuild = 0a4153349
*/var e={463(e){var t=TypeError;e.exports=function(e){if("string"==typeof e)return e;throw new t("Argument is not a string")}},804(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=t+"+/",n=t+"-_",inverse=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};e.exports={i2c:r,c2i:inverse(r),i2cUrl:n,c2iUrl:inverse(n)}},529(e){e.exports=function(e,t){return{value:e,done:t}}},837(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}},944(e){var t=TypeError;e.exports=function(e){var r=e&&e.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new t("Incorrect `alphabet` option")}},767(e){e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},117(e){e.exports=function(e){return null==e}},859(e){e.exports=function(e){e.iterator=e.next=e.nextHandler=e.mapper=e.predicate=e.inner=e.iterables=e.iters=e.openIters=e.padding=e.finishResults=e.buffer=null}},684(e){e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},269(e){e.exports=Object.create?Object.create(null):{}},741(e){var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function trunc(e){var n=+e;return(n>0?r:t)(n)}},717(e,t){t.f=Object.getOwnPropertySymbols},750(e,t,r){var n=r(117),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},835(e){e.exports=function(e){try{var t=new Set,r={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){t.clear();t.add(4);return function(){return{done:!0}}}})}},n=t[e](r);return 1===n.size&&4===n.values().next().value}catch(e){return!1}}},291(e,t,r){var n=r(741);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},14(e,t,r){var n=r(291),o=Math.min;e.exports=function(e){var t=n(e);return t>0?o(t,9007199254740991):0}},981(e,t,r){var n=r(750),o=Object;e.exports=function(e){return o(n(e))}},812(e){var t=TypeError;e.exports=function(e,r){if(e<r)throw new t("Not enough arguments");return e}}};const t={};function __webpack_require__(r){const n=t[r];if(void 0!==n)return n.exports;const o=t[r]={exports:{}};e[r](o,o.exports,__webpack_require__);return o.exports}__webpack_require__.cw=e=>{var t;return()=>{if(e){var r=e;e=0;t={exports:{}};r.call(t.exports,t,t.exports)}return t.exports}};__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})};__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=__webpack_require__.cw(e=>{var t=ae(),r=ot(),n=TypeError;e.exports=function(e){if(t(e))return e;throw new n(r(e)+" is not a function")}}),n=__webpack_require__.cw(e=>{var t=ue(),r=String,n=TypeError;e.exports=function(e){if(t(e))return e;throw new n("Can't set "+r(e)+" as a prototype")}}),o=__webpack_require__.cw(e=>{var t=Ue().has;e.exports=function(e){t(e);return e}}),a_string_namespaceFn=()=>__webpack_require__(463),i=__webpack_require__.cw(e=>{var t=ht(),r=xe(),n=Ce().f,o=t("unscopables"),i=Array.prototype;void 0===i[o]&&n(i,o,{configurable:!0,value:r(null)});e.exports=function(e){i[o][e]=!0}}),a=__webpack_require__.cw(e=>{var t=Re(),r=TypeError;e.exports=function(e,n){if(t(n,e))return e;throw new r("Incorrect invocation")}}),s=__webpack_require__.cw(e=>{var t=ce(),r=String,n=TypeError;e.exports=function(e){if(void 0===e||t(e))return e;throw new n(r(e)+" is not an object or undefined")}}),c=__webpack_require__.cw(e=>{var t=ce(),r=String,n=TypeError;e.exports=function(e){if(t(e))return e;throw new n(r(e)+" is not an object")}}),u=__webpack_require__.cw(e=>{var t=b(),r=TypeError;e.exports=function(e){if("Uint8Array"===t(e))return e;throw new r("Argument is not an Uint8Array")}}),f=__webpack_require__.cw(e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView}),l=__webpack_require__.cw(e=>{var t=H(),r=j(),n=w(),o=t.ArrayBuffer,i=t.TypeError;e.exports=o&&r(o.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==n(e))throw new i("ArrayBuffer expected");return e.byteLength}}),p=__webpack_require__.cw(e=>{var t=H(),r=f(),n=l(),o=t.DataView;e.exports=function(e){if(!r||0!==n(e))return!1;try{new o(e);return!1}catch(e){return!0}}}),h=__webpack_require__.cw(e=>{var t=p(),r=TypeError;e.exports=function(e){if(t(e))throw new r("ArrayBuffer is detached");return e}}),_=__webpack_require__.cw(e=>{var t,r,n,o=f(),i=B(),a=H(),s=ae(),c=ce(),u=X(),l=b(),p=ot(),h=x(),_=S(),m=A(),g=Re(),d=Ie(),w=De(),y=ht(),v=it(),k=re(),C=k.enforce,I=k.get,R=a.Int8Array,M=R&&R.prototype,E=a.Uint8ClampedArray,D=E&&E.prototype,q=R&&d(R),T=M&&d(M),O=Object.prototype,P=a.TypeError,U=y("toStringTag"),L=v("TYPED_ARRAY_TAG"),G="TypedArrayConstructor",j=o&&!!w&&"Opera"!==l(a.opera),W=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(e){var t=d(e);if(c(t)){var r=I(t);return r&&u(r,G)?r[G]:getTypedArrayConstructor(t)}},isTypedArray=function(e){if(!c(e))return!1;var t=l(e);return u(N,t)||u(z,t)};for(t in N)(n=(r=a[t])&&r.prototype)?C(n)[G]=r:j=!1;for(t in z)(n=(r=a[t])&&r.prototype)&&(C(n)[G]=r);if(!j||!s(q)||q===Function.prototype){q=function TypedArray(){throw new P("Incorrect invocation")};if(j)for(t in N)a[t]&&w(a[t],q)}if(!j||!T||T===O){T=q.prototype;if(j)for(t in N)a[t]&&w(a[t].prototype,T)}j&&d(D)!==T&&w(D,T);if(i&&!u(T,U)){W=!0;m(T,U,{configurable:!0,get:function(){return c(this)?this[L]:void 0}});for(t in N)a[t]&&h(a[t].prototype,L,t)}e.exports={NATIVE_ARRAY_BUFFER_VIEWS:j,TYPED_ARRAY_TAG:W&&L,aTypedArray:function(e){if(isTypedArray(e))return e;throw new P("Target is not a typed array")},aTypedArrayConstructor:function(e){if(s(e)&&(!w||g(q,e)))return e;throw new P(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(i){if(r)for(var o in N){var s=a[o];if(s&&u(s.prototype,e))try{delete s.prototype[e]}catch(r){try{s.prototype[e]=t}catch(e){}}}T[e]&&!r||_(T,e,r?t:j&&M[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,o;if(i){if(w){if(r)for(n in N)if((o=a[n])&&u(o,e))try{delete o[e]}catch(e){}if(q[e]&&!r)return;try{return _(q,e,r?t:j&&q[e]||t)}catch(e){}}for(n in N)!(o=a[n])||o[e]&&!r||_(o,e,t)}},getTypedArrayConstructor,isView:function isView(e){if(!c(e))return!1;var t=l(e);return"DataView"===t||u(N,t)||u(z,t)},isTypedArray,TypedArray:q,TypedArrayPrototype:T}}),m=__webpack_require__.cw(e=>{var t=Qe(),r=Ze(),n=be(),createMethod=function(e){return function(o,i,a){var s=t(o),c=n(s);if(0===c)return!e&&-1;var u,f=r(a,c);if(e&&i!=i){for(;c>f;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((e||f in s)&&s[f]===i)return e||f||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}}),g=__webpack_require__.cw(e=>{var t=B(),r=oe(),n=TypeError,o=Object.getOwnPropertyDescriptor,i=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=i?function(e,t){if(r(e)&&!o(e,"length").writable)throw new n("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}}),base64_map_namespaceFn=()=>__webpack_require__(804),d=__webpack_require__.cw(e=>{var t=c(),r=me();e.exports=function(e,n,o,i){try{return i?n(t(o)[0],o[1]):n(o)}catch(t){r(e,"throw",t)}}}),w=__webpack_require__.cw(e=>{var t=N(),r=t({}.toString),n=t("".slice);e.exports=function(e){return n(r(e),8,-1)}}),b=__webpack_require__.cw(e=>{var t=rt(),r=ae(),n=w(),o=ht()("toStringTag"),i=Object,a="Arguments"===n(function(){return arguments}());e.exports=t?n:function(e){var t,s,c;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(t=i(e),o))?s:a?n(t):"Object"===(c=n(t))&&r(t.callee)?"Arguments":c}}),y=__webpack_require__.cw(e=>{var t=X(),r=Te(),n=Ae(),o=Ce();e.exports=function(e,i,a){for(var s=r(i),c=o.f,u=n.f,f=0;f<s.length;f++){var l=s[f];t(e,l)||a&&t(a,l)||c(e,l,u(i,l))}}}),v=__webpack_require__.cw(e=>{var t=O();e.exports=!t(function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype})}),x=__webpack_require__.cw(e=>{var t=B(),r=Ce(),n=k();e.exports=t?function(e,t,o){return r.f(e,t,n(1,o))}:function(e,t,r){e[t]=r;return e}}),k=__webpack_require__.cw(e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}}),C=__webpack_require__.cw(e=>{var t=B(),r=Ce(),n=k();e.exports=function(e,o,i){t?r.f(e,o,n(0,i)):e[o]=i}}),A=__webpack_require__.cw(e=>{var t=ye(),r=Ce();e.exports=function(e,n,o){o.get&&t(o.get,n,{getter:!0});o.set&&t(o.set,n,{setter:!0});return r.f(e,n,o)}}),S=__webpack_require__.cw(e=>{var t=ae(),r=Ce(),n=ye(),o=R();e.exports=function(e,i,a,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:i;t(a)&&n(a,u,s);if(s.global)c?e[i]=a:o(i,a);else{try{s.unsafe?e[i]&&(c=!0):delete e[i]}catch(e){}c?e[i]=a:r.f(e,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}}),I=__webpack_require__.cw(e=>{var t=S();e.exports=function(e,r,n){for(var o in r)t(e,o,r[o],n);return e}}),R=__webpack_require__.cw(e=>{var t=H(),r=Object.defineProperty;e.exports=function(e,n){try{r(t,e,{value:n,configurable:!0,writable:!0})}catch(r){t[e]=n}return n}}),B=__webpack_require__.cw(e=>{var t=O();e.exports=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}),M=__webpack_require__.cw(e=>{var t=H(),r=ce(),n=t.document,o=r(n)&&r(n.createElement);e.exports=function(e){return o?n.createElement(e):{}}}),E=__webpack_require__.cw(e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),D=__webpack_require__.cw(e=>{var t=H().navigator,r=t&&t.userAgent;e.exports=r?String(r):""}),q=__webpack_require__.cw(e=>{var t,r,n=H(),o=D(),i=n.process,a=n.Deno,s=i&&i.versions||a&&a.version,c=s&&s.v8;c&&(r=(t=c.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1]));!r&&o&&(!(t=o.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=o.match(/Chrome\/(\d+)/))&&(r=+t[1]);e.exports=r}),T=__webpack_require__.cw(e=>{var t=H(),r=Ae().f,n=x(),o=S(),i=R(),a=y(),s=se();e.exports=function(e,c){var u,f,l,p,h,_=e.target,m=e.global,g=e.stat;if(u=m?t:g?t[_]||i(_,{}):t[_]&&t[_].prototype)for(f in c){p=c[f];l=e.dontCallGetSet?(h=r(u,f))&&h.value:u[f];if(!s(m?f:_+(g?".":"#")+f,e.forced)&&void 0!==l){if(typeof p==typeof l)continue;a(p,l)}(e.sham||l&&l.sham)&&n(p,"sham",!0);o(u,f,p,e)}}}),O=__webpack_require__.cw(e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}}),P=__webpack_require__.cw(e=>{var t=W(),n=r(),o=U(),i=t(t.bind);e.exports=function(e,t){n(e);return void 0===t?e:o?i(e,t):function(){return e.apply(t,arguments)}}}),U=__webpack_require__.cw(e=>{var t=O();e.exports=!t(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}),L=__webpack_require__.cw(e=>{var t=U(),r=Function.prototype.call;e.exports=t?r.bind(r):function(){return r.apply(r,arguments)}}),G=__webpack_require__.cw(e=>{var t=B(),r=X(),n=Function.prototype,o=t&&Object.getOwnPropertyDescriptor,i=r(n,"name"),a=i&&(!t||t&&o(n,"name").configurable);e.exports={CONFIGURABLE:a}}),j=__webpack_require__.cw(e=>{var t=N(),n=r();e.exports=function(e,r,o){try{return t(n(Object.getOwnPropertyDescriptor(e,r)[o]))}catch(e){}}}),W=__webpack_require__.cw(e=>{var t=w(),r=N();e.exports=function(e){if("Function"===t(e))return r(e)}}),N=__webpack_require__.cw(e=>{var t=U(),r=Function.prototype,n=r.call,o=t&&r.bind.bind(n,n);e.exports=t?o:function(e){return function(){return n.apply(e,arguments)}}}),get_alphabet_option_namespaceFn=()=>__webpack_require__(944),z=__webpack_require__.cw(e=>{var t=H(),r=ae();e.exports=function(e,n){return arguments.length<2?(o=t[e],r(o)?o:void 0):t[e]&&t[e][n];var o}}),get_iterator_direct_namespaceFn=()=>__webpack_require__(767),J=__webpack_require__.cw(e=>{var t=L(),r=ae(),n=c(),o=ot(),i=Y(),a=TypeError;e.exports=function(e,s){var c=arguments.length<2?i(e):s;if(r(c))return n(t(c,e));throw new a(o(e)+" is not iterable")}}),Y=__webpack_require__.cw(e=>{var t=w(),r=is_null_or_undefined_namespaceFn(),n=$(),o=ht()("iterator"),i=Array.prototype;e.exports=function(e){if(!r(e))return n(e,o)||n(e,"@@iterator")||("Arguments"===t(e)?i[o]:void 0)}}),$=__webpack_require__.cw(e=>{var t=r(),n=is_null_or_undefined_namespaceFn();e.exports=function(e,r){var o=e[r];return n(o)?void 0:t(o)}}),V=__webpack_require__.cw(e=>{var t=r(),n=c(),o=L(),i=to_integer_or_infinity_namespaceFn(),a=get_iterator_direct_namespaceFn(),s="Invalid size",u=RangeError,f=TypeError,l=Math.max,SetRecord=function(e,r){this.set=e;this.size=l(r,0);this.has=t(e.has);this.keys=t(e.keys)};SetRecord.prototype={getIterator:function(){return a(n(o(this.keys,this.set)))},includes:function(e){return o(this.has,this.set,e)}};e.exports=function(e){n(e);var t=+e.size;if(t!=t)throw new f(s);var r=i(t);if(r<0)throw new u(s);return new SetRecord(e,r)}}),H=__webpack_require__.cw(function(e){var check=function(e){return e&&e.Math===Math&&e};e.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")()}),X=__webpack_require__.cw(e=>{var t=N(),r=to_object_namespaceFn(),n=t({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return n(r(e),t)}}),Z=__webpack_require__.cw(e=>{e.exports={}}),K=__webpack_require__.cw(e=>{var t=z();e.exports=t("document","documentElement")}),Q=__webpack_require__.cw(e=>{var t=B(),r=O(),n=M();e.exports=!t&&!r(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}),ee=__webpack_require__.cw(e=>{var t=N(),r=O(),n=w(),o=Object,i=t("".split);e.exports=r(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?i(e,""):o(e)}:o}),te=__webpack_require__.cw(e=>{var t=N(),r=ae(),n=Ve(),o=t(Function.toString);r(n.inspectSource)||(n.inspectSource=function(e){return o(e)});e.exports=n.inspectSource}),re=__webpack_require__.cw(e=>{var t,r,n,o=pt(),i=H(),a=ce(),s=x(),c=X(),u=Ve(),f=$e(),l=Z(),p="Object already initialized",h=i.TypeError,_=i.WeakMap;if(o||u.state){var m=u.state||(u.state=new _);m.get=m.get;m.has=m.has;m.set=m.set;t=function(e,t){if(m.has(e))throw new h(p);t.facade=e;m.set(e,t);return t};r=function(e){return m.get(e)||{}};n=function(e){return m.has(e)}}else{var g=f("state");l[g]=!0;t=function(e,t){if(c(e,g))throw new h(p);t.facade=e;s(e,g,t);return t};r=function(e){return c(e,g)?e[g]:{}};n=function(e){return c(e,g)}}e.exports={set:t,get:r,has:n,enforce:function(e){return n(e)?r(e):t(e,{})},getterFor:function(e){return function(t){var n;if(!a(t)||(n=r(t)).type!==e)throw new h("Incompatible receiver, "+e+" required");return n}}}}),ne=__webpack_require__.cw(e=>{var t=ht(),r=iterators_namespaceFn(),n=t("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[n]===e)}}),oe=__webpack_require__.cw(e=>{var t=w();e.exports=Array.isArray||function isArray(e){return"Array"===t(e)}}),ie=__webpack_require__.cw(e=>{var t=b();e.exports=function(e){var r=t(e);return"BigInt64Array"===r||"BigUint64Array"===r}}),ae=__webpack_require__.cw(e=>{var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}}),se=__webpack_require__.cw(e=>{var t=O(),r=ae(),n=/#|\.prototype\./,isForced=function(e,n){var c=i[o(e)];return c===s||c!==a&&(r(n)?t(n):!!n)},o=isForced.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=isForced.data={},a=isForced.NATIVE="N",s=isForced.POLYFILL="P";e.exports=isForced}),is_null_or_undefined_namespaceFn=()=>__webpack_require__(117),ce=__webpack_require__.cw(e=>{var t=ae();e.exports=function(e){return"object"==typeof e?null!==e:t(e)}}),ue=__webpack_require__.cw(e=>{var t=ce();e.exports=function(e){return t(e)||null===e}}),fe=__webpack_require__.cw(e=>{e.exports=!1}),le=__webpack_require__.cw(e=>{var t=z(),r=ae(),n=Re(),o=ft(),i=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var o=t("Symbol");return r(o)&&n(o.prototype,i(e))}}),pe=__webpack_require__.cw(e=>{var t=L();e.exports=function(e,r,n){for(var o,i,a=n?e:e.iterator,s=e.next;!(o=t(s,a)).done;)if(void 0!==(i=r(o.value)))return i}}),he=__webpack_require__.cw(e=>{var t=P(),r=L(),n=c(),o=ot(),i=ne(),a=be(),s=Re(),u=J(),f=Y(),l=me(),p=TypeError,Result=function(e,t){this.stopped=e;this.result=t},h=Result.prototype;e.exports=function(e,c,_){var m,g,d,w,b,y,v,x=_&&_.that,k=!(!_||!_.AS_ENTRIES),C=!(!_||!_.IS_RECORD),A=!(!_||!_.IS_ITERATOR),S=!(!_||!_.INTERRUPTED),I=t(c,x),stop=function(e){var t=m;m=void 0;t&&l(t,"normal");return new Result(!0,e)},callFn=function(e){if(k){n(e);return S?I(e[0],e[1],stop):I(e[0],e[1])}return S?I(e,stop):I(e)};if(C)m=e.iterator;else if(A)m=e;else{if(!(g=f(e)))throw new p(o(e)+" is not iterable");if(i(g)){for(d=0,w=a(e);w>d;d++)if((b=callFn(e[d]))&&s(h,b))return b;return new Result(!1)}m=u(e,g)}y=C?e.next:m.next;for(;!(v=r(y,m)).done;){var R=v.value;try{b=callFn(R)}catch(e){if(!m)throw e;l(m,"throw",e)}if("object"==typeof b&&b&&s(h,b))return b}return new Result(!1)}}),_e=__webpack_require__.cw(e=>{var t=me();e.exports=function(e,r,n){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{n=t(e[o].iterator,r,n)}catch(e){r="throw";n=e}if("throw"===r)throw n;return n}}),me=__webpack_require__.cw(e=>{var t=L(),r=c(),n=$();e.exports=function(e,o,i){var a,s;r(e);try{if(!(a=n(e,"return"))){if("throw"===o)throw i;return i}a=t(a,e)}catch(e){s=!0;a=e}if("throw"===o)throw i;if(s)throw a;r(a);return i}}),ge=__webpack_require__.cw(e=>{var t=L(),r=xe(),n=x(),o=I(),i=ht(),a=re(),s=$(),c=we().IteratorPrototype,u=__webpack_require__(529),f=me(),l=_e(),p=__webpack_require__(859),h=i("toStringTag"),_="IteratorHelper",m="WrapForValidIterator",g="normal",d="throw",w=a.set,createIteratorProxyPrototype=function(e){var n=a.getterFor(e?m:_);return o(r(c),{next:function next(){var t=n(this);if(e)return t.nextHandler();if(t.done)return u(void 0,!0);try{var r=t.nextHandler();t.done&&p(t);return t.returnHandlerResult?r:u(r,t.done)}catch(e){t.done=!0;p(t);throw e}},return:function(){var r=n(this),o=r.iterator,i=r.inner,a=r.openIters,c=r.done;r.done=!0;if(e){var h=s(o,"return");return h?t(h,o):u(void 0,!0)}p(r);if(c)return u(void 0,!0);if(i)try{f(i.iterator,g)}catch(e){return f(o,d,e)}if(a)try{l(a,g)}catch(e){if(o)return f(o,d,e);throw e}o&&f(o,g);return u(void 0,!0)}})},b=createIteratorProxyPrototype(!0),y=createIteratorProxyPrototype(!1);n(y,h,"Iterator Helper");e.exports=function(e,t,r){var n=function Iterator(n,o){if(o){o.iterator=n.iterator;o.next=n.next}else o=n;o.type=t?m:_;o.returnHandlerResult=!!r;o.nextHandler=e;o.counter=0;o.done=!1;w(this,o)};n.prototype=t?b:y;return n}}),iterator_helper_throws_on_invalid_iterator_namespaceFn=()=>__webpack_require__(684),de=__webpack_require__.cw(e=>{var t=H();e.exports=function(e,r){var n=t.Iterator,o=n&&n.prototype,i=o&&o[e],a=!1;if(i)try{i.call({next:function(){return{done:!0}},return:function(){a=!0}},-1)}catch(e){e instanceof r||(a=!1)}if(!a)return i}}),we=__webpack_require__.cw(e=>{var t,r,n,o=O(),i=ae(),a=ce(),s=xe(),c=Ie(),u=S(),f=ht(),l=fe(),p=f("iterator");[].keys&&("next"in(n=[].keys())?(r=c(c(n)))!==Object.prototype&&(t=r):!0);!a(t)||o(function(){var e={};return t[p].call(e)!==e})?t={}:l&&(t=s(t));i(t[p])||u(t,p,function(){return this});e.exports={IteratorPrototype:t}}),iterators_namespaceFn=()=>__webpack_require__(269),be=__webpack_require__.cw(e=>{var t=to_length_namespaceFn();e.exports=function(e){return t(e.length)}}),ye=__webpack_require__.cw(e=>{var t=N(),r=O(),n=ae(),o=X(),i=B(),a=G().CONFIGURABLE,s=te(),c=re(),u=c.enforce,f=c.get,l=String,p=Object.defineProperty,h=t("".slice),_=t("".replace),m=t([].join),g=i&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),d=String(String).split("String"),w=e.exports=function(e,t,r){"Symbol("===h(l(t),0,7)&&(t="["+_(l(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]");r&&r.getter&&(t="get "+t);r&&r.setter&&(t="set "+t);(!o(e,"name")||a&&e.name!==t)&&(i?p(e,"name",{value:t,configurable:!0}):e.name=t);g&&r&&o(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?i&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=u(e);o(n,"source")||(n.source=m(d,"string"==typeof t?t:""));return e};Function.prototype.toString=w(function toString(){return n(this)&&f(this).source||s(this)},"toString")}),ve=__webpack_require__.cw(e=>{var t=N(),r=Map.prototype;e.exports={Map,set:t(r.set),get:t(r.get),has:t(r.has),remove:t(r.delete),proto:r}}),xe=__webpack_require__.cw(e=>{var t,r=c(),n=ke(),o=E(),i=Z(),a=K(),s=M(),u=$e(),f="prototype",l="script",p=u("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<"+l+">"+e+"</"+l+">"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag(""));e.close();var t=e.parentWindow.Object;e=null;return t},NullProtoObject=function(){try{t=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&t?NullProtoObjectViaActiveX(t):function(){var e,t=s("iframe"),r="java"+l+":";t.style.display="none";a.appendChild(t);t.src=String(r);(e=t.contentWindow.document).open();e.write(scriptTag("document.F=Object"));e.close();return e.F}():NullProtoObjectViaActiveX(t);for(var e=o.length;e--;)delete NullProtoObject[f][o[e]];return NullProtoObject()};i[p]=!0;e.exports=Object.create||function create(e,t){var o;if(null!==e){EmptyConstructor[f]=r(e);o=new EmptyConstructor;EmptyConstructor[f]=null;o[p]=e}else o=NullProtoObject();return void 0===t?o:n.f(o,t)}}),ke=__webpack_require__.cw((e,t)=>{var r=B(),n=lt(),o=Ce(),i=c(),a=Qe(),s=Me();t.f=r&&!n?Object.defineProperties:function defineProperties(e,t){i(e);for(var r,n=a(t),c=s(t),u=c.length,f=0;u>f;)o.f(e,r=c[f++],n[r]);return e}}),Ce=__webpack_require__.cw((e,t)=>{var r=B(),n=Q(),o=lt(),i=c(),a=tt(),s=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",h="writable";t.f=r?o?function defineProperty(e,t,r){i(e);t=a(t);i(r);if("function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var n=f(e,t);if(n&&n[h]){e[t]=r.value;r={configurable:p in r?r[p]:n[p],enumerable:l in r?r[l]:n[l],writable:!1}}}return u(e,t,r)}:u:function defineProperty(e,t,r){i(e);t=a(t);i(r);if(n)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new s("Accessors not supported");"value"in r&&(e[t]=r.value);return e}}),Ae=__webpack_require__.cw((e,t)=>{var r=B(),n=L(),o=Ee(),i=k(),a=Qe(),s=tt(),c=X(),u=Q(),f=Object.getOwnPropertyDescriptor;t.f=r?f:function getOwnPropertyDescriptor(e,t){e=a(e);t=s(t);if(u)try{return f(e,t)}catch(e){}if(c(e,t))return i(!n(o.f,e,t),e[t])}}),Se=__webpack_require__.cw((e,t)=>{var r=Be(),n=E().concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return r(e,n)}}),Ie=__webpack_require__.cw(e=>{var t=X(),r=ae(),n=to_object_namespaceFn(),o=$e(),i=v(),a=o("IE_PROTO"),s=Object,c=s.prototype;e.exports=i?s.getPrototypeOf:function(e){var o=n(e);if(t(o,a))return o[a];var i=o.constructor;return r(i)&&o instanceof i?i.prototype:o instanceof s?c:null}}),Re=__webpack_require__.cw(e=>{var t=N();e.exports=t({}.isPrototypeOf)}),Be=__webpack_require__.cw(e=>{var t=N(),r=X(),n=Qe(),o=m().indexOf,i=Z(),a=t([].push);e.exports=function(e,t){var s,c=n(e),u=0,f=[];for(s in c)!r(i,s)&&r(c,s)&&a(f,s);for(;t.length>u;)r(c,s=t[u++])&&(~o(f,s)||a(f,s));return f}}),Me=__webpack_require__.cw(e=>{var t=Be(),r=E();e.exports=Object.keys||function keys(e){return t(e,r)}}),Ee=__webpack_require__.cw((e,t)=>{var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:r}),De=__webpack_require__.cw(e=>{var t=j(),r=ce(),o=require_object_coercible_namespaceFn(),i=n();e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,n=!1,a={};try{(e=t(Object.prototype,"__proto__","set"))(a,[]);n=a instanceof Array}catch(e){}return function setPrototypeOf(t,a){o(t);i(a);if(!r(t))return t;n?e(t,a):t.__proto__=a;return t}}():void 0)}),qe=__webpack_require__.cw(e=>{var t=L(),r=ae(),n=ce(),o=TypeError;e.exports=function(e,i){var a,s;if("string"===i&&r(a=e.toString)&&!n(s=t(a,e)))return s;if(r(a=e.valueOf)&&!n(s=t(a,e)))return s;if("string"!==i&&r(a=e.toString)&&!n(s=t(a,e)))return s;throw new o("Can't convert object to primitive value")}}),Te=__webpack_require__.cw(e=>{var t=z(),r=N(),n=Se(),o=__webpack_require__(717),i=c(),a=r([].concat);e.exports=t("Reflect","ownKeys")||function ownKeys(e){var t=n.f(i(e)),r=o.f;return r?a(t,r(e)):t}}),require_object_coercible_namespaceFn=()=>__webpack_require__(750),Oe=__webpack_require__.cw(e=>{var t=Ue(),r=We(),n=t.Set,o=t.add;e.exports=function(e){var t=new n;r(e,function(e){o(t,e)});return t}}),Pe=__webpack_require__.cw(e=>{var t=o(),r=Ue(),n=Oe(),i=ze(),a=V(),s=We(),c=pe(),u=r.has,f=r.remove;e.exports=function difference(e){var r=t(this),o=a(e),l=n(r);i(l)<=o.size?s(l,function(e){o.includes(e)&&f(l,e)}):c(o.getIterator(),function(e){u(l,e)&&f(l,e)});return l}}),Ue=__webpack_require__.cw(e=>{var t=N(),r=Set.prototype;e.exports={Set,add:t(r.add),has:t(r.has),remove:t(r.delete),proto:r}}),Fe=__webpack_require__.cw(e=>{var t=o(),r=Ue(),n=ze(),i=V(),a=We(),s=pe(),c=r.Set,u=r.add,f=r.has;e.exports=function intersection(e){var r=t(this),o=i(e),l=new c;n(r)>o.size?s(o.getIterator(),function(e){f(r,e)&&u(l,e)}):a(r,function(e){o.includes(e)&&u(l,e)});return l}}),Le=__webpack_require__.cw(e=>{var t=o(),r=Ue().has,n=ze(),i=V(),a=We(),s=pe(),c=me();e.exports=function isDisjointFrom(e){var o=t(this),u=i(e);if(n(o)<=u.size)return!1!==a(o,function(e){if(u.includes(e))return!1},!0);var f=u.getIterator();return!1!==s(f,function(e){if(r(o,e))return c(f.iterator,"normal",!1)})}}),Ge=__webpack_require__.cw(e=>{var t=o(),r=ze(),n=We(),i=V();e.exports=function isSubsetOf(e){var o=t(this),a=i(e);return!(r(o)>a.size)&&!1!==n(o,function(e){if(!a.includes(e))return!1},!0)}}),je=__webpack_require__.cw(e=>{var t=o(),r=Ue().has,n=ze(),i=V(),a=pe(),s=me();e.exports=function isSupersetOf(e){var o=t(this),c=i(e);if(n(o)<c.size)return!1;var u=c.getIterator();return!1!==a(u,function(e){if(!r(o,e))return s(u.iterator,"normal",!1)})}}),We=__webpack_require__.cw(e=>{var t=N(),r=pe(),n=Ue(),o=n.Set,i=n.proto,a=t(i.forEach),s=t(i.keys),c=s(new o).next;e.exports=function(e,t,n){return n?r({iterator:s(e),next:c},t):a(e,t)}}),Ne=__webpack_require__.cw(e=>{var t=z(),createSetLike=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},createSetLikeWithInfinitySize=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,r){var n=t("Set");try{(new n)[e](createSetLike(0));try{(new n)[e](createSetLike(-1));return!1}catch(t){if(!r)return!0;try{(new n)[e](createSetLikeWithInfinitySize(-1/0));return!1}catch(t){return r(new n([1,2])[e](createSetLikeWithInfinitySize(1/0)))}}}catch(e){return!1}}}),set_method_get_keys_before_cloning_detection_namespaceFn=()=>__webpack_require__(835),ze=__webpack_require__.cw(e=>{var t=j(),r=Ue();e.exports=t(r.proto,"size","get")||function(e){return e.size}}),Je=__webpack_require__.cw(e=>{var t=o(),r=Ue(),n=Oe(),i=V(),a=pe(),s=r.add,c=r.has,u=r.remove;e.exports=function symmetricDifference(e){var r=t(this),o=i(e).getIterator(),f=n(r);a(o,function(e){c(r,e)?u(f,e):s(f,e)});return f}}),Ye=__webpack_require__.cw(e=>{var t=o(),r=Ue().add,n=Oe(),i=V(),a=pe();e.exports=function union(e){var o=t(this),s=i(e).getIterator(),c=n(o);a(s,function(e){r(c,e)});return c}}),$e=__webpack_require__.cw(e=>{var t=He(),r=it(),n=t("keys");e.exports=function(e){return n[e]||(n[e]=r(e))}}),Ve=__webpack_require__.cw(e=>{var t=fe(),r=H(),n=R(),o="__core-js_shared__",i=e.exports=r[o]||n(o,{});(i.versions||(i.versions=[])).push({version:"3.51.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.51.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),He=__webpack_require__.cw(e=>{var t=Ve(),r=Object.create||Object;e.exports=function(e,n){return t[e]||(t[e]=n||r(null))}}),Xe=__webpack_require__.cw(e=>{var t=q(),r=O(),n=H().String;e.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}),Ze=__webpack_require__.cw(e=>{var t=to_integer_or_infinity_namespaceFn(),r=Math.max,n=Math.min;e.exports=function(e,o){var i=t(e);return i<0?r(i+o,0):n(i,o)}}),Ke=__webpack_require__.cw(e=>{var t=et(),r=TypeError;e.exports=function(e){var n=t(e,"number");if("number"==typeof n)throw new r("Can't convert number to bigint");return BigInt(n)}}),Qe=__webpack_require__.cw(e=>{var t=ee(),r=require_object_coercible_namespaceFn();e.exports=function(e){return t(r(e))}}),to_integer_or_infinity_namespaceFn=()=>__webpack_require__(291),to_length_namespaceFn=()=>__webpack_require__(14),to_object_namespaceFn=()=>__webpack_require__(981),et=__webpack_require__.cw(e=>{var t=L(),r=ce(),n=le(),o=$(),i=qe(),a=ht(),s=TypeError,c=a("toPrimitive");e.exports=function(e,a){if(!r(e)||n(e))return e;var u,f=o(e,c);if(f){void 0===a&&(a="default");u=t(f,e,a);if(!r(u)||n(u))return u;throw new s("Can't convert object to primitive value")}void 0===a&&(a="number");return i(e,a)}}),tt=__webpack_require__.cw(e=>{var t=et(),r=le();e.exports=function(e){var n=t(e,"string");return r(n)?n:n+""}}),rt=__webpack_require__.cw(e=>{var t={};t[ht()("toStringTag")]="z";e.exports="[object z]"===String(t)}),nt=__webpack_require__.cw(e=>{var t=b(),r=String;e.exports=function(e){if("Symbol"===t(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}}),ot=__webpack_require__.cw(e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}}),it=__webpack_require__.cw(e=>{var t=N(),r=0,n=Math.random(),o=t(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++r+n,36)}}),st=__webpack_require__.cw(e=>{var t=H(),r=N(),n=s(),o=a_string_namespaceFn(),i=X(),a=base64_map_namespaceFn(),c=get_alphabet_option_namespaceFn(),u=h(),f=a.c2i,l=a.c2iUrl,p=t.SyntaxError,_=t.TypeError,m=t.Array,g=r("".charAt),d=Math.floor,skipAsciiWhitespace=function(e,t){for(var r=e.length;t<r;t++){var n=g(e,t);if(" "!==n&&"\t"!==n&&"\n"!==n&&"\f"!==n&&"\r"!==n)break}return t},decodeBase64Chunk=function(e,t,r){var n=e.length;n<4&&(e+=2===n?"AA":"A");var o=(t[g(e,0)]<<18)+(t[g(e,1)]<<12)+(t[g(e,2)]<<6)+t[g(e,3)],i=[o>>16&255,o>>8&255,255&o];if(2===n){if(r&&0!==i[1])throw new p("Extra bits");return[i[0]]}if(3===n){if(r&&0!==i[2])throw new p("Extra bits");return[i[0],i[1]]}return i},writeBytes=function(e,t,r){for(var n=t.length,o=0;o<n;o++)e[r+o]=t[o];return r+n};e.exports=function(e,t,r,a){o(e);n(t);var s="base64"===c(t)?f:l,h=t?t.lastChunkHandling:void 0;void 0===h&&(h="loose");if("loose"!==h&&"strict"!==h&&"stop-before-partial"!==h)throw new _("Incorrect `lastChunkHandling` option");r&&u(r.buffer);var w=e.length,b=r||m(d(3*w/4)),y=0,v=0,x="",k=0;if(a)for(;;){if((k=skipAsciiWhitespace(e,k))===w){if(x.length>0){if("stop-before-partial"===h)break;if("loose"!==h)throw new p("Missing padding");if(1===x.length)throw new p("Malformed padding: exactly one additional character");y=writeBytes(b,decodeBase64Chunk(x,s,!1),y)}v=w;break}var C=g(e,k);++k;if("="===C){if(x.length<2)throw new p("Padding is too early");k=skipAsciiWhitespace(e,k);if(2===x.length){if(k===w){if("stop-before-partial"===h)break;throw new p("Malformed padding: only one =")}if("="===g(e,k)){++k;k=skipAsciiWhitespace(e,k)}}if(k<w)throw new p("Unexpected character after padding");y=writeBytes(b,decodeBase64Chunk(x,s,"strict"===h),y);v=w;break}if(!i(s,C))throw new p("Unexpected character");var A=a-y;if(1===A&&2===x.length||2===A&&3===x.length)break;if(4===(x+=C).length){y=writeBytes(b,decodeBase64Chunk(x,s,!1),y);x="";v=k;if(y===a)break}}r||(b.length=y);return{bytes:b,read:v,written:y}}}),ct=__webpack_require__.cw(e=>{var t=H(),r=N(),n=t.Uint8Array,o=t.SyntaxError,i=Math.min,a=r("".match);e.exports=function(e,t){var r=e.length;if(r%2!=0)throw new o("String should be an even number of characters");for(var s=t?i(t.length,r/2):r/2,c=t||new n(s),u=a(e,/[\S\s]{2}/g),f=0;f<s;f++){var l=+("0x"+u[f]+"0");if(l!=l)throw new o("String should only contain hex characters");c[f]=l>>4}return{bytes:c,read:f<<1}}}),ut=__webpack_require__.cw(e=>{var t=O(),r=ht(),n=B(),o=fe(),i=r("iterator");e.exports=!t(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),a="";e.pathname="c%20d";t.forEach(function(e,r){t.delete("b");a+=r+e});r.delete("a",2);r.delete("b",void 0);return o&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(o||!n)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[i]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==a||"x"!==new URL("https://x",void 0).host})}),ft=__webpack_require__.cw(e=>{var t=Xe();e.exports=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}),lt=__webpack_require__.cw(e=>{var t=B(),r=O();e.exports=t&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}),pt=__webpack_require__.cw(e=>{var t=H(),r=ae(),n=t.WeakMap;e.exports=r(n)&&/native code/.test(String(n))}),ht=__webpack_require__.cw(e=>{var t=H(),r=He(),n=X(),o=it(),i=Xe(),a=ft(),s=t.Symbol,c=r("wks"),u=a?s.for||s:s&&s.withoutSetter||o;e.exports=function(e){n(c,e)||(c[e]=i&&n(s,e)?s[e]:u("Symbol."+e));return c[e]}}),_t=__webpack_require__.cw(()=>{var e=T(),t=m().includes,r=O(),n=i(),o=r(function(){return!Array(1).includes()}),a=r(function(){return[,1].includes(void 0,1)});e({target:"Array",proto:!0,forced:o||a},{includes:function includes(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}});n("includes")}),mt=__webpack_require__.cw(()=>{var e=T(),t=to_object_namespaceFn(),r=be(),n=g(),o=__webpack_require__(837);e({target:"Array",proto:!0,arity:1,forced:O()(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function push(e){var i=t(this),a=r(i),s=arguments.length;o(a+s);for(var c=0;c<s;c++){i[a]=arguments[c];a++}n(i,a);return a}})}),gt=__webpack_require__.cw(()=>{var e=T(),t=H(),r=a(),n=c(),o=ae(),i=Ie(),s=A(),u=C(),f=O(),l=X(),p=ht(),h=we().IteratorPrototype,_=B(),m=fe(),g="constructor",d="Iterator",w=p("toStringTag"),b=TypeError,y=t[d],v=m||!o(y)||y.prototype!==h||!f(function(){y({})}),x=function Iterator(){r(this,h);if(i(this)===h)throw new b("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(e,t){_?s(h,e,{configurable:!0,get:function(){return t},set:function(t){n(this);if(this===h)throw new b("You can't redefine this property");l(this,e)?this[e]=t:u(this,e,t)}}):h[e]=t};l(h,w)||defineIteratorPrototypeAccessor(w,d);!v&&l(h,g)&&h[g]!==Object||defineIteratorPrototypeAccessor(g,x);x.prototype=h;e({global:!0,constructor:!0,forced:v},{Iterator:x})}),dt=__webpack_require__.cw(()=>{var e=T(),t=L(),n=he(),o=r(),i=c(),a=get_iterator_direct_namespaceFn(),s=me(),u=de()("every",TypeError);e({target:"Iterator",proto:!0,real:!0,forced:u},{every:function every(e){i(this);try{o(e)}catch(e){s(this,"throw",e)}if(u)return t(u,this,e);var r=a(this),c=0;return!n(r,function(t,r){if(!e(t,c++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),wt=__webpack_require__.cw(()=>{var e=T(),t=L(),n=r(),o=c(),i=get_iterator_direct_namespaceFn(),a=ge(),s=d(),u=fe(),f=me(),l=iterator_helper_throws_on_invalid_iterator_namespaceFn(),p=de(),h=!u&&!l("filter",function(){}),_=!u&&!h&&p("filter",TypeError),m=u||h||_,g=a(function(){for(var e,r,n=this.iterator,i=this.predicate,a=this.next;;){e=o(t(a,n));if(this.done=!!e.done)return;r=e.value;if(s(n,i,[r,this.counter++],!0))return r}});e({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function filter(e){o(this);try{n(e)}catch(e){f(this,"throw",e)}return _?t(_,this,e):new g(i(this),{predicate:e})}})}),bt=__webpack_require__.cw(()=>{var e=T(),t=L(),n=r(),o=c(),i=get_iterator_direct_namespaceFn(),a=ge(),s=d(),u=me(),f=iterator_helper_throws_on_invalid_iterator_namespaceFn(),l=de(),p=fe(),h=!p&&!f("map",function(){}),_=!p&&!h&&l("map",TypeError),m=p||h||_,g=a(function(){var e=this.iterator,r=o(t(this.next,e));if(!(this.done=!!r.done))return s(e,this.mapper,[r.value,this.counter++],!0)});e({target:"Iterator",proto:!0,real:!0,forced:m},{map:function map(e){o(this);try{n(e)}catch(e){u(this,"throw",e)}return _?t(_,this,e):new g(i(this),{mapper:e})}})}),yt=__webpack_require__.cw(()=>{var e=T(),t=r(),n=ve(),o=fe(),i=n.get,a=n.has,s=n.set;e({target:"Map",proto:!0,real:!0,forced:o},{getOrInsertComputed:function getOrInsertComputed(e,r){var n=a(this,e);t(r);if(n)return i(this,e);0===e&&1/e==-1/0&&(e=0);var o=r(e);s(this,e,o);return o}})}),vt=__webpack_require__.cw(()=>{var e=T(),t=ve(),r=fe(),n=t.get,o=t.has,i=t.set;e({target:"Map",proto:!0,real:!0,forced:r},{getOrInsert:function getOrInsert(e,t){if(o(this,e))return n(this,e);i(this,e,t);return t}})}),xt=__webpack_require__.cw(()=>{var e=T(),t=Pe(),r=O();e({target:"Set",proto:!0,real:!0,forced:!Ne()("difference",function(e){return 0===e.size})||r(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var r=e++>1;t.has(1)&&t.clear();return{done:r,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size})},{difference:t})}),kt=__webpack_require__.cw(()=>{var e=T(),t=O(),r=Fe();e({target:"Set",proto:!0,real:!0,forced:!Ne()("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||t(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:r})}),Ct=__webpack_require__.cw(()=>{var e=T(),t=Le();e({target:"Set",proto:!0,real:!0,forced:!Ne()("isDisjointFrom",function(e){return!e})},{isDisjointFrom:t})}),At=__webpack_require__.cw(()=>{var e=T(),t=Ge();e({target:"Set",proto:!0,real:!0,forced:!Ne()("isSubsetOf",function(e){return e})},{isSubsetOf:t})}),St=__webpack_require__.cw(()=>{var e=T(),t=je();e({target:"Set",proto:!0,real:!0,forced:!Ne()("isSupersetOf",function(e){return!e})},{isSupersetOf:t})}),It=__webpack_require__.cw(()=>{var e=T(),t=Je(),r=set_method_get_keys_before_cloning_detection_namespaceFn();e({target:"Set",proto:!0,real:!0,forced:!Ne()("symmetricDifference")||!r("symmetricDifference")},{symmetricDifference:t})}),Rt=__webpack_require__.cw(()=>{var e=T(),t=Ye(),r=set_method_get_keys_before_cloning_detection_namespaceFn();e({target:"Set",proto:!0,real:!0,forced:!Ne()("union")||!r("union")},{union:t})}),Bt=__webpack_require__.cw(()=>{var e=_(),t=ie(),r=be(),n=to_integer_or_infinity_namespaceFn(),o=Ke(),i=e.aTypedArray,a=e.getTypedArrayConstructor,s=e.exportTypedArrayMethod,c=RangeError,u=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}(),f=u&&function(){try{new Int8Array(1).with(-.5,1)}catch(e){return!0}}();s("with",{with:function(e,s){var u=i(this),f=r(u),l=n(e),p=l<0?f+l:l,h=t(u)?o(s):+s;if(p>=f||p<0)throw new c("Incorrect index");for(var _=new(a(u))(f),m=0;m<f;m++)_[m]=m===p?h:u[m];return _}}.with,!u||f)}),Mt=__webpack_require__.cw(()=>{var e=T(),t=H(),r=st(),n=u(),o=t.Uint8Array,i=!o||!o.prototype.setFromBase64||!function(){var e=new o([255,255,255,255,255]);try{e.setFromBase64("",null);return}catch(e){}try{e.setFromBase64("a");return}catch(e){}try{e.setFromBase64("MjYyZg===")}catch(t){return 50===e[0]&&54===e[1]&&50===e[2]&&255===e[3]&&255===e[4]}}();o&&e({target:"Uint8Array",proto:!0,forced:i},{setFromBase64:function setFromBase64(e){n(this);var t=r(e,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:t.read,written:t.written}}})}),Et=__webpack_require__.cw(()=>{var e=T(),t=H(),r=a_string_namespaceFn(),n=u(),o=h(),i=ct();t.Uint8Array&&e({target:"Uint8Array",proto:!0,forced:function throwsOnLengthTrackingView(){try{var e=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(e).setFromHex("cafed00d")}catch(e){return!0}}()},{setFromHex:function setFromHex(e){n(this);r(e);o(this.buffer);var t=i(e,this).read;return{read:t,written:t/2}}})}),Dt=__webpack_require__.cw(()=>{var e=T(),t=H(),r=N(),n=s(),o=u(),i=h(),a=base64_map_namespaceFn(),c=get_alphabet_option_namespaceFn(),f=a.i2c,l=a.i2cUrl,p=Math.floor,_=Math.ceil,m=r("".charAt),g=t.Uint8Array,d=t.Array,w=r([].join),b=!g||!g.prototype.toBase64||!function(){try{(new g).toBase64(null)}catch(e){return!0}}();g&&e({target:"Uint8Array",proto:!0,forced:b},{toBase64:function toBase64(){var e=o(this),t=arguments.length?n(arguments[0]):void 0,r="base64"===c(t)?f:l,a=!!t&&!!t.omitPadding;i(this.buffer);for(var s,u=0,h=e.length,g=d(a?4*p(h/3)+(h%3?h%3+1:0):4*_(h/3)),b=0,at=function(e){return m(r,s>>6*e&63)};u+2<h;u+=3){s=(e[u]<<16)+(e[u+1]<<8)+e[u+2];g[b++]=at(3);g[b++]=at(2);g[b++]=at(1);g[b++]=at(0)}if(u+2===h){s=(e[u]<<16)+(e[u+1]<<8);g[b++]=at(3);g[b++]=at(2);g[b++]=at(1);a||(g[b++]="=")}else if(u+1===h){s=e[u]<<16;g[b++]=at(3);g[b++]=at(2);if(!a){g[b++]="=";g[b++]="="}}return w(g,"")}})}),qt=__webpack_require__.cw(()=>{var e=T(),t=H(),r=N(),n=u(),o=h(),i=r(1.1.toString),a=r([].join),s=Array,c=t.Uint8Array,f=!c||!c.prototype.toHex||!function(){try{return"ffffffffffffffff"===new c([255,255,255,255,255,255,255,255]).toHex()}catch(e){return!1}}();c&&e({target:"Uint8Array",proto:!0,forced:f},{toHex:function toHex(){n(this);o(this.buffer);for(var e=s(this.length),t=0,r=this.length;t<r;t++){var c=i(this[t],16);e[t]=1===c.length?"0"+c:c}return a(e,"")}})}),Tt=__webpack_require__.cw(()=>{var e=T(),t=z(),r=__webpack_require__(812),n=nt(),o=ut(),i=t("URL");e({target:"URL",stat:!0,forced:!o},{parse:function parse(e){var t=r(arguments.length,1),o=n(e),a=t<2||void 0===arguments[1]?void 0:n(arguments[1]);try{return new i(o,a)}catch(e){return null}}})});_t();mt();gt();wt();vt();yt();xt();kt();Ct();At();St();It();Rt();Bt();Mt();Et();Dt();qt();Tt();"object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type,new Float32Array([1/0,1/0,-1/0,-1/0]);const Ot={ERRORS:0,WARNINGS:1,INFOS:5};let Pt=Ot.WARNINGS;function setVerbosityLevel(e){Number.isInteger(e)&&(Pt=e)}function getVerbosityLevel(){return Pt}function info(e){Pt>=Ot.INFOS&&console.info(`Info: ${e}`)}function warn(e){Pt>=Ot.WARNINGS&&console.warn(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function util_shadow(e,t,r,n=!1){Object.defineProperty(e,t,{value:r,enumerable:!n,configurable:!0,writable:!1});return r}const Ut=function BaseExceptionClosure(){function BaseException(e,t){this.message=e;this.name=t}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class FormatError extends Ut{constructor(e){super(e,"FormatError")}}function bytesToString(e){"object"==typeof e&&void 0!==e?.length||unreachable("Invalid argument for bytesToString");const t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);const n=[];for(let o=0;o<t;o+=r){const i=Math.min(o+r,t),a=e.subarray(o,i);n.push(String.fromCharCode.apply(null,a))}return n.join("")}class FeatureTest{static get isLittleEndian(){const e=new Uint8Array(4);e[0]=1;return util_shadow(this,"isLittleEndian",1===new Uint32Array(e.buffer,0,1)[0])}static get isOffscreenCanvasSupported(){return util_shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return util_shadow(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get isVideoFrameSupported(){return util_shadow(this,"isVideoFrameSupported","undefined"!=typeof VideoFrame)}static get isFloat16ArraySupported(){return util_shadow(this,"isFloat16ArraySupported","undefined"!=typeof Float16Array)}static get isSanitizerSupported(){return util_shadow(this,"isSanitizerSupported","undefined"!=typeof Sanitizer)}static get platform(){const{platform:e,userAgent:t}=navigator;return util_shadow(this,"platform",{isAndroid:t.includes("Android"),isLinux:e.includes("Linux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:t.includes("Firefox")})}static get isCanvasFilterSupported(){let e;this.isOffscreenCanvasSupported?e=new OffscreenCanvas(1,1).getContext("2d"):"undefined"!=typeof document&&(e=document.createElement("canvas").getContext("2d"));return util_shadow(this,"isCanvasFilterSupported",void 0!==e?.filter)}static get isAlphaColorInputSupported(){if("undefined"==typeof document)return util_shadow(this,"isAlphaColorInputSupported",!1);const e=document.createElement("input");e.type="color";e.setAttribute("alpha","");e.value="#ff000080";return util_shadow(this,"isAlphaColorInputSupported","#ff0000"!==e.value)}static get isBackdropFilterSupported(){return util_shadow(this,"isBackdropFilterSupported","undefined"!=typeof CSS&&CSS.supports("backdrop-filter","blur(1px)"))}}class Util{static get hexNums(){return util_shadow(this,"hexNums",Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")))}static makeHexColor(e,t,r){return`#${this.hexNums[e]}${this.hexNums[t]}${this.hexNums[r]}`}static get identity0to256Map(){return util_shadow(this,"identity0to256Map",Uint8Array.from({length:256},(e,t)=>t))}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static multiplyByDOMMatrix(e,t){return[e[0]*t.a+e[2]*t.b,e[1]*t.a+e[3]*t.b,e[0]*t.c+e[2]*t.d,e[1]*t.c+e[3]*t.d,e[0]*t.e+e[2]*t.f+e[4],e[1]*t.e+e[3]*t.f+e[5]]}static applyTransform(e,t,r=0){const n=e[r],o=e[r+1];e[r]=n*t[0]+o*t[2]+t[4];e[r+1]=n*t[1]+o*t[3]+t[5]}static applyTransformToBezier(e,t,r=0){const n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5];for(let t=0;t<6;t+=2){const u=e[r+t],f=e[r+t+1];e[r+t]=u*n+f*i+s;e[r+t+1]=u*o+f*a+c}}static applyInverseTransform(e,t){const r=e[0],n=e[1],o=t[0]*t[3]-t[1]*t[2];e[0]=(r*t[3]-n*t[2]+t[2]*t[5]-t[4]*t[3])/o;e[1]=(-r*t[1]+n*t[0]+t[4]*t[1]-t[5]*t[0])/o}static axialAlignedBoundingBox(e,t,r){const n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5],u=e[0],f=e[1],l=e[2],p=e[3];let h=n*u+s,_=h,m=n*l+s,g=m,d=a*f+c,w=d,b=a*p+c,y=b;if(0!==o||0!==i){const e=o*u,t=o*l,r=i*f,n=i*p;h+=r;g+=r;m+=n;_+=n;d+=e;y+=e;b+=t;w+=t}r[0]=Math.min(r[0],h,m,Math.min(_,g));r[1]=Math.min(r[1],d,b,Math.min(w,y));r[2]=Math.max(r[2],h,m,Math.max(_,g));r[3]=Math.max(r[3],d,b,Math.max(w,y))}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e,t){const r=e[0],n=e[1],o=e[2],i=e[3],a=r**2+n**2,s=r*o+n*i,c=o**2+i**2,u=(a+c)/2,f=Math.sqrt(u**2-(a*c-s**2));t[0]=Math.sqrt(u+f||1);t[1]=Math.sqrt(u-f||1)}static normalizeRect(e){const t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>n)return null;const o=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return o>i?null:[r,o,n,i]}static pointBoundingBox(e,t,r){r[0]=Math.min(r[0],e);r[1]=Math.min(r[1],t);r[2]=Math.max(r[2],e);r[3]=Math.max(r[3],t)}static rectBoundingBox(e,t,r,n,o){o[0]=Math.min(o[0],e,r);o[1]=Math.min(o[1],t,n);o[2]=Math.max(o[2],e,r);o[3]=Math.max(o[3],t,n)}static#e(e,t,r,n,o,i,a,s,c,u){if(c<=0||c>=1)return;const f=1-c,l=c*c,p=l*c,h=f*(f*(f*e+3*c*t)+3*l*r)+p*n,_=f*(f*(f*o+3*c*i)+3*l*a)+p*s;u[0]=Math.min(u[0],h);u[1]=Math.min(u[1],_);u[2]=Math.max(u[2],h);u[3]=Math.max(u[3],_)}static#t(e,t,r,n,o,i,a,s,c,u,f,l){if(Math.abs(c)<1e-12){Math.abs(u)>=1e-12&&this.#e(e,t,r,n,o,i,a,s,-f/u,l);return}const p=u**2-4*f*c;if(p<0)return;const h=Math.sqrt(p),_=2*c;this.#e(e,t,r,n,o,i,a,s,(-u+h)/_,l);this.#e(e,t,r,n,o,i,a,s,(-u-h)/_,l)}static bezierBoundingBox(e,t,r,n,o,i,a,s,c){c[0]=Math.min(c[0],e,a);c[1]=Math.min(c[1],t,s);c[2]=Math.max(c[2],e,a);c[3]=Math.max(c[3],t,s);this.#t(e,r,o,a,t,n,i,s,3*(3*(r-o)-e+a),6*(e-2*r+o),3*(r-e),c);this.#t(e,r,o,a,t,n,i,s,3*(3*(n-i)-t+s),6*(t-2*n+i),3*(n-t),c)}}const makeArr=()=>[];"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 Iterator.prototype.join&&(Iterator.prototype.join=function(e){return[...this].join(e)});const Ft=async function JBig2(e={}){var t=e,quit_=(e,t)=>{throw t},r=import.meta.url;try{new URL(".",r).href}catch{}0;console.log.bind(console);var n,o,i=console.error.bind(console),a=!1;function updateMemoryViews(){if(!o?.buffer?.resizable){var e=function getMemoryBuffer(){return _.buffer}();o=new Int8Array(e);s=new Uint8Array(e)}}class ExitStatus{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`;this.status=e}}var s,callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(t)},c=[],u=[],f=!0,l=0,p={},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return n;quit_(0,e)},keepRuntimeAlive=()=>f||l>0,_proc_exit=e=>{n=e;if(!keepRuntimeAlive()){t.onExit?.(e);a=!0}quit_(0,new ExitStatus(e))},_exit=(e,t)=>{n=e;_proc_exit(e)},callUserCallback=e=>{if(!a)try{return e()}catch(e){handleException(e)}finally{(()=>{if(!keepRuntimeAlive())try{_exit(n)}catch(e){handleException(e)}})()}},alignMemory=(e,t)=>Math.ceil(e/t)*t,growMemory=e=>{var t=(e-_.buffer.byteLength+65535)/65536|0;try{_.grow(t);updateMemoryViews();return 1}catch(e){}};t.noExitRuntime&&(f=t.noExitRuntime);t.print&&t.print;t.printErr&&(i=t.printErr);t.arguments&&t.arguments;t.thisProgram&&t.thisProgram;var h,_,m=t.preInit;if(m){"function"==typeof m&&(t.preInit=m=[m]);for(;m.length>0;)m.shift()()}t.writeArrayToMemory=(e,t)=>{o.set(e,t)};var g,d={e:()=>function abort(e){t.onAbort?.(e);i(e=`Aborted(${e})`);a=!0;e+=". Build with -sASSERTIONS for more info.";throw new WebAssembly.RuntimeError(e)}(""),d:()=>{f=!1;l=0},a:(e,t)=>{if(p[e]){clearTimeout(p[e].id);delete p[e]}if(!t)return 0;var r=setTimeout(()=>{delete p[e];callUserCallback(()=>h(e,performance.now()))},t);p[e]={id:r,timeout_ms:t};return 0},g:function _createImageData(e){t.imageData=new Uint8Array(e)},b:e=>{var t=s.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,alignMemory(Math.max(e,o),65536));if(growMemory(i))return!0}return!1},c:_proc_exit,h:function _setImageData(e,r,n,o){if(n===r){t.imageData=new Uint8ClampedArray(s.subarray(e,e+n*o));return}const i=r*o,a=t.imageData=new Uint8ClampedArray(i);for(let t=e,o=0;o<i;t+=n,o+=r)a.set(s.subarray(t,t+r),o)},f:function _setLineData(e,r,n){t.imageData.set(s.subarray(e,e+r),n)}};g=await async function createWasm(){function receiveInstance(e){!function assignWasmExports(e){t._malloc=e.k;t._free=e.l;t._jbig2_decode=e.m;t._ccitt_decode=e.n;h=e.o;_=e.i;e.__indirect_function_table}(g=e.exports);updateMemoryViews();return g}var e=function getWasmImports(){return{a:d}}(),r=t.instantiateWasm;return new Promise(t=>{r(e,e=>t(receiveInstance(e)))})}();await async function run(){!function preRun(){var e=t.preRun;if(e){"function"==typeof e&&(e=[e]);u.push(...e)}callRuntimeCallbacks(u)}();var e=t.setStatus;if(e){e("Running...");await new Promise(e=>setTimeout(e,1));setTimeout(e,1,"")}if(!a){!function initRuntime(){0;g.j()}();t.onRuntimeInitialized?.();!function postRun(){var e=t.postRun;if(e){"function"==typeof e&&(e=[e]);c.push(...e)}callRuntimeCallbacks(c)}()}}();return t};dt();bt();Symbol("CIRCULAR_REF"),Symbol("EOF"),new Map;const Lt=new Map,Gt=new Map;class Name{constructor(e){this.name=e}static get(e){let t=Lt.get(e);if(!t){t=new Name(e);Lt.set(e,t)}return t}}const nonSerializable=()=>nonSerializable;class Dict{__nonSerializable__=nonSerializable;#r=new Map;objId=null;suppressEncryption=!1;xref;constructor(e=null){this.xref=e}assignXref(e){this.xref=e}get size(){return this.#r.size}#n(e,t,r){let n=this.#r.get(t);void 0===n&&void 0!==r&&(n=this.#r.get(r));return n instanceof Ref&&this.xref?e?this.xref.fetchAsync(n,this.suppressEncryption):this.xref.fetch(n,this.suppressEncryption):n}get(e,t){return this.#n(!1,e,t)}async getAsync(e,t){return this.#n(!0,e,t)}getArray(e,t){let r=this.#n(!1,e,t);if(Array.isArray(r)){r=r.slice();for(let e=0,t=r.length;e<t;e++)r[e]instanceof Ref&&this.xref&&(r[e]=this.xref.fetch(r[e],this.suppressEncryption))}return r}getRaw(e){return this.#r.get(e)}getKeys(){return this.#r.keys()}getRawValues(){return this.#r.values()}getRawEntries(){return this.#r.entries()}set(e,t){this.#r.set(e,t)}setIfNotExists(e,t){this.has(e)||this.set(e,t)}setIfNumber(e,t){"number"==typeof t&&this.set(e,t)}setIfArray(e,t){(Array.isArray(t)||ArrayBuffer.isView(t))&&this.set(e,t)}setIfDefined(e,t){null!=t&&this.set(e,t)}setIfName(e,t){"string"==typeof t?this.set(e,Name.get(t)):t instanceof Name&&this.set(e,t)}setIfDict(e,t){t instanceof Dict&&this.set(e,t)}has(e){return this.#r.has(e)}*[Symbol.iterator](){for(const[e,t]of this.#r)yield[e,t instanceof Ref&&this.xref?this.xref.fetch(t,this.suppressEncryption):t]}static get empty(){const e=new Dict(null);e.set=(e,t)=>{unreachable("Should not call `set` on the empty dictionary.")};return util_shadow(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:r=!1}){const n=new Dict(e),o=new Map;for(const e of t)if(e instanceof Dict)for(const[t,n]of e.getRawEntries()){const e=o.getOrInsertComputed(t,makeArr);(!e.length||r&&n instanceof Dict)&&e.push(n)}for(const[t,r]of o){if(1===r.length||!(r[0]instanceof Dict)){n.set(t,r[0]);continue}const o=new Dict(e);for(const e of r)for(const[t,r]of e.getRawEntries())o.setIfNotExists(t,r);o.size>0&&n.set(t,o)}o.clear();return n.size>0?n:Dict.empty}clone(){const e=new Dict(this.xref);for(const[t,r]of this.#r)e.set(t,r);return e}delete(e){this.#r.delete(e)}}class Ref{#o;constructor(e,t,r){this.#o=e;this.num=t;this.gen=r}toString(){return this.#o}static fromString(e){let t=Gt.get(e);if(t)return t;const r=/^([1-9]\d*)R([1-9]\d*)?$/.exec(e);if(!r)return null;t=new Ref(e,parseInt(r[1],10),r[2]?parseInt(r[2],10):0);Gt.set(e,t);return t}static get(e,t){const r=0===t?`${e}R`:`${e}R${t}`;let n=Gt.get(r);if(!n){n=new Ref(r,e,t);Gt.set(r,n)}return n}}Symbol.iterator;Symbol.iterator;class BaseStream{get length(){unreachable("Abstract getter `length` accessed")}get isEmpty(){unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return util_shadow(this,"isDataLoaded",!0)}getByte(){unreachable("Abstract method `getByte` called")}getBytes(e){unreachable("Abstract method `getBytes` called")}async getImageData(e,t){return this.getBytes(e,t)}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(e,t){return null}peekByte(){const e=this.getByte();-1!==e&&this.pos--;return e}peekBytes(e){const t=this.getBytes(e);this.pos-=t.length;return t}getUint16(){const e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){unreachable("Abstract method `getByteRange` called")}getString(e){return bytesToString(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){unreachable("Abstract method `reset` called")}moveStart(){unreachable("Abstract method `moveStart` called")}makeSubStream(e,t,r=null){unreachable("Abstract method `makeSubStream` called")}clone(){unreachable("Abstract method `clone` called")}getBaseStreams(){return null}getOriginalStream(){return this.stream?.getOriginalStream()||this}}Object.create(null);class MissingDataException extends Ut{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException");this.begin=e;this.end=t}}class WasmImage{static#i=null;static#a=new Set;static#s=!0;static#c=!0;static#u=null;#f=null;#l=null;_filename=null;_noWasmFilename=null;static setOptions({getHandler:e,useWasm:t,useWorkerFetch:r,wasmUrl:n}){WasmImage.#s=t;WasmImage.#c=r;WasmImage.#u=n;r||(WasmImage.#i=e)}static get instance(){unreachable("Abstract getter `instance` accessed")}static cleanup(){for(const e of WasmImage.#a)e.#l=null}constructor(e=!1){e&&WasmImage.#a.add(this)}async#p(e){const{default:t}=await(import(
/*webpackIgnore: true*/
/*@vite-ignore*/
`${WasmImage.#u}${this._noWasmFilename}`));return{exports:t(e)}}async#h(e){this.#f||(WasmImage.#c?this.#f=await async function fetchBinaryData(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file "${e}" with "${t.statusText}".`);return t.bytes()}(`${WasmImage.#u}${this._filename}`):this.#f=await WasmImage.#i().sendWithPromise("FetchBinaryData",{kind:"wasmUrl",filename:this._filename}));return(await WebAssembly.instantiate(this.#f,e)).instance}async#_(e,t,r){if(WasmImage.#s)try{return r(await this.#h(t))}catch(e){warn(`#getWasmInstance: ${e}`)}try{return r(await this.#p(t))}catch(e){warn(`#getJsInstance: ${e}`)}e(null);return null}_getModule(e){if(!this.#l){const{promise:t,resolve:r}=Promise.withResolvers();this.#l=Promise.race([t,e({warn,instantiateWasm:this.#_.bind(this,r)})])}return this.#l}async decode(e,t){unreachable("Abstract method `decode` called")}}class Jbig2Error extends Ut{constructor(e){super(e,"Jbig2Error")}}class JBig2CCITTFaxImage extends WasmImage{_filename="jbig2.wasm";_noWasmFilename="jbig2_nowasm_fallback.js";static get instance(){return util_shadow(this,"instance",new JBig2CCITTFaxImage(!0))}async decode(e,t,r,n,o){const i=await this._getModule(Ft);if(!i)throw new Jbig2Error("JBig2 failed to initialize");let a,s;try{const c=e.length;a=i._malloc(c);i.writeArrayToMemory(e,a);if(o)i._ccitt_decode(a,c,t,r,o.K,o.EndOfLine?1:0,o.EncodedByteAlign?1:0,o.BlackIs1?1:0,o.Columns,o.Rows);else{const e=n?n.length:0;if(e>0){s=i._malloc(e);i.writeArrayToMemory(n,s)}i._jbig2_decode(a,c,t,r,s,e)}if(!i.imageData)throw new Jbig2Error("Unknown error");const{imageData:u}=i;i.imageData=null;return u}finally{a&&i._free(a);s&&i._free(s)}}}function MathClamp(e,t,r){return Math.min(Math.max(e,t),r)}function isDefaultDecodeHelper(e,t){if(!Array.isArray(e))return!0;const r=e.length;if(r<t){warn("Decode map length is too short.");return!0}if(r>t){info("Truncating too long decode map.");e.length=t}return!1}class ColorSpace{static#m=new Uint8ClampedArray(3);constructor(e,t){this.name=e;this.numComps=t}getRgb(e,t,r=new Uint8ClampedArray(3)){this.getRgbItem(e,t,r,0);return r}getRgbHex(e,t){const r=this.getRgb(e,t,ColorSpace.#m);return Util.makeHexColor(r[0],r[1],r[2])}getRgbItem(e,t,r,n){unreachable("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,r,n,o,i,a){unreachable("Should not call ColorSpace.getRgbBuffer")}getRgbItems(e,t,r,n,o){const{numComps:i}=this;for(let a=0,s=0;a<t;a++,s+=i){this.getRgbItem(e,s,r,n);n+=3+o}}isPassthrough(e){return!1}getColorMap(e){const t=1<<e,r=e<=8?new Uint8Array(t):new Uint16Array(t);for(let e=0;e<t;e++)r[e]=e;const n=new Uint8ClampedArray(3*t);this.getRgbBuffer(r,0,t,n,0,e,0);return n}isDefaultDecode(e,t){return ColorSpace.isDefaultDecode(e,this.numComps)}fillRgb(e,t,r,n,o,i,a,s,c){const u=t*r;let f=null;const l=1<<a,p=r!==o||t!==n;if(this.isPassthrough(a))f=s;else if(1===this.numComps&&u>l&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=this.getColorMap(a);if(p){f=new Uint8Array(3*u);let e=0;for(let r=0;r<u;++r){const n=3*s[r];f[e++]=t[n];f[e++]=t[n+1];f[e++]=t[n+2]}}else{let r=0;for(let n=0;n<u;++n){const o=3*s[n];e[r++]=t[o];e[r++]=t[o+1];e[r++]=t[o+2];r+=c}}}else if(p){f=new Uint8ClampedArray(3*u);this.getRgbBuffer(s,0,u,f,0,a,0)}else this.getRgbBuffer(s,0,n*i,e,0,a,c);if(f)if(p)!function resizeRgbImage(e,t,r,n,o,i,a){a=1!==a?0:a;const s=r/o,c=n/i;let u,f=0;const l=new Uint32Array(o),p=3*r;for(let e=0;e<o;e++)l[e]=3*Math.floor(e*s);for(let r=0;r<i;r++){const n=Math.floor(r*c)*p;for(let r=0;r<o;r++){u=n+l[r];t[f++]=e[u++];t[f++]=e[u++];t[f++]=e[u++];f+=a}}}(f,e,t,r,n,o,c);else{let t=0,r=0;for(let o=0,a=n*i;o<a;o++){e[t++]=f[r++];e[t++]=f[r++];e[t++]=f[r++];t+=c}}}get usesZeroToOneRange(){return util_shadow(this,"usesZeroToOneRange",!0)}static isDefaultDecode(e,t){if(isDefaultDecodeHelper(e,2*t))return!0;for(let t=0,r=e.length;t<r;t+=2)if(0!==e[t]||1!==e[t+1])return!1;return!0}}class AlternateCS extends ColorSpace{constructor(e,t,r){super("Alternate",e);this.base=t;this.tintFn=r;this.tmpBuf=new Float32Array(t.numComps)}getRgbItem(e,t,r,n){const o=this.tmpBuf;this.tintFn(e,t,o,0);this.base.getRgbItem(o,0,r,n)}getRgbItems(e,t,r,n,o){const{base:i,numComps:a,tintFn:s}=this,c=i.numComps,u=new Float32Array(t*c);for(let r=0,n=0,o=0;r<t;r++){s(e,n,u,o);n+=a;o+=c}i.getRgbItems(u,t,r,n,o)}getRgbBuffer(e,t,r,n,o,i,a){const s=this.tintFn,c=this.base,u=1/((1<<i)-1),f=c.numComps,l=c.usesZeroToOneRange,p=(c.isPassthrough(8)||!l)&&0===a;let h=p?o:0;const _=p?n:new Uint8ClampedArray(f*r),m=this.numComps,g=new Float32Array(m),d=new Float32Array(f);let w,b;for(w=0;w<r;w++){for(b=0;b<m;b++)g[b]=e[t++]*u;s(g,0,d,0);if(l)for(b=0;b<f;b++)_[h++]=255*d[b];else{c.getRgbItem(d,0,_,h);h+=f}}p||c.getRgbBuffer(_,0,r,n,o,8,a)}}class PatternCS extends ColorSpace{constructor(e){super("Pattern",null);this.base=e}isDefaultDecode(e,t){unreachable("Should not call PatternCS.isDefaultDecode")}}class IndexedCS extends ColorSpace{#g;constructor(e,t,r){super("Indexed",1);this.highVal=t;const n=t+1,o=e.numComps*n,i=new Uint8Array(o);if(r instanceof BaseStream)i.set(r.getBytes(o));else{if("string"!=typeof r)throw new FormatError(`IndexedCS - unrecognized lookup table: ${r}`);for(let e=0;e<o;++e)i[e]=r.charCodeAt(e)}this.#g=new Uint8ClampedArray(3*n);e.getRgbBuffer(i,0,n,this.#g,0,8,0)}getRgbItem(e,t,r,n){const o=this.#g,i=3*MathClamp(Math.round(e[t]),0,this.highVal);r[n]=o[i];r[n+1]=o[i+1];r[n+2]=o[i+2]}getRgbBuffer(e,t,r,n,o,i,a){const{highVal:s}=this,c=this.#g;for(let i=0;i<r;++i){const r=3*MathClamp(Math.round(e[t++]),0,s);n[o++]=c[r];n[o++]=c[r+1];n[o++]=c[r+2];o+=a}}isDefaultDecode(e,t){if(isDefaultDecodeHelper(e,2))return!0;if(!Number.isInteger(t)||t<1){warn("Bits per component is not correct");return!0}return 0===e[0]&&e[1]===(1<<t)-1}}class DeviceGrayCS extends ColorSpace{constructor(){super("DeviceGray",1)}getRgbItem(e,t,r,n){const o=255*e[t];r[n]=r[n+1]=r[n+2]=o}getRgbBuffer(e,t,r,n,o,i,a){const s=255/((1<<i)-1);let c=t,u=o;for(let t=0;t<r;++t){const t=s*e[c++];n[u++]=t;n[u++]=t;n[u++]=t;u+=a}}}class DeviceRgbCS extends ColorSpace{constructor(){super("DeviceRGB",3)}getRgbItem(e,t,r,n){r[n]=255*e[t];r[n+1]=255*e[t+1];r[n+2]=255*e[t+2]}getRgbBuffer(e,t,r,n,o,i,a){if(8===i&&0===a){n.set(e.subarray(t,t+3*r),o);return}const s=255/((1<<i)-1);let c=t,u=o;for(let t=0;t<r;++t){n[u++]=s*e[c++];n[u++]=s*e[c++];n[u++]=s*e[c++];u+=a}}isPassthrough(e){return 8===e}}class DeviceRgbaCS extends ColorSpace{constructor(){super("DeviceRGBA",4)}isPassthrough(e){return 8===e}fillRgb(e,t,r,n,o,i,a,s,c){r!==o||t!==n?function resizeRgbaImage(e,t,r,n,o,i,a){const s=r/o,c=n/i;let u=0;const f=new Uint32Array(o);if(1===a){for(let e=0;e<o;e++)f[e]=Math.floor(e*s);const n=new Uint32Array(e.buffer),a=new Uint32Array(t.buffer),l=FeatureTest.isLittleEndian?16777215:4294967040;for(let e=0;e<i;e++){const t=n.subarray(Math.floor(e*c)*r);for(let e=0;e<o;e++)a[u++]|=t[f[e]]&l}}else{const n=4,a=r*n;for(let e=0;e<o;e++)f[e]=Math.floor(e*s)*n;for(let r=0;r<i;r++){const n=e.subarray(Math.floor(r*c)*a);for(let e=0;e<o;e++){const r=f[e];t[u++]=n[r];t[u++]=n[r+1];t[u++]=n[r+2]}}}}(s,e,t,r,n,o,c):function copyRgbaImage(e,t,r){if(1===r){const r=new Uint32Array(e.buffer),n=new Uint32Array(t.buffer),o=FeatureTest.isLittleEndian?16777215:4294967040;for(let e=0,t=r.length;e<t;e++)n[e]|=r[e]&o}else{let r=0;for(let n=0,o=e.length;n<o;n+=4){t[r++]=e[n];t[r++]=e[n+1];t[r++]=e[n+2]}}}(s,e,c)}}class DeviceCmykCS extends ColorSpace{constructor(){super("DeviceCMYK",4)}#d(e,t,r,n,o){const i=e[t]*r,a=e[t+1]*r,s=e[t+2]*r,c=e[t+3]*r;n[o]=255+i*(-4.387332384609988*i+54.48615194189176*a+18.82290502165302*s+212.25662451639585*c-285.2331026137004)+a*(1.7149763477362134*a-5.6096736904047315*s+-17.873870861415444*c-5.497006427196366)+s*(-2.5217340131683033*s-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747);n[o+1]=255+i*(8.841041422036149*i+60.118027045597366*a+6.871425592049007*s+31.159100130055922*c-79.2970844816548)+a*(-15.310361306967817*a+17.575251261109482*s+131.35250912493976*c-190.9453302588951)+s*(4.444339102852739*s+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578);n[o+2]=255+i*(.8842522430003296*i+8.078677503112928*a+30.89978309703729*s-.23883238689178934*c-14.183576799673286)+a*(10.49593273432072*a+63.02378494754052*s+50.606957656360734*c-112.23884253719248)+s*(.03296041114873217*s+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}getRgbItem(e,t,r,n){this.#d(e,t,1,r,n)}getRgbBuffer(e,t,r,n,o,i,a){const s=1/((1<<i)-1);for(let i=0;i<r;i++){this.#d(e,t,s,n,o);t+=4;o+=3+a}}}class CalGrayCS extends ColorSpace{constructor(e,t,r){super("CalGray",1);if(!e)throw new FormatError("WhitePoint missing - required for color space CalGray");[this.XW,this.YW,this.ZW]=e;[this.XB,this.YB,this.ZB]=t||[0,0,0];this.G=r||1;if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(this.XB<0||this.YB<0||this.ZB<0){info(`Invalid BlackPoint for ${this.name}, falling back to default.`);this.XB=this.YB=this.ZB=0}0===this.XB&&0===this.YB&&0===this.ZB||warn(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`);if(this.G<1){info(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`);this.G=1}}#d(e,t,r,n,o){const i=(e[t]*o)**this.G,a=this.YW*i,s=Math.max(295.8*a**.3333333333333333-40.8,0);r[n]=s;r[n+1]=s;r[n+2]=s}getRgbItem(e,t,r,n){this.#d(e,t,r,n,1)}getRgbBuffer(e,t,r,n,o,i,a){const s=1/((1<<i)-1);for(let i=0;i<r;++i){this.#d(e,t,n,o,s);t+=1;o+=3+a}}}class CalRGBCS extends ColorSpace{static#w=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#b=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#y=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#v=new Float32Array([1,1,1]);static#x=new Float32Array(3);static#k=new Float32Array(3);static#C=new Float32Array(3);static#A=(24/116)**3/8;constructor(e,t,r,n){super("CalRGB",3);if(!e)throw new FormatError("WhitePoint missing - required for color space CalRGB");const[o,i,a]=this.whitePoint=e,[s,c,u]=this.blackPoint=t||new Float32Array(3);[this.GR,this.GG,this.GB]=r||new Float32Array([1,1,1]);[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=n||new Float32Array([1,0,0,0,1,0,0,0,1]);if(o<0||a<0||1!==i)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(s<0||c<0||u<0){info(`Invalid BlackPoint for ${this.name} [${s}, ${c}, ${u}], falling back to default.`);this.blackPoint=new Float32Array(3)}if(this.GR<0||this.GG<0||this.GB<0){info(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`);this.GR=this.GG=this.GB=1}}#S(e,t,r){r[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];r[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2];r[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]}#I(e,t,r){r[0]=1*t[0]/e[0];r[1]=1*t[1]/e[1];r[2]=1*t[2]/e[2]}#R(e,t,r){r[0]=.95047*t[0]/e[0];r[1]=1*t[1]/e[1];r[2]=1.08883*t[2]/e[2]}#B(e){return e<=.0031308?MathClamp(12.92*e,0,1):e>=.99554525?1:MathClamp(1.055*e**(1/2.4)-.055,0,1)}#M(e){return e<0?-this.#M(-e):e>8?((e+16)/116)**3:e*CalRGBCS.#A}#E(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2]){r[0]=t[0];r[1]=t[1];r[2]=t[2];return}const n=this.#M(0),o=(1-n)/(1-this.#M(e[0])),i=1-o,a=(1-n)/(1-this.#M(e[1])),s=1-a,c=(1-n)/(1-this.#M(e[2])),u=1-c;r[0]=t[0]*o+i;r[1]=t[1]*a+s;r[2]=t[2]*c+u}#D(e,t,r){if(1===e[0]&&1===e[2]){r[0]=t[0];r[1]=t[1];r[2]=t[2];return}const n=r;this.#S(CalRGBCS.#w,t,n);const o=CalRGBCS.#x;this.#I(e,n,o);this.#S(CalRGBCS.#b,o,r)}#q(e,t,r){const n=r;this.#S(CalRGBCS.#w,t,n);const o=CalRGBCS.#x;this.#R(e,n,o);this.#S(CalRGBCS.#b,o,r)}#d(e,t,r,n,o){const i=MathClamp(e[t]*o,0,1),a=MathClamp(e[t+1]*o,0,1),s=MathClamp(e[t+2]*o,0,1),c=1===i?1:i**this.GR,u=1===a?1:a**this.GG,f=1===s?1:s**this.GB,l=this.MXA*c+this.MXB*u+this.MXC*f,p=this.MYA*c+this.MYB*u+this.MYC*f,h=this.MZA*c+this.MZB*u+this.MZC*f,_=CalRGBCS.#k;_[0]=l;_[1]=p;_[2]=h;const m=CalRGBCS.#C;this.#D(this.whitePoint,_,m);const g=CalRGBCS.#k;this.#E(this.blackPoint,m,g);const d=CalRGBCS.#C;this.#q(CalRGBCS.#v,g,d);const w=CalRGBCS.#k;this.#S(CalRGBCS.#y,d,w);r[n]=255*this.#B(w[0]);r[n+1]=255*this.#B(w[1]);r[n+2]=255*this.#B(w[2])}getRgbItem(e,t,r,n){this.#d(e,t,r,n,1)}getRgbBuffer(e,t,r,n,o,i,a){const s=1/((1<<i)-1);for(let i=0;i<r;++i){this.#d(e,t,n,o,s);t+=3;o+=3+a}}}class LabCS extends ColorSpace{constructor(e,t,r){super("Lab",3);if(!e)throw new FormatError("WhitePoint missing - required for color space Lab");[this.XW,this.YW,this.ZW]=e;[this.amin,this.amax,this.bmin,this.bmax]=r||[-100,100,-100,100];[this.XB,this.YB,this.ZB]=t||[0,0,0];if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError("Invalid WhitePoint components, no fallback available");if(this.XB<0||this.YB<0||this.ZB<0){info("Invalid BlackPoint, falling back to default");this.XB=this.YB=this.ZB=0}if(this.amin>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}}#T(e){return e>=6/29?e**3:108/841*(e-4/29)}#O(e,t,r,n){return r+e*(n-r)/t}#d(e,t,r,n,o){let i=e[t],a=e[t+1],s=e[t+2];if(!1!==r){i=this.#O(i,r,0,100);a=this.#O(a,r,this.amin,this.amax);s=this.#O(s,r,this.bmin,this.bmax)}a>this.amax?a=this.amax:a<this.amin&&(a=this.amin);s>this.bmax?s=this.bmax:s<this.bmin&&(s=this.bmin);const c=(i+16)/116,u=c+a/500,f=c-s/200,l=this.XW*this.#T(u),p=this.YW*this.#T(c),h=this.ZW*this.#T(f);let _,m,g;if(this.ZW<1){_=3.1339*l+-1.617*p+-.4906*h;m=-.9785*l+1.916*p+.0333*h;g=.072*l+-.229*p+1.4057*h}else{_=3.2406*l+-1.5372*p+-.4986*h;m=-.9689*l+1.8758*p+.0415*h;g=.0557*l+-.204*p+1.057*h}n[o]=255*Math.sqrt(_);n[o+1]=255*Math.sqrt(m);n[o+2]=255*Math.sqrt(g)}getRgbItem(e,t,r,n){this.#d(e,t,!1,r,n)}getRgbBuffer(e,t,r,n,o,i,a){const s=(1<<i)-1;for(let i=0;i<r;i++){this.#d(e,t,s,n,o);t+=3;o+=3+a}}isDefaultDecode(e,t){return!0}get usesZeroToOneRange(){return util_shadow(this,"usesZeroToOneRange",!1)}}const jt=1===new Uint8Array(new Uint32Array([1]).buffer)[0]?4278190080:255,Wt=~jt;class QCMS{static#P=null;static _memory=null;static _destBuffer=null;static _destOffset=0;static _keepAlpha=!1;static get _memoryArray(){const e=this.#P;return e?.byteLength?e:this.#P=new Uint8Array(this._memory.buffer)}}const Nt=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"}),zt=Object.freeze({Perceptual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});function qcms_convert_array(e,t,r){const n=passArray8ToWasm0(t,Zt.__wbindgen_malloc),o=Kt;Zt.qcms_convert_array(e,n,o,r)}function __wbg_get_imports(){return{__proto__:null,"./qcms_bg.js":{__proto__:null,__wbg___wbindgen_throw_344f42d3211c4765:function(e,t){throw new Error(function getStringFromWasm0(e,t){return function decodeText(e,t){Vt+=t;if(Vt>=$t){Yt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Yt.decode();Vt=t}return Yt.decode(getUint8ArrayMemory0().subarray(e,e+t))}(e>>>0,t)}(e,t))},__wbg_copy_result_0d15f3bf9d9012ae:function(e,t){!function copy_result(e,t){const{_destBuffer:r,_destOffset:n,_keepAlpha:o,_memoryArray:i}=QCMS;if(!o){r.set(i.subarray(e,e+t),n);return}const a=t>>2,s=r.byteOffset+n;if(!(3&(s|e))){const t=new Uint32Array(r.buffer,s,a),n=new Uint32Array(QCMS._memory.buffer,e,a);for(let e=0;e<a;e++)t[e]=t[e]&jt|n[e]&Wt;return}for(let o=e,a=e+t,s=n;o<a;o+=4,s+=4){r[s]=i[o];r[s+1]=i[o+1];r[s+2]=i[o+2]}}(e>>>0,t>>>0)},__wbindgen_init_externref_table:function(){const e=Zt.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0);e.set(t+0,void 0);e.set(t+1,null);e.set(t+2,!0);e.set(t+3,!1)}}}}let Jt=null;function getUint8ArrayMemory0(){null!==Jt&&0!==Jt.byteLength||(Jt=new Uint8Array(Zt.memory.buffer));return Jt}function passArray8ToWasm0(e,t){const r=t(1*e.length,1)>>>0;getUint8ArrayMemory0().set(e,r/1);Kt=e.length;return r}let Yt=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Yt.decode();const $t=2146435072;let Vt=0;let Ht,Xt,Zt,Kt=0;function __wbg_finalize_init(e,t){Xt=e;Zt=e.exports;Ht=t;Jt=null;Zt.__wbindgen_start();return Zt}function fetchSync(e){const t=new XMLHttpRequest;t.open("GET",e,!1);t.responseType="arraybuffer";t.send(null);return t.response}class IccColorSpace extends ColorSpace{#U;#F;static#s=!0;static#u=null;static#L=null;constructor(e,t,r){if(!IccColorSpace.isUsable)throw new Error("No ICC color space support");super(t,r);let n;switch(r){case 1:n=Nt.Gray8;this.#F=(e,t)=>function qcms_convert_one(e,t){return Zt.qcms_convert_one(e,t)>>>0}(this.#U,255*e[t]);break;case 3:n=Nt.RGB8;this.#F=(e,t)=>function qcms_convert_three(e,t,r,n){return Zt.qcms_convert_three(e,t,r,n)>>>0}(this.#U,255*e[t],255*e[t+1],255*e[t+2]);break;case 4:n=Nt.CMYK;this.#F=(e,t)=>function qcms_convert_four(e,t,r,n,o){return Zt.qcms_convert_four(e,t,r,n,o)>>>0}(this.#U,255*e[t],255*e[t+1],255*e[t+2],255*e[t+3]);break;default:throw new Error(`Unsupported number of components: ${r}`)}this.#U=function qcms_transformer_from_memory(e,t,r){const n=passArray8ToWasm0(e,Zt.__wbindgen_malloc),o=Kt;return Zt.qcms_transformer_from_memory(n,o,t,r)>>>0}(e,n,zt.Perceptual);if(!this.#U)throw new Error("Failed to create ICC color space");IccColorSpace.#L||=new FinalizationRegistry(e=>{!function qcms_drop_transformer(e){Zt.qcms_drop_transformer(e)}(e)});IccColorSpace.#L.register(this,this.#U)}getRgbHex(e,t){const r=this.#F(e,t);return Util.makeHexColor(r>>16,r>>8&255,255&r)}getRgbItem(e,t,r,n){const o=this.#F(e,t);r[n]=o>>16;r[n+1]=o>>8&255;r[n+2]=255&o}getRgbItems(e,t,r,n,o){const{numComps:i}=this,a=t*i,s=new Uint8Array(a);for(let t=0;t<a;t++)s[t]=255*e[t];QCMS._destBuffer=r;QCMS._destOffset=n;QCMS._keepAlpha=1===o;qcms_convert_array(this.#U,s,1===o);QCMS._destBuffer=null}getRgbBuffer(e,t,r,n,o,i,a){e=e.subarray(t,t+r*this.numComps);if(8!==i){const t=255/((1<<i)-1);for(let r=0,n=e.length;r<n;r++)e[r]*=t}QCMS._destBuffer=n;QCMS._destOffset=o;QCMS._keepAlpha=1===a&&n.buffer!==e.buffer;qcms_convert_array(this.#U,e,1===a);QCMS._destBuffer=null}static setOptions({useWasm:e,useWorkerFetch:t,wasmUrl:r}){if(t){this.#s=e;this.#u=r}else this.#s=!1}static get isUsable(){let e=!1;if(this.#s)if(this.#u)try{this._module=function initSync(e){if(void 0!==Zt)return Zt;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=__wbg_get_imports();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return __wbg_finalize_init(new WebAssembly.Instance(e,t),e)}({module:fetchSync(`${this.#u}qcms_bg.wasm`)});e=!!this._module;QCMS._memory=this._module.memory}catch(e){warn(`ICCBased color space: "${e}".`)}else warn("No ICC color space support due to missing `wasmUrl` API option");return util_shadow(this,"isUsable",e)}}class CmykICCBasedCS extends IccColorSpace{static#G;constructor(){super(new Uint8Array(fetchSync(`${CmykICCBasedCS.#G}CGATS001Compat-v2-micro.icc`)),"DeviceCMYK",4)}static setOptions({iccUrl:e}){this.#G=e}static get isUsable(){let e=!1;IccColorSpace.isUsable&&(this.#G?e=!0:warn("No CMYK ICC profile support due to missing `iccUrl` API option"));return util_shadow(this,"isUsable",e)}}class ColorSpaceUtils{static parse({cs:e,xref:t,resources:r=null,pdfFunctionFactory:n,globalColorSpaceCache:o,localColorSpaceCache:i,asyncIfNotCached:a=!1}){const s={xref:t,resources:r,pdfFunctionFactory:n,globalColorSpaceCache:o,localColorSpaceCache:i};let c,u,f;if(e instanceof Ref){u=e;const r=o.getByRef(u)||i.getByRef(u);if(r)return r;e=t.fetch(e)}if(e instanceof Name){c=e.name;const t=i.getByName(c);if(t)return t}try{f=this.#j(e,s)}catch(e){if(a&&!(e instanceof MissingDataException))return Promise.reject(e);throw e}if(c||u){i.set(c,u,f);u&&o.set(null,u,f)}return a?Promise.resolve(f):f}static#W(e,t){const{globalColorSpaceCache:r}=t;let n;if(e instanceof Ref){n=e;const t=r.getByRef(n);if(t)return t}const o=this.#j(e,t);n&&r.set(null,n,o);return o}static#j(e,t){const{xref:r,resources:n,pdfFunctionFactory:o,globalColorSpaceCache:i}=t;if((e=r.fetchIfRef(e))instanceof Name)switch(e.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 PatternCS(null);default:if(n instanceof Dict){const r=n.get("ColorSpace");if(r instanceof Dict){const n=r.get(e.name);if(n){if(n instanceof Name)return this.#j(n,t);e=n;break}}}warn(`Unrecognized ColorSpace: ${e.name}`);return this.gray}if(Array.isArray(e)){const n=r.fetchIfRef(e[0]).name;let a,s,c,u,f,l;switch(n){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"CMYK":case"DeviceCMYK":return this.cmyk;case"CalGray":a=r.fetchIfRef(e[1]);u=a.getArray("WhitePoint");f=a.getArray("BlackPoint");l=a.get("Gamma");return new CalGrayCS(u,f,l);case"CalRGB":a=r.fetchIfRef(e[1]);u=a.getArray("WhitePoint");f=a.getArray("BlackPoint");l=a.getArray("Gamma");const p=a.getArray("Matrix");return new CalRGBCS(u,f,l,p);case"ICCBased":const h=e[1]instanceof Ref;if(h){const t=i.getByRef(e[1]);if(t)return t}const _=r.fetchIfRef(e[1]),m=_.dict;s=m.get("N");if(IccColorSpace.isUsable)try{const t=new IccColorSpace(_.getBytes(),"ICCBased",s);h&&i.set(null,e[1],t);return t}catch(t){if(t instanceof MissingDataException)throw t;warn(`ICCBased color space (${e[1]}): "${t}".`)}const g=m.getRaw("Alternate");if(g){const e=this.#W(g,t);if(e.numComps===s)return e;warn("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===s)return this.gray;if(3===s)return this.rgb;if(4===s)return this.cmyk;break;case"Pattern":c=e[1]||null;c&&=this.#W(c,t);return new PatternCS(c);case"I":case"Indexed":c=this.#W(e[1],t);const d=MathClamp(r.fetchIfRef(e[2]),0,255),w=r.fetchIfRef(e[3]);return new IndexedCS(c,d,w);case"Separation":case"DeviceN":const b=r.fetchIfRef(e[1]);s=Array.isArray(b)?b.length:1;c=this.#W(e[2],t);const y=o.create(e[3]);return new AlternateCS(s,c,y);case"Lab":a=r.fetchIfRef(e[1]);u=a.getArray("WhitePoint");f=a.getArray("BlackPoint");const v=a.getArray("Range");return new LabCS(u,f,v);default:warn(`Unimplemented ColorSpace object: ${n}`);return this.gray}}warn(`Unrecognized ColorSpace object: ${e}`);return this.gray}static get gray(){return util_shadow(this,"gray",new DeviceGrayCS)}static get rgb(){return util_shadow(this,"rgb",new DeviceRgbCS)}static get rgba(){return util_shadow(this,"rgba",new DeviceRgbaCS)}static get cmyk(){if(CmykICCBasedCS.isUsable)try{return util_shadow(this,"cmyk",new CmykICCBasedCS)}catch{warn("CMYK fallback: DeviceCMYK")}return util_shadow(this,"cmyk",new DeviceCmykCS)}}class JpegError extends Ut{constructor(e){super(e,"JpegError")}}class DNLMarkerError extends Ut{constructor(e,t){super(e,"DNLMarkerError");this.scanLines=t}}class EOIMarkerError extends Ut{constructor(e){super(e,"EOIMarkerError")}}const Qt=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]),er=4017,tr=799,rr=3406,nr=2276,or=1567,ir=3784,ar=5793,sr=2896;function buildHuffmanTable(e,t){let r,n,o=0,i=16;for(;i>0&&!e[i-1];)i--;const a=[{children:[],index:0}];let s,c=a[0];for(r=0;r<i;r++){for(n=0;n<e[r];n++){c=a.pop();c.children[c.index]=t[o];for(;c.index>0;)c=a.pop();c.index++;a.push(c);for(;a.length<=r;){a.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}o++}if(r+1<i){a.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}}return a[0].children}function getBlockBufferOffset(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function decodeScan(e,t,r,n,o,i,a,s,c,u,f=!1){const l=n.mcusPerLine,p=n.progressive,h=r;let _=0,m=0;function readBit(){if(m>0){m--;return _>>m&1}_=e[r++];if(255===_){const o=e[r++];if(o){if(220===o&&f){r+=2;const e=t.getUint16(r);r+=2;if(e>0&&e!==n.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",e)}else if(217===o){if(f){const e=b*(8===n.precision?8:0);if(e>0&&Math.round(n.scanLines/e)>=5)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 ${(_<<8|o).toString(16)}`)}}m=7;return _>>>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<<e-1?t:t+(-1<<e)+1}let g=0;let d,w=0;let b=0;function decodeMcu(e,t,r,n,o){const i=r%l;b=(r/l|0)*e.v+n;const a=i*e.h+o;t(e,getBlockBufferOffset(e,b,a))}function decodeBlock(e,t,r){b=r/e.blocksPerLine|0;const n=r%e.blocksPerLine;t(e,getBlockBufferOffset(e,b,n))}const y=o.length;let v,x,k,C,A,S;S=p?0===a?0===c?function decodeDCFirst(e,t){const r=decodeHuffman(e.huffmanTableDC),n=0===r?0:receiveAndExtend(r)<<u;e.blockData[t]=e.pred+=n}:function decodeDCSuccessive(e,t){e.blockData[t]|=readBit()<<u}:0===c?function decodeACFirst(e,t){if(g>0){g--;return}let r=a;const n=s;for(;r<=n;){const n=decodeHuffman(e.huffmanTableAC),o=15&n,i=n>>4;if(0===o){if(i<15){g=receive(i)+(1<<i)-1;break}r+=16;continue}r+=i;const a=Qt[r];e.blockData[t+a]=receiveAndExtend(o)*(1<<u);r++}}:function decodeACSuccessive(e,t){let r=a;const n=s;let o,i,c=0;for(;r<=n;){const n=t+Qt[r],a=e.blockData[n]<0?-1:1;switch(w){case 0:i=decodeHuffman(e.huffmanTableAC);o=15&i;c=i>>4;if(0===o)if(c<15){g=receive(c)+(1<<c);w=4}else{c=16;w=1}else{if(1!==o)throw new JpegError("invalid ACn encoding");d=receiveAndExtend(o);w=c?2:3}continue;case 1:case 2:if(e.blockData[n])e.blockData[n]+=a*(readBit()<<u);else{c--;0===c&&(w=2===w?3:0)}break;case 3:if(e.blockData[n])e.blockData[n]+=a*(readBit()<<u);else{e.blockData[n]=d<<u;w=0}break;case 4:e.blockData[n]&&(e.blockData[n]+=a*(readBit()<<u))}r++}if(4===w){g--;0===g&&(w=0)}}:function decodeBaseline(e,t){const r=decodeHuffman(e.huffmanTableDC),n=0===r?0:receiveAndExtend(r);e.blockData[t]=e.pred+=n;let o=1;for(;o<64;){const r=decodeHuffman(e.huffmanTableAC),n=15&r,i=r>>4;if(0===n){if(i<15)break;o+=16;continue}o+=i;const a=Qt[o];e.blockData[t+a]=receiveAndExtend(n);o++}};let I,R=0;const B=1===y?o[0].blocksPerLine*o[0].blocksPerColumn:l*n.mcusPerColumn;let M,E;for(;R<=B;){const n=i?Math.min(B-R,i):B;if(n>0){for(x=0;x<y;x++)o[x].pred=0;g=0;if(1===y){v=o[0];for(A=0;A<n;A++){decodeBlock(v,S,R);R++}}else for(A=0;A<n;A++){for(x=0;x<y;x++){v=o[x];M=v.h;E=v.v;for(k=0;k<E;k++)for(C=0;C<M;C++)decodeMcu(v,S,R,k,C)}R++}}m=0;I=findNextFileMarker(e,t,r);if(!I)break;if(I.invalid){warn(`decodeScan - ${n>0?"unexpected":"excessive"} MCU data, current marker is: ${I.invalid}`);r=I.offset}if(!(I.marker>=65488&&I.marker<=65495))break;r+=2}return r-h}function quantizeAndInverse(e,t,r){const n=e.quantizationTable,o=e.blockData;let i,a,s,c,u,f,l,p,h,_,m,g,d,w,b,y,v;if(!n)throw new JpegError("missing required Quantization Table.");for(let e=0;e<64;e+=8){h=o[t+e];_=o[t+e+1];m=o[t+e+2];g=o[t+e+3];d=o[t+e+4];w=o[t+e+5];b=o[t+e+6];y=o[t+e+7];h*=n[e];if(0!==(_|m|g|d|w|b|y)){_*=n[e+1];m*=n[e+2];g*=n[e+3];d*=n[e+4];w*=n[e+5];b*=n[e+6];y*=n[e+7];i=ar*h+128>>8;a=ar*d+128>>8;s=m;c=b;u=sr*(_-y)+128>>8;p=sr*(_+y)+128>>8;f=g<<4;l=w<<4;i=i+a+1>>1;a=i-a;v=s*ir+c*or+128>>8;s=s*or-c*ir+128>>8;c=v;u=u+l+1>>1;l=u-l;p=p+f+1>>1;f=p-f;i=i+c+1>>1;c=i-c;a=a+s+1>>1;s=a-s;v=u*nr+p*rr+2048>>12;u=u*rr-p*nr+2048>>12;p=v;v=f*tr+l*er+2048>>12;f=f*er-l*tr+2048>>12;l=v;r[e]=i+p;r[e+7]=i-p;r[e+1]=a+l;r[e+6]=a-l;r[e+2]=s+f;r[e+5]=s-f;r[e+3]=c+u;r[e+4]=c-u}else{v=ar*h+512>>10;r[e]=v;r[e+1]=v;r[e+2]=v;r[e+3]=v;r[e+4]=v;r[e+5]=v;r[e+6]=v;r[e+7]=v}}for(let e=0;e<8;++e){h=r[e];_=r[e+8];m=r[e+16];g=r[e+24];d=r[e+32];w=r[e+40];b=r[e+48];y=r[e+56];if(0!==(_|m|g|d|w|b|y)){i=ar*h+2048>>12;a=ar*d+2048>>12;s=m;c=b;u=sr*(_-y)+2048>>12;p=sr*(_+y)+2048>>12;f=g;l=w;i=4112+(i+a+1>>1);a=i-a;v=s*ir+c*or+2048>>12;s=s*or-c*ir+2048>>12;c=v;u=u+l+1>>1;l=u-l;p=p+f+1>>1;f=p-f;i=i+c+1>>1;c=i-c;a=a+s+1>>1;s=a-s;v=u*nr+p*rr+2048>>12;u=u*rr-p*nr+2048>>12;p=v;v=f*tr+l*er+2048>>12;f=f*er-l*tr+2048>>12;l=v;h=i+p;y=i-p;_=a+l;b=a-l;m=s+f;w=s-f;g=c+u;d=c-u;h<16?h=0:h>=4080?h=255:h>>=4;_<16?_=0:_>=4080?_=255:_>>=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;w<16?w=0:w>=4080?w=255:w>>=4;b<16?b=0:b>=4080?b=255:b>>=4;y<16?y=0:y>=4080?y=255:y>>=4;o[t+e]=h;o[t+e+8]=_;o[t+e+16]=m;o[t+e+24]=g;o[t+e+32]=d;o[t+e+40]=w;o[t+e+48]=b;o[t+e+56]=y}else{v=ar*h+8192>>14;v=v<-2040?0:v>=2024?255:v+2056>>4;o[t+e]=v;o[t+e+8]=v;o[t+e+16]=v;o[t+e+24]=v;o[t+e+32]=v;o[t+e+40]=v;o[t+e+48]=v;o[t+e+56]=v}}}function buildComponentData(e,t){const r=t.blocksPerLine,n=t.blocksPerColumn,o=new Int16Array(64);for(let e=0;e<n;e++)for(let n=0;n<r;n++){quantizeAndInverse(t,getBlockBufferOffset(t,e,n),o)}return t.blockData}function findNextFileMarker(e,t,r,n=r){const o=e.length-1;let i=n<r?n:r;if(r>=o)return null;const a=t.getUint16(r);if(a>=65472&&a<=65534)return{invalid:null,marker:a,offset:r};let s=t.getUint16(i);for(;!(s>=65472&&s<=65534);){if(++i>=o)return null;s=t.getUint16(i)}return{invalid:a.toString(16),marker:s,offset:i}}function prepareComponents(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV);for(const n of e.components){const o=Math.ceil(Math.ceil(e.samplesPerLine/8)*n.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*n.v/e.maxV),a=t*n.h,s=64*(r*n.v)*(a+1);n.blockData=new Int16Array(s);n.blocksPerLine=o;n.blocksPerColumn=i}e.mcusPerLine=t;e.mcusPerColumn=r}function readDataBlock(e,t,r){const n=t.getUint16(r);let o=(r+=2)+n-2;const i=findNextFileMarker(e,t,o,r);if(i?.invalid){warn("readDataBlock - incorrect length, current marker is: "+i.invalid);o=i.offset}const a=e.subarray(r,o);return{appData:a,oldOffset:r,newOffset:r+a.length}}function skipData(e,t,r){const n=t.getUint16(r),o=(r+=2)+n-2,i=findNextFileMarker(e,t,o,r);return i?.invalid?i.offset:o}class JpegImage{constructor(e){this._colorTransform=e?.colorTransform??-1;this._decodeTransform=e?.decodeTransform||null;this._isSourcePDF=!1}static canUseImageDecoder(e,t=-1){const r=new DataView(e.buffer,e.byteOffset,e.byteLength),n={width:0,height:0,exifStart:0,exifEnd:0};let o=0,i=null,a=r.getUint16(o);o+=2;if(65496!==a)throw new JpegError("SOI not found");a=r.getUint16(o);o+=2;e:for(;65497!==a;){switch(a){case 65505:const{appData:t,oldOffset:s,newOffset:c}=readDataBlock(e,r,o);o=c;if(69===t[0]&&120===t[1]&&105===t[2]&&102===t[3]&&0===t[4]&&0===t[5]){if(n.exifStart)throw new JpegError("Duplicate EXIF-blocks found.");n.exifStart=s+6;n.exifEnd=c}a=r.getUint16(o);o+=2;continue;case 65472:case 65473:case 65474:n.height=r.getUint16(o+3);n.width=r.getUint16(o+5);i=e[o+7];break e;case 65535:255!==e[o]&&o--}o=skipData(e,r,o);a=r.getUint16(o);o+=2}return 4===i||3===i&&0===t?null:n}parse(e,{dnlScanLines:t=null}={}){const r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=e.length-1;let o,i,a=0,s=null,c=null,u=0;const f=[],l=[],p=[];let h=r.getUint16(a);a+=2;if(65496!==h)throw new JpegError("SOI not found");h=r.getUint16(a);a+=2;e:for(;65497!==h;){let _,m,g;switch(h){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:d,newOffset:w}=readDataBlock(e,r,a);a=w;65504===h&&74===d[0]&&70===d[1]&&73===d[2]&&70===d[3]&&0===d[4]&&(s={version:{major:d[5],minor:d[6]},densityUnits:d[7],xDensity:d[8]<<8|d[9],yDensity:d[10]<<8|d[11],thumbWidth:d[12],thumbHeight:d[13],thumbData:d.subarray(14,14+3*d[12]*d[13])});65518===h&&65===d[0]&&100===d[1]&&111===d[2]&&98===d[3]&&101===d[4]&&(c={version:d[5]<<8|d[6],flags0:d[7]<<8|d[8],flags1:d[9]<<8|d[10],transformCode:d[11]});break;case 65499:const b=r.getUint16(a);a+=2;const y=b+a-2;let v;for(;a<y;){const t=e[a++],n=new Uint16Array(64);if(t>>4){if(t>>4!=1)throw new JpegError("DQT - invalid table spec");for(m=0;m<64;m++){v=Qt[m];n[v]=r.getUint16(a);a+=2}}else for(m=0;m<64;m++){v=Qt[m];n[v]=e[a++]}f[15&t]=n}break;case 65472:case 65473:case 65474:if(o)throw new JpegError("Only single frame JPEGs supported");a+=2;o={};o.extended=65473===h;o.progressive=65474===h;o.precision=e[a++];const x=r.getUint16(a);a+=2;o.scanLines=t||x;o.samplesPerLine=r.getUint16(a);a+=2;o.components=[];o.componentIds={};const k=e[a++];let C=0,A=0;for(_=0;_<k;_++){const t=e[a],r=e[a+1]>>4,n=15&e[a+1];C<r&&(C=r);A<n&&(A=n);const i=e[a+2];g=o.components.push({h:r,v:n,quantizationId:i,quantizationTable:null});o.componentIds[t]=g-1;a+=3}o.maxH=C;o.maxV=A;prepareComponents(o);break;case 65476:const S=r.getUint16(a);a+=2;for(_=2;_<S;){const t=e[a++],r=new Uint8Array(16);let n=0;for(m=0;m<16;m++,a++)n+=r[m]=e[a];const o=new Uint8Array(n);for(m=0;m<n;m++,a++)o[m]=e[a];_+=17+n;(t>>4?l:p)[15&t]=buildHuffmanTable(r,o)}break;case 65501:a+=2;i=r.getUint16(a);a+=2;break;case 65498:const I=1===++u&&!t;a+=2;const R=e[a++],B=[];for(_=0;_<R;_++){const t=e[a++],r=o.componentIds[t],n=o.components[r];n.index=t;const i=e[a++];n.huffmanTableDC=p[i>>4];n.huffmanTableAC=l[15&i];B.push(n)}const M=e[a++],E=e[a++],D=e[a++];try{a+=decodeScan(e,r,a,o,B,i,M,E,D>>4,15&D,I)}catch(t){if(t instanceof DNLMarkerError){warn(`${t.message} -- attempting to re-parse the JPEG image.`);return this.parse(e,{dnlScanLines:t.scanLines})}if(t instanceof EOIMarkerError){warn(`${t.message} -- ignoring the rest of the image data.`);break e}throw t}break;case 65500:a+=4;break;case 65535:255!==e[a]&&a--;break;default:const q=findNextFileMarker(e,r,a-2,a-3);if(q?.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+q.invalid);a=q.offset;break}if(!q||a>=n){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new JpegError("JpegImage.parse - unknown marker: "+h.toString(16))}if(a<n){h=r.getUint16(a);a+=2}else h=0}if(!o)throw new JpegError("JpegImage.parse - no frame data found.");this.width=o.samplesPerLine;this.height=o.scanLines;this.jfif=s;this.adobe=c;this.components=[];for(const e of o.components){const t=f[e.quantizationId];t&&(e.quantizationTable=t);this.components.push({index:e.index,output:buildComponentData(0,e),scaleX:e.h/o.maxH,scaleY:e.v/o.maxV,blocksPerLine:e.blocksPerLine,blocksPerColumn:e.blocksPerColumn})}this.numComponents=this.components.length}#N(e,t){const r=this.width/e,n=this.height/t;let o,i,a,s,c,u,f,l,p,h=0;const _=this.components.length,m=e*t*_,g=new Uint8ClampedArray(m),d=new Uint32Array(e),w=4294967288;let b;for(f=0;f<_;f++){o=this.components[f];i=o.scaleX*r;a=o.scaleY*n;h=f;const p=o.output;s=o.blocksPerLine+1<<3;if(i!==b){for(c=0;c<e;c++){l=0|c*i;d[c]=(l&w)<<3|7&l}b=i}for(u=0;u<t;u++){l=0|u*a;const t=s*(l&w)|(7&l)<<3;for(c=0;c<e;c++){g[h]=p[t+d[c]];h+=_}}}let y=this._decodeTransform;this._isSourcePDF||4!==_||(y||=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(y)for(f=0;f<m;)for(l=0,p=0;l<_;l++,f++,p+=2)g[f]=(g[f]*y[p]>>8)+y[p+1];return g}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(e){let t,r,n;for(let o=0,i=e.length;o<i;o+=3){t=e[o];r=e[o+1];n=e[o+2];e[o]=t-179.456+1.402*n;e[o+1]=t+135.459-.344*r-.714*n;e[o+2]=t-226.816+1.772*r}return e}_convertYccToRgba(e,t){for(let r=0,n=0,o=e.length;r<o;r+=3,n+=4){const o=e[r],i=e[r+1],a=e[r+2];t[n]=o-179.456+1.402*a;t[n+1]=o+135.459-.344*i-.714*a;t[n+2]=o-226.816+1.772*i;t[n+3]=255}return t}_convertYcckToRgb(e){this._convertYcckToCmyk(e);return this._convertCmykToRgb(e)}_convertYcckToRgba(e){this._convertYcckToCmyk(e);return this._convertCmykToRgba(e)}_convertYcckToCmyk(e){let t,r,n;for(let o=0,i=e.length;o<i;o+=4){t=e[o];r=e[o+1];n=e[o+2];e[o]=434.456-t-1.402*n;e[o+1]=119.541-t+.344*r+.714*n;e[o+2]=481.816-t-1.772*r}return e}_convertCmykToRgb(e){const t=e.length/4;ColorSpaceUtils.cmyk.getRgbBuffer(e,0,t,e,0,8,0);return e.subarray(0,3*t)}_convertCmykToRgba(e){ColorSpaceUtils.cmyk.getRgbBuffer(e,0,e.length/4,e,0,8,1);if(ColorSpaceUtils.cmyk instanceof DeviceCmykCS)for(let t=3,r=e.length;t<r;t+=4)e[t]=255;return e}getData({width:e,height:t,forceRGBA:r=!1,forceRGB:n=!1}){if(this.numComponents>4)throw new JpegError("Unsupported color mode");this._isSourcePDF=!0===arguments[0]?.isSourcePDF;const o=this.#N(e,t);if(1===this.numComponents&&(r||n)){const e=o.length*(r?4:3),t=new Uint8ClampedArray(e);if(r)!function grayToRGBA(e,t){if(FeatureTest.isLittleEndian)for(let r=0,n=e.length;r<n;r++)t[r]=65793*e[r]|4278190080;else for(let r=0,n=e.length;r<n;r++)t[r]=16843008*e[r]|255}(o,new Uint32Array(t.buffer));else{let e=0;for(const r of o){t[e++]=r;t[e++]=r;t[e++]=r}}return t}if(3===this.numComponents&&this._isColorConversionNeeded){if(r){const e=new Uint8ClampedArray(o.length/3*4);return this._convertYccToRgba(o,e)}return this._convertYccToRgb(o)}if(4===this.numComponents){if(this._isColorConversionNeeded)return r?this._convertYcckToRgba(o):n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(r)return this._convertCmykToRgba(o);if(n)return this._convertCmykToRgb(o)}return o}}const cr=async function OpenJPEG(e={}){var t=e,r=import.meta.url;try{new URL(".",r).href}catch{}0;var n,o=console.log.bind(console),i=console.error.bind(console);function updateMemoryViews(){if(!n?.buffer?.resizable){var e=function getMemoryBuffer(){return h.buffer}();n=new Int8Array(e);s=new Uint8Array(e);a=new Int32Array(e);c=new Uint32Array(e)}}var a,s,c,callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(t)},u=[],f=[],alignMemory=(e,t)=>Math.ceil(e/t)*t,growMemory=e=>{var t=(e-h.buffer.byteLength+65535)/65536|0;try{h.grow(t);updateMemoryViews();return 1}catch(e){}},l=[null,[],[]],p=globalThis.TextDecoder&&new TextDecoder,UTF8ArrayToString=(e,t=0,r,n)=>{var o=((e,t,r,n)=>{var o=t+r;if(n)return o;for(;e[t]&&!(t>=o);)++t;return t})(e,t,r,n);if(o-t>16&&e.buffer&&p)return p.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|c:(7&a)<<18|s<<12|c<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i},printChar=(e,t)=>{var r=l[e];if(t&&10!==t)r.push(t);else{(1===e?o:i)(UTF8ArrayToString(r));r.length=0}},UTF8ToString=(e,t,r)=>e?UTF8ArrayToString(s,e,t,r):"";t.noExitRuntime&&t.noExitRuntime;t.print&&(o=t.print);t.printErr&&(i=t.printErr);t.arguments&&t.arguments;t.thisProgram&&t.thisProgram;var h,_=t.preInit;if(_){"function"==typeof _&&(t.preInit=_=[_]);for(;_.length>0;)_.shift()()}t.writeArrayToMemory=(e,t)=>{n.set(e,t)};var m,g={g:function _copy_component(e,r,n,o){e>>=2;const i=t.imageData,s=a.subarray(e,e+o);for(let e=0,t=r;e<o;e++,t+=n)i[t]=s[e]},c:e=>{var t=s.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,alignMemory(Math.max(e,o),65536));if(growMemory(i))return!0}return!1},d:function _fd_seek(e,t,r,n){t=(o=t)<-9007199254740992||o>9007199254740992?NaN:Number(o);var o;return 70},b:(e,t,r,n)=>{for(var o=0,i=0;i<r;i++){var a=c[t>>2],u=c[t+4>>2];t+=8;for(var f=0;f<u;f++)printChar(e,s[a+f]);o+=u}c[n>>2]=o;return 0},h:function _init_pixels(e){t.imageData=new Uint8ClampedArray(e)},e:function _jsPrintWarning(e){const r=UTF8ToString(e);(t.warn||console.warn)(`OpenJPEG: ${r}`)},f:function _setImageData(e,r){t.imageData=new Uint8ClampedArray(s.slice(e,e+r).buffer)},a:function _storeErrorMessage(e){const r=UTF8ToString(e);t.errorMessages?t.errorMessages+="\n"+r:t.errorMessages=r}};m=await async function createWasm(){function receiveInstance(e){!function assignWasmExports(e){t._malloc=e.k;t._free=e.l;t._jp2_decode=e.m;h=e.i;e.__indirect_function_table}(m=e.exports);updateMemoryViews();return m}var e=function getWasmImports(){return{a:g}}(),r=t.instantiateWasm;return new Promise(t=>{r(e,e=>t(receiveInstance(e)))})}();await async function run(){!function preRun(){var e=t.preRun;if(e){"function"==typeof e&&(e=[e]);f.push(...e)}callRuntimeCallbacks(f)}();var e=t.setStatus;if(e){e("Running...");await new Promise(e=>setTimeout(e,1));setTimeout(e,1,"")}false;!function initRuntime(){0;m.j()}();t.onRuntimeInitialized?.();!function postRun(){var e=t.postRun;if(e){"function"==typeof e&&(e=[e]);u.push(...e)}callRuntimeCallbacks(u)}()}();return t};class Stream extends BaseStream{constructor(e,t,r,n){super();this.bytes=e instanceof Uint8Array?e:new Uint8Array(e);this.start=t||0;this.pos=this.start;this.end=t+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(e){const t=this.pos,r=e?Math.min(t+e,this.end):this.end;this.pos=r;return this.bytes.subarray(t,r)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);return this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,r=null){return new Stream(this.bytes.buffer,e,t,r)}clone(){return new Stream(this.bytes.buffer,this.start,this.length,this.dict?.clone())}}class JpxError extends Ut{constructor(e){super(e,"JpxError")}}class JpxImage extends WasmImage{_filename="openjpeg.wasm";_noWasmFilename="openjpeg_nowasm_fallback.js";static get instance(){return util_shadow(this,"instance",new JpxImage(!0))}async decode(e,{numComponents:t,isIndexedColormap:r=!1,smaskInData:n=!1,reducePower:o=0}={}){const i=void 0!==t;t??=4;const a=await this._getModule(cr);if(!a)throw new JpxError("OpenJPEG failed to initialize");let s;try{const c=e.length;s=a._malloc(c);a.writeArrayToMemory(e,s);if(a._jp2_decode(s,c,t>0?t:0,!!r,!!n,o,i)){const{errorMessages:e}=a;if(e){delete a.errorMessages;throw new JpxError(e)}throw new JpxError("Unknown error")}const{imageData:u}=a;a.imageData=null;return u}finally{s&&a._free(s)}}static parseImageProperties(e){if(!(e instanceof ArrayBuffer||ArrayBuffer.isView(e)))throw new JpxError("Invalid data format, must be a TypedArray.");let t=(e=new Stream(e)).getByte();for(;t>=0;){const r=t;t=e.getByte();if(65361===(r<<8|t)){e.skip(4);const t=e.getInt32()>>>0,r=e.getInt32()>>>0,n=e.getInt32()>>>0,o=e.getInt32()>>>0;e.skip(16);return{width:t-n,height:r-o,bitsPerComponent:8,componentsCount:e.getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}globalThis.pdfjsImageDecoders={getVerbosityLevel,Jbig2Error,Jbig2Image:JBig2CCITTFaxImage,JpegError,JpegImage,JpxError,JpxImage,setVerbosityLevel,VerbosityLevel:Ot};export{Jbig2Error,JBig2CCITTFaxImage as Jbig2Image,JpegError,JpegImage,JpxError,JpxImage,Ot as VerbosityLevel,getVerbosityLevel,setVerbosityLevel};