cafe-ofd
Version:
A vue component for Ofd
1 lines • 907 kB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["index"]=e():t["index"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({"0083":function(t,e,r){"use strict";var i={};function n(){try{return new window.XMLHttpRequest}catch(t){}}function s(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}i._getBinaryFromXHR=function(t){return t.response||t.responseText};var o="undefined"!==typeof window&&window.ActiveXObject?function(){return n()||s()}:n;i.getBinaryContent=function(t,e){var r,n,s,a;e||(e={}),"function"===typeof e?(a=e,e={}):"function"===typeof e.callback&&(a=e.callback),a||"undefined"===typeof Promise?(n=function(t){a(null,t)},s=function(t){a(t,null)}):r=new Promise((function(t,e){n=t,s=e}));try{var c=o();c.open("GET",t,!0),"responseType"in c&&(c.responseType="arraybuffer"),c.overrideMimeType&&c.overrideMimeType("text/plain; charset=x-user-defined"),c.onreadystatechange=function(e){if(4===c.readyState)if(200===c.status||0===c.status)try{n(i._getBinaryFromXHR(c))}catch(r){s(new Error(r))}else s(new Error("Ajax error for "+t+" : "+this.status+" "+this.statusText))},e.progress&&(c.onprogress=function(r){e.progress({path:t,originalEvent:r,percent:r.loaded/r.total*100,loaded:r.loaded,total:r.total})}),c.send()}catch(u){s(new Error(u),null)}return r},t.exports=i},"0094":function(t,e,r){"use strict";var i,n=r("bb2f"),s=r("da84"),o=r("e330"),a=r("6964"),c=r("f183"),u=r("6d61"),l=r("acac"),d=r("861d"),h=r("69f3").enforce,f=r("d039"),p=r("cdce"),g=Object,m=Array.isArray,b=g.isExtensible,y=g.isFrozen,v=g.isSealed,S=g.freeze,w=g.seal,A={},E={},C=!s.ActiveXObject&&"ActiveXObject"in s,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},I=u("WeakMap",x,l),T=I.prototype,_=o(T.set),P=function(){return n&&f((function(){var t=S([]);return _(new I,t,1),!y(t)}))};if(p)if(C){i=l.getConstructor(x,"WeakMap",!0),c.enable();var F=o(T["delete"]),D=o(T.has),R=o(T.get);a(T,{delete:function(t){if(d(t)&&!b(t)){var e=h(this);return e.frozen||(e.frozen=new i),F(this,t)||e.frozen["delete"](t)}return F(this,t)},has:function(t){if(d(t)&&!b(t)){var e=h(this);return e.frozen||(e.frozen=new i),D(this,t)||e.frozen.has(t)}return D(this,t)},get:function(t){if(d(t)&&!b(t)){var e=h(this);return e.frozen||(e.frozen=new i),D(this,t)?R(this,t):e.frozen.get(t)}return R(this,t)},set:function(t,e){if(d(t)&&!b(t)){var r=h(this);r.frozen||(r.frozen=new i),D(this,t)?_(this,t,e):r.frozen.set(t,e)}else _(this,t,e);return this}})}else P()&&a(T,{set:function(t,e){var r;return m(t)&&(y(t)?r=A:v(t)&&(r=E)),_(this,t,e),r==A&&S(t),r==E&&w(t),this}})},"00ee":function(t,e,r){var i=r("b622"),n=i("toStringTag"),s={};s[n]="z",t.exports="[object z]"===String(s)},"01b4":function(t,e){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return null===e&&(this.tail=null),t.item}}},t.exports=r},"0366":function(t,e,r){var i=r("4625"),n=r("59ed"),s=r("40d5"),o=i(i.bind);t.exports=function(t,e){return n(t),void 0===e?t:s?o(t,e):function(){return t.apply(e,arguments)}}},"04f8":function(t,e,r){var i=r("2d00"),n=r("d039");t.exports=!!Object.getOwnPropertySymbols&&!n((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},"057f":function(t,e,r){var i=r("c6b6"),n=r("fc6a"),s=r("241c").f,o=r("4dae"),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return s(t)}catch(e){return o(a)}};t.exports.f=function(t){return a&&"Window"==i(t)?c(t):s(n(t))}},"06cf":function(t,e,r){var i=r("83ab"),n=r("c65b"),s=r("d1e7"),o=r("5c6c"),a=r("fc6a"),c=r("a04b"),u=r("1a2d"),l=r("0cfb"),d=Object.getOwnPropertyDescriptor;e.f=i?d:function(t,e){if(t=a(t),e=c(e),l)try{return d(t,e)}catch(r){}if(u(t,e))return o(!n(s.f,t,e),t[e])}},"07ac":function(t,e,r){var i=r("23e7"),n=r("6f53").values;i({target:"Object",stat:!0},{values:function(t){return n(t)}})},"07fa":function(t,e,r){var i=r("50c4");t.exports=function(t){return i(t.length)}},"0b42":function(t,e,r){var i=r("e8b5"),n=r("68ee"),s=r("861d"),o=r("b622"),a=o("species"),c=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,n(e)&&(e===c||i(e.prototype))?e=void 0:s(e)&&(e=e[a],null===e&&(e=void 0))),void 0===e?c:e}},"0b43":function(t,e,r){var i=r("04f8");t.exports=i&&!!Symbol["for"]&&!!Symbol.keyFor},"0c47":function(t,e,r){var i=r("da84"),n=r("d44e");n(i.JSON,"JSON",!0)},"0ccb":function(t,e,r){var i=r("e330"),n=r("50c4"),s=r("577e"),o=r("1148"),a=r("1d80"),c=i(o),u=i("".slice),l=Math.ceil,d=function(t){return function(e,r,i){var o,d,h=s(a(e)),f=n(r),p=h.length,g=void 0===i?" ":s(i);return f<=p||""==g?h:(o=f-p,d=c(g,l(o/g.length)),d.length>o&&(d=u(d,0,o)),t?h+d:d+h)}};t.exports={start:d(!1),end:d(!0)}},"0cfb":function(t,e,r){var i=r("83ab"),n=r("d039"),s=r("cc12");t.exports=!i&&!n((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,r){var i=r("e330"),n=Error,s=i("".replace),o=function(t){return String(n(t).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,c=a.test(o);t.exports=function(t,e){if(c&&"string"==typeof t&&!n.prepareStackTrace)while(e--)t=s(t,a,"");return t}},"0d51":function(t,e){var r=String;t.exports=function(t){try{return r(t)}catch(e){return"Object"}}},"0f29":function(t,e,r){"use strict";r("4f27")},"10d1":function(t,e,r){r("0094")},"10d11":function(t,e,r){r("14d9"),r("d9e2");const i=0,n=32,s=16,o=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],a=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function c(t){const e=[];for(let r=0,i=t.length;r<i;r+=2)e.push(parseInt(t.substr(r,2),16));return e}function u(t){return t.map(t=>(t=t.toString(16),1===t.length?"0"+t:t)).join("")}function l(t){const e=[];for(let r=0,i=t.length;r<i;r++){const i=t.codePointAt(r);if(i<=127)e.push(i);else if(i<=2047)e.push(192|i>>>6),e.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)e.push(224|i>>>12),e.push(128|i>>>6&63),e.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw e.push(i),new Error("input is not supported");r++,e.push(240|i>>>18&28),e.push(128|i>>>12&63),e.push(128|i>>>6&63),e.push(128|63&i)}}return e}function d(t){const e=[];for(let r=0,i=t.length;r<i;r++)t[r]>=240&&t[r]<=247?(e.push(String.fromCodePoint(((7&t[r])<<18)+((63&t[r+1])<<12)+((63&t[r+2])<<6)+(63&t[r+3]))),r+=3):t[r]>=224&&t[r]<=239?(e.push(String.fromCodePoint(((15&t[r])<<12)+((63&t[r+1])<<6)+(63&t[r+2]))),r+=2):t[r]>=192&&t[r]<=223?(e.push(String.fromCodePoint(((31&t[r])<<6)+(63&t[r+1]))),r++):e.push(String.fromCodePoint(t[r]));return e.join("")}function h(t,e){return t<<e|t>>>32-e}function f(t){return(255&o[t>>>24&255])<<24|(255&o[t>>>16&255])<<16|(255&o[t>>>8&255])<<8|255&o[255&t]}function p(t){return t^h(t,2)^h(t,10)^h(t,18)^h(t,24)}function g(t){return t^h(t,13)^h(t,23)}function m(t,e,r){const i=new Array(4),n=new Array(4);for(let s=0;s<4;s++)n[0]=255&t[0+4*s],n[1]=255&t[1+4*s],n[2]=255&t[2+4*s],n[3]=255&t[3+4*s],i[s]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];for(let s,o=0;o<32;o+=4)s=i[1]^i[2]^i[3]^r[o+0],i[0]^=p(f(s)),s=i[2]^i[3]^i[0]^r[o+1],i[1]^=p(f(s)),s=i[3]^i[0]^i[1]^r[o+2],i[2]^=p(f(s)),s=i[0]^i[1]^i[2]^r[o+3],i[3]^=p(f(s));for(let s=0;s<16;s+=4)e[s]=i[3-s/4]>>>24&255,e[s+1]=i[3-s/4]>>>16&255,e[s+2]=i[3-s/4]>>>8&255,e[s+3]=255&i[3-s/4]}function b(t,e,r){const n=new Array(4),s=new Array(4);for(let i=0;i<4;i++)s[0]=255&t[0+4*i],s[1]=255&t[1+4*i],s[2]=255&t[2+4*i],s[3]=255&t[3+4*i],n[i]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let i,o=0;o<32;o+=4)i=n[1]^n[2]^n[3]^a[o+0],e[o+0]=n[0]^=g(f(i)),i=n[2]^n[3]^n[0]^a[o+1],e[o+1]=n[1]^=g(f(i)),i=n[3]^n[0]^n[1]^a[o+2],e[o+2]=n[2]^=g(f(i)),i=n[0]^n[1]^n[2]^a[o+3],e[o+3]=n[3]^=g(f(i));if(r===i)for(let i,o=0;o<16;o++)i=e[o],e[o]=e[31-o],e[31-o]=i}function y(t,e,r,{padding:o="pkcs#5",mode:a,output:h="string"}={}){if("string"===typeof e&&(e=c(e)),16!==e.length)throw new Error("key is invalid");if(t="string"===typeof t?r!==i?l(t):c(t):[...t],"pkcs#5"===o&&r!==i){const e=s-t.length%s;for(let r=0;r<e;r++)t.push(e)}const f=new Array(n);b(e,f,r);const p=[];let g=t.length,y=0;while(g>=s){const e=t.slice(y,y+16),r=new Array(16);m(e,r,f);for(let t=0;t<s;t++)p[y+t]=r[t];g-=s,y+=s}if("pkcs#5"===o&&r===i){const t=p[p.length-1];p.splice(p.length-t,t)}return"array"!==h?r!==i?u(p):d(p):p}t.exports={encrypt(t,e,r){return y(t,e,1,r)},decrypt(t,e,r){return y(t,e,0,r)}}},1148:function(t,e,r){"use strict";var i=r("5926"),n=r("577e"),s=r("1d80"),o=RangeError;t.exports=function(t){var e=n(s(this)),r="",a=i(t);if(a<0||a==1/0)throw o("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(r+=e);return r}},"13d2":function(t,e,r){var i=r("e330"),n=r("d039"),s=r("1626"),o=r("1a2d"),a=r("83ab"),c=r("5e77").CONFIGURABLE,u=r("8925"),l=r("69f3"),d=l.enforce,h=l.get,f=String,p=Object.defineProperty,g=i("".slice),m=i("".replace),b=i([].join),y=a&&!n((function(){return 8!==p((function(){}),"length",{value:8}).length})),v=String(String).split("String"),S=t.exports=function(t,e,r){"Symbol("===g(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||c&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&r&&o(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(n){}var i=d(t);return o(i,"source")||(i.source=b(v,"string"==typeof e?e:"")),t};Function.prototype.toString=S((function(){return s(this)&&h(this).source||u(this)}),"toString")},"13d5":function(t,e,r){"use strict";var i=r("23e7"),n=r("d58f").left,s=r("a640"),o=r("2d00"),a=r("605d"),c=!a&&o>79&&o<83,u=c||!s("reduce");i({target:"Array",proto:!0,forced:u},{reduce:function(t){var e=arguments.length;return n(this,t,e,e>1?arguments[1]:void 0)}})},"14d8":function(t,e,r){r("2b3d"),r("bf19"),r("9861"),r("5494");var i=r("428f");t.exports=i.URL},"14d9":function(t,e,r){"use strict";var i=r("23e7"),n=r("7b0b"),s=r("07fa"),o=r("3a34"),a=r("3511"),c=r("d039"),u=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=u||!l();i({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=n(this),r=s(e),i=arguments.length;a(r+i);for(var c=0;c<i;c++)e[r]=arguments[c],r++;return o(e,r),r}})},"14e5":function(t,e,r){"use strict";var i=r("23e7"),n=r("c65b"),s=r("59ed"),o=r("f069"),a=r("e667"),c=r("2266"),u=r("5eed");i({target:"Promise",stat:!0,forced:u},{all:function(t){var e=this,r=o.f(e),i=r.resolve,u=r.reject,l=a((function(){var r=s(e.resolve),o=[],a=0,l=1;c(t,(function(t){var s=a++,c=!1;l++,n(r,e,t).then((function(t){c||(c=!0,o[s]=t,--l||i(o))}),u)})),--l||i(o)}));return l.error&&u(l.value),r.promise}})},1626:function(t,e,r){var i=r("8ea1"),n=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===n}:function(t){return"function"==typeof t}},"182d":function(t,e,r){var i=r("f8cd"),n=RangeError;t.exports=function(t,e){var r=i(t);if(r%e)throw n("Wrong offset");return r}},1920:function(t,e,r){r("4d90");var i=r("b109");t.exports=i("String","padStart")},"197b":function(t,e,r){var i=r("e065");i("species")},"19aa":function(t,e,r){var i=r("3a9b"),n=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw n("Incorrect invocation")}},"1a2d":function(t,e,r){var i=r("e330"),n=r("7b0b"),s=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(n(t),e)}},"1b3b":function(t,e,r){r("6ce5")},"1be4":function(t,e,r){var i=r("d066");t.exports=i("document","documentElement")},"1c59":function(t,e,r){"use strict";var i=r("6d61"),n=r("6566");i("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n)},"1c7e":function(t,e,r){var i=r("b622"),n=i("iterator"),s=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){s=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!s)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(c){}return r}},"1cd7":function(t,e,r){r("f6d6");var i=r("428f");t.exports=i.String.fromCodePoint},"1cdc":function(t,e,r){var i=r("342f");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},"1d02":function(t,e,r){"use strict";var i=r("ebb5"),n=r("a258").findLastIndex,s=i.aTypedArray,o=i.exportTypedArrayMethod;o("findLastIndex",(function(t){return n(s(this),t,arguments.length>1?arguments[1]:void 0)}))},"1d80":function(t,e,r){var i=r("7234"),n=TypeError;t.exports=function(t){if(i(t))throw n("Can't call method on "+t);return t}},"1dde":function(t,e,r){var i=r("d039"),n=r("b622"),s=r("2d00"),o=n("species");t.exports=function(t){return s>=51||!i((function(){var e=[],r=e.constructor={};return r[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"1f4a":function(t,e,r){r("99af"),r("d3b7"),r("a4d3"),r("b636"),r("e01a"),r("dc8d"),r("efe9"),r("d28b"),r("2a1b"),r("8edd"),r("80e0"),r("6b9e"),r("197b"),r("2351"),r("8172"),r("944a"),r("81b8"),r("0c47"),r("23dc"),r("f8c9");var i=r("428f");t.exports=i.Symbol},"1fb5":function(t,e,r){"use strict";e.byteLength=l,e.toByteArray=h,e.fromByteArray=g;for(var i=[],n=[],s="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=o.length;a<c;++a)i[a]=o[a],n[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function l(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i}function d(t,e,r){return 3*(e+r)/4-r}function h(t){var e,r,i=u(t),o=i[0],a=i[1],c=new s(d(t,o,a)),l=0,h=a>0?o-4:o;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c}function f(t){return i[t>>18&63]+i[t>>12&63]+i[t>>6&63]+i[63&t]}function p(t,e,r){for(var i,n=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),n.push(f(i));return n.join("")}function g(t){for(var e,r=t.length,n=r%3,s=[],o=16383,a=0,c=r-n;a<c;a+=o)s.push(p(t,a,a+o>c?c:a+o));return 1===n?(e=t[r-1],s.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],s.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},"1fe2":function(t,e,r){r("7276")},2110:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));r("907a"),r("986a"),r("1d02"),r("3c5d"),r("1b3b"),r("3d71"),r("c6e3"),r("14d9"),r("33d1"),r("ea98"),r("d9e2"),r("c7cf");const i={ERRORS:0,WARNINGS:1,INFOS:5};let n=i.WARNINGS;function s(t){n>=i.INFOS&&console.log("Info: "+t)}function o(t){throw new Error(t)}function a(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}const c=function(){function t(e){this.constructor===t&&o("Cannot initialize BaseException."),this.message=e,this.name=this.constructor.name}return t.prototype=new Error,t.constructor=t,t}();(function(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="})();function u(t){return t<=0?0:Math.ceil(Math.log2(t))}function l(t,e){return t[e]<<24>>24}function d(t,e){return t[e]<<8|t[e+1]}function h(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}const f=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class p{constructor(t,e,r){this.data=t,this.bp=e,this.dataEnd=r,this.chigh=t[e],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){const t=this.data;let e=this.bp;255===t[e]?t[e+1]>143?(this.clow+=65280,this.ct=8):(e++,this.clow+=t[e]<<9,this.ct=7,this.bp=e):(e++,this.clow+=e<this.dataEnd?t[e]<<8:65280,this.ct=8,this.bp=e),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(t,e){let r=t[e]>>1,i=1&t[e];const n=f[r],s=n.qe;let o,a=this.a-s;if(this.chigh<s)a<s?(a=s,o=i,r=n.nmps):(a=s,o=1^i,1===n.switchFlag&&(i=o),r=n.nlps);else{if(this.chigh-=s,0!==(32768&a))return this.a=a,i;a<s?(o=1^i,1===n.switchFlag&&(i=o),r=n.nlps):(o=i,r=n.nmps)}do{0===this.ct&&this.byteIn(),a<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(0===(32768&a));return this.a=a,t[e]=r<<1|i,o}}const g=function(){const t=-2,e=-1,r=0,i=1,n=2,o=3,a=4,c=5,u=6,l=7,d=8,h=[[-1,-1],[-1,-1],[7,d],[7,l],[6,u],[6,u],[6,c],[6,c],[4,r],[4,r],[4,r],[4,r],[4,r],[4,r],[4,r],[4,r],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,i],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,a],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[3,o],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n],[1,n]],f=[[-1,-1],[12,t],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],p=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],g=[[-1,-1],[-1,-1],[12,t],[12,t],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],m=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],b=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];function y(t,e={}){if(!t||"function"!==typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=t,this.eof=!1,this.encoding=e.K||0,this.eoline=e.EndOfLine||!1,this.byteAlign=e.EncodedByteAlign||!1,this.columns=e.Columns||1728,this.rows=e.Rows||0;let r,i=e.EndOfBlock;null!==i&&void 0!==i||(i=!0),this.eoblock=i,this.black=e.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;while(0===(r=this._lookBits(12)))this._eatBits(1);1===r&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}return y.prototype={readNextChar(){if(this.eof)return-1;const t=this.refLine,h=this.codingLine,f=this.columns;let p,g,m,b,y;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let m,y,v;if(this.err=!1,this.nextLine2D){for(b=0;h[b]<f;++b)t[b]=h[b];t[b++]=f,t[b]=f,h[0]=0,this.codingPos=0,p=0,g=0;while(h[this.codingPos]<f)switch(m=this._getTwoDimCode(),m){case r:this._addPixels(t[p+1],g),t[p+1]<f&&(p+=2);break;case i:if(m=y=0,g){do{m+=v=this._getBlackCode()}while(v>=64);do{y+=v=this._getWhiteCode()}while(v>=64)}else{do{m+=v=this._getWhiteCode()}while(v>=64);do{y+=v=this._getBlackCode()}while(v>=64)}this._addPixels(h[this.codingPos]+m,g),h[this.codingPos]<f&&this._addPixels(h[this.codingPos]+y,1^g);while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2;break;case l:if(this._addPixels(t[p]+3,g),g^=1,h[this.codingPos]<f){++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case c:if(this._addPixels(t[p]+2,g),g^=1,h[this.codingPos]<f){++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case o:if(this._addPixels(t[p]+1,g),g^=1,h[this.codingPos]<f){++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case n:if(this._addPixels(t[p],g),g^=1,h[this.codingPos]<f){++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case d:if(this._addPixelsNeg(t[p]-3,g),g^=1,h[this.codingPos]<f){p>0?--p:++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case u:if(this._addPixelsNeg(t[p]-2,g),g^=1,h[this.codingPos]<f){p>0?--p:++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case a:if(this._addPixelsNeg(t[p]-1,g),g^=1,h[this.codingPos]<f){p>0?--p:++p;while(t[p]<=h[this.codingPos]&&t[p]<f)p+=2}break;case e:this._addPixels(f,0),this.eof=!0;break;default:s("bad 2d code"),this._addPixels(f,0),this.err=!0}}else{h[0]=0,this.codingPos=0,g=0;while(h[this.codingPos]<f){if(m=0,g)do{m+=v=this._getBlackCode()}while(v>=64);else do{m+=v=this._getWhiteCode()}while(v>=64);this._addPixels(h[this.codingPos]+m,g),g^=1}}let S=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(m=this._lookBits(12),this.eoline)while(m!==e&&1!==m)this._eatBits(1),m=this._lookBits(12);else while(0===m)this._eatBits(1),m=this._lookBits(12);1===m?(this._eatBits(12),S=!0):m===e&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&S&&this.byteAlign){if(m=this._lookBits(12),1===m){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(b=0;b<4;++b)m=this._lookBits(12),1!==m&&s("bad rtc code: "+m),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){while(1){if(m=this._lookBits(13),m===e)return this.eof=!0,-1;if(m>>1===1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&m))}h[0]>0?this.outputBits=h[this.codingPos=0]:this.outputBits=h[this.codingPos=1],this.row++}if(this.outputBits>=8)y=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&h[this.codingPos]<f&&(this.codingPos++,this.outputBits=h[this.codingPos]-h[this.codingPos-1]);else{m=8,y=0;do{this.outputBits>m?(y<<=m,1&this.codingPos||(y|=255>>8-m),this.outputBits-=m,m=0):(y<<=this.outputBits,1&this.codingPos||(y|=255>>8-this.outputBits),m-=this.outputBits,this.outputBits=0,h[this.codingPos]<f?(this.codingPos++,this.outputBits=h[this.codingPos]-h[this.codingPos-1]):m>0&&(y<<=m,m=0))}while(m)}return this.black&&(y^=255),y},_addPixels(t,e){const r=this.codingLine;let i=this.codingPos;t>r[i]&&(t>this.columns&&(s("row is wrong length"),this.err=!0,t=this.columns),1&i^e&&++i,r[i]=t),this.codingPos=i},_addPixelsNeg(t,e){const r=this.codingLine;let i=this.codingPos;if(t>r[i])t>this.columns&&(s("row is wrong length"),this.err=!0,t=this.columns),1&i^e&&++i,r[i]=t;else if(t<r[i]){t<0&&(s("invalid code"),this.err=!0,t=0);while(i>0&&t<r[i-1])--i;r[i]=t}this.codingPos=i},_findTableCode(t,r,i,n){const s=n||0;for(let o=t;o<=r;++o){let t=this._lookBits(o);if(t===e)return[!0,1,!1];if(o<r&&(t<<=r-o),!s||t>=s){const e=i[t-s];if(e[0]===o)return this._eatBits(o),[!0,e[1],!0]}}return[!1,0,!1]},_getTwoDimCode(){let t,r=0;if(this.eoblock){if(r=this._lookBits(7),t=h[r],t&&t[0]>0)return this._eatBits(t[0]),t[1]}else{const t=this._findTableCode(1,7,h);if(t[0]&&t[2])return t[1]}return s("Bad two dim code"),e},_getWhiteCode(){let t,r=0;if(this.eoblock){if(r=this._lookBits(12),r===e)return 1;if(t=r>>5===0?f[r]:p[r>>3],t[0]>0)return this._eatBits(t[0]),t[1]}else{let t=this._findTableCode(1,9,p);if(t[0])return t[1];if(t=this._findTableCode(11,12,f),t[0])return t[1]}return s("bad white code"),this._eatBits(1),1},_getBlackCode(){let t,r;if(this.eoblock){if(t=this._lookBits(13),t===e)return 1;if(r=t>>7===0?g[t]:t>>9===0&&t>>7!==0?m[(t>>1)-64]:b[t>>7],r[0]>0)return this._eatBits(r[0]),r[1]}else{let t=this._findTableCode(2,6,b);if(t[0])return t[1];if(t=this._findTableCode(7,12,m,64),t[0])return t[1];if(t=this._findTableCode(10,13,g),t[0])return t[1]}return s("bad black code"),this._eatBits(1),1},_lookBits(t){let r;while(this.inputBits<t){if(-1===(r=this.source.next()))return 0===this.inputBits?e:this.inputBuf<<t-this.inputBits&65535>>16-t;this.inputBuf=this.inputBuf<<8|r,this.inputBits+=8}return this.inputBuf>>this.inputBits-t&65535>>16-t},_eatBits(t){(this.inputBits-=t)<0&&(this.inputBits=0)}},y}();class m extends c{constructor(t){super("JBIG2 error: "+t)}}var b=function(){function t(){}function e(t,e,r){this.data=t,this.start=e,this.end=r}function r(t,e,r){var i=t.getContexts(e),n=1;function s(t){for(var e=0,s=0;s<t;s++){var o=r.readBit(i,n);n=n<256?n<<1|o:511&(n<<1|o)|256,e=e<<1|o}return e>>>0}var o=s(1),a=s(1)?s(1)?s(1)?s(1)?s(1)?s(32)+4436:s(12)+340:s(8)+84:s(6)+20:s(4)+4:s(2);return 0===o?a:a>0?-a:null}function i(t,e,r){for(var i=t.getContexts("IAID"),n=1,s=0;s<r;s++){var o=e.readBit(i,n);n=n<<1|o}return r<31?n&(1<<r)-1:2147483647&n}t.prototype={getContexts(t){return t in this?this[t]:this[t]=new Int8Array(65536)}},e.prototype={get decoder(){var t=new p(this.data,this.start,this.end);return a(this,"decoder",t)},get contextCache(){var e=new t;return a(this,"contextCache",e)}};var n=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],s=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],o=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],c=[39717,1941,229,405],f=[32,8];function b(t,e,r){var i,n,s,o,a,c,u,l=r.decoder,d=r.contextCache.getContexts("GB"),h=[],f=31735;for(n=0;n<e;n++)for(a=h[n]=new Uint8Array(t),c=n<1?a:h[n-1],u=n<2?a:h[n-2],i=u[0]<<13|u[1]<<12|u[2]<<11|c[0]<<7|c[1]<<6|c[2]<<5|c[3]<<4,s=0;s<t;s++)a[s]=o=l.readBit(d,i),i=(i&f)<<1|(s+3<t?u[s+3]<<11:0)|(s+4<t?c[s+4]<<4:0)|o;return h}function y(t,e,r,i,n,o,a,u){if(t){const t=new j(u.data,u.start,u.end);return X(t,e,r,!1)}if(0===i&&!o&&!n&&4===a.length&&3===a[0].x&&-1===a[0].y&&-3===a[1].x&&-1===a[1].y&&2===a[2].x&&-2===a[2].y&&-2===a[3].x&&-2===a[3].y)return b(e,r,u);var l=!!o,d=s[i].concat(a);d.sort((function(t,e){return t.y-e.y||t.x-e.x}));var h,f,p=d.length,g=new Int8Array(p),m=new Int8Array(p),y=[],v=0,S=0,w=0,A=0;for(f=0;f<p;f++)g[f]=d[f].x,m[f]=d[f].y,S=Math.min(S,d[f].x),w=Math.max(w,d[f].x),A=Math.min(A,d[f].y),f<p-1&&d[f].y===d[f+1].y&&d[f].x===d[f+1].x-1?v|=1<<p-1-f:y.push(f);var E=y.length,C=new Int8Array(E),x=new Int8Array(E),I=new Uint16Array(E);for(h=0;h<E;h++)f=y[h],C[h]=d[f].x,x[h]=d[f].y,I[h]=1<<p-1-f;for(var T,_,P,F,D,R=-S,N=-A,O=e-w,B=c[i],k=new Uint8Array(e),M=[],H=u.decoder,K=u.contextCache.getContexts("GB"),L=0,V=0,U=0;U<r;U++){if(n){var q=H.readBit(K,B);if(L^=q,L){M.push(k);continue}}for(k=new Uint8Array(k),M.push(k),T=0;T<e;T++)if(l&&o[U][T])k[T]=0;else{if(T>=R&&T<O&&U>=N)for(V=V<<1&v,f=0;f<E;f++)_=U+x[f],P=T+C[f],F=M[_][P],F&&(F=I[f],V|=F);else for(V=0,D=p-1,f=0;f<p;f++,D--)P=T+g[f],P>=0&&P<e&&(_=U+m[f],_>=0&&(F=M[_][P],F&&(V|=F<<D)));var z=H.readBit(K,V);k[T]=z}}return M}function v(t,e,r,i,n,s,a,c,u){var l=o[r].coding;0===r&&(l=l.concat([c[0]]));var d,h=l.length,p=new Int32Array(h),g=new Int32Array(h);for(d=0;d<h;d++)p[d]=l[d].x,g[d]=l[d].y;var b=o[r].reference;0===r&&(b=b.concat([c[1]]));var y=b.length,v=new Int32Array(y),S=new Int32Array(y);for(d=0;d<y;d++)v[d]=b[d].x,S[d]=b[d].y;for(var w=i[0].length,A=i.length,E=f[r],C=[],x=u.decoder,I=u.contextCache.getContexts("GR"),T=0,_=0;_<e;_++){if(a){var P=x.readBit(I,E);if(T^=P,T)throw new m("prediction is not supported")}var F=new Uint8Array(t);C.push(F);for(var D=0;D<t;D++){var R,N,O=0;for(d=0;d<h;d++)R=_+g[d],N=D+p[d],R<0||N<0||N>=t?O<<=1:O=O<<1|C[R][N];for(d=0;d<y;d++)R=_+S[d]-s,N=D+v[d]-n,R<0||R>=A||N<0||N>=w?O<<=1:O=O<<1|i[R][N];var B=x.readBit(I,O);F[D]=B}}return C}function S(t,e,n,s,o,a,c,l,d,h,f,p){if(t&&e)throw new m("symbol refinement with Huffman is not supported");var g=[],b=0,S=u(n.length+s),A=f.decoder,E=f.contextCache;let C,x;t&&(C=H(1),x=[],S=Math.max(S,1));while(g.length<s){var I=t?a.tableDeltaHeight.decode(p):r(E,"IADH",A);b+=I;let s=0,o=0;const u=t?x.length:0;while(1){var T,_=t?a.tableDeltaWidth.decode(p):r(E,"IADW",A);if(null===_)break;if(s+=_,o+=s,e){var P=r(E,"IAAI",A);if(P>1)T=w(t,e,s,b,0,P,1,n.concat(g),S,0,0,1,0,a,d,h,f,0,p);else{var F=i(E,A,S),D=r(E,"IARDX",A),R=r(E,"IARDY",A),N=F<n.length?n[F]:g[F-n.length];T=v(s,b,d,N,D,R,!1,h,f)}g.push(T)}else t?x.push(s):(T=y(!1,s,b,c,!1,null,l,f),g.push(T))}if(t&&!e){const t=a.tableBitmapSize.decode(p);let e;if(p.byteAlign(),0===t)e=U(p,o,b);else{const r=p.end,i=p.position+t;p.end=i,e=X(p,o,b,!1),p.end=r,p.position=i}const r=x.length;if(u===r-1)g.push(e);else{let t,i,n,s,o,a=0;for(t=u;t<r;t++){for(s=x[t],n=a+s,o=[],i=0;i<b;i++)o.push(e[i].subarray(a,n));g.push(o),a=n}}}}var O=[],B=[],k=!1,M=n.length+s;while(B.length<M){var j=t?C.decode(p):r(E,"IAEX",A);while(j--)B.push(k);k=!k}for(var K=0,L=n.length;K<L;K++)B[K]&&O.push(n[K]);for(var V=0;V<s;K++,V++)B[K]&&O.push(g[V]);return O}function w(t,e,n,s,o,a,c,u,l,d,h,f,p,g,b,y,S,w,A){if(t&&e)throw new m("refinement with Huffman is not supported");var E,C,x=[];for(E=0;E<s;E++){if(C=new Uint8Array(n),o)for(var I=0;I<n;I++)C[I]=o;x.push(C)}var T=S.decoder,_=S.contextCache,P=t?-g.tableDeltaT.decode(A):-r(_,"IADT",T),F=0;E=0;while(E<a){var D=t?g.tableDeltaT.decode(A):r(_,"IADT",T);P+=D;var R=t?g.tableFirstS.decode(A):r(_,"IAFS",T);F+=R;var N=F;do{let s=0;c>1&&(s=t?A.readBits(w):r(_,"IAIT",T));var O=c*P+s,B=t?g.symbolIDTable.decode(A):i(_,T,l),k=e&&(t?A.readBit():r(_,"IARI",T)),M=u[B],H=M[0].length,j=M.length;if(k){var K=r(_,"IARDW",T),L=r(_,"IARDH",T),V=r(_,"IARDX",T),U=r(_,"IARDY",T);H+=K,j+=L,M=v(H,j,b,M,(K>>1)+V,(L>>1)+U,!1,y,S)}var X,q,z,W=O-(1&f?0:j-1),G=N-(2&f?H-1:0);if(d){for(X=0;X<j;X++)if(C=x[G+X],C){z=M[X];var $=Math.min(n-W,H);switch(p){case 0:for(q=0;q<$;q++)C[W+q]|=z[q];break;case 2:for(q=0;q<$;q++)C[W+q]^=z[q];break;default:throw new m(`operator ${p} is not supported`)}}N+=j-1}else{for(q=0;q<j;q++)if(C=x[W+q],C)switch(z=M[q],p){case 0:for(X=0;X<H;X++)C[G+X]|=z[X];break;case 2:for(X=0;X<H;X++)C[G+X]^=z[X];break;default:throw new m(`operator ${p} is not supported`)}N+=H-1}E++;var Y=t?g.tableDeltaS.decode(A):r(_,"IADS",T);if(null===Y)break;N+=Y+h}while(1)}return x}function A(t,e,r,i,n,s){const o=[];t||(o.push({x:-e,y:0}),0===n&&(o.push({x:-3,y:-1}),o.push({x:2,y:-2}),o.push({x:-2,y:-2})));const a=(i+1)*e,c=y(t,a,r,n,!1,null,o,s),u=[];for(let l=0;l<=i;l++){const t=[],i=e*l,n=i+e;for(let e=0;e<r;e++)t.push(c[e].subarray(i,n));u.push(t)}return u}function E(t,e,r,i,n,s,o,a,c,l,d,h,f,p,g){const b=null;if(o)throw new m("skip is not supported");if(0!==a)throw new m("operator "+a+" is not supported in halftone region");const v=[];let S,w,A;for(S=0;S<n;S++){if(A=new Uint8Array(i),s)for(w=0;w<i;w++)A[w]=s;v.push(A)}const E=e.length,C=e[0],x=C[0].length,I=C.length,T=u(E),_=[];t||(_.push({x:r<=1?3:2,y:-1}),0===r&&(_.push({x:-3,y:-1}),_.push({x:2,y:-2}),_.push({x:-2,y:-2})));const P=[];let F,D,R,N,O,B,k,M,H,K,L;for(t&&(F=new j(g.data,g.start,g.end)),S=T-1;S>=0;S--)D=t?X(F,c,l,!0):y(!1,c,l,r,!1,b,_,g),P[S]=D;for(R=0;R<l;R++)for(N=0;N<c;N++){for(O=0,B=0,w=T-1;w>=0;w--)O=P[w][R][N]^O,B|=O<<w;if(k=e[B],M=d+R*p+N*f>>8,H=h+R*f-N*p>>8,M>=0&&M+x<=i&&H>=0&&H+I<=n)for(S=0;S<I;S++)for(L=v[H+S],K=k[S],w=0;w<x;w++)L[M+w]|=K[w];else{let t,e;for(S=0;S<I;S++)if(e=H+S,!(e<0||e>=n))for(L=v[e],K=k[S],w=0;w<x;w++)t=M+w,t>=0&&t<i&&(L[t]|=K[w])}}return v}function C(t,e){var r={};r.number=h(t,e);var i=t[e+4],s=63&i;if(!n[s])throw new m("invalid segment type: "+s);r.type=s,r.typeName=n[s],r.deferredNonRetain=!!(128&i);var o=!!(64&i),a=t[e+5],c=a>>5&7,u=[31&a],l=e+6;if(7===a){c=536870911&h(t,l-1),l+=3;var f=c+7>>3;u[0]=t[l++];while(--f>0)u.push(t[l++])}else if(5===a||6===a)throw new m("invalid referred-to flags");r.retainBits=u;let p=4;r.number<=256?p=1:r.number<=65536&&(p=2);var g,b,y=[];for(g=0;g<c;g++){let e;e=1===p?t[l]:2===p?d(t,l):h(t,l),y.push(e),l+=p}if(r.referredTo=y,o?(r.pageAssociation=h(t,l),l+=4):r.pageAssociation=t[l++],r.length=h(t,l),l+=4,4294967295===r.length){if(38!==s)throw new m("invalid unknown segment length");var v=I(t,l),S=t[l+T],w=!!(1&S),A=6,E=new Uint8Array(A);for(w||(E[0]=255,E[1]=172),E[2]=v.height>>>24&255,E[3]=v.height>>16&255,E[4]=v.height>>8&255,E[5]=255&v.height,g=l,b=t.length;g<b;g++){var C=0;while(C<A&&E[C]===t[g+C])C++;if(C===A){r.length=g+A;break}}if(4294967295===r.length)throw new m("segment end was not found")}return r.headerEnd=l,r}function x(t,e,r,i){var n=[],s=r;while(s<i){var o=C(e,s);s=o.headerEnd;var a={header:o,data:e};if(t.randomAccess||(a.start=s,s+=o.length,a.end=s),n.push(a),51===o.type)break}if(t.randomAccess)for(var c=0,u=n.length;c<u;c++)n[c].start=s,s+=n[c].header.length,n[c].end=s;return n}function I(t,e){return{width:h(t,e),height:h(t,e+4),x:h(t,e+8),y:h(t,e+12),combinationOperator:7&t[e+16]}}var T=17;function _(t,e){var r,i,n,s,o=t.header,a=t.data,c=t.start,u=t.end;switch(o.type){case 0:var f={},p=d(a,c);if(f.huffman=!!(1&p),f.refinement=!!(2&p),f.huffmanDHSelector=p>>2&3,f.huffmanDWSelector=p>>4&3,f.bitmapSizeSelector=p>>6&1,f.aggregationInstancesSelector=p>>7&1,f.bitmapCodingContextUsed=!!(256&p),f.bitmapCodingContextRetained=!!(512&p),f.template=p>>10&3,f.refinementTemplate=p>>12&1,c+=2,!f.huffman){for(s=0===f.template?4:1,i=[],n=0;n<s;n++)i.push({x:l(a,c),y:l(a,c+1)}),c+=2;f.at=i}if(f.refinement&&!f.refinementTemplate){for(i=[],n=0;n<2;n++)i.push({x:l(a,c),y:l(a,c+1)}),c+=2;f.refinementAt=i}f.numberOfExportedSymbols=h(a,c),c+=4,f.numberOfNewSymbols=h(a,c),c+=4,r=[f,o.number,o.referredTo,a,c,u];break;case 6:case 7:var g={};g.info=I(a,c),c+=T;var b=d(a,c);if(c+=2,g.huffman=!!(1&b),g.refinement=!!(2&b),g.logStripSize=b>>2&3,g.stripSize=1<<g.logStripSize,g.referenceCorner=b>>4&3,g.transposed=!!(64&b),g.combinationOperator=b>>7&3,g.defaultPixelValue=b>>9&1,g.dsOffset=b<<17>>27,g.refinementTemplate=b>>15&1,g.huffman){var y=d(a,c);c+=2,g.huffmanFS=3&y,g.huffmanDS=y>>2&3,g.huffmanDT=y>>4&3,g.huffmanRefinementDW=y>>6&3,g.huffmanRefinementDH=y>>8&3,g.huffmanRefinementDX=y>>10&3,g.huffmanRefinementDY=y>>12&3,g.huffmanRefinementSizeSelector=!!(16384&y)}if(g.refinement&&!g.refinementTemplate){for(i=[],n=0;n<2;n++)i.push({x:l(a,c),y:l(a,c+1)}),c+=2;g.refinementAt=i}g.numberOfSymbolInstances=h(a,c),c+=4,r=[g,o.referredTo,a,c,u];break;case 16:const t={},e=a[c++];t.mmr=!!(1&e),t.template=e>>1&3,t.patternWidth=a[c++],t.patternHeight=a[c++],t.maxPatternIndex=h(a,c),c+=4,r=[t,o.number,a,c,u];break;case 22:case 23:const E={};E.info=I(a,c),c+=T;const C=a[c++];E.mmr=!!(1&C),E.template=C>>1&3,E.enableSkip=!!(8&C),E.combinationOperator=C>>4&7,E.defaultPixelValue=C>>7&1,E.gridWidth=h(a,c),c+=4,E.gridHeight=h(a,c),c+=4,E.gridOffsetX=4294967295&h(a,c),c+=4,E.gridOffsetY=4294967295&h(a,c),c+=4,E.gridVectorX=d(a,c),c+=2,E.gridVectorY=d(a,c),c+=2,r=[E,o.referredTo,a,c,u];break;case 38:case 39:var v={};v.info=I(a,c),c+=T;var S=a[c++];if(v.mmr=!!(1&S),v.template=S>>1&3,v.prediction=!!(8&S),!v.mmr){for(s=0===v.template?4:1,i=[],n=0;n<s;n++)i.push({x:l(a,c),y:l(a,c+1)}),c+=2;v.at=i}r=[v,a,c,u];break;case 48:var w={width:h(a,c),height:h(a,c+4),resolutionX:h(a,c+8),resolutionY:h(a,c+12)};4294967295===w.height&&delete w.height;var A=a[c+16];d(a,c+17),w.lossless=!!(1&A),w.refinement=!!(2&A),w.defaultPixelValue=A>>2&1,w.combinationOperator=A>>3&3,w.requiresBuffer=!!(32&A),w.combinationOperatorOverride=!!(64&A),r=[w];break;case 49:break;case 50:break;case 51:break;case 53:r=[o.number,a,c,u];break;case 62:break;default:throw new m(`segment type ${o.typeName}(${o.type}) is not implemented`)}var E="on"+o.typeName;E in e&&e[E].apply(e,r)}function P(t,e){for(var r=0,i=t.length;r<i;r++)_(t[r],e)}function F(t){for(var e=new R,r=0,i=t.length;r<i;r++){var n=t[r],s=x({},n.data,n.start,n.end);P(s,e)}return e.buffer}function D(t){const e=t.length;let r=0;if(151!==t[r]||74!==t[r+1]||66!==t[r+2]||50!==t[r+3]||13!==t[r+4]||10!==t[r+5]||26!==t[r+6]||10!==t[r+7])throw new m("parseJbig2 - invalid header.");const i=Object.create(null);r+=8;const n=t[r++];i.randomAccess=!(1&n),2&n||(i.numberOfPages=h(t,r),r+=4);const s=x(i,t,r,e),o=new R;P(s,o);const{width:a,height:c}=o.currentPageInfo,u=o.buffer,l=new Uint8ClampedArray(a*c);let d=0,f=0;for(let h=0;h<c;h++){let t,e=0;for(let r=0;r<a;r++)e||(e=128,t=u[f++]),l[d++]=t&e?0:255,e>>=1}return{imgData:l,width:a,height:c}}function R(){}function N(t){2===t.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=t[0],this.rangeLength=0,this.prefixCode=t[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=t[0],this.prefixLength=t[1],this.rangeLength=t[2],this.prefixCode=t[3],this.isLowerRange="lower"===t[4])}function O(t){this.children=[],t?(this.isLeaf=!0,this.rangeLength=t.rangeLength,this.rangeLow=t.rangeLow,this.isLowerRange=t.isLowerRange,this.isOOB=t.isOOB):this.isLeaf=!1}function B(t,e){e||this.assignPrefixCodes(t),this.rootNode=new O(null);for(let r=0,i=t.length;r<i;r++){const e=t[r];e.prefixLength>0&&this.rootNode.buildTree(e,e.prefixLength-1)}}function k(t,e,r){const i=t[e],n=4294967295&h(t,e+1),s=4294967295&h(t,e+5),o=new j(t,e+9,r),a=1+(i>>1&7),c=1+(i>>4&7),u=[];let l,d,f=n;do{l=o.readBits(a),d=o.readBits(c),u.push(new N([f,l,d,0])),f+=1<<d}while(f<s);return l=o.readBits(a),u.push(new N([n-1,l,32,0,"lower"])),l=o.readBits(a),u.push(new N([s,l,32,0])),1&i&&(l=o.readBits(a),u.push(new N([l,0]))),new B(u,!1)}R.prototype={onPageInformation:function(t){this.currentPageInfo=t;var e=t.width+7>>3,r=new Uint8ClampedArray(e*t.height);if(t.defaultPixelValue)for(var i=0,n=r.length;i<n;i++)r[i]=255;this.buffer=r},drawBitmap:function(t,e){var r,i,n,s,o=this.currentPageInfo,a=t.width,c=t.height,u=o.width+7>>3,l=o.combinationOperatorOverride?t.combinationOperator:o.combinationOperator,d=this.buffer,h=128>>(7&t.x),f=t.y*u+(t.x>>3);switch(l){case 0:for(r=0;r<c;r++){for(n=h,s=f,i=0;i<a;i++)e[r][i]&&(d[s]|=n),n>>=1,n||(n=128,s++);f+=u}break;case 2:for(r=0;r<c;r++){for(n=h,s=f,i=0;i<a;i++)e[r][i]&&(d[s]^=n),n>>=1,n||(n=128,s++);f+=u}break;default:throw new m(`operator ${l} is not supported`)}},onImmediateGenericRegion:function(t,r,i,n){var s=t.info,o=new e(r,i,n),a=y(t.mmr,s.width,s.height,t.template,t.prediction,null,t.at,o);this.drawBitmap(s,a)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(t,r,i,n,s,o){let a,c;t.huffman&&(a=V(t,i,this.customTables),c=new j(n,s,o));var u=this.symbols;u||(this.symbols=u={});for(var l=[],d=0,h=i.length;d<h;d++){const t=u[i[d]];t&&(l=l.concat(t))}var f=new e(n,s,o);u[r]=S(t.huffman,t.refinement,l,t.numberOfNewSymbols,t.numberOfExportedSymbols,a,t.template,t.at,t.refinementTemplate,t.refinementAt,f,c)},onImmediateTextRegion:function(t,r,i,n,s){var o=t.info;let a,c;for(var l=this.symbols,d=[],h=0,f=r.length;h<f;h++){const t=l[r[h]];t&&(d=d.concat(t))}var p=u(d.length);t.huffman&&(c=new j(i,n,s),a=L(t,r,this.customTables,d.length,c));var g=new e(i,n,s),m=w(t.huffman,t.refinement,o.width,o.height,t.defaultPixelValue,t.num